How to get the max value from n dimensional array in OpenCV

后端 未结 2 1829
没有蜡笔的小新
没有蜡笔的小新 2021-02-10 15:02

I am trying to get max value from a 3-d Mat, but minmaxIdx and mixmaxloc both failed to do this.

int sz[] = {BIN, BIN, BIN};
Mat accumarray(3, sz, CV_8U, Scalar         


        
2条回答
  •  再見小時候
    2021-02-10 15:26

    Use Mat() instead of NULL for Mask or you will vioulate an assertion Mask.empty()

    Mat m;
    double min, max;
    int minInd, maxInd;
    cv::minMaxIdx(m, &min, &max, &minInd, &maxInd, Mat());
    

提交回复
热议问题