OpenCV 밝기(색상) 분할, cv2.split()


OpenCV 밝기(색상) 분할, cv2.split()

코드 import cv2 src = cv2.imread('c:/data/lena.jpg') dst = cv2.split(src) # 분할 print(type(dst)) print(type(dst[0])) # cv2 출력 # cv2.imshow('blue', dst[0]) # cv2.imshow('green', dst[1]) # cv2.imshow('red', dst[2]) # cv2.waitKey() # cv2.destroyAllWindows() # plt 출력 fig, ax = plt.subplots(2, 2, figsize = (10, 10), sharey=True) # 2 x 2 서브플롯을 (10, 10)의 크기로 생성 fig.canvas.manager.set_window_title('plt') # 창 이름 # 왼쪽 상단 ax[0][0].axis('off') ax[0][0].imshow(dst[2], aspect = 'auto', cmap='gray') # r # 오른쪽 상단 ...



원문링크 : OpenCV 밝기(색상) 분할, cv2.split()