cv::line() with thickness might take a very long time for pathological huge segments #27365
Open
4 tasks done
Labels
Content-Length: 252923 | pFad | https://github.com/opencv/opencv/issues/27365
52Fetched URL: https://github.com/opencv/opencv/issues/27365
Alternative Proxies:
Uh oh!
There was an error while loading. Please reload this page.
System Information
OpenCV 4.12.0
Detailed description
When using
cv::line()
with a pathological huge segment (the segment points being very far away from the image bounds, but crossing the image anyway), with thickness,FillConvexPoly()
will be called.This
FillConvexPoly()
will inherit from very distant points and consume a huge amount of (wasted) time.A solution would be to clip line points within
static void ThickLine()
(the only trick is to take care of the line width to preserve line caps)I will submit a PR
Steps to reproduce
Issue submission checklist
The text was updated successfully, but these errors were encountered: