the position of image plane in optical imaging In the book Learning OpenCV, there is one figure that show the image plane always is focal image. 


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)


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?
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.