Pinhole Camera Model
In this article, we will talk about the simplest camera model, which is the Pinhole Camera Model.
Say we want to build a very simple camera model, given an object (the tree) and a sensor placed directly facing the object. Each point on the object will emit multiple light rays outward.
Multiple rays from the same point on the object will hit different pixels on the sensor. Therefore, each pixel receives light rays from many points. Hence, there is no one-to-one mapping (a pixel -> a point in the scene), so we lose the spatial information, and the image captured by the sensor is very blurred.
If we want to have a more focused image, we need to limit the number of rays from each scene point that reach the sensor. This can be achieved by placing a barrier with a small aperture between the 3D scene and the sensor.
The size of the aperture affects how sharp and bright the projected scene is. A wider aperture means more light rays pass through the barrier, resulting in a brighter but more blurred image. A very small aperture allows fewer light rays to pass through, resulting in a darker but sharper image.
A more formal representation of the Pinhole Camera Model is presented in the Figure below. The sensor is referred to as the image plane ( or the projection plane), and the distance between the pinhole (camera center) and the image plane, f, is called the focal length.
We define a coordinate system [ X Y Z ], called the camera reference system, centered at the pinhole, such that the axis Z ( the optical axis) is perpendicular to the image plane and points towards the 3-D scene.
Get Shaima’s stories in your inbox
Join Medium for free to get updates from this writer.
If you increase the focal length, the 3-D object appears larger. And if you decrease the focal length, the 3-D object appears smaller.
Note that the image is inverted. To simplify the model, we omit this fact by assuming the image plane is placed on the same side of the pinhole as the 3D scene. In this case, the image plane is called the virtual image plane.
In computer vision, we don’t care about the inversion, because the digital image we receive has already been pre-flipped by the digital camera.
To understand how the 3D world imprints itself onto the virtual image plane taken the Pinhole Camera Model, we need to derive the relationship between the 3D point and the image plane point.
Consider Figure 8. Let P =[ X Y Z ] be a point on a 3-D object visible to the pinhole camera and projected onto the image plane as the point p = [ x y ].
Notice the triangle formed by the center of the camera (0,0,0), the center point at the image plane (0,0,f), and the image point p is similar to the triangle formed by (0,0,0), (0,0, Z), and the 3-D point P.
We will write the points P and p as vectors R and r, respectively:
Using the law of similar triangles, we get:
So the image point p is defined as:
Notice that the division by Z indicates that the projection is non-linear
And this is how images are formed using a simple Pinhole Camera Model :)






