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?
1 | initial version |
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?
2 | No.2 Revision |
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.