As a human, I have trouble figuring out the left and right endpoints on your sample graph, so I imagine getting a machine to give a consistent answer would quite difficult. The right endpoint is particularly fuzzy. Should it be at about 400 pixels, or 425?
My best internal algorithm essentially tries to curve fit the right and left endpoints of the wire using the whole image instead of just one scanned line of it. Perhaps using all the information from the image instead of just one line is essential to getting a good width. Have you tried any edge detection techniques? I tried the "fuzzy select tool" in GIMP (GNU Image Manipulation Program; free Photoshop, essentially) and after modifying the "threshold" slightly, I got very good results on the outline of the shape, from which I could pretty easily calculate the widths.
Attached is an example of the fuzzy select tool. Sorry for the large size, but I think it's important to be able to see the pixels very clearly to determine the goodness of fit.




Reply With Quote