Dear all,
I am using the function for pruning and want it to remove one point at a time from each end of a line. But just when it is almost done, it unexpectedly removes three points. Can anyone explain this behavior? Is there a workaround?
img0 = Image[{{0, 0, 0, 0}, {0, 0, 1, 0}, {0, 0, 1, 0}, {0, 1, 0,
0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 1, 0}, {0, 0, 1, 0}, {0, 0,
1, 0}, {0, 0, 0, 0}}]
FixedPointList[Pruning[#, {1}] &, img0]
In the 1st and 2nd round, it removes 2 points, but 3 points in the 3rd round.
In the end, I want to convert the line to a vector object, so I thought with pruning I can get two points at a time, then reverse one of the traces and connect it to the other one. But this behavior makes it more complex.
Thanks for your ideas!
Max