# How to find pixel per meter

I have a static camera through which I am focusing on the covered area, total covered area by a camera is

```
length 78.7 cm
width 102.1 cm
heigh 118.5 cm
```

my image size is `800 * 480`

now in the total covered area, I have another box whose

```
length is 22.6 cm
width is 25.6 cm
height is 24 cm
```

I want to find out how many pixels I have per meter. I am using the formula of

`m/pixels * 0.39`

but it's not giving the exact answer.

Where does that 0.39 factor come from? You can get a raw idea of the pixel/mm ratio dividing your resolution by the effective field of view (that is, at a GIVEN DISTANCE). But you have to be aware of 2 things: doing this you're not taking into account lens distorsion and as you move away from the center of the image the error increases since your area is flat, so points in the borders are laying at a different (greater) distance from the camera sensor than the ones in the middle. I suggest calibrate your camera for better results on a given plane, but with a single fixed device setup you won't be able to perform measurements in depth.