opencv/modules/imgproc/src
Liane Lin 8a0ea789e7
Merge pull request #27149 from liane-lin:4.x
Fix #25696: Solved the problem in Subdiv2D, empty delaunay triangulation #27149

Detailed description

Expected behaviour:
Given 4 points, where no three points are collinear, the Delaunay Triangulation Algorithm should return 2 triangles.

Actual:
The algorithm returns zero triangles in this particular case.

Fix:
The radius of the circumcircle tends to infinity when the points are closer to form collinear points, so the problem occurs because the super-triangles are not large enough,
which then results in certain edges are not swapped. The proposed solution just increases the super triangle, duplicating the value of constant for example.

### Pull Request Readiness Checklist

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
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
2025-05-30 15:20:01 +03:00
..
opencl Merge pull request #26842 from chacha21:threshold_with_mask 2025-03-12 17:55:07 +03:00
_geom.h Backport C-API cleanup (imgproc) from 5.x 2023-01-16 23:29:50 +03:00
accum.cpp Deprecated convertTypeStr and made new variant that also takes the buffer size 2023-04-26 09:48:15 -04:00
accum.dispatch.cpp Merge pull request #23109 from seanm:misc-warnings 2023-10-06 13:33:21 +03:00
accum.simd.hpp Merge pull request #27343 from fengyuentau:4x/build/fix_more_warnings 2025-05-21 16:12:09 +03:00
approx.cpp Merge pull request #25607 from Fest1veNapkin:imgproc_approx_bounding_poly 2024-07-09 17:11:23 +03:00
bilateral_filter.dispatch.cpp Fixed bilateral filter's sigma color and sigma space issue 2025-05-14 14:22:05 +05:30
bilateral_filter.simd.hpp Clean up the Universal Intrinsic API. 2023-10-13 19:23:30 +08:00
blend.cpp Merge pull request #24058 from hanliutong:rewrite-imgporc 2023-09-14 20:37:46 +03:00
box_filter.dispatch.cpp Move OpenVX integrations to imgproc to OpenVX HAL 2025-02-15 09:55:37 +03:00
box_filter.simd.hpp Partially back-port #25075 to 4.x 2024-03-05 12:15:39 +03:00
canny.cpp Move OpenVX integrations to imgproc to OpenVX HAL 2025-02-15 09:55:37 +03:00
ccl_bolelli_forest_firstline.inc.hpp Merge pull request #19631 from prittt:sota-ccl 2021-02-27 17:27:24 +00:00
ccl_bolelli_forest_lastline.inc.hpp Merge pull request #19631 from prittt:sota-ccl 2021-02-27 17:27:24 +00:00
ccl_bolelli_forest_singleline.inc.hpp Merge pull request #19631 from prittt:sota-ccl 2021-02-27 17:27:24 +00:00
ccl_bolelli_forest.inc.hpp Merge pull request #19631 from prittt:sota-ccl 2021-02-27 17:27:24 +00:00
clahe.cpp Partially back-port #25075 to 4.x 2024-03-05 12:15:39 +03:00
color_hsv.dispatch.cpp Reworked HSV color conversion tables initialization for OpenCL branch. 2025-05-12 09:02:47 +03:00
color_hsv.simd.hpp Merge pull request #27337 from fengyuentau:4x/build/riscv/fix_warnings 2025-05-21 09:28:29 +03:00
color_lab.cpp Relax the loop condition to process the final batch. 2025-03-13 07:54:41 +00:00
color_rgb.dispatch.cpp OCL: fix incompatibility with Mali ruintime 2023-12-21 00:30:44 +03:00
color_rgb.simd.hpp Merge pull request #26071 from tingboliao:4.x 2024-09-03 07:56:37 +03:00
color_yuv.dispatch.cpp imgproc: restore multiplanar conversion functions in cv::hal namespace 2024-10-25 20:21:33 +03:00
color_yuv.simd.hpp Merge pull request #25616 from savuor:rv/yuv_docs 2024-05-25 13:12:03 +03:00
color.cpp fix FFmpeg wrapper build 2024-12-26 12:15:46 +00:00
color.hpp Merge pull request #25981 from Kumataro:fix25971 2024-08-09 14:22:02 +03:00
color.simd_helpers.hpp Merge pull request #25981 from Kumataro:fix25971 2024-08-09 14:22:02 +03:00
colormap.cpp Merge pull request #21645 from chacha21:applyColorMap_8UC1_optimized 2022-03-01 19:55:00 +03:00
connectedcomponents.cpp Partially back-port #25075 to 4.x 2024-03-05 12:15:39 +03:00
contours_approx.cpp Merge pull request #26834 from chacha21:findContours_speedup 2025-03-12 18:00:01 +03:00
contours_blockstorage.hpp Merge pull request #26834 from chacha21:findContours_speedup 2025-03-12 18:00:01 +03:00
contours_common.cpp Merge pull request #26834 from chacha21:findContours_speedup 2025-03-12 18:00:01 +03:00
contours_common.hpp Merge pull request #26834 from chacha21:findContours_speedup 2025-03-12 18:00:01 +03:00
contours_link.cpp Merge pull request #26834 from chacha21:findContours_speedup 2025-03-12 18:00:01 +03:00
contours_new.cpp Merge pull request #26834 from chacha21:findContours_speedup 2025-03-12 18:00:01 +03:00
contours.cpp imgproc: fix contour approximation, added test 2024-05-30 12:23:15 +03:00
convhull.cpp Partially back-port #25075 to 4.x 2024-03-05 12:15:39 +03:00
corner.avx.cpp Merge pull request #16236 from alalek:fix_core_simd_emulator 2020-01-10 21:31:02 +03:00
corner.cpp Merge pull request #24058 from hanliutong:rewrite-imgporc 2023-09-14 20:37:46 +03:00
corner.hpp
cornersubpix.cpp Merge pull request #25564 from mshabunin:cleanup-imgproc-2 2024-05-17 15:01:05 +03:00
demosaicing.cpp Merge pull request #27226 from Kumataro:fix27225 2025-04-25 11:29:22 +03:00
deriv.cpp Move OpenVX integrations to imgproc to OpenVX HAL 2025-02-15 09:55:37 +03:00
distransform.cpp Partially back-port #25075 to 4.x 2024-03-05 12:15:39 +03:00
drawing.cpp Merge pull request #26590 from Kumataro:fix26589 2024-12-17 07:40:27 +03:00
emd_new.cpp imgproc: fix allocation issue in EMD 2024-05-14 12:51:26 +03:00
emd.cpp Merge pull request #25469 from mshabunin:cpp-emd 2024-04-24 14:28:31 +03:00
featureselect.cpp Merge pull request #19392 from amirtu:OCV-165_finalize_goodFeaturesToTrack_returns_also_corner_value_PR 2021-02-15 19:55:57 +00:00
filter.dispatch.cpp Merge pull request #26806 from shyama7004:fix-typo 2025-01-20 17:14:27 +03:00
filter.hpp Merge pull request #26850 from shyama7004:update-headers 2025-01-28 07:26:40 +03:00
filter.simd.hpp Merge pull request #25364 from mshabunin:fix-unaligned-filter 2024-04-09 17:44:36 +03:00
filterengine.hpp Merge pull request #18073 from vpisarev:apache2_license 2020-08-17 11:49:11 +00:00
fixedpoint.inl.hpp Merge pull request #25364 from mshabunin:fix-unaligned-filter 2024-04-09 17:44:36 +03:00
floodfill.cpp Fix overlow pointers. 2025-01-27 11:55:10 +01:00
gabor.cpp
generalized_hough.cpp Merge pull request #26590 from Kumataro:fix26589 2024-12-17 07:40:27 +03:00
geometry.cpp Fixed result buffer overflow in intersectConvexConvex_ for non-convex input. 2024-06-10 19:38:35 +03:00
grabcut.cpp Merge pull request #25564 from mshabunin:cleanup-imgproc-2 2024-05-17 15:01:05 +03:00
hal_replacement.hpp hal/imgproc: add hal for calcHist and implement in hal:riscv-rvv (#27332) 2025-05-21 07:07:22 +03:00
hershey_fonts.cpp
histogram.cpp Merge pull request #27334 from fengyuentau:4x/imgproc/compareHist_chisqr_simd 2025-05-21 07:07:57 +03:00
hough.cpp Update types inside HoughLinesProbabilistic in order to handle great images. 2025-01-13 09:36:44 +03:00
imgwarp.avx2.cpp
imgwarp.cpp Merge pull request #27119 from amane-ame:warp_hal_rvv 2025-03-25 11:57:47 +03:00
imgwarp.hpp Use generic SIMD in warpAffineBlocklineNN 2024-10-14 01:28:41 +08:00
imgwarp.lasx.cpp Add Loongson Advanced SIMD Extension support: -DCPU_BASELINE=LASX 2022-09-10 09:39:43 +03:00
imgwarp.sse4_1.cpp Merge pull request #26590 from Kumataro:fix26589 2024-12-17 07:40:27 +03:00
intelligent_scissors.cpp Merge pull request #23109 from seanm:misc-warnings 2023-10-06 13:33:21 +03:00
intersection.cpp Merge pull request #23690 from chacha21:rotatedRectangleIntersection_precision 2023-05-30 17:46:39 +03:00
linefit.cpp Partially back-port #25075 to 4.x 2024-03-05 12:15:39 +03:00
lsd.cpp Merge pull request #23109 from seanm:misc-warnings 2023-10-06 13:33:21 +03:00
main.cpp
matchcontours.cpp Partially back-port #25075 to 4.x 2024-03-05 12:15:39 +03:00
median_blur.dispatch.cpp Move OpenVX integrations to imgproc to OpenVX HAL 2025-02-15 09:55:37 +03:00
median_blur.simd.hpp Merge pull request #27299 from amd:fast_medianblur_simd 2025-05-19 08:56:57 +03:00
min_enclosing_triangle.cpp fix findMinEnclosingTriangle and add tests 2021-10-21 18:12:51 +03:00
moments.cpp Merge pull request #25564 from mshabunin:cleanup-imgproc-2 2024-05-17 15:01:05 +03:00
morph.dispatch.cpp Partially back-port #25075 to 4.x 2024-03-05 12:15:39 +03:00
morph.simd.hpp Partially back-port #25075 to 4.x 2024-03-05 12:15:39 +03:00
phasecorr.cpp Perform arithmetics in CV_32F branch of divSpectrums() with doubles to prevent infs/NaNs (+ corresponding test). 2024-06-10 15:47:29 +02:00
precomp.hpp Update drawing.cpp and test_contours.cpp 2024-11-25 20:35:20 +03:00
pyramids.cpp Merge pull request #27337 from fengyuentau:4x/build/riscv/fix_warnings 2025-05-21 09:28:29 +03:00
resize.avx2.cpp imgproc(resize): drop unused 'pix_size4' 2020-03-29 02:41:50 +00:00
resize.cpp Relax the loop condition to process the final batch. 2025-03-13 07:54:41 +00:00
resize.hpp Add Loongson Advanced SIMD Extension support: -DCPU_BASELINE=LASX 2022-09-10 09:39:43 +03:00
resize.lasx.cpp Add Loongson Advanced SIMD Extension support: -DCPU_BASELINE=LASX 2022-09-10 09:39:43 +03:00
resize.sse4_1.cpp imgproc(resize): drop unused 'pix_size4' 2020-03-29 02:41:50 +00:00
rotcalipers.cpp Partially back-port #25075 to 4.x 2024-03-05 12:15:39 +03:00
samplers.cpp Partially back-port #25075 to 4.x 2024-03-05 12:15:39 +03:00
segmentation.cpp Merge pull request #25564 from mshabunin:cleanup-imgproc-2 2024-05-17 15:01:05 +03:00
shapedescr.cpp Merge pull request #26810 from MaximSmolskiy:improve-robustness-for-fitEllipseAMS 2025-01-22 12:49:12 +03:00
smooth.dispatch.cpp Move OpenVX integrations to imgproc to OpenVX HAL 2025-02-15 09:55:37 +03:00
smooth.simd.hpp Fixed several cases of unaligned pointer cast 2024-12-02 16:15:23 +03:00
spatialgradient.cpp Merge pull request #24058 from hanliutong:rewrite-imgporc 2023-09-14 20:37:46 +03:00
stackblur.cpp fix statckblur big kernel case 2024-04-30 18:07:21 +08:00
subdivision2d.cpp Merge pull request #27149 from liane-lin:4.x 2025-05-30 15:20:01 +03:00
sumpixels.avx512_skx.hpp minor change 2025-01-31 21:12:36 +05:30
sumpixels.dispatch.cpp Merge pull request #27060 from YooLc:hal-rvv-integral 2025-04-21 09:50:13 +03:00
sumpixels.simd.hpp Merge pull request #26109 from WanliZhong:univ_intrin_operator2warpper 2024-09-13 10:56:48 +03:00
tables.cpp
templmatch.cpp Merge pull request #26590 from Kumataro:fix26589 2024-12-17 07:40:27 +03:00
thresh.cpp Merge pull request #26842 from chacha21:threshold_with_mask 2025-03-12 17:55:07 +03:00
utils.cpp Partially back-port #25075 to 4.x 2024-03-05 12:15:39 +03:00