美文网首页
[转载] 关于 Matrix 中的齐次坐标

[转载] 关于 Matrix 中的齐次坐标

作者: pdog18 | 来源:发表于2017-11-21 14:04 被阅读18次

原文Homogeneous Coordinates
译文关于齐次坐标的理解

Problem: Two parallel lines can intersect.

image

Railroad gets narrower and meets at horizon.

In Euclidean space (geometry), two parallel lines on the same plane cannot intersect, or cannot meet each other forever. It is a common sense that everyone is familiar with.

However, it is not true any more in projective space, for example, the train railroad on the side picture becomes narrower while it moves far away from eyes. Finally, the two parallel rails meet at the horizon, which is a point at infinity.

Euclidean space (or Cartesian space) describe our 2D/3D geometry so well, but they are not sufficient to handle the projective space (Actually, Euclidean geometry is a subset of projective geometry). The Cartesian coordinates of a 2D point can be expressed as(x, y).

What if this point goes far away to infinity? The point at infinity would be (∞,∞), and it becomes meaningless in Euclidean space. The parallel lines should meet at infinity in projective space, but cannot do in Euclidean space. Mathematicians have discoverd a way to solve this issue.

Solution: Homogeneous Coordinates

Homogeneous coordinates, introduced by August Ferdinand Möbius, make calculations of graphics and geometry possible in projective space. Homogeneous coordinates are a way of representing N-dimensional coordinates with N+1 numbers.

To make 2D Homogeneous coordinates, we simply add an additional variable, w, into existing coordinates. Therefore, a point in Cartesian coordinates, (X, Y) becomes (x, y, w) in Homogeneous coordinates. And X and Y in Cartesian are re-expressed with x, y and w in Homogeneous as;
X = x/w
Y = y/w

For instance, a point in Cartesian (1, 2) becomes (1, 2, 1) in Homogeneous. If a point, (1, 2), moves toward infinity, it becomes (∞,∞) in Cartesian coordinates. And it becomes (1, 2, 0) in Homogeneous coordinates, because of (1/0, 2/0) ≈ (∞,∞). Notice that we can express the point at infinity without using "∞".

Why is it called "homogeneous"?

As mentioned before, in order to convert from Homogeneous coordinates

(x, y, w)

to Cartesian coordinates, we simply dividex and y by w;

image

Converting Homogeneous to Cartesian, we can find an important fact. Let's see the following example;

image

As you can see, the points (1, 2, 3), (2, 4, 6) and (4, 8, 12) correspond to the same Euclidean point (1/3, 2/3). And any scalar product, (1a, 2a, 3a) is the same point as (1/3, 2/3) in Euclidean space. Therefore, these points are

"homogeneous"

because they represent the same point in Euclidean space (or Cartesian space). In other words, Homogeneous coordinates are scale invariant.

Proof: Two parallel lines can intersect.

Consider the following linear system in Euclidean space;

image

And we know that there is no solution for above equations because of C ≠ D.
IfC = D, then two lines are identical (overlapped).

Let's rewrite the equations for projective space by replacingx and ytox/w, y/w

respectively.

image

Now, we have a solution,(x, y, 0)since(C - D)w = 0, ∴ w = 0. Therefore, two parallel lines meet at(x, y, 0), which is the point at infinity.

Homogeneous coordinates are very useful and fundamental concept in computer graphics, such as projecting a 3D scene onto a 2D plane.

相关文章

  • [转载] 关于 Matrix 中的齐次坐标

    原文Homogeneous Coordinates译文关于齐次坐标的理解 Problem: Two paralle...

  • 关于齐次坐标

    以下对齐次坐标的解释,主要参考在其他博客看到的,非原创,个人觉得解释的浅显易懂,有助于初学者对齐次坐标的理解。 对...

  • 【转】齐次坐标系入门级思考

    转载自齐次坐标系入门级思考

  • 栅格化时为什么要引入齐次坐标

    参考:为什么要引入齐次坐标,齐次坐标的意义(一)为什么要引入齐次坐标,齐次坐标的意义(二)用矩阵表述变换与齐次坐标...

  • 延展1—齐次坐标

    本文为L_Ares个人写作,包括图片皆为个人亲自操作,以任何形式转载请表明原文出处。 本文学习了网上“关于齐次坐标...

  • 关于齐次坐标的理解

    问题:两条平行线可以相交于一点 在欧式几何空间中,处于同一平面的两条平行直线不能相交,这是我们中学就学的知识。 然...

  • 齐次坐标

    齐次坐标就是将一个原本是n维的向量用一个n+1维向量来表示,是指一个用于投影几何里的坐标系统 齐次坐标是计算机图形...

  • 齐次坐标

    H.C.(Homogeneous Coordinates) are a system of coordiantes...

  • 齐次坐标

    Homogeneous CoordinatesProblem: Two parallel lines can in...

  • 齐次坐标

    《计算机视觉教程》笔记编著:章毓晋(清华大学电子工程系)出版社:人民邮电出版社出版时间:2017.3 (其实,不管...

网友评论

      本文标题:[转载] 关于 Matrix 中的齐次坐标

      本文链接:https://www.haomeiwen.com/subject/krfwvxtx.html