opencv_contrib
opencv_contrib copied to clipboard
[FR] Add convex_hull function based on run-length encoding
Currently, the complexity of convexHull() is O(N log(N)) (N is the number of points) because the first step is std::sort(). If we calculate convex hull based on run-length encoding like https://docs.opencv.org/4.x/df/def/group__ximgproc__run__length__morphology.html the first step sorting is unnecessary, and the complexity becomes O(N) (N is the number of run length).