The fact that you are using a larger image could explain why your original sample look like it contains a lot of grey pixels. That is something you don't get which threshold is applied.
If you do have the latest IM you should also have the 'LOG' morphology kernals which generates a larger edge detection kernel that can 'delete' extraneous edges better. Sobel and other edge detector kernels could also be useful too. But you will then also have to use the
-morphology convolve operator as the older operators have yet to be converted to the new method.
See
http://www.imagemagick.org/Usage/convolve/ for more info. Fred can give more practical examples (yet to be added to IM examples).
I still have a speed issue (twice as slow) to resolve first and the older versions ability to use a GPU has to also merge into the morphology version. Once that is done then things can continue.
Note that a 'Canny' Edge detection was mentioned. This generates continuous lines in the image, but at the cost of disconnecting 'T' junctions. Unfortunately it has yet to be implemented, and may not be added for a long time yet, unless we get an interested programmer. It's so far down my own 'ToDo' list that it does not even appear, though I am interested in the operator.
Looks like Fred (fwm42) beat me to the submit with a similar answer and appropriate links to the exact same kernels I mentioned.
