openCV: Assertion failed
I am using opencv for image processing, while comparing images by using command compareHist i am getting the following error:
OpenCV Error: Assertion failed (H1.type() == H2.type() && H1.type() == CV_32F) in compareHist, file /home/alishba/opencv-2.4.9/modules/imgproc/src/histogram.cpp, line 1985 terminate called after throwing an instance of 'cv::Exception' what(): /home/alishba/opencv-2.4.9/modules/imgproc/src/histogram.cpp:1985: error: (-215) H1.type() == H2.type() && H1.type() == CV_32F in function compareHist Aborted (core dumped) |
So programming questions are probably not in this section (honestly, openCV has little to do with linux as it is multiplatform), but I did a little openCV work back in grad school, so lets go for it
We have nothing to work with here. What we need to see to be able to look into anything is your code, specifically related to how you call the function and initialize the arrays for Code:
double cv::compareHist( InputArray _H1, InputArray _H2, int method ) |
All times are GMT -5. The time now is 02:52 AM. |