It might be weird for me to register for the computer vision course alongside my Master’s thesis1, but as my friends know, I’m pretty much originally a gamer before I’m even started to be interested in mathematics (and then computer science). After playing some video games, I started to form another dream of building my own robot! Interesting!

So I asked Mr. Dae (i.e. Assoc. Prof. Nattee Niparnan, Computer Engineering, Chulalangkorn University) to teach me robotics, and I sent him the current course offerings at ETH. He suggest me to begin with Computer Vision, so here I am.
(Also, if at some point, I turn out to be too busy doing these than spending adequate time with the thesis, I might consider withdrawing from the courses later on… For now let’s just see how it goes…)
Now, as a chuunibyou and edgy person as I am right now, I’m often attracted to recasting things into an algebro-geometric language.
Note: I wrote this post myself, but I used ChatGPT to catch some of the errors. In particular, let me put a big disclaimer here. Disclaimer: Some statements are false! I try to fix them as much as I could, and the main idea should still work, but there may be bugs and I don’t have enough time and energy to polish to the cleanest point, so that’s it.
The Basics of Geometry
Let us fix a base field
and recall the basic settings. The affine
-space, denoted by
, is simply the set
without the additive structure of a vector space. We equip this with Zariski topology and the sheaf of regular functions to see that this is just the scheme
over
.
Now we go to the projective case, which is the main protagonist of the relevant geometry here. We define the projective space
as
, where
whenever there exists some
such that
for all
. Equipping this with Zariski topology and the sheaf of regular functions turns this into the scheme
over
.
Now, there is another important construction, which many books don’t appreciate but I think we should introduce it here: the dual projective space. We define
to be the projectivization of the vector space
of
-linear forms of
. We can think of an element of
as a hyperplane, because the zero locus of a projectivized linear form is really just a hyperplane in
.
There is now an obvious map
. How? Let the point
be sent to the linear form
, and then collapsed through the projectivization into its class in
. In this blog post, my decision is to denote this map by the symbol
, and write
for such operation (for
). You may appreciate (or hate) this notation later on.
Convention: Here I try to adapt to both the culture of algebraic geometry and the culture of computer vision, so, for a point
(with a normal font for
), this is just a point, and the homogeneous coordinates are written
. For a single point
there may be multiple choices for its coordinate, i.e., if
is a coordinate, then one can just pick
and then
would also be another coordinate. The convention is that if I write
then this means “let
be any possible form of the homogeneous coordinates for
; it doesn’t matter what we pick”. The “it doesn’t matter what we pick” is an assertion, and technically has to be check every time I write this and claim something, but we will implicitly keep this in the back of our minds and just work with it (and stop ourselves from doing any operation that isn’t invariant under the choice of such coordinate). Now, when I write
(in boldface), it is meant to be understood as the vector
or also the corresponding matrix in
. That is, boldfaces represent viewing things in a linear algebraic manner, while normal font represents viewing things abstractly (and also in the algebro-geometric sense). For points, we will often use
to denote the vector of coordinates corresponding to a point in
and use
to for a point in
.
Points and Lines
There is a computational trick that I didn’t know before. If
are 2D projective points, then what would be the line passing through them? Before that, what is a line in
? Algebraically we may think of a line as a projective subvariety defined as the zero locus of a linear polynomial. And this can be interpreted computationally easily: let
be not all zero, then the projective variety
is said to be a line. And we can then interpret this linear-algebraically: a coordinate
is on the line whenever
(and then projectivize this). What I want to say is that the projectivization of the linear form
is an element of
corresponding to this line! Therefore, a line in
is just an element of
(one has to check the reverse correspondence, but this is not hard).
An element of
can therefore be represented by homogeneous coordinates
, where its line locus is
. This means, for a line to pass through
and
, such line, parametrized by
, must satisfy
![Rendered by QuickLaTeX.com \[\begin{cases}ap_0 + bp_1 + cp_2 = 0\\aq_0 + bq_1 + cq_2 = 0.\end{cases}\]](https://blogs.ethz.ch/its/wp-content/ql-cache/quicklatex.com-cfefdc1417d464e3b44a6eaaf234a6a6_l3.png)
What are the answers to this linear system of equations? Surprisingly, a clean answer here is
(cross product). We can check this explicitly. Recall that
![Rendered by QuickLaTeX.com \[\mathbf{p} \times \mathbf{q} = \begin{pmatrix}p_1q_2 - p_2q_1\\p_2q_0 - p_0q_2\\p_0q_1 - p_1q_0\end{pmatrix}.\]](https://blogs.ethz.ch/its/wp-content/ql-cache/quicklatex.com-4718cd3e5a655b207ea70cad3ef79405_l3.png)
You can plug this into the equations and see that they are satisfied. Now, I think the uniqueness question isn’t hard. By linear algebra, the solution space
cut out by two linear equations is a one-dimensional subspace (if
), or a two-dimensional subspace (if
). For the case of
, by projectivization, such one-dimensional subspace reduces to a single object in
. This is the line passing through
and
. For the
case there are still infinitely many lines passing through them, and so there is not much we can do to try and extract one correct line. We have:
Proposition 1. For a pair
of distinct points, there exists a unique line passing through them. If
then
is that line. ![]()
Now, in computer vision, we often represent things with arrays (and hence vectors and matrices), so instead of keeping things in
, we often write down
, representing an element
such that
is its corresponding line. In practice, we’d use the following characterization: a point
lies on the line
if and only if
(if and only if
as well).
Onto the next computational trick, suppose
are “lines” (i.e.
are the corresponding lines). What is the intersection of these two lines? The surprising computational trick is that we can write the lines’ data in vectors
, and then consider the cross product
. Then
is the intersection point (with its homogeneous coordinates being
) of the two lines! This works whenever
. Let us show this. Let
and
. Then
. If
then
,
, and
, i.e.
, a contradiction to our assumption that
. So
, and so
is well-defined as an element of
. Now let us check that
lies on
and
. Indeed,
, so
lies on
. Similarly one can check that
, and so
lies on
as well. Observe that maybe
and
can be parallel in the standard affine patch, but then that means they intersect at the point at infinity, and that’s fine. This gives the following dual to the Proposition 1:
Proposition 2. For a pair
of distinct “lines”, there exists a unique point
lying on the intersection of
and
, and a homogeneous coordinates of
can be taken to be
. ![]()
(Uniqueness can be proven similarly to Proposition 1.)
Conics

Depending on where you’re from, you might define a conic as:
- circles, ellipses, parabolas, and hyperbolas
- the zero locus of a quadratic polynomial

- the intersection of a plane through the standard double cone
- a plane algebraic curve of degree

- an algebraic curve of genus zero
Here I’ll introduce the viewpoint from computer vision: a conic is represented by a matrix
, where the conic is the zero locus of
. More precisely, the conic corresponding to
is the set
. In other words, a conic is a zero locus of a quadratic form, projectivized. Without loss of generality we can restrict such
to be a symmetric matrix, so we have
parameters, i.e. it looks like
![Rendered by QuickLaTeX.com \[\begin{pmatrix}a & b & c\\b & d & e\\c & e & f\end{pmatrix},\]](https://blogs.ethz.ch/its/wp-content/ql-cache/quicklatex.com-eaa9efd06e831660a46698caedb606d7_l3.png)
where
. Since the locus is the same up to projectivization, the parameters can all be simultaneously scaled by any
and they’re still giving the same conic, so there are actually
degrees of freedom, or in other words, the moduli space of conics in
has generic dimension
. What does this mean? We have the following proposition:
Proposition 3. For general five points
there exists a unique conic passing through the points.
Proof. (Existence) Let us parametrize the conics by the family
. When we want to impose that
lies on the conic, this amounts to imposing that
. If we view
as the unknown and
as a given known point, then the equation
is exactly a linear constraint on the parameters of
(perhaps it will be much clearer if we expand the matrix multiplication, but I don’t want to make it messy). This means “the collection of
such that the conic associated to
passes through
” is the zero locus of
cut out by five linear equations. If you translate this phrase using
, you can see that the question is then “what’s the intersection locus of five hyperplanes in
“.
At this point I can import the Chow ring machinery and fancier stuffs, but I think it’s better to think intuitively that each linear equation (corresponding to a hyperplane in
) reduces the dimension by one, and so with five general hyperplanes, the intersection locus is a nontrivial zero-dimensional locus. This (roughly and intuitively) proves the existence. For readers who want a rigorous Chow ring machinery, here I’ll note that
where
is the rational equivalence class of a hyperplane. This is Theorem 2.1. of Eisenbud–Harris. Now if we consider
and ask for
, then we get
in
, hence a nontrivial intersection locus, for general hyperplanes.
(Uniqueness) For general readers, I wish to ask you a simpler question that I found from David Bessis’ Mathematica: Can a straight line intersect a circle at three points? You can convince yourself that the answer is no, perhaps by trying to perform such intersection, and to picture such phenomena in your mind. A next logical example is the number of intersections of two ellipses. I think it’s not hard to try on your own to imagine two ellipses intersecting at four points. But you will find it impossible that two ellipses intersect at five points (if you really try to make them intersect at more than four points, you will eventually coerce them to intersect at every point, which is infinitely many points, and is a degenerate case). If you’re already convinced here, then the proof is done: perhaps we prescribe the points
and suppose there are two conics
and
passing through all the five points. If
then we are done, but if not, then
and
are distinct conics, and they can intersect only at most at
points, a contradiction to the fact that
lie on the intersection of
and
.
For a rigorous statement and proof, we need Bézout’s theorem to conclude that
and
intersect at at most
points.
Note that in the statement, I used the phrase “general five points” because it is not true that this statement holds “for all five points”! One obvious problem you might see is when the points are not distinct and so the uniqueness proof doesn’t go through. Another problem is when some of the points are collinear, and so the dimension reduction argument in the proof of existence doesn’t go through. So, by “general five points”, what I mean is that “the set
such that the statement holds is Zariski-dense in
“. ![]()
Now, there is a very natural and beautiful generalization, which I’ll state it here and leave it to the readers who wish to prove it by themselves (or, perhaps, ask your favorite LLM).
Theorem 4. Let
be given. For a general tuple of
points in
, there exists a unique plane algebraic curve of degree
passing through all the points.
Now let us move on to the computer vision part!
The Pinhole Camera
How does a camera work? (Disclaimer: I don’t know!) For readers who know how a camera works, please feel free to comment (or even teach me)! Since I’m not intrinsically interested in constructing a camera or something like that, I’ll just abstract it away, and consider the pinhole camera model as a standing hypothesis.

In this model, we consider the camera as a box on the right (the blue plane acts as the front of the camera, and the yellow plane acts as the “film”, or some plane that “records the image”). The pinhole is what makes such recording possible: sunlight hits the object in the “3D Scene”, then reflect its color in every direction. The pinhole is the filter that “we only want to capture these few directions of rays”, so that the possible rays of light that hit the image plane will only be the rays passing through the pinhole point.
What if the pinhole is too large? This is where the image gets blurry: the top of the tree gets sent across a chunk of vertical spaces, and so on. See the following image.

What if the pinhole is too small? Actually, theoretically, there’s no downside to that. Just make it the smallest as you can, but if it’s too small to be practically used, the light gets blocked by the pinhole itself and then we can’t capture the image.
There is a fun mini-experiment, if you have a myopia or something like that. Normally we use eyeglasses (i.e. lenses) to refract the light rays and correct the focal point. But there is another way. Put off your eyeglasses, pinch a tiny hole on a piece of paper (or use your hand to make a very small hole), and look through it (place it very closely to one of your eyes, and close the other eye). You might see the image clearly. Here is my attempt to explain how it works.

Basically, the problem of myopia is that the green ray and the blue ray converge before they hit the retina. Important, and this is where a lot of people got it wrong, including me, and got corrected by a friend of mine (thanks Atom!): it is not true that the lens makes the light rays focus at the retina. The light rays (from different parts of the scene, i.e. see red vs blue rays) focus before they hit the retina, turning the image into an upside-down image. It is only that the rays coming from a single point of the scene can hit the eye surface at different spots, making it blurry at first. The lens of the eye then tries to focus these rays to get a sharp image of the point at the retina. Now, how does the pinhole help in the case of myopia? The pinhole is a filtering device that tries to only allow (near-)parallel rays to pass through, so at a single point of the scene, multiple rays reflected into all directions are filtered out, leaving only a small bunch of rays that are already nearly parallel into the eye. The lens can then focus these rays (in the example image above the focal point is even before the lens), and then the image hits the retina, with a very small degree of blurry effect corresponding to different rays emitted from the same point of the scene.
Now, back to computer vision. For our purposes, we will now assume our camera model to be the pinhole camera model without lenses (because this simplifies things a lot). To model this mathematically, a pinhole camera is just a particular kind of linear mapping from the scene in
to the image in
. For simplicity, instead of viewing the image upside down, we will assume that the computer can just flip the image directly, and model our image space as having the same orientation as the scene. And for simplicity, we replace the real affine spaces by complex projective spaces,
and
. Consider the following model:

Abstractly, we would want something like the following definition.
Definition. A pinhole camera is a matrix
which defines a partial map
by sending
(viewed as a vector in
) to
(matrix multiplication).
Why is this only a partial map and not an actual projective morphism or something like that? The problem is that, for some bad values of
, the matrix multiplication
may vanish, and hence not well-defined in
! (For example, inputting the pinhole gives an undefined projected point!)
This makes it a bit hard to define it purely in algebro-geometric terms, but let me give it an attempt. Consider the sheaf
, and grab a rational section
over a dense open
. This corresponds to the pinhole camera matrix
given by
. So, uh…, yes… a pinhole camera is a rational section of the sheaf
.
Note: I think this phenomenon is closely related to the situation of quasimap, which is defined from a nodal curve
to
as a morphism
in the following commutative diagram:

where
is the quotient stack. But ok, I don’t know much about quotient stack (yet), so I don’t think I should try to guess how things work. It’s just that the idea of pinhole camera came up while I was listening to the talk of Denis Nesterov in last Wednesday’s seminar.
Now, before moving on, I want to dissect
a bit more so that we won’t miss what’s in the literature. There are two parts of the camera transformation: the intrinsic part
and the extrinsic part
, with
and
, and we have
(the notation
is just the block matrix notation: it is a
matrix whose first three columns are from
and the last column is from
). This may sound nonsense to the pure mathematicians, but it’s actually important (in an applied sense) to know which parameter controls which quantity in real life.
Since a pinhole camera
defines a partial map
by sending
to
, observe that the actual map
is the same when you scale
by some scalar
. This means there are
degrees of freedom for
. In these
degrees of freedom, we interpret it into
intrinsic parameters (i.e. design
in such a way with
degrees of freedom) corresponding to focal length, skew, and principal point, and
extrinsic parameters (i.e. design
and
in such a way with
degrees of freedom) corresponding to
for rotation and
for translation. We describe the design of
and
in the following.
In pixel coordinates, let
![Rendered by QuickLaTeX.com \[\mathbf{K} := \begin{pmatrix}\alpha_x & s & p_x\\0 & \alpha_y & p_y\\0 & 0 & 1\end{pmatrix}, \qquad \alpha_x = fm_x, \alpha_y = fm_y.\]](https://blogs.ethz.ch/its/wp-content/ql-cache/quicklatex.com-3169062f31739b7221582de91a8c58be_l3.png)
Here, we have:
is the focal length in length units,
convert from length to pixels,
is the skew,- and
is the principal point.
We say that
is intrinsic because it’s the property of the camera, no matter how we move the camera around, while
is extrinsic because it depends largely on the camera’s pose. Here,
corresponds to where the camera is positioned in the world. The entries in the matrix for
are free, so
has
degrees of freedom.
And
corresponds to how the camera is rotated. Actually, we can just restrict to
. Since
, we see that
has
degrees of freedom.2
Under the settings above, we redefine the notion of the pinhole camera using this decomposition
.
Redefinition. A pinhole camera is a matrix
coming from
with
where
,
, and
. We call
the intrinsic matrix of
, and
the extrinsic matrix of
.
Proposition 5. For a pinhole camera
, we have
.
Proof. Since
, and
, we see that
is invertible, and so
. But
so
has full rank, and so
also has rank at least
. Since
is a
matrix, its rank is at most
, so its rank is exactly
. ![]()
Basic Problems of Computer Vision
Here I’ll introduce briefly some of the very first basic problems we wish to solve in computer vision. As we all know, computer vision is the inverse of computer graphics. In graphics, we have some data of an object, a 3D model, or something like that, and we wish to visualize such object into the scene. In vision, we have the image data of a scene, and we wish to learn about what is happening. The first problem is therefore the homography problem, or, more appropriately, the correspondence problem: you have two images of basically the same thing. How do you “match” which part of the first image correspond to which part of the second image? See the following example.


These two images are not exactly the same, but they “morally” present the same scene. I took them within the same minute, at the exact same place (but perhaps with some hand movement and some camera rotation) during a trip to Grindelwald with Mammoth (a friend of mine) in September 2025.
Here is an example of a possible correspondence (not really very good but it’s what my program spits out). This mainly uses the Harris corner detector and then mutual nearest neighbors. The Harris corner detector is a nice, simple, and classical way to detect corners, where the descriptor here is the sum of squared differences (SSD) between
pixels patches around each keypoint.

There are obviously better ways of doing things. For example, instead of just detecting corners and matching them using SSD, one can also detect blobs using Laplacian of Gaussians (LoG) or similar techniques. And for the descriptor, this raw
neighborhood extraction is a very basic (and inefficient) way. One can replace this by SIFT or other techniques as well. I’ll not go through the mechanism of Harris detector here since it would be too long and it’s outside the current post’s focus. I’m just presenting this as a possible basic solution to the correspondence problem.
What’s the point of the correspondence problem? Basically, it’s the first step to teach the computer “how to see things” from images. But it’s not just that. Some applications include, for example, deduction of a homography between two camera poses, attaching different images to form a panorama, etc. I still don’t have much experience on that side, so I won’t go more into the details. Let us now move on to the next problems.
Multi-View Geometry
The next collection of problems I’d like to present here concerns the existence of multiple cameras. Why do we even want to have multiple cameras? Have you ever wondered why do you have two eyes (instead of one)? The basic problem of having one eye is that it is intrinsically impossible to know the depth (i.e. whether an object is near or far) in a flat image without external data. Under the standard
pinhole camera, one degree of freedom is gone (in a sense, it’s intuitively a kind of projection, but not necessarily mathematically a projection; the axis to which the projection is done along is forgotten upon such projection). This problem can be fixed once one has at least two cameras (intuitively, two cameras impose high enough constraints to pin down the depth). We will see how this works later, but let me introduce the three fundamental problems of multi-view geometry first.
Correspondence Geometry: Given an image point
, how does this constrain where the corresponding point
appears in another image? (If this is confusing or if it sounds nonsense, I recommend you to go back to the correspondence problem above that we’ve tried to match points of one image with points of another image; this scenario is similar, but the question is more precise: if I fix the pixel
, how much can we say about the corresponding
in another image)
Camera Geometry (Motion): Given a collection of corresponding points
, how can we recover the relative cameras and poses
?
Scene Geometry (Structure): Given correspondences
, and known cameras
, then where are the 3D points
actually located?
It’s not like they are three separated problems, but rather a sequential process where we solve the first problem then go to the next, and then to the last, in order to reconstruct a 3D scene out of images from two cameras.
Let us now develop the geometry to solve these problems.
Epipolar Geometry
Let us set the stage. Suppose there are two cameras:
and
, and
and
denote their “centers” (i.e. their imaginary pinholes) respectively. Suppose we’re looking at a point object
in the scene. The image
is obtained by
, where
is the camera projection matrix of
. Similarly, the image
can be obtained in the same way:
, where
is the camera projection matrix of
. Let
be the unique plane through the points
(this is well-defined assuming
are not collinear). We call
the epipolar plane.
Then, one can draw a line connecting
to
. This is called the baseline. It intersects the image plane of the first camera at a point
, called epipolar point. Similarly, it also intersects the image plane of the second camera at a point
, also called epipolar point. The straight line connecting
and
(and then extended indefinitely) is called the epipolar line, denoted by
. The same process can be done on the other side, getting
. The following picture illustrates everything I’ve said.

This illustration above is (intentionally) symmetric (since it’s harder to draw in a more general case), but in general it need not be so. Now consider if you’re looking using the first camera on the left. You capture the image. What do you see? You see the object at
but you only know the image coordinate
, and not the world coordinate
. The only deductible information is that
must lie on the ray (in the world coordinates) from
to
. We also know that this ray must be on the epipolar plane
. We then see that this plane
, when intersected with the image plane of the second camera, gives the epipolar line
. And then we see that the corresponding image point
must lie somewhere on
.
This is an additional deduced constraint for the Correspondence Geometry problem: once we know
, and the image plane of the second camera, we can deduce immediately that
must lie on
(and
can be computed from the known information). This constraint is called the epipolar constraint.
What can we say once we know the epipolar constraint? Well, for simplicity, suppose we know every parameters (including
, epipolar points and lines, image planes, and the epipolar plane). The epipolar constraint is precisely
. Now what is
? Since
is defined as the line passing through
and
, we may apply Proposition 1 and see that
. This allows us to get the following remarkable deduction:
Theorem 6. Let
be the camera projection matrices for the two cameras. Then there exists a unique (up to scaling) matrix
of rank
such that for all object point
in the scene (assume
), if
is the image point on the first camera, and
is the image point on the second camera, then they satisfy
.
Before going to the proof, let me state a small lemma that might illuminate us why the epipolar constraint and the epipolar plane is useful.
Lemma 7. Given the prescription of everything, i.e.,
(assuming
and assuming that
are not collinear), the epipolar plane
, the first epipolar line
, and the second epipolar line
, there exists an “invertible linear projective transformation”
(i.e. there exists a matrix
) sending
to
(i.e.
for all
such that
), which sends
to
(i.e.
) and
to
(i.e.
).
I’ve tried to make a proof of this one, but my proof contained some errors and it’s quite tedious and long, so I retract the proof and leave this statement here as a linear algebra grinding exercise for anyone interested (or disprove it if you don’t trust it). It is intuitively very clear why it works (you can just draw two lines and find a map that project one into another), and it should morally be true, but then yes you have to grind the details to establish it.
We call such
a homography from the first image plane to the second image plane with respect to
, and write
for
.
Why is this relevant? In Theorem 6, if we ask for
for a single correspondence
instead of for all correspondences, we now have a very nice simple solution. Recall that the epipolar constraint is
, and we saw that
. Lemma 6 shows that there exists an invertible
with
. This means the epipolar constraint, when transposed to
, amounts to
![]()
But for any vector
, the cross product
is just
, so
, where
![Rendered by QuickLaTeX.com \[[\mathbf{e'}]_\times = \begin{pmatrix}0 & -e'_3 & e'_2\\e'_3 & 0 & -e'_1\\-e'_2 & e'_1 & 0\end{pmatrix}.\]](https://blogs.ethz.ch/its/wp-content/ql-cache/quicklatex.com-60ff01fa97e359d36dc32e5abc06326c_l3.png)
This means we can write the epipolar constraint as
, and so it is now clear to define
. This has rank
since
has rank
and
is invertible. So, for a single correspondence, we got
already! The rest is to try to establish some (potentially different)
that works for all correspondences.
Recall that
(i.e. it is undefined in
to project the pinhole of the camera onto the image plane). Recall also that by our Proposition 5,
. By the rank–nullity theorem,
, and so the subspace
is exactly the kernel of
. Let
be its orthogonal complement, then we see that
is an isomorphism of vector spaces, hence invertible. Let
be its inverse, i.e. that
for all
. Since
is bijective,
is well-defined, and we see that
automatically. Note: this
is closely related to the concept of a pseudoinverse, but since I haven’t received any formal education on that topic, and I’m too lazy to go out of my way to develop the singular value decomposition (SVD) machinery and to prove the existence and uniqueness of pseudoinverses, I decided to just use the ad-hoc approach in this way. Also another important fact is that we defined
based on
and
(and not anything about the image or the scene).
The next step will depend on the object in the scene. For an object point
in the scene, we get
, so
. Since
, we can write
uniquely, and we see that
. That is,
. Now if we view from the second camera, we get
. But now, recall the epipolar constraint
and recall that
(see, i.e. before Lemma 6). And the epipolar point
is defined as the projection of
onto the image plane of the second camera, i.e.
. Substituting these, we get
![]()
And we substitute back
to see that
.
So the epipolar constraint becomes
. Put
to see that
. Observe that the definition of
doesn’t depend on the choice of
, i.e., it works for all object points. Also, recall that
has rank
, and
is invertible, so
has rank
. This proves the existence part of Theorem 6.
Before proving the uniqueness, let us deduce some more useful properties of the fundamental matrix.
Lemma 8. Let the camera settings
be given. Let
and
be the epipoles. Let
be a fundamental matrix for this setting. Then,
- For any
,
. And similarly for any
,
.
and
.- For a point
on the first image plane (this works even if
is not an image point, i.e. when
) such that
, without knowing the actual object point
, we can deduce the epipolar line in the second image, as it satisfies
. Similarly, on the other side,
for all
.

Proof. For the first item, consider the illustration above. Let
be any image point (i.e. assume
). We try to draw the red line, say, let
. Note:
since
, but the rest is fine. Now, for each object point
, we can project to
, and this lies on the line
, and by definition, when projected to
, we get the point
(but possibly differently scaled in the homogeneous coordinates). In this sense, this means the point
and the point
are in correspondence, and so, by the defining property of
, this means
for all
. Taking limit as
approaches
, since
is continuous, we see that
as well, and since
, we deduce that
. This proves the first direction of the first statement in case that
corresponds to the coordinate of an actual point (i.e.
). Now what if
? In that case
is an image point, so
. And also
itself is an image point, so
. Subtracting them gives
. This proves the general case. The other direction is the same, by symmetry. This proves the first statement.
Now, for the second statement, we use the first statement: we know that
for all
, and by picking a basis and plugging into
, this is enough to see that
, and so
. Similarly,
for all
means
for all
and so
, so
. This proves the second statement.
Now, for the third, suppose
is the object point, which is unknown to us (this exists even if
is not an image point, i.e.
, since
has full rank; recall Proposition 5). The epipolar constraint tells us that
(and also
since the second epipole lies on the epipolar line). By the defining properties of the fundamental matrix, we see that
. This means
, i.e.
lies on the line
. Now, by the first statement, we see that
, which is
, i.e.
lies on the line
. Since there is only a unique line passing through two points (recall Proposition 1), and both
and
pass through
and
, we see that they must be the same line, i.e.
. By symmetry, the other side works similarly. This completes the proof. ![]()
Now we can go back to our main theorem.
Proof of uniqueness (up to scaling) of Theorem 6. Suppose
and
are two fundamental matrices. By Lemma 8(3), for each point
its epipolar line on the second camera
satisfies
and
. This means
. That is, for each
there exists
such that
. A priori,
is just a function without any structure (i.e. we can’t assume continuity, linearity, or anything), but observe that for
, and any
, the relation above tells us that
![]()
Rearranging the terms, we get
.
This means, whenever
and
are linearly independent, we can see that
. (And also, when
we get
)
Since
is of rank
, as usual, we have
, and by Lemma 8(2),
. So if
and
are linearly dependent, then pick some
such that
and
(this exists since
), then
and
are linearly independent, and
and
are linearly independent, so
. This shows that
for all
, whether they’re linearly independent or not, and so
is a constant function! Therefore, there exists some
such that
for all
. Picking
to be each basis element shows that
, and so this proves the uniqueness up to scaling of the fundamental matrix. ![]()
By the existence part, we’ve explicitly constructed
, and by the uniqueness part, this is the unique fundamental matrix up to scaling. Therefore, for a pair of pinhole cameras
, we can construct
, and hence
, by the above procedure, and so this is a well-defined function
![]()
Now, I wonder, whether the converse of Theorem 6 is true. That is, suppose
satisfy
, then is it true that
and
are in correspondence, i.e. that there exists
such that
and
?
Assume that
and
. By uniqueness of Theorem 6, we can assume
immediately. Suppose
satisfy
, then, expanding
, we get
. Let
to see that
. Geometrically and intuitively, this means
lies on the unique line (in
) that passes through
and
. In the locus form, we can take
to be that line. The fact that this passes through
(and
) tells us that there exists some
such that
. Fix such
and write
such that
.
Now, put
. Observe that
. This means
. Now observe also that
. This shows that
and
are in correspondence!
The problem when at least one of the image point is at its epipole is that
immediately, but there is no such world point
that projects to them!
This shows that the converse of Theorem 6 is true whenever
and
.
Now, and this may be a stretch, but let me dub it “The Fundamental Theorem of Epipolar Geometry”, is therefore the following consequence.
Theorem 9. For two pinhole cameras with matrices
and
and pinholes at
and
, let
be their fundamental matrix, then the following is an exact sequence of
-vector spaces.
![]()
where
.
Proof. The first map looks injective, but is actually not (one can see this by comparing the dimensions). Nevertheless, the lifted version works: suppose
and
, then this means
, so
.
The second map is surjective. Indeed,
has rank
, so for
outside
, we may look for
such that
. There are infinitely many such
, so we can simply grab such a pair
and see that
. Scaling
by any
gives the surjectivity.
Now, onto the exactness, the fact that the image of the first map is in the kernel of the second map is precisely Theorem 6: for any
arising from some correspondence, we have
. The fact that the kernel of the second map is in the image of the first map is the converse of Theorem 6 we’ve just shown: if we know that
, then there exists some
such that
and
. ![]()
Phew. Now we have a partial solution for the Correspondence Geometry problem: if the settings
are given, then the task is just to compute the fundamental matrix
, and then every correspondence can be characterized by
.
The main problem is that in practice, we may not know the camera settings! This leads us to the second problem: the problem of motion.
The Problem of Motion
We haven’t yet established a way to calculate
directly from empirical correspondences (which we will eventually do, just a bit later), but suppose we magically know about
, then can we deduce back
? It turns out that we can, up to some projective ambiguity. This intuitively leads us to this sequence:
![]()
Strictly speaking, this is nonsense, since we’re not working over an abelian category, and so there’s no such thing as an exact sequence. But what I want to show is that the preimage of
can be determined up to an ambiguity of
. (Uhh… what’s the right way to say it? The fiber of
at each point is isomorphic to
? I guess???) Let me formulate it in a better way.
By the way, here we distinguish between different scales of a pinhole camera projection matrix, so, uhh, perhaps not
but rather
would be the correct description for
. I think the following is the correct precise theorem, and let us prove it.
Theorem 10. Let
be a pair of pinhole camera projection matrices. If
, then the pair
has the same fundamental matrices as
.
Proof. A pair
is in correspondence if and only if
if and only if there exists some
such that
and
if and only if, for
, we have
and
if and only if
, where
is the fundamental matrix for
. This means
. Since
and
are arbitrary, we see that
. ![]()
The converse is also true, and this is called the uniqueness theorem:
Theorem 11. Let
and
be two pairs of pinhole camera projection matrices. If
then there exists some
such that
and
.
I’m too lazy to prove this one. I looked it up in the lecture notes, but the details are quite tedious linear algebra grinding. But Theorem 10 was enough to deduce a useful canonical form for pairs of pinhole cameras projection matrices: If we have
, then since they are of full rank, there exists some
such that
. When this happens, we look at
and record it as
. Once in this form, one checks that
(just push the formula).
Now, the following Projective Reconstruction Theorem allows us to (theoretically) reconstruct the pinhole cameras projection matrices from a collection of correspondences.
Theorem 12 (Projective Reconstruction Theorem). Let
be a collection of correspondences. Suppose these correspondences determine a unique fundamental matrix, i.e. there exists a unique (up to scaling)
of rank
such that
for all
. Then the scene and cameras may be reconstructed from these correspondences alone, i.e., the
can be recovered. Moreover, any two such reconstructions are projectively equivalent.
Proof. For existence, put
. Grab
. Then put
. Take
and
from their kernels. Uniqueness follows from the uniqueness theorem (Theorem 11). ![]()
In this way, we get an answer to the motion problem, and the rough idea is: if we know a bunch of correspondences
, the idea is to (in some way, and we will explore this next) compute the fundamental matrix
that is valid for the correspondences, and then recover
using the projective reconstruction theorem.
Computing the Fundamental Matrix
This is the core computational heart (but unfortunately I’ll not go through in deep details since my time is short…). Given an (assumed imperfect) empirical data of correspondences
, how to compute the fundamental matrix
? We begin with the natural idea: use its characterization and solve the algebraic system!
More precisely, we wish to find
such that
for all
. We can rewrite this equation in an expanded form:
![Rendered by QuickLaTeX.com \[\sum_{j=0}^2\sum_{k=0}^2 F_{j,k}(\mathbf{x'}_i)_j(\mathbf{x}_i)_k = 0.\]](https://blogs.ethz.ch/its/wp-content/ql-cache/quicklatex.com-abb0a8e6030909ed9cd770c8e047414a_l3.png)
In this way, we can reformulate the unknown
as an unknown vector
and get the corresponding linear system. For each correspondence
, write
and
, and the equation becomes

Writing the matrix on the left as
, the problem is simply
. But if
is too large then the system is overdetermined. We also have to add another nonlinear constraint that
(but we will do this later). For now, if
and we assume the input to be linearly independent, then
has dimension
, so we can pick a nontrivial solution out of the kernel.
For higher
, the system is overdetermined, but there is still an intuitive solution: try to fit the noisy points onto some
that produces best fit. In this sense we would minimize
subject to
.
The above algorithm is what we call the Eight-Point Algorithm, and it has been developed in the literature, but from the practical side, there is a big problem around it: numerical stability. There are noises, and the last homogeneous coordinate is always set to
, and small measurement errors tend to amplify into large solution errors.
However, with proper normalization, the eight-point algorithm becomes effective again. See [Hartley] for details.
Now back to the rank
constraint. In practice it is enough to require
. This, surprisingly, has an intuitive geometric explanation as well. The requirement that
has rank
is equivalent to requiring that whatever point
one has on the first image, when one calculates the epipolar line
, it should pass through some specific epipole
. In general, without this requirement, the epipolar lines may become a mess.
We often do this by approximating the closest rank-2 matrix from a given
. Suppose the algorithm recovers
, then we want to find
of rank two such that the error
is minimized. A natural way to do this is to SVD and truncate out the smallest value. (I will probably revisit this again once I seriously go and learn about SVD, but right now let’s just move on with the rough idea)
There are other useful algorithms, such as the Seven-Point Algorithm (since the fundamental matrix up to scale has only
degrees of freedom, there is a way to compute it using only seven points) and the Five-Point Algorithm (instead of estimating the fundamental matrix, we move to another realm and define the essential matrix, which has only
degrees of freedom instead of
). I leave them (and my very limited understanding) here and I wish to learn more about them later once I have more time.
The Structure Problem and Triangulation
We’ve made a rough idea how to solve the correspondence problem and the motion problem. So now we can assume the existence of
and
. The structure problem asks us to recover the actual points
such that
and
. To solve this, we use a process called triangulation.
Indeed, if
, then we see that
. Expand
into three rows
where each
is a
-vector corresponding to the
th row. Write
. We have
![Rendered by QuickLaTeX.com \[\mathbf{x} \times \mathbf{PX} = \begin{pmatrix}x\\y\\1\end{pmatrix} \times \begin{pmatrix}\mathbf{p}_1^\intercal\mathbf{X}\\\mathbf{p}_2^\intercal\mathbf{X}\\\mathbf{p}_3^\intercal\mathbf{X}\end{pmatrix} = \begin{pmatrix}y\mathbf{p}_3^\intercal\mathbf{X} - \mathbf{p}_2^\intercal\mathbf{X}\\\mathbf{p}_1^\intercal\mathbf{X}-x\mathbf{p}_3^\intercal\mathbf{X}\\x\mathbf{p}_2^\intercal\mathbf{X} - y\mathbf{p}_1^\intercal\mathbf{X}\end{pmatrix}.\]](https://blogs.ethz.ch/its/wp-content/ql-cache/quicklatex.com-ca2c12c7cadfc4551f19d3a30f99f899_l3.png)
These rows are not linearly independent, i.e., the system
![Rendered by QuickLaTeX.com \[\begin{pmatrix}y\mathbf{p}_3^\intercal\mathbf{X} - \mathbf{p}_2^\intercal\mathbf{X}\\\mathbf{p}_1^\intercal\mathbf{X}-x\mathbf{p}_3^\intercal\mathbf{X}\\x\mathbf{p}_2^\intercal\mathbf{X} - y\mathbf{p}_1^\intercal\mathbf{X}\end{pmatrix} = 0\]](https://blogs.ethz.ch/its/wp-content/ql-cache/quicklatex.com-5e20ea2e484d7a8b7b1c113e937736a6_l3.png)
has its third row equals
times the first plus
times the second, so we can discard the third row, and rewrite in the matrix form:
![Rendered by QuickLaTeX.com \[\begin{pmatrix}y\mathbf{p}_3^\intercal - \mathbf{p}_2^\intercal\\\mathbf{p}_1^\intercal-x\mathbf{p}_3^\intercal\end{pmatrix}\mathbf{X} = 0.\]](https://blogs.ethz.ch/its/wp-content/ql-cache/quicklatex.com-0be750720287f078fd7d3d014dd42f8b_l3.png)
We can do similarly for the
as well, and merge the systems together, to get:
![Rendered by QuickLaTeX.com \[\begin{pmatrix}y\mathbf{p}_3^\intercal - \mathbf{p}_2^\intercal\\\mathbf{p}_1^\intercal-x\mathbf{p}_3^\intercal\\y'\mathbf{p'}_3^\intercal - \mathbf{p'}_2^\intercal\\\mathbf{p'}_1^\intercal-x'\mathbf{p'}_3^\intercal\end{pmatrix}\mathbf{X} = 0.\]](https://blogs.ethz.ch/its/wp-content/ql-cache/quicklatex.com-b658e58993932309b21907695bc88560_l3.png)
The rest is just solving this system. This is the linear triangulation process.
This looks simple and easy, but it is still not the optimal one (in a sense), assuming noise exists. The optimal triangulation tries to minimize the reprojection error, i.e., tries to estimate
that has the maximum likelihood of being the true explanation of the actual object. To do this, we define the MLE for this problem:
![]()
where
is the dehomogenization perspective projection
. This is an actual MLE under Gaussian noise in image measurements.
To this end, we’ve made a rough way in the basic pipeline: solve for the correspondence problem first (perhaps using Harris detector, or others), and then from the correspondence problem, solve the correspondence geometry problem of two cameras by computing the fundamental matrix, and then from the fundamental matrix, apply the projective reconstruction theorem to postulate the pinhole camera matrices, and once this is done, perform a linear triangulation to recover the structure. This whole thing is packaged as the Structure-from-Motion problem (SfM) and it is one of the fundamental problems in computer vision.
There are also modern algebro-geometric interpretations that would perhaps make a more natural synthesis of algebraic geometry and computer vision. See, for example, this.
- I’ve asked for permission from my thesis supervisor, Prof. Andrew Kresch, to register for some other courses alongside the thesis, and he accepted and supported this. ↩︎
- I actually used $\mathbb{C}$ by default, but when we talk about orthogonality or something that requires Euclidean inner product, it’s more appropriate to restrict to $\mathbb{R}$. This complicates thing up a bit, since the “degree of freedom” is ambiguous whether we mean the real dimension or the complex dimension of an object (say, a manifold, or a variety). I hope you can decide by yourself whether right now we’re restricting to $\mathbb{R}$ or considering the whole $\mathbb{C}$, and count the dimensions accordingly. ↩︎
Comments