-
이미지에서 black border 제거하기컴퓨터 비젼(Computer Vision) 2021. 8. 2. 09:31
image = read_img(i) temp_image = image threshold = 0 rows = np.where(np.max(temp_image, 0) > threshold)[0] if rows.size: cols = np.where(np.max(temp_image, 1)>threshold)[0] image = image[cols[0]:cols[-1]+1, rows[0]:rows[-1]+1] else: image = image[:1, :1] return image
threshold를 통해 허용 가능한 pixel 조절 가능
'컴퓨터 비젼(Computer Vision)' 카테고리의 다른 글
Fast Interpolation (0) 2022.01.28 Conditional Random Field (0) 2021.12.08 의용 영상에서의 히스토그램 균일화 (1) (0) 2021.11.18 Tensorflow_io로 dicom 데이터 다루기 (0) 2021.08.09 3D Image Crop (0) 2021.08.08