Files
opencv-MIRROR/modules/core/test
Mohammad Sohail Shaikh 56d41f7166 core: return early for empty input in minMaxIdx (#30897)
* core: do not pass empty input to HAL minMaxIdx

cv::minMaxLoc and cv::minMaxIdx on an empty CV_8U Mat crashed with
SIGSEGV on ARM64 builds that use KleidiCV: the HAL min/max location
wrapper reads src_data[offset] when a min or max value is requested, and
src_data is NULL for an empty Mat. The generic code already returns zero
values and -1 indices for empty input, so skip the HAL calls then.

* core: fix comment on empty input in minMaxIdx

* core: return early for empty input in minMaxIdx

Check the input for emptiness at the top of cv::minMaxIdx and return zero
values and -1 indices, instead of skipping only the HAL calls. This also
covers a default constructed Mat (dims == 0) and empty UMat. Add a test
for cv::Mat().
2026-11-20 12:54:42 +05:30
..
2026-09-11 15:33:26 +03:00
2018-02-12 07:09:43 -05:00
2025-12-25 15:45:08 +06:00
2026-01-04 15:12:59 +01:00
2018-02-03 19:39:47 +00:00