Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Detection of contours intersections

I have two contour images and I would like to find the contours intersection. So far I've succesfully used the logical and operation, unfortunately I've fallen into this case:

image description

As you can see, the logical and operation is going to fail because there isn't any intersection. If the red contours is in image A, and blue contour is in image B, I would like a way to return the two red pixel indicated by the arrow. Does openCV provide some function to do that? In case there isn't, how would you solve this problem?

Thank you.

Detection of contours intersections

I have two contour images and I would like to find the contours intersection. So far I've succesfully used the logical and operation, unfortunately I've fallen into this case:

image description

As you can see, the logical and operation is going to fail because there isn't any intersection. If the red contours is in image A, and blue contour is in image B, I would like a way to return the two red pixel indicated by the arrow. Does openCV provide some function to do that? In case there isn't, how would you solve this problem?

PS: the contours come from random shapes, they are NOT straight lines!

Thank you.

click to hide/show revision 3
retagged

Detection of contours intersections

I have two contour images and I would like to find the contours intersection. So far I've succesfully used the logical and operation, unfortunately I've fallen into this case:

image description

As you can see, the logical and operation is going to fail because there isn't any intersection. If the red contours is in image A, and blue contour is in image B, I would like a way to return the two red pixel indicated by the arrow. Does openCV provide some function to do that? In case there isn't, how would you solve this problem?

PS: the contours come from random shapes, they are NOT straight lines!

Thank you.

Detection of contours intersections

I have two contour images and I would like to find the contours intersection. So far I've succesfully used the logical and operation, unfortunately I've fallen into this case:

image description

As you can see, the logical and operation is going to fail because there isn't any intersection. If the red contours is in image A, and blue contour is in image B, I would like a way to return the two red pixel indicated by the arrow. Does openCV provide some function to do that? In case there isn't, how would you solve this problem?

PS: the contours come from random shapes, they are NOT straight lines!

Thank you.

Detection of contours intersections

I have two contour images and I would like to find the contours intersection. So far I've succesfully used the logical and operation, unfortunately I've fallen into this case:

image description

As you can see, the logical and operation is going to fail because there isn't any intersection. If the red contours is in image A, and blue contour is in image B, I would like a way to return the two red pixel indicated by the arrow. Does openCV provide some function to do that? In case there isn't, how would you solve this problem?

PS: the contours come from random shapes, they are NOT straight lines!

Thank you.