Reputation: 1
Given a binary image with multiple objects in it, I would like to enclose each object in contour. And then, I would like to calculate area inside object, followed by area inside contour. Any ideas how to do this?
Upvotes: 0
Views: 173
Reputation: 77
Use the OpenCV findContours()
method for contours, the contourArea()
method for contour area, and the OpenCV Moments
class to calculate the object area.
See these pages from the OpenCV documentation site:
Upvotes: 2