CamCal 002 Weak Perspective
Highlights: In this post we will talk about how human vision can be tricked with a Perspective Projection model, and we will present one new model, which is called Weak Perspective.
Tutorial Overview:
1. Human vision
Humans are very sensitive to this structure of parallel lines and what they convey to us. Probably most of you have seen this Muller-Lyer illusion. Which one of these lines is longer?
And you probably all know that well, actually, they are the same length, Next picture is another version of it that shows you why this can be an interesting effect.
And you can see the two red arrows and now the question is, which of those is longer? This one is a lot harder for you to say that they are actually the same length.
In fact, when you pull them away, when we stare at them, they look like they are different length. But of course they are actually the same length. And that’s because you are using this perspective projection as a way of saying that in the real world the height of the wall is longer than the height of the ticket window. So, it looks the same on your image, but your brain automatically wants to undo that projection transformation.
2. Weak perspective
Until now we talked about Perspective Projection, but there is another model called weak perspective. Sometimes called scaled orthographic and also power perspective but what we are going to call weak perspective is following.
The idea is that we know that when things get further away, they are going to get smaller. But what we are going to do is, we are going to assume that all the points on a given object, they are all at some constant depth. We will say \(z_{0}\) as it is written above. So for all the points on that object, \(\left ( x,y,z \right ) \) will get mapped to, \(\left ( \frac{fx}{z_{0}},\frac{fy}{z_{0}} \right ) \).
$$ \left ( x,y,z \right )\rightarrow \left ( \frac{fx}{z_{0}},\frac{fy}{z_{0}} \right ) $$
So that object will get scaled. But some other object, might be a significantly closer object, it will get scaled by a different value. So, basically in weak perspective, what we are saying is that the difference of depth over an object or over the range of an object, is very small compared to the difference in depth from the object to the center of projection. And if that’s true, then you can basically say that each object has its own scale factor.
Matrix form
Of course, as a special case of perspective projection, we can do this in a matrix form also. So, here we have the equation or the transformation we said before \(\left ( x,y,z \right )\rightarrow \left ( \frac{fx}{z_{0}},\frac{fy}{z_{0}} \right ) \). And basically \(\frac{f}{z_{0}}\) is acting like a scale factor. So here we have our projection matrix, which now has a \(1/s \). And then when we multiply that through on the homogenous coordinates and then divide, we are dividing by the \(1/s \), which gives us \(\left ( sx,sy \right ) \).
$$ \left ( x,y,z \right )\rightarrow \left ( \frac{fx}{z_{0}},\frac{fy}{z_{0}} \right ) $$
$$ \begin{bmatrix}1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 0 & 1/s\end{bmatrix}\begin{bmatrix}x\\ y\\ z\\ 1\end{bmatrix}= \begin{bmatrix}x\\ y\\ 1/s\end{bmatrix}\Rightarrow\left ( sx,sy \right ) $$
In short, weak perspective gives us this scaled effect of each collection of points that sit on a given object.
Summary:
All in all, here we have shown differences between human vision and perspective projection, and we have introduced one new model, which is called weak perspective. In the next post we will talk more about camera calibration.