Using OpenCV 2.3.1. I am running cv::minMaxLoc() and it is returning the point (-1, -1) for both the minimum and maximum location, with 0 as the value for both. What does this mean?
Using OpenCV 2.3.1. I am running cv::minMaxLoc() and it is returning the point (-1,
Share
Below are the relevant sections of code for the minMaxLoc function:
Judging from the code flow it appears you have the case of
minidxequal to zero, which then setsdminval = dmaxval = 0. Also, within theofs2idxfunction, whenminidx(i.e.,ofsparameter inofs2idx) is equal to zero the logic sets the min and max points to (-1, -1) (i.e.,idx[i] = -1;). This might happen if your matrix has no elements. What is the size of the matrix you are trying to use?