In the book Learning OpenCV, there is one figure that show the image plane always is focal image. enter image description here

The description of the figure from the book is as follow.

We begin by looking at the simplest model of a camera, the pinhole camera model. In this simple model, light is envisioned as entering from the scene or a distant object, but only a single ray enters from any particular point. In a physical pinhole camera, this point is then “projected” onto an imaging surface. As a result, the image on this image plane(also called the projective plane) is always in focus, and the size of the image relative to the distant object is given by a single parameter of the camera: its focal length. For our idealized pinhole camera, the distance from the pinhole aperture to the screen is precisely the focal length. This is shown in Figure 11-1, where f is the focal length of the camera, Z is the distance from the camera to the object, X is the length of the object, and x is the object’s image on the imaging plane. In the figure, we can see by similar triangles that –x/f = X/Z,

From this link https://en.wikipedia.org/wiki/Lens_(optics) enter image description here

There is thin lens equation. Only object in infinity can be imaged in focal image. Which one is correct?

Edit: From my previous knowledge, camera calibration is performed for cameras using fixed focal length lenses using methods from the opencv library. In calibration process, the pinhole camera model is assumed and the image plane is f away from optical center. In the book Learning OpenCV, there is one chapter which gives detailed description of calibration process.

Nowadays I learn that the same procedure is used for cameras on mobile phones. Such cameras have the autofocus functionality. AF is implemented by changing the position of the lens by using VCM(voice coil motor). The link have one figure which shows the process. http://electroiq.com/blog/2011/11/mems-alternatives-for-miniature-auto-focus-cameras/. The focal length of the lens is fixed. If you capture the chess board each time, the VCM will modify the lens to make objects at the center of the image in focus. Can the calibration procedure apply to such system?

  • $\begingroup$ By "focal image" do you mean an image that is in focus, that is that all rays from a point in the object that go through the lens will converge at a point on the image plane? $\endgroup$ Nov 14, 2016 at 10:23
  • $\begingroup$ Yes. In the first figure, the distance from image plane to optical center is f(focal length). $\endgroup$ Nov 14, 2016 at 11:55
  • $\begingroup$ Why do you say "Only object in infinity can be imaged in focal image."? In the second figure the distance from the image plane to optical center is $S_2$, which does not necessarily equal $f$. $\endgroup$ Nov 14, 2016 at 12:53
  • $\begingroup$ From thin lens formula, s2 equals f only if s1 is infinity. $\endgroup$ Nov 14, 2016 at 12:55
  • $\begingroup$ Right, but the definition of a "focal image" in my first comment (which you acknowledged) does not require that the focal image is formed at a distance $f$ from the optical center. $\endgroup$ Nov 14, 2016 at 12:59

1 Answer 1


I agree with user lxg that it is a notational difference, as for the pinhole camera we always have:

$$S_2 = f$$

That is not necessarily true for a camera with a lens. A pinhole camera is not the same as a camera with a lens, because a pinhole camera is sharp at all $S_1$. What makes focal length a descriptive quality of both camera types is that the magnification $M$ of a distant object imaged onto the image plane when the object is in focus can be estimated just from the focal length and the distance to the object. For a single-lens camera:

$$M = -\frac{S_2}{S_1}$$

When an object is in focus:

$$\frac{1}{S_1}+\frac{1}{S_2} = \frac{1}{f}\\ \Rightarrow M = \frac{f}{f-S_1}$$

If $f$ is very small compared to $S_1$, as it is for distant objects, it follows that:

$$M \approx -\frac{f}{S_1}$$

For the pinhole camera we have similarly:

$$M = -\frac{S_2}{S_1} = -\frac{f}{S_1}$$

The magnification is negative because the image is upside-down compared to the object.

In mobile phones the focal length is in the order of 1.5 mm to 7 mm. If you are not doing close-up, then the pinhole model approximates the magnification well, with an error under 0.15 % to 0.7 % for objects at a distance of 1 m or greater.

  • $\begingroup$ Your help is highly appreciated. From the link en.wikipedia.org/wiki/Pinhole_camera, depth of field is infinite, so everything is in focus. In OpenCV, pinhole camera model is used to calibrate one practical camera. Is that OK? Is it applicable for the case f is small compared with S2? $\endgroup$ Nov 15, 2016 at 2:46
  • $\begingroup$ @JoggingSong Depends on the calibration and the lens. Compound lenses could have compensation for this and that. You could expand your question rather than comment and elaborate a bit. $f$ is never very small compared to $S_2$. $\endgroup$ Nov 15, 2016 at 7:01
  • $\begingroup$ I have edited my question. If one pinhole camera hasn't one lens, where does the concept of focal length come from? $\endgroup$ Nov 15, 2016 at 8:13
  • $\begingroup$ @JoggingSong I don't know. Maybe from astronomy where the object is always at "infinite" distance, so the magnification from a telescope with a certain focal length will match the magnification from a pinhole camera obscura with $S_2 = f$. What I wrote resonates with a quote about pinhole cameras from the book I think you cite: "The size of the image relative to the distant object is given by a single parameter of the camera: its focal length." $\endgroup$ Nov 15, 2016 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.