opencv/modules
Maksim Shabunin 6350bfbf79
Merge pull request #25564 from mshabunin:cleanup-imgproc-2
imgproc: C-API cleanup, drawContours refactor #25564

Changes:
* moved several macros from types_c.h to cvdef.h (assuming we will continue using them)
* removed some cases of C-API usage in _imgproc_ module (`CV_TERMCRIT_*` and `CV_CMP_*`)
* refactored `drawContours` to use C++ API instead of calling `cvDrawContours` + test for filled contours with holes (case with non-filled contours is simpler and is covered in some other tests)

#### Note:
There is one case where old drawContours behavior doesn't match the new one - when `contourIdx == -1` (means "draw all contours") and `maxLevel == 0` (means draw only selected contours, but not what is inside).

From the docs:
> **contourIdx**	Parameter indicating a contour to draw. If it is negative, all the contours are drawn.

> **maxLevel**	Maximal level for drawn contours. If it is 0, only the specified contour is drawn. If it is 1, the function draws the contour(s) and all the nested contours. If it is 2, the function draws the contours, all the nested contours, all the nested-to-nested contours, and so on. This parameter is only taken into account when there is hierarchy available.


Old behavior - only one first contour is drawn:
![actual_screenshot_08 05 2024](https://github.com/opencv/opencv/assets/3304494/d0ae1d64-ddad-46bb-8acc-6f696874f71b)
a
New behavior (also expected by the test) - all contours are drawn:
![expected_screenshot_08 05 2024](https://github.com/opencv/opencv/assets/3304494/57ccd980-9dde-4006-90ee-19d6ce76912a)
2024-05-17 15:01:05 +03:00
..
calib3d Merge pull request #25308 from dkurt:not_normalized_findHomography 2024-04-29 14:35:14 +03:00
core Merge pull request #25564 from mshabunin:cleanup-imgproc-2 2024-05-17 15:01:05 +03:00
dnn Skip Test_Caffe_layers.Concat with Vulkan due to sporadic failures. 2024-05-17 11:54:25 +03:00
features2d Merge pull request #25424 from mshabunin:fix-features2d-test 2024-04-17 14:19:05 +03:00
flann Merge pull request #25024 from vrabaud:neon 2024-02-20 11:29:23 +03:00
gapi Disable more streaming test in G-API due to instability. 2024-05-15 15:41:23 +03:00
highgui Merge pull request #25525 from sturkmen72:png-spng-test 2024-05-17 11:37:12 +03:00
imgcodecs Update imgcodecs tests 2024-05-15 22:24:21 +03:00
imgproc Merge pull request #25564 from mshabunin:cleanup-imgproc-2 2024-05-17 15:01:05 +03:00
java doc: fix formulas in JavaDoc broken after Doxygen upgrade 2024-03-11 23:47:23 +03:00
js Merge pull request #25084 from EDVTAZ:emscripten-3.1.54-compat 2024-02-26 10:30:56 +03:00
ml Partially back-port #25075 to 4.x 2024-03-05 12:15:39 +03:00
objc Merge pull request #24136 from komakai:visionos_support 2023-12-20 15:35:10 +03:00
objdetect Merge pull request #25378 from AleksandrPanov:move_charuco_tutorial 2024-04-16 12:14:33 +03:00
photo Merge pull request #25402 from Linaname:4.x 2024-04-17 11:26:56 +03:00
python python: adapt test to NumPy 2.x 2024-05-03 20:10:41 +03:00
stitching Partially back-port #25075 to 4.x 2024-03-05 12:15:39 +03:00
ts Partially back-port #25075 to 4.x 2024-03-05 12:15:39 +03:00
video Merge pull request #25092 from klatism:libjpeg-upgrade 2024-03-28 17:03:05 +03:00
videoio videoio: decreased log level for failed backends in VideoCapture and VideoWriter open 2024-05-06 20:48:17 +03:00
world cmake: use /INCREMENTAL:NO with MSVS 2015 2023-12-07 19:46:27 +00:00