Buckets:
Camera models
Pinhole Cameras
The simplest kind of camera - perhaps one that you have made yourself - consists of a lightproof box, with a small hole made in one side and a screen or a photographic film on the other. Light rays passing through the hole generate an inverted image on the rear wall of the box. This simple model for a camera is commonly used in 3D graphics applications.
Camera axes conventions
There are a number of different conventions for the direction of the camera axes. Here we will follow the convention of Blender (see diagram), where the camera points along the negative Z-axis, the camera X-axis points to the left (looking from the camera) and the camera Y-axis points up.
Pinhole camera coordinate transformation
Each point in 3D space maps to a single point on the 2D plane. To find the map between 3D and 2D coordinates, we first need to know the intrinsics of the camera, which for a pinhole camera are:
- the focal lengths, and .
- the coordinates of the principle point, and , which is the optical centre of the image. This point is where the optical axis intersects the image plane.
Using these intrinsic parameters, we construct the camera matrix:
In order to apply this to a point to a point in 3D space, we multiply the point by the camera matrix to give a new 3x1 vector . This is a homogeneous vector in 2D, but where the last component isn't 1. To find the position of the point in the image plane we have to divide the first two coordinates by the last one, to give the point .
Whilst this is the textbook definition of the camera matrix, if we use the Blender camera convention it will flip the image left to right and up-down (as points in front of the camera will have negative z-values). One potential way to fix this is to change the signs of some of the elements of the camera matrix:
Camera Transformation Matrices
Usually, the camera isn't just at the origin, but we have to transform points from world coordinates to coordinates relative to the camera. To do so, we first apply the world-to-camera matrix to the points, and then we apply the camera matrix.
More complex camera models
More complicated camera models are possible, modeling the distortion generated by a real lens. For a discussion of such models, see Multiple View Geometry in Computer Vision.
Xet Storage Details
- Size:
- 2.92 kB
- Xet hash:
- 2950f98b2aa83f79b888c2012bc0bc7a7052c82a2d8ebf1a62d626d7df322496
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.