Search code examples
imageopencvimage-processingcomputer-visiondetection

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?


Solution

  • Use pointPolygonTest function. Here's tutorial.