mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
a27a13921b
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