I am using the OpenCV library, the example called “FindContours”.
I tried to obtain a new contour based on the ConvexHull function, but I get the same thing.
So I tried:
for (Contour contour : contours) {
stroke(0, 255, 0);
contour.getConvexHull();
contour.draw();
stroke(255, 0, 0);
beginShape();
for (PVector point : contour.getPoints()) {
//contour.setPolygonApproximationFactor(3);
//vertex(point.x, point.y);
}
endShape();
}
Anyone knows why my contour is the same, with or without contour.getConvexHull(); line?
Here is a pic I prepared for testing