Camera calibration (1)-deep understanding of homogeneous coordinates and their functions

1. What is homogeneous coordinate and homogeneous coordinate system

Homogeneous coordinates

Homogeneous coordinates are one of the key theories of a camera calibration problem, so let's analyze this problem.
In terms of definition, homogeneous coordinates (projected coordinates) use N+1 dimensions to represent N-dimensional coordinates (points and vectors). It can also be said that homogeneous coordinates are used to represent Cartesian coordinates . The specific mathematical expression can be like this Write:
add an additional variable w to the end of the point coordinate (x, y) in the rectangular coordinate system, a point (X, Y) becomes (x, y, w) in the homogeneous coordinates, and
X = x /w
Y = y/w
This also solves the problem that the Cartesian coordinate system cannot represent the point at infinity. According to human vision, two parallel lines will intersect at infinity. The rectangular coordinate system cannot be used to solve this phenomenon. Description, and when w approaches 0, (X, Y) tends to infinity, and its homogeneous coordinates can be expressed as (x, y, 0), which solves this problem.
Insert picture description here

At the same time, another problem arises, the conversion between Cartesian coordinates and homogeneous coordinates:
(1) When converting Cartesian coordinates to homogeneous coordinates, you need to consider whether the coordinates are points or vectors. If (x,y) is a point , It can be changed to (x,y,1); and if (x,y) is a vector, it becomes (x,y,0)
(2) Homogeneous coordinates are converted to Cartesian coordinates, if it is (x, y, 2), then its Cartesian coordinates are (x/2, y/2);
if it is (x, y, 0), its Cartesian coordinates are still (x, y).
Homogeneous coordinates (for two dimensions) are therefore defined as follows:

  1. Any point on the projection plane can be expressed as (X, Y, Z), which is called the'homogeneous coordinates or projected coordinates of the point, where X, Y and Z are not all 0.
  2. For a point represented by a homogeneous coordinate table, if the value in the coordinate is all multiplied by the same non-zero real number, the point will still be represented.
  3. On the contrary, two homogeneous coordinates represent the same point, if and only if one of the homogeneous coordinates can be obtained by multiplying the other homogeneous coordinate by the same non-zero constant.
  4. When Z is not 0, the point represents (X/Z, Y/Z) on the Euclidean plane.
  5. When Z is 0, the point represents an infinity point.
  6. The triple (0, 0, 0) does not represent any point. The origin is expressed as (0, 0, 1).

Homogeneous coordinate system

So how to understand the homogeneous coordinate system from space?
It’s interesting to say that we imagine that there is an absolute coordinate system in the universe. For the Cartesian coordinate system we are using now, its origin is at (0,0), and of course there are countless identical coordinate systems. It's just that their origins are different. For a point (x, y) in a Cartesian coordinate system, it is the same for all Cartesian coordinate systems, which is a bit of a multidimensional universe. One of the coordinate systems is a universe.

Second, the role of homogeneous coordinates

I have read a lot of articles, and there is basically this sentence to summarize its function: homogeneous coordinate representation is one of the important methods of computer graphics. It can be used to clearly distinguish vectors and points, and it is also easier to use for affine (Linear) geometric transformation.
Homogeneous coordinates have important applications in computer graphics. They can be used to distinguish vectors from points. The difference between points and vectors has been explained above. The main applications of affine transformation are as follows:

2.1 "Translation Matrix" is expanded to 3 dimensions

In image processing, the image is often translated and calculated in the form of a matrix. By performing a homogeneous transformation on the coordinate points, the translation matrix can be expressed in a 3-dimensional manner.
The translation can be expressed as:
[x 2 y 2] \begin{bmatrix} x2\\ y2\end{bmatrix}[x2the y 2]= [ x 1 y 1 ] \begin{bmatrix} x1\\ y1\end{bmatrix} [x1y1]+ [ x 0 y 0 ] \begin{bmatrix} x0\\ y0\end{bmatrix} [x0y 0]After
homogeneous transformation:
[x 2 y 2 1] \begin{bmatrix} x2\\ y2\\1\end{bmatrix}x2y 21= [ 1 0 x 0 0 1 y 0 0 0 1 ] \begin{bmatrix} 1&0&x0\\ 0&1&y0\\0&0&1\end{bmatrix} 100010x0y 01* [ x 1 y 1 1 ] \begin{bmatrix} x1\\ y1\\1\end{bmatrix} x1y11

2.2 Rotate, zoom

Rotation Rotate
a point counterclockwise by an angle around the origin, expressed in the form of a matrix:
Insert picture description here
Insert picture description here
Insert picture description here
zoom
Insert picture description here
Insert picture description here

Reference article:
Understanding the
homogeneous coordinate system Understanding
homogeneous coordinate transformation

Guess you like

Origin blog.csdn.net/baidu_35536188/article/details/109735600