how to model complex shapes using representative points?

Viewed 824

I want to reduce the amount of white pixels in this image to just some candidate or representative points in the output image (goal is to model different types of shapes)

Input Image

Output Image

if you just connect the gray points in the output image together you have the same path but with less white pixels. this path should have only one starting point and one ending point and covers all path from starting to ending.

I can solve it using CCA(connected component analysis) and some if then else rules ! but it seems slow.

I need this Algorithm to reduce the amount of pixels needed to describe shapes.

what is the fastest and accurate algorithm here ?

I also welcome those methods that can increase the accuracy of shape modeling by increasing the candidate points.

3 Answers
Related