is there a formula to calculate the pixel size of a object at long distance? Here is the scenario, I have a very small object 1cm by 1cm at 200m away from my camera. The camera has a resolution of 640x480. So I want to find out the pixel size of my object in the camera screen. What about parameters would I need as well? Thanks.
You must know sensor size (mm) and focal length (mm), and the pixel dimensions of your sensor (pixels). If it is a compact camera or phone, you may not know much of this.
If you know, you can go to http://www.scantips.com/lights/fieldofview.html to determine the field of view at 200m.
Lets assume a DSLR with sensor size 24mm wide, and focal length is 100mm and the sensor is 6000 pixels wide.
First, it computes the horizontal field of view at 200m is 48m. This distance through this lens onto this sensor will show this width.
Then we know the sensor width is 6000 pixels which covers the 48m.
1 cm would cover 6000 pixels width x 1cm/4800cm = 1.25 pixels. A pixel cannot be divided, so call that 2 pixels.
Or, you could take the picture, zoom in on it really large, to say 1600% size, so you can see the pixels well, and then count them on this object.
The simple way is to measure it. Take a picture of a ruler at a known distance from the lens, with the ruler extending out of the frame. Say the ruler is 10m from the camera and you can see 1.37m vertically. Then at 10m, each pixel represents 1.37/480 m. At 200m, each pixel represents 20 times more size because you are 20 times further away, so it represents 20*1.37/480 meters