Issue with compareHist function
When I calculating the chi-square distance between 2 histograms in Python 3.7.4 with OpenCV 4.1.2, I use the following code:
dis = cv2.compareHist(hist1, hist2, cv2.HISTCMP_CHISQR)
When I debugging this, there will be a warning which says 'Expected Ptr<cv::umat> for argument '%s'. It seems like the problem is on the 'method' arguement. And I also try to set the method arguement to 1, or method = 1, still the same problem. Can you talented people here help me figure this problem out, please. And I will be great thank to you guys, love you! Thank you very much!
can you show some more code ? what are hist1, hist2 ?
Snipped:
hist1 and hist2 generate by np.histogram funtion, inputs kmean of sift descripters of images.
what is e.g.
hist1.dtype
? (compareHist()
expects floats)