First time here? Check out the FAQ!
answered 2017-02-24 05:27:38 -0600
You can use mask :
Mat im = imread("f:/lib/opencv/samples/data/lena.jpg", IMREAD_GRAYSCALE); Mat mask = im>0; double minc[1], maxc[1]; minMaxLoc(im, minc, maxc,NULL,NULL,mask); cout<<minc[0];