Assuming you can write a loop that "visits" each dot (not hard if they're evenly spaced and the upper-leftmost dot is fixed in position, but harder if that's not true), here's the kind of heuristic I'd try using at each dot:
For each row and column, count how "open" it is. For each white
pixel above or below a column, or each pixel left or right of a row,
it gets one additional "open" count. These counts range from 0 to
2.
A pixel's "open" count is the sum of its row open count and its
column open count. The counts range from 0 to 4.
A pixel is removable if it is "3-open" or "4-open".
I think this will do the right thing when a dot impacts a vertical or
horizontal trace, but I'm less confident in the case that it impacts a
diagonal trace or a pad.
I don't know what software generates these files you have, but here's
another idea: if you can change the grid pitch, generate several images
with different pitches, then the pixels you want to turn white are the
ones that are white in one of the different pictures.
Jeff
pgp0WJ0MJRLVs.pgp
Description: PGP signature
_______________________________________________ Image-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/image-sig
