image-rs / imageproc

Image processing operations
MIT License
736 stars 145 forks source link

Calculate the area of a contour #518

Closed joshuajbouw closed 6 months ago

joshuajbouw commented 1 year ago

Currently there is no way to be able to calculate the area with a contour without doing it manually, which I am struggling with. This will be able then to be used by users to enable the ability to find the minimum and maximum contour in a set of contours.

Calculating the area of a contour is helpful in image detection by finding the largest contour when using the warp perspective method in order to display a wanted part of an image when the background is solid. Unfortunately, this is lacking in this library.