Pixels per meter
Show older comments
How to find the number of pixels per meter in an image? I have an image where I can find the total number of pixels in it. But, my problem is to find how many meters a pixel covers or how many pixels are taken to cover one meter. Can anyone help me regarding this?
Thank you.
2 Comments
Image Analyst
on 4 Oct 2011
So take a picture of a meter stick. (Sorry to state the obvious.)
Walter Roberson
on 4 Oct 2011
... and the meter stick should be aligned with the focal plane. And the more meters linear you can fit in, the more accurate you conversion should be.
Ideally you would use a fine-ruled grid from side to side on the entire scene, so that you could also test for optical non-linearity and astigmatism. As a coarse assessment, though, you could use a meter-stick centered precisely in the image, and another at the top of the image and pointing to the optical center, and a third at the side of the image and pointing to the optical center. Those three together would allow you to test horizontal and vertical linearity (if there is non-linearity then there would be more than a pixel difference in the lengths in the positions.) And if the lengths are all the same to within one pixel, you can then average the lengths to improve the pixels per meter estimate.
Answers (1)
Walter Roberson
on 3 Oct 2011
0 votes
This is a matter that cannot be resolved without access to further information -- e.g., a calibration object in the field of view; or a knowledge of the distance to the target and of the aperture of the camera. Aperture determines angular field of view, half-angle together with distance and basic trig applied a right-angle triangle gives you the half-width (x radius), number of pixels across divided by twice the radius gives you pixels per unit of measure.
1 Comment
Walter Roberson
on 4 Oct 2011
The above trig should be done with respect to the smaller axes, which is usually (but not always) the horizontal axes.
Categories
Find more on Geometric Transformation and Image Registration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!