OpenCV 버전 문제 cv2.split()
OpenCV 4.2 버전에서는 아래 예제의 print(type(dst)) 결과값이 list로 나옴 4.5 버전에서 print(type(dst))결과값이 tuple로 나옴 # 0411.py import cv2 src = cv2.imread('./data/lena.jpg') dst = cv2.split(src) #print(dst) print(type(dst)) print(type(dst[0])) # type(dst[1]), type(dst[2]) cv2.imshow('blue', dst[0]) cv2.imshow('green', dst[1]) cv2.imshow('red', dst[2]) cv2.waitKey() cv2.destroyAllWindows()
OpenCV
2023. 1. 30. 17:44