Ask Your Question

Revision history [back]

Use mask in minMaxLoc :

Mat mask=depth>0;
minMaxLoc( depth,&minX,&maxX,&pMin,&pMax,mask);