Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I know this is a bit late, but this should solve the issue for me.

sift2 = cv2.DescriptorExtractor_create("SIFT")
bowDiction = cv2.BOWImgDescriptorExtractor(sift2, cv2.BFMatcher(cv2.NORM_L2))

I believe the problem is that sift is not only a descriptor extractor, but also a feature finder. So, sending this function only cv2.SURF() or cv2.SIFT() will not be the appropriate type. Send it the descriptor extractor portion of your favorite feature detector (replacing SIFT with SURF etc should work fine)

I know this is a bit late, but this should solve the issue for me.

sift2 = cv2.DescriptorExtractor_create("SIFT")
bowDiction = cv2.BOWImgDescriptorExtractor(sift2, cv2.BFMatcher(cv2.NORM_L2))

I believe the problem is that sift is not only a descriptor extractor, but also a feature finder. So, sending this function only cv2.SURF() or cv2.SIFT() will not be the appropriate type. Send it the descriptor extractor portion of your favorite feature detector (replacing SIFT with SURF etc should work fine)

NOTE: This is using opencv 2.4.11