Although the mill will take care of the jagged edges left by the bitmap and smooth them off a little they will look awful with OSHPark's precision etching, so I decided to add a smoothing routine.
I tried a routine that checked the angles and tried to conform the points to an average but this made a pretty awful mess and I decided not to continue, and looked instead at reducing the edge pixels. it pretty soon became apparent that I could just remove those that are inside the polygons.
After a bit of tinkering I managed to write a rule that works the same as the edge detection routine. These are both Maxwellian and step along a path in units, and eventually loop back to the start where they quit having nothing to do. They work in a similar manner to catalytic enzymes unzipping proteins, breaking only the bonds they can reach and moving along the molecule in steps.
It still has a few problems identifying points that should be there, but it gets most of them.
The resulting polygon looks quite tidy really considering it started life as a hexadecagon, approximated by the pixels used to represent it, and then reconstructed from the mess. I can use this technique in AIMos and Cardware too, making the vision system resolution independent. It extracts the mathematical curve described by the pixels so it can be scaled like a vector and redrawn at a different resolution.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.