mirror of
https://github.com/opencv/opencv.git
synced 2026-12-02 13:16:32 -06:00
Problem For a 1D Mat, minMaxIdx writes only the first element of minIdx and maxIdx and leaves the second one unset, even though the docs require 2 elements. minMaxLoc hid this by forcing y = 0, which returns (-1, 0) instead of (-1, -1) when nothing is found. Fix ofs2idx now also sets idx[1] for a 1D Mat: 0 when a value is found, -1 when not. The y = 0 override in minMaxLoc is removed, so a 1D "not found" result matches 2D.