Suppose I have a binary image and I want to do the the following in OpenCV: Given a point, measure the area and perimeter of the connected component that point belongs to ..
def areaAndPerimeter(point):
...do some stuff...
return area, perimeter
I know I can use cv2.findContours()
to find the perimeter and area of each connected component, but I don't know how to pair that information with input point. Which perimeter and area corresponds to the connected component of point