Javatpoint Logo
Javatpoint Logo

Perspective Transformation

In general terms, perspective means when human eyes see an object, it looks bigger when it is close to the eye and smaller when it is far from the eyes. Transformation means the transfer of an object from one state to another. Perspective transformation works in the same principle in which human vision and camera work that is the conversion of the 3D world into a 2D image.

Frame of reference

A frame of reference consists of an abstract coordinate system and set of reference points which fix the coordinate system and measurements.

To define a reference frame only n+1 reference point is needed. Using rectangular coordinates frame is defined with a reference point from the origin, each at one unit distance in n coordinate axes.

Perspective Transformation

5 frames of reference

Following are five different frames of references:

  1. Object coordinate frame: It is used for modeling objects.
  2. World coordinate frame: It is used for co-relating the objects in a 3D world.
  3. Camera coordinate frame: It relates the objects with a camera.
  4. Image coordinate frame: It is not a 3D coordinate system. It is used to map 3D points in a 2D image plane.
  5. Pixel coordinate frame: It is also not a 3D coordinate system. In this, each pixel has a value for coordinates.

Transformation between these 5 frames

Perspective Transformation

Let, Y = 3D object, y = 2D Image, f = focal length of the camera and Z = distance between object and the camera And two different angle formed by Q

Perspective Transformation

Tan Perspective Transformation = - y/f         ------- Equation 1

Where, minus denotes that image is inverted.

Y=-f(y/z)         -------- Equation 2
Comparing equation 1 and equation 2

From the above equation, we conclude that when light rays reflect back and strike on an object which is passed from the camera, then an inverted image is formed.

Calculating the size of the image formed

Let's take a plant which is of height 5m and the camera is placed 50m away from the plant.

We have to find the size of the plant with camera focal length which is 50m


As the focal length is given in millimeter, so we will convert all the values in millimeter.

Y = 5000 mm.
f = 50 mm.
Z = 50000 mm.
Now apply the values in formula
Y = - f (y/z) = -50 X 5000 / 50000
    = -5mm

Here, the minus sign is used to indicate that the image is inverted.

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA