(somewhere between 2.4.3 and 2.4.5)
…thout crashing everything
This function is a great example of how some rearchitecturing is needed. We lose functionallity at the C wrapper by hiding the origin. We lose functionallity at the high level haskell function by hiding the line type and thickenss. In the future hopefully someone will make a CV/Bindings/* that is more complete. Then, we can add non-Ptr types and fully functional haskell operations based on these primitives.
WARNING: Not yet tested. This refactoring has several benefits: 1) We can use native haskell combinators, for example: - map contourArea cs - filter ((>94) . contourPerimeter) cs 2) It fixes a purity bug. Previously, if two entities were concurrently running mapContours, which mutates a pointer, then we could break the system (consider one contour twice or skip another contour).