shaun pollock
shaun pollock

Reputation: 1

Opencv contours

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

Answers (1)

Crazed
Crazed

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:

Contours

Contour Features

Upvotes: 2

Related Questions