Peter Selinger wrote:
Hi guys, I heard from Bob today that he had integrated my "potrace" into inkscape.
This is cool. Thanks for joining the list, and welcome.
That is really great! I checked out the inkscape-devel archives and I noticed that Bob was tinkering with brightness settings to prepare an image for black-and-white tracing.
Yes, that was the first image conversion that I enabled, merely using a cutoff threshold for direct color->b&w translation. I added the 'canny' edge detection later, to find traceable information in another way. It seems obvious that there is no single best method for doing this, and that it depends on the given source image and the desired result.
Maybe simple quantization to a small number of colors, then converting to black and white, will produce a nice set of contour lines for tracing.
Did you look at the "mkbitmap" program, which comes with the potrace distribution? It is a pretty good pre-processor for potrace for certain types of images, like cartoons or photographs of handwriting. For some examples, see
http://potrace.sourceforge.net/mkbitmap.html
It does not do too great for Bob's venus example, I have to say. The problem (which is shared by the "canny" edge detector) seems to be that both programs look only at edges in the contrast data, and ignores edges in the hue and saturation. Therefore, there are lots of missing edges in the left part of the image.
I added a preview image to the dialog so that the user can see the intermediate bitmap that underlies the trace. This should help in getting the adjustments correct.
Also, you might look at the settings that we are using. This is still just a very early bit of integration between Inkscape and Potrace, so tweaks obviously need to be done.
I will be mostly unavailable until Monday afternoon, but I will be eager to delve into this then.
Thanks,
Bob