Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

yes, unfortunately this function is missing from the java interface.

"Is there any technical reason for minMaxIdx to be excluded"

yes. the wrapper mechanism can't handle raw c++ pointers, thus it omits any function like that.

"minMaxLoc is available"

yes, there was a manual workaround made special for this (it's quite a kludge, imho)

"but this function is limited to 2-dimensionnal arrays."

you still can get the index from the Point, like int idx = p.x + p.y * img.rows;

yes, unfortunately this function is missing from the java interface.

"Is there any technical reason for minMaxIdx to be excluded"

yes. the wrapper mechanism can't handle raw c++ pointers, thus it omits any function like that.

"minMaxLoc is available"

yes, there was a manual workaround made special for this (it's quite a kludge, imho)

"but this function is limited to 2-dimensionnal arrays."

you still can get the index from the Point, like like:

Core.MinMaxLocResult mm = Core.minMaxLoc(img);
Point p = mm.maxLoc;
int idx = p.x + p.y * img.rows;img.rows;

yes, unfortunately this function is missing from the java interface.

"Is there any technical reason for minMaxIdx to be excluded"

yes. the wrapper mechanism can't handle raw c++ pointers, thus it omits any function like that.

"minMaxLoc is available"

yes, there was a manual workaround made special for this (it's quite a kludge, imho)

"but this function is limited to 2-dimensionnal arrays."

you still can get the index from the Point, like:

Core.MinMaxLocResult mm = Core.minMaxLoc(img);
Point p = mm.maxLoc;
int idx = p.x + p.y * img.rows;
img.cols;