- #1
wil3
- 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 got to be an easier way to do this.
Thanks much,
wil3
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 got to be an easier way to do this.
Thanks much,
wil3