# How to determine the required resolution to view an image at a certain size?

If I have several camera specifics, can I determine the required resolution to view an image at the size I want?

For example, let's say I want a picture of a square painting to be at least 20 pixels large. I know the focal length is 7.5 mm, the painting was 8 m away from the camera, it is 2 m tall in real life. I know that the image sensor is 2.4 mm by 2.4 mm. Can I determine the required resolution to view the painting at least 20 pixels large?

-
Sure, and it is basic math if you understand the definitions of all the terms you used. – Kris Van Bael Sep 23 '11 at 18:20
I do understand the definitions of the terms I used, and I figure it should be possible, but I'm not familiar with the relationship between those and the resolution. Thus my question.. – headphones Sep 23 '11 at 18:34

## 1 Answer

In general, the ray height in the image plane $h$ is given by

$$h=f \tan{\theta}$$

Where $f$ is the focal length and $\theta$ is the ray angle in object space. All the angles and heights are measured from the optical axis.

In your case

$$\theta = \tan^{-1}{\frac{H}{D}}$$

Where $H$ is the height of your object and $D$ is the object distance. Therefore, you have

$$h = f \frac{H}{D}$$

Plugging in the numbers, your image will have a height of 0.9375mm, so to have that cover 10 pixels, (remember the height is from the center of the image, not the bottom, to the top) you will need pixels with a spacing of $\frac{0.9375}{10} = 0.09375 \text{ mm}$, or $93.75\ \mu m$

-
I'm on a smartphone. Somebody fix my silly latex goof. – Colin K Sep 23 '11 at 19:10
But is it not possible to get the resolution from this information, in the sense of "we need 640px by 480px"? – headphones Sep 23 '11 at 19:11
@headphones: I'm not sure what you mean. Do you want to know how many pixels would be in a 2.4mm sensor if each pixel is ~0.1mm? That would be about 24x24 pixels. You will probably never find a CCD that small though. There are some imaging arrays that size, but they are usually micro-bolometers or infrared photodiode arrays. – Colin K Sep 23 '11 at 23:06