• Skip to primary navigation
  • Skip to main content
  • Skip to footer
  • Welcome to the world of Anagram Engineering
  • Who we are
  • Leistungen
    • Web Development
    • Embedded Systems
  • References
    • Customers
    • Webdesign & Webapps
    • Mobile Apps
    • Embedded Systems
    • Cloud Apps
  • News

Search

Anagram Engineering

Webdesign und Softwarelösungen aus Vorarlberg. Ihr Partner für innovative Lösungen rund ums Internet. Full Service Agentur.

The Pinhole Camera



Next: Camera Model with Lens
Up: Perspective Projection
Previous: Perspective Projection


The Pinhole Camera

An ideal model of a camera is the pinhole camera, as seen in Figure 2.2. This kind of
camera can be imagined as a box with a pinhole, through which
light enters and forms a two-dimensional image on the opposite site. A point
$ P=(X,Y,Z)$ in the three-dimensional $ XYZ$-space is projected to an image-point
$ p=(x,y)$ in the two-dimensional $ xy$-space (wall). If the coordinate system of the
$ XYZ$-space is aligned at the pinhole so that the Z-axis coincides with the optical axis and the image
plane has its origin at $ (0,0,f)$, then the projection equations are
given by

$displaystyle x = frac{fX}{Z}$ (2.4)


and

$displaystyle y = frac{fY}{Z}$ (2.5)


Figure 2.2:
Pinhole camera model
Image pinhole

To represent Equation 2.4 and Equation 2.5 in a linear way, we transform the point $ (x,y)$ in the Euclidean plane to a point $ (x,y,1)$ in the projective plane. This represents the same point, we simply added a new coordinate $ 1$. Overall scaling is unimportant. The point
$ p = (alpha x,alpha y,alpha)$ can be re-transformed by dividing through $ alpha$. Thus $ p$ is similar to
$ (frac{x}{alpha},frac{y}{alpha})$. Because scaling is unimportant, the coordinate $ (x,y,1)$ is called homogeneous coordinate. Homogenous coordinates can also be used within a higher dimensional domain. Now we can combine Equation 2.4 and Equation 2.5 to

$displaystyle begin{pmatrix}xcr ycr 1 end{pmatrix} = begin{pmatrix}frac{f...
...cr 0 & 0 & 0 & 1 end{pmatrix} begin{pmatrix}x cr y cr z cr 1 end{pmatrix}$ (2.6)


If we want to know the image coordinates we have to take four more values into account. Namely

$ c_x,c_y$
image principal point, which is the intersection between the camera’s optical axis and the image plane.
$ d_x,d_y$
distance between two sensor elements in $ x$ and $ y$ direction

$ d_x$ and $ d_y$ can normally be found in the datasheet2.2 of the sensor chip. The image principal point has to be found by calibration (see Section 2.2 for more information). If the parameters and the point in camera coordinates are known, we can compute the image coordinates with the following formulation

$displaystyle x_i = frac{x_c}{d_x} + c_x$ (2.7)


and

$displaystyle y_i = frac{y_c}{d_y} + c_y$ (2.8)


where $ x_c$ and $ y_c$ are the coordinates of the point in the camera coordinate system. If we combine Equation 2.6 with Equation 2.7 and Equation 2.8 we can formulate the translation from Point $ P(X,Y,Z)$ to the image coordinates
$ p(x_i,y_i)$

$displaystyle begin{pmatrix}x_icr y_icr 1 end{pmatrix} = begin{pmatrix}fr...
...cr 0 & 0 & 0 & 1 end{pmatrix} begin{pmatrix}x cr y cr z cr 1end{pmatrix}$ (2.9)



Next: Camera Model with Lens
Up: Perspective Projection

Footer

Contact US

Stiegstrasse 24
6830 Rankweil

+43 650 925 62 64

About US

Anagram Engineering develops software for Web, Mobile, Tablet and embedded devices.

Learn More

© 2026 · Anagram Engineering

  • terms & conditions
  • impress
  • customers
  • References
  • who we are
  • Deutsch
  • English