本文主要是介绍Projective geometry (投影几何)(一) 之 2D project plane (2D投影平面),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
2D projectie plane
- Points and lines
- Homogeneous representation of points
- 两条直线的交点 (intersection of two lines)
- Ideal points and the line at infinity
- 平行直线的交点
- Ideal points and the line at infinity
- Model for the projective plane
- Duality
- Conics and dual conics
- Tangent lines to conics
- Dual conics
- Degenerate conics
Row and column vector 通常情况向量 x \boldsymbol{x} x代表着列向量, 行向量使用 x T \boldsymbol{x^T} xT。
一个读者的感悟。
所有的知识点都是来源于书Multiple View of Geometry in Computer Vision 。读书的过程中觉得数学是一个很奇妙的东西。高中学习的知识在projective geometry中莫名被串了起来,形成了新的知识和新的系统。每一个定义和证明都非常巧妙有趣。受益匪浅。
PS 写博客过程中被导师提醒用英语写作可以锻炼research writing 的能力,所以博客后半段用英语写了。难以理解的地方尽量用中文注解。
Points and lines
在投影机和中点和线如何表示。通常情况下一条直线的表示方式为 a x + b y + c = 0 ax + by + c = 0 ax+by+c=0, 于是一条直线的向量我们可以表示为 ( a , b , c ) T (a, b, c)^T (a,b,c)T。然而这个表示并不是唯一的, 因为 ( k a ) x + ( k b ) y + ( k c ) = 0 (ka)x + (kb)y + (kc) = 0 (ka)x+(kb)y+(kc)=0对于任意 k k k, 表示的都是同一条直线, 所以向量可以表示为 k ( a , b , c ) T k(a, b, c)^T k(a,b,c)T。于是这里我们引用 Homogeneous representation of points.
Homogeneous representation of points
点 x = ( x , y ) T \boldsymbol{x}=(x,y)^T x=(x,y)T 在直线 l = ( a , b , c ) T \boldsymbol{l}=(a,b,c)^T l=(a,b,c)T上的条件为 a x + b y + c = 0 ax + by + c = 0 ax+by+c=0. 可以表示为 ( x , y , 1 ) ( a , b , c ) T = ( x , y , 1 ) l = ( k x , k y , k ) l = 0 (x,y,1)(a,b,c)^T = (x,y,1)\boldsymbol{l}= (kx,ky,k)\boldsymbol{l} = 0 (x,y,1)(a,b,c)T=(x,y,1)l=(kx,ky,k)l=0 这里的 ( k x , k y , k ) (kx,ky,k) (kx,ky,k)就是Homogeneous representation,所以投影空间的点可以表示为 ( x 1 , x 2 , x 3 ) (x_1, x_2, x_3) (x1,x2,x3),与之对应的二维空间的点应当表示为$(x_1/x_3, x_2/x_3).
Result2.1. The point x lies on the line l if and only if x T l = 0 x^Tl = 0 xTl=0.
Note that x T l = l T x = x . l x^Tl = l^Tx = x.l xTl=lTx=x.l.
两条直线的交点 (intersection of two lines)
两条直线 l = ( a , b , c ) T l = (a,b,c)^T l=(a,b,c)T and l ′ = ( a ′ , b ′ , c ′ ) T l' = (a',b',c')^T l′=(a′,b′,c′)T. x = l × l ′ x = l\times l' x=l×l′(叉乘)。因为 l . ( l × l ′ ) = l ′ . ( l × l ′ ) l.( l\times l') = l'.(l \times l') l.(l×l′)=l′.(l×l′), 所以 l T x = l ′ T x = 0 l^Tx = l'^Tx = 0 lTx=l′Tx=0。因此,如果点 x x x属于直线 l l l与 l ′ l' l′, x x x就是 l l l与 l ′ l' l′的焦点。
Result2.2. The intersection of two lines l and l’ is the point x = l × l ′ x = l\times l' x=l×l′
例如:直线x = 1 可以被写成-1x + 1 = 0, l = ( − 1 , 0 , 1 ) T l = (-1,0,1)^T l=(−1,0,1)T同理直线y = 1可以被写作 l ′ = ( 0 , − 1 , 1 ) T l' = (0,-1,1)^T l′=(0,−1,1)T.
x = l × l ′ = ∣ i j k − 1 0 1 0 − 1 1 ∣ = ( 1 1 1 ) x = l \times l' = \begin{vmatrix} i &j &k \\-1 & 0 & 1 \\ 0 & -1 & 1 \end{vmatrix} = \begin{pmatrix} 1 \\ 1 \\1 \end{pmatrix} x=l×l′=∣∣∣∣∣∣i−10j0−1k11∣∣∣∣∣∣=⎝⎛111⎠⎞
Result 2.4. The line through two points x and x’ is l = x × x ′ l = x\times x' l=x×x′
Ideal points and the line at infinity
理想点和无穷远处的线的定义。
平行直线的交点
两条直线 l = ( a , b , c ) T l = (a,b,c)^T l=(a,b,c)T和 l ′ = ( a , b , c ′ ) T l' = (a,b,c')^T l′=(a,b,c′)T。两条直线互相平行。交点 l × l ′ = ( c ′ − c ) ( b , − a , 0 ) T l\times l' = (c' - c)(b, -a, 0)^T l×l′=(c′−c)(b,−a,0)T,由于
( c ′ − c ) (c' - c) (c′−c)是常数,所以交点为 ( b , − a , 0 ) T (b, -a, 0)^T (b,−a,0)T。当我们想要将这个点表示为2D的点的时候,我们发现这个点在无穷远处。所以在投影几何中,我们认为平行的直线相较于无穷远点。
例如:直线x = 1 可以被写成-1x + 1 = 0, l = ( − 1 , 0 , 1 ) T l = (-1,0,1)^T l=(−1,0,1)T同理直线x = 2可以被写作 l ′ = ( − 1 , 0 , 2 ) T l' = (-1,0,2)^T l′=(−1,0,2)T.
x = l × l ′ = ∣ i j k − 1 0 1 − 1 0 2 ∣ = ( 0 1 0 ) x = l \times l' = \begin{vmatrix} i &j &k \\-1 & 0 & 1 \\ -1 & 0 & 2 \end{vmatrix} = \begin{pmatrix} 0 \\ 1 \\0 \end{pmatrix} x=l×l′=∣∣∣∣∣∣i−1−1j00k12∣∣∣∣∣∣=⎝⎛010⎠⎞
Ideal points and the line at infinity
For the homogeneous points, 如果向量 x = ( x 1 , x 2 , x 3 ) x = (x_1, x_2, x_3) x=(x1,x2,x3)中, x 3 = 0 x_3 = 0 x3=0, 那么这个点被称为ideal points or points at infinity。这一系列ideal points 是位于一条直线上的 叫做line at infinity l ∞ = ( 0 , 0 , 1 ) l_\infty = (0,0,1) l∞=(0,0,1),因为 ( 0 , 0 , 1 ) ( x 1 , x 2 , 0 ) T = 0 (0,0,1)(x_1, x_2, 0)^T = 0 (0,0,1)(x1,x2,0)T=0.
Note that l = ( a , b , c ) l = (a,b,c) l=(a,b,c) and l ′ = ( a , b , c ′ ) l' = (a,b,c') l′=(a,b,c′)与 l ∞ l_\infty l∞相交于同一点 ( b , − a , 0 ) T (b, -a, 0)^T (b,−a,0)T。在普通几何学中, ( b , − a ) (b,-a) (b,−a)是一个与直线相切的向量,所以与直线互相垂直的向量可以表示为 ( a , b ) (a,b) (a,b),可以表示直线的方向。Consequently, the direction of the lines varies as the coordinate of the ideal point ( b , − a , 0 ) T (b, -a, 0)^T (b,−a,0)T so the line at infinity can be regarded as a set of direction of the lines in the plane.
Model for the projective plane
Duality
The results above have duality. The equation l T x = 0 l^Tx = 0 lTx=0 for the line and point is symmetric since l T x = 0 l^Tx = 0 lTx=0 implies x T l = 0 x^Tl = 0 xTl=0. Similarly, the results 2.2 and 2.4 have duality as well. So we can get the result of Duality principle.
Result 2.6. Duality principle To any theroem of 2-dimensional projective geometry there corresponds a dual theorem, which may be derived by interchanging the role of points and lines in the original theorem.
Conics and dual conics
Conic is a curve (这里的conic是指圆锥曲线) described by second-degree equation. Conics: hyperbola, ellipse and parabola (non-degenerate conics).
Note that:
The equation of conic can be written as:
a x 2 + b x y + c y 2 + d x + e y + f = 0 ax^2 +bxy+cy^2+dx+ey+f = 0 ax2+bxy+cy2+dx+ey+f=0
We can rewrite it with homogeous coordinate by replacement: x = x 1 / x 3 x = x_1/x_3 x=x1/x3, y = x 2 / x 3 y = x_2/x_3 y=x2/x3, so that the equation is:
a x 1 2 + b x 1 x 2 + c x 2 2 + d x 1 x 3 + e x 2 x 3 + f x 3 2 = 0 ax_1^2 +bx_1x_2+cx_2^2+dx_1x_3+ex_2x_3+fx_3^2 = 0 ax12+bx1x2+cx22+dx1x3+ex2x3+fx32=0
or formula x T C x = 0 x^TCx = 0 xTCx=0, where the conic coeffieient matrix C C C is given by:
C = ( a b / 2 d / 2 b / 2 c e / 2 d / 2 e / 2 f ) C = \begin{pmatrix} a&b/2 & d/2 \\ b/2 &c&e/2 \\d/2&e/2&f \end{pmatrix} C=⎝⎛ab/2d/2b/2ce/2d/2e/2f⎠⎞
It is symmetric and has 5 degree of freedom (五个未知数).
Thus, 5 points can define a conic.
Tangent lines to conics
Result 2.7. The line l l l tangent to C C C at point x x x on C C C is given by l = C x l = Cx l=Cx
Proof: (需添加proof)
Dual conics
The description in Reuslt 2.7 is defined by points. We can change it to lines which we denote as C ∗ C^* C∗. A line tangent to conic C C C satisfied l T C ∗ l = 0 l^TC^*l = 0 lTC∗l=0. C ∗ C^* C∗ is the adjoint matrix of C C C. For non-singular symmetric matrix C ∗ = C − 1 C^* = C^{-1} C∗=C−1.
What’s more, from Reuslt 2.7, at the point x, the tangent line is l = C x l = Cx l=Cx, which indicates that the points x at the line l l l which intersects the C as x = C − 1 l x = C^{-1}l x=C−1l. Since x T C x = 0 x^TCx = 0 xTCx=0, we obtain ( C − 1 l ) T C ( C − 1 l ) = l T C ∗ l = 0 (C^{-1}l)^TC(C^{-1}l) = l^TC^*l = 0 (C−1l)TC(C−1l)=lTC∗l=0 (because C is symmetric matrix, we can get C T = C − 1 C^T = C^{-1} CT=C−1).
Similarly, 5 lines can define a dual conic.
Degenerate conics
When the matrix C does not have full rank, then the conic is degenerate. Degenerate point conics include two lines (rank 2), and a repeated line (rank 1).
(需添加example)
这篇关于Projective geometry (投影几何)(一) 之 2D project plane (2D投影平面)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!