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

Issue

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?

Solution

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.