error: (-5) image is empty or has incorrect depth (!=CV_8U) in function cv::SIFT::operator ()
问题 I am trying to run basic script found on a tutorial for object detection. I have tried everything I could find on web but failed to solve it. Already tried different suggested methods to convert image to CV_U8. Also used 8 bit images as input, still without progress. Here is the code: import cv2 import numpy as np MIN_MATCH_COUNT=30 detector=cv2.SIFT() FLANN_INDEX_KDITREE=0 flannParam=dict(algorithm=FLANN_INDEX_KDITREE,tree=5) flann=cv2.FlannBasedMatcher(flannParam,{}) trainImg=cv2.imread(