def get_im_cv2(path):
img = cv2.imread(path,1)
resized = cv2.resize(img, (32, 32), cv2.INTER_LINEAR)
#cv2.startWindowThread("preview")
cv2.imshow("preview", resized)
key = cv2.waitKey(0)
if key == ord('t'):
cv2.destroyWindow("preview")
return resized
or
def get_im_cv2(path):
img = cv2.imread(path,1)
resized = cv2.resize(img, (32, 32), cv2.INTER_LINEAR)
#cv2.startWindowThread("preview")
cv2.imshow("preview", resized)
cv2.waitKey(0)
return resized
waitKey 는 반드시 써줘야 이미지가 나온다.
댓글 없음:
댓글 쓰기