Results 1 to 8 of 8

Thread: Fitting an almost rectangular block to get the width

Threaded View

  1. #2
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Re: Fitting an almost rectangular block to get the width

    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.
    Attached Images Attached Images  
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width