opencv/modules
Maxim Smolskiy 615ceefd0c
Merge pull request #27582 from MaximSmolskiy:take_into_account_overflow_for_connected_components
Take into account overflow for connected components #27582

### Pull Request Readiness Checklist

Fix #27568 

The problem was caused by a label type overflow (`debug_example.npy` contains `92103` labels, that doesn't fit in the `CV_16U` (`unsigned short`) type). If pass `CV_32S` instead of `CV_16U` as `ltype` - everything will be calculated successfully

Added overflow detection to throw exception with a clear error message instead of strange segfault/assertion error

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
2025-07-29 13:10:01 +03:00
..
calib3d Reduce the size of the checkerboard_radon.png image in the doc. Add references to the perspective camera model figure for solvePnP and related functions for better explanation. 2025-06-24 03:55:14 +02:00
core Merge pull request #27587 from fengyuentau:4x/core/filestorage_json_support_backslash 2025-07-29 12:04:55 +03:00
dnn Replace deprecated proto2::FieldDescriptor::is_optional 2025-07-15 09:17:57 +02:00
features2d Enable Java bindings for SimpleBlobDetector::blobColor 2025-04-20 15:57:41 +09:00
flann Fix float-conversion warnings in FLANN by using float literals 2025-06-17 09:59:44 +00:00
gapi Merge pull request #27549 from atamas19:tensor_naming_functionality 2025-07-22 17:09:39 +03:00
highgui Merge pull request #27416 from Kumataro:fix27413 2025-06-12 15:32:28 +03:00
imgcodecs Merge pull request #27589 from Kumataro:fix27588 2025-07-29 08:18:21 +03:00
imgproc Merge pull request #27582 from MaximSmolskiy:take_into_account_overflow_for_connected_components 2025-07-29 13:10:01 +03:00
java Merge pull request #24426 from dkurt:qrcode_eci_encoding 2025-06-19 10:12:15 +03:00
js js: remove deprecated DEMANGLE_SUPPORT option 2025-07-06 08:06:20 +09:00
ml Merge pull request #27338 from omahs:patch-1 2025-05-21 12:13:50 +03:00
objc feat: add conditional inclusion support to header parser 2025-05-19 10:11:52 +03:00
objdetect Fixed out-of-bound access issue in QR Encoder Java warappers. 2025-06-26 17:19:10 +03:00
photo Merge pull request #27396 from abhishek-gola:hdr_bug_fix 2025-06-05 09:02:58 +03:00
python fix: mark Feature2D.detectAndCompute mask as optional in Python type stubs 2025-07-14 21:35:58 -04:00
stitching Merge pull request #26754 from s-trinh:add_bibtex_direct_pdf_links 2025-01-27 10:28:38 +03:00
ts Merge pull request #27416 from Kumataro:fix27413 2025-06-12 15:32:28 +03:00
video Merge pull request #25027 from opencv-pushbot:gitee/alalek/tests_filter_debug 2025-03-21 10:22:17 +03:00
videoio Merge pull request #27453 from MELSunny:4.x 2025-07-18 11:19:58 +03:00
world cmake: use /INCREMENTAL:NO with MSVS 2015 2023-12-07 19:46:27 +00:00