You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Moreover, the opencv version of MinMaxIdx returns the indexs in the form of an array of size corresponding to the dimension of the input mat. Here the index is simply a scalar. Does it mean it is a linearized version of the nd-index?
The text was updated successfully, but these errors were encountered:
Nice spot on the typo! Besides the name of the return type, it also seems that an array should be returned with mat.dims elements. This array should always contain at least two elements as per the OpenCV spec:
When minIdx is not NULL, it must have at least 2 elements (as well as maxIdx), even if src is a single-row or single-column matrix. In OpenCV (following MATLAB) each array has at least 2 dimensions, i.e. single-column matrix is Mx1 matrix (and therefore minIdx/maxIdx will be (i1,0)/(i2,0)) and single-row matrix is 1xN matrix (and therefore minIdx/maxIdx will be (0,j1)/(0,j2)).
The problem seems to me a typo in the code.
In stead of returning
I guess it should be returning
Moreover, the opencv version of MinMaxIdx returns the indexs in the form of an array of size corresponding to the dimension of the input mat. Here the index is simply a scalar. Does it mean it is a linearized version of the nd-index?
The text was updated successfully, but these errors were encountered: