Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV4Android - Erode a Contour? Or some form of a distance transform?

So let's say that I have the contour of an object but I want to shave off the outer 5 pixels from the contour what would be the best way to do that?

Some form of erosion? A distance transform? or would it have to be done more manually?

OpenCV4Android - Erode Resize a Contour? Or some form of a distance transform?Contour but retain center?

So let's say that I have the contour of an object but I want to shave off the outer 5 pixels from the contour what would be the best way to do that?

Is there a way to scale a contour? Some form of erosion? A distance transform? or would it have to be done more manually?manually?

I've seen this: http://answers.opencv.org/question/44580/can-i-resize-a-contour/

The problem with the above approach is that it does not retain it's center and I would then have to run another contour to "get" the inner segment I want.