Ask Your Question

Revision history [back]

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];