Conected components using opencv dilate, setting a starting point

65 Views Asked by At

I need to find connected components using opencv-python, cv2.dilate()

The problem is, can I set the starting point of connected components?

When I use cv2.connectedComponentsWithStats(), there was a return labels, so I could masked only I needed such as

seed_label = labels[seed_point[1], seed_point[0]]
component_mask = np.where(labels == seed_label, 255, 0).astype(np.uint8)

But when I use cv2.dilate(), it looks like there is no way to set a starting point.

Sorry for bad English. Thanks a lot.

0

There are 0 best solutions below