image-rs / imageproc

Image processing operations
MIT License
735 stars 145 forks source link

add contour_area #535

Closed cospectrum closed 6 months ago

cospectrum commented 1 year ago

This will solve #518. oriented_contour_area will first check the provided points, if there are no points, 1 point or 2 points (line) then the result will be 0.0, otherwise triangle formula is used with the last difference computed first. contour_area will return the absolute value of the oriented_contour_area. I don't like the boolean flag for orientation as in OpenCV, because it will be very easy to confuse it

theotherphil commented 6 months ago

Thanks!