Resampling grid to remove noise before extracting chain code
In theory, as chain code is very sensitive to noise we should:
- Superimpose a sampling grid
- Resample to some fixed number of points
I have seen this approach many places but not an implementation anywhere. Or can we implement it using opencv?
For example I have this image, I apply Canny edge detection. Then how do I make it become as follows:
I do not even know how to place grid on the image and obtain the boundary vertices.
I have tried this using the suggestion of Tetragramm: