Mathematica Mathematica Calculating length from pixel count

  • Thread starter wil3
  • Start date
179
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,

wil3
 

Want to reply to this thread?

"Mathematica Calculating length from pixel count" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top