cv2 contourArea returned value


I went through the opencv-python documentation for the method cv2.contourArea() in order to understand the context of the returned value. But i need some clarification. For instance, if the area of a contour is 32.0, how does it translate to the number of pixels in the image (width or height)?

How is the area returned related to the pixels of the image?Is there a formula?

Asked By: ElectricSaga



opencv uses the green formula to calculate the area of contour.

This link explains How the green formula is used to calculate area with examples

Nykamp DQ, “Using Green’s theorem to find area.” From Math Insight.

Answered By: RCvaram