Determine if a point is inside or outside of a shape with opencv


I have images with white background and simple shapes in them (each image has one shape). I want to determine if a certain point (x,y) is inside the shape or not. How can I do that with opencv?


Use pointPolygonTest function. Here’s tutorial.

Answered By – ArtemStorozhuk

Answer Checked By – Candace Johnson (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.