# cv::minMaxIdx in Java

**URL:** <https://forum.opencv.org/t/cv-minmaxidx-in-java/14015>\
**Category:** Android/Java\
**Created:** [July 25, 2023, 10:11am UTC](https://forum.opencv.org/t/cv-minmaxidx-in-java/14015 "2023-07-25T10:11:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![trausch](https://avatars.discourse-cdn.com/v4/letter/t/e68b1a/32.png) [@trausch](https://forum.opencv.org/u/trausch)\
**Post date:** [July 25, 2023, 10:11am UTC](https://forum.opencv.org/t/cv-minmaxidx-in-java/14015/1 "2023-07-25T10:11:00Z")

</div>

In version 4.7.0 (Java) there is a cv::minMaxLoc function, but not a cv::minMaxIdx function. But I need this.

Is it now under 4.8.0?

Can I still simply use this function under Java?

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [July 25, 2023, 11:12am UTC](https://forum.opencv.org/t/cv-minmaxidx-in-java/14015/2 "2023-07-25T11:12:03Z")

</div>

[https://docs.opencv.org/4.x/javadoc/org/opencv/core/Core.MinMaxLocResult.html](https://docs.opencv.org/4.x/javadoc/org/opencv/core/Core.MinMaxLocResult.html)

---

<div class="post-metadata">

**Author:** ![trausch](https://avatars.discourse-cdn.com/v4/letter/t/e68b1a/32.png) [@trausch](https://forum.opencv.org/u/trausch)\
**Post date:** [July 25, 2023, 11:41am UTC](https://forum.opencv.org/t/cv-minmaxidx-in-java/14015/3 "2023-07-25T11:41:14Z")

</div>

This is of no use to me since I don’t need the result, but the column/row it’s in. For this I need the \*Idx function, which is not passed on to Java via JNI.

---

<div class="post-metadata">

**Author:** ![trausch](https://avatars.discourse-cdn.com/v4/letter/t/e68b1a/32.png) [@trausch](https://forum.opencv.org/u/trausch)\
**Post date:** [July 25, 2023, 11:49am UTC](https://forum.opencv.org/t/cv-minmaxidx-in-java/14015/4 "2023-07-25T11:49:04Z")

</div>

Sorry, you are right. Not only the values are returned, but also the positions. Since I use Points to process pixels in my image, I didn’t expect these to be the coordinates in the matrix.

Thanks for the hint.
