Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

cv::minMaxLoc argument problem

$
0
0
I'm trying to use cv::minMaxLoc to find minium and maximum values and points in a one-dimensional array but I can't compile the source. void main(void) { cv::Mat array1D = cv::Mat(1, 800, CV_32FC1, cv::Scalar(0)); double minVal; double maxVal; int minIdx; int maxIdx; // .... // putting an image projection to array1D and I can draw and view it's histogram // .... cv::minMaxLoc(array1D, &minVal, &maxVal, &minIdx, &maxIdx); } But I'm getting, `error C2665: 'cv::minMaxLoc' : none of the 2 overloads could convert all the argument type` when I change the `cv::minMaxLoc` line to `cv::minMaxLoc(array1D, &minVal, &maxVal);`, there is no error. I also tried casting the idx addresses with `(int *)` and also tried too `cv::minMaxLoc(array1d, &minVal, &maxVal, &minIdx, &maxIdx, cv::Mat())` and result is same.

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>