Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Mathematica Calculating length from pixel count

  1. May 11, 2012 #1
    Hello. Does anyone know of a fast way of converting pixel count into a length metric (preferably using Mathematica)? I have an imaging program that segments and measures the lengths of objects in an image, but the only parameter that I can extract is pixel count, which then can get converted to length if I measure a ruler using the program.

    But if objects are diagonal in the image, then the program will obviously see them take up fewer pixels because they have to cross an extra √(2) in order to get detected. So I can't just multiply the pixel count by a constant ratio, since orientation matters.

    A lot of my objects are curved, so this isn't a matter of just measuring orientation and then multiplying by an appropriate factor. I'm sure this problem has been dealt with before, and I could probably flesh out a brute force way of solving this pixel-by-pixel, but there's gotta be an easier way to do this.

    Thanks much,

  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted