OpenCV
OpenCV - 기초
import cv2 import matplotlib.pyplot as plt print(cv2.version.opencv_version) imagefile='./lena.jpg' img=cv2.imread(imagefile) print(img.shape) # (590(가로), 529(세로), 3)(채널 수 RGB(3))) img2=cv2.imread(imagefile,0) #흑백으로 열기 print(img2.shape) # (590, 529) cv2.startWindowThread() cv2.imshow('lena color',img) cv2.imshow('lena grayscale', img2) cv2.waitKey() cv2.destroyAllWindows() #폴더 이미지 확인 imagefile =..
2022. 11. 2. 16:05