Is there a function in opencv, which can compute the minimum value of a 2d or 3d matrix along a specific dimension. And give me the index of the minimum value.
Minimizing in 1 dimension would mean, if I have a 3d matrix the result should be a 2d matrix, and if I have a 2d matrix than the result should be a 1d matrix(array) of indices where the min/max value is stored.
minMaxIdx and MinMaxLoc gives the global minimum index/value along all the dimensions.
cv::reduce will give you row or column wise minimum or maximum. But I don't think it will give you the index. A "find()" function is what lacks in OpenCV.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With