0
0
mirror of https://github.com/opencv/opencv.git synced 2026-01-18 17:21:42 +01:00
Ghazi-raad a27a13921b Fix LINE_4/LINE_8 swap in drawContours (issue #26413)
Changed condition to correctly route LINE_8 to Line() instead of Line2().

The condition 'line_type == 1 || line_type == 4' was causing LINE_8 (value 8)
to be processed by Line2() which implements 4-connectivity, and LINE_4 (value 4)
to be processed by Line() which was implementing 8-connectivity behavior. This
resulted in swapped line connectivity.

Changed to 'line_type == 1 || line_type == 8' so LINE_8 goes to Line() with
8-connectivity and LINE_4 goes to Line2() with 4-connectivity, matching the
documented behavior where LINE_4 should produce 4-connected lines and LINE_8
should produce 8-connected lines.

Fixes #26413
2025-11-26 21:41:28 +00:00
2025-11-22 15:15:00 -03:00
2020-02-26 15:12:45 +03:00
2018-10-11 17:57:51 +00:00
2025-08-01 09:50:10 +03:00
2024-03-03 23:37:07 +05:30

OpenCV: Open Source Computer Vision Library

Resources

Contributing

Please read the contribution guidelines before starting work on a pull request.

Summary of the guidelines:

  • One pull request per issue;
  • Choose the right base branch;
  • Include tests and documentation;
  • Clean up "oops" commits before submitting;
  • Follow the coding style guide.

Additional Resources

Description
Languages
C++ 87.5%
C 3.1%
Python 3%
CMake 2%
Java 1.5%
Other 2.7%