<blockquote>
<p>The projection matrix is then essentially <code>K * [R | T]</code></p>
</blockquote>
<p>Is incorrect, actually the K Matrix is similar to projection matrix and
the R|T is called <em>camera transform matrix</em> or <em>view transform matrix</em>
Or called <em>extrinsic matrix</em>. So focus on the projection stuff and forget about camera transform,
what is the difference between <em>K Matrix</em> and Perspective Projection
Matrix(call it <em>P Matrix</em> later)?</p>
<ul>
<li>For <em>K Matrix</em> it transform 3D points to 2D pixels in image space.</li>
<li>For <em>P Matrix</em> it transform 3D points to NDC space.</li>
</ul>
<p>Take a look at two matrices:</p>
<p><span class="math-container">$$K = \begin{bmatrix}f_x&amp;   0&amp;  c_x\\  0&amp; f_y&amp;  c_y\\
0  &amp;  0 &amp;    1\\\end{bmatrix}$$</span></p>
<p><span class="math-container">$$P = \begin{bmatrix}
\frac{1}{t*a}&amp;   0&amp;  0&amp; 0\\0&amp; \frac{1}{t}&amp;  0&amp; 0\\
0  &amp;  0 &amp;    A&amp; B&amp;\\ 0  &amp;  0 &amp;    -1&amp; 0\\ \end{bmatrix}$$</span>
<span class="math-container">$$t=tan(\frac{fovy}{2})$$</span>
<span class="math-container">$$a=\frac{width}{height}$$</span></p>
<p>Let's add perspective divide and show the result of the above two matrices:</p>
<p>Intrinsic case: <span class="math-container">$$x_{2d} = \frac{x_0}{z_0 * \frac{1}{f_x}} + c_x$$</span></p>
<p>Perspective case: <span class="math-container">$$x_{2d} = \frac{x_0}{-z_0(t*a)}$$</span></p>
<p>Similar with some difference.</p>
<p>The image space: Origin from left-top corner
so should add Cx Cy as the offset from center to left-top corner.
And in NDC space we assume Z-axis direct out of screen so P(3,2) = -1.</p>

CC BY-SA 4.0
2023-08-01T08:31:04.937Z
2023-08-14T01:29:19.657Z
2023-08-14T01:29:19.657Z
Joshua
<p>I was going through the camera matrix explained in the <a href="https://en.wikipedia.org/wiki/Camera_matrix" rel="nofollow noreferrer">wikipedia</a> article and understand how the matrix <strong>K</strong> <span class="math-container">\begin{bmatrix}f_x&amp;s&amp;x_0\\0&amp;f_y&amp;y_0\\0&amp;0&amp;1\end{bmatrix}</span> is <a href="http://ksimek.github.io/2013/08/13/intrinsic/" rel="nofollow noreferrer">built</a>. The projection matrix is then essentially <code>K * [R | T]</code></p>

<p>However, I am not able to understand what the <a href="https://computergraphics.stackexchange.com/questions/6254/how-to-derive-a-perspective-projection-matrix-from-its-components">perspective projection</a> matrix is and how is it same to the intrinsic matrix <strong>K</strong></p>

CC BY-SA 4.0
2020-01-14T08:40:13.337Z
*"The **projection matrix is then essentially...".*   AFAICS That's not a projection matrix.. it's not really a "2D" rotation + translation matrix either.         Are you familiar with homogeneous coordinates? You really need to understand those first.
Simon F
CC BY-SA 4.0
2020-01-14T17:28:23.823Z
@SimonF this matrix can be easily broken into 2D Scaling "+" 2D translation. Also, this is essentially the simple perspective projection matrix. (multiply by it and then homogenise the co-ordinates.)
midi
CC BY-SA 4.0
2020-01-14T17:30:47.073Z
@SimonF I now understand that the projection matrix (with the viewing frustum mapped to a cube) is used as it contains depth information which is lost in the simple perspective projection matrix I had written earlier.
midi
CC BY-SA 4.0
2020-01-15T09:42:39.033Z
Oh good. :-)  FWIW my first comment was that you'd written [R|T] which seemed to me to imply **Rotation** +Scaling, but the matrix requires another term.
Simon F
<3d><projections><camera-matrix>
Intrinsic Matrix vs Perspective projection matrix
midi
# Intrinsic Matrix vs Perspective projection matrix

(Asked by: username_0 on 2020-01-14)

I was going through the camera matrix explained in the [wikipedia](https://en.wikipedia.org/wiki/Camera_matrix) article and understand how the matrix **K** \begin{bmatrix}f\_x&s&x\_0\\0&f\_y&y\_0\\0&0&1\end{bmatrix} is [built](http://ksimek.github.io/2013/08/13/intrinsic/). The projection matrix is then essentially `K * [R | T]`

However, I am not able to understand what the [perspective projection](https://computergraphics.stackexchange.com/questions/6254/how-to-derive-a-perspective-projection-matrix-from-its-components) matrix is and how is it same to the intrinsic matrix **K**

**Tags:** 3d, projections, camera-matrix

> **Comments:**
> **username_1**: *"The **projection matrix is then essentially...".*   AFAICS That's not a projection matrix.. it's not really a "2D" rotation + translation matrix either.         Are you familiar with homogeneous coordinates? You really need to understand those first.  
> **username_0**: @username_1 this matrix can be easily broken into 2D Scaling "+" 2D translation. Also, this is essentially the simple perspective projection matrix. (multiply by it and then homogenise the co-ordinates.)  
> **username_0**: @username_1 I now understand that the projection matrix (with the viewing frustum mapped to a cube) is used as it contains depth information which is lost in the simple perspective projection matrix I had written earlier.  
> **username_1**: Oh good. :-)  FWIW my first comment was that you'd written [R|T] which seemed to me to imply **Rotation** +Scaling, but the matrix requires another term.  

---

## 1 answers

### Answer by username_2 on 2023-08-01. Score: 2 | Accepted answer

> The projection matrix is then essentially `K * [R | T]`

Is incorrect, actually the K Matrix is similar to projection matrix and
the R|T is called *camera transform matrix* or *view transform matrix*
Or called *extrinsic matrix*. So focus on the projection stuff and forget about camera transform,
what is the difference between *K Matrix* and Perspective Projection
Matrix(call it *P Matrix* later)?

* For *K Matrix* it transform 3D points to 2D pixels in image space.
* For *P Matrix* it transform 3D points to NDC space.

Take a look at two matrices:

$$K = \begin{bmatrix}f\_x& 0& c\_x\\ 0& f\_y& c\_y\\
0 & 0 & 1\\\end{bmatrix}$$

$$P = \begin{bmatrix}
\frac{1}{t\*a}& 0& 0& 0\\0& \frac{1}{t}& 0& 0\\
0 & 0 & A& B&\\ 0 & 0 & -1& 0\\ \end{bmatrix}$$
$$t=tan(\frac{fovy}{2})$$
$$a=\frac{width}{height}$$

Let's add perspective divide and show the result of the above two matrices:

Intrinsic case: $$x\_{2d} = \frac{x\_0}{z\_0 \* \frac{1}{f\_x}} + c\_x$$

Perspective case: $$x\_{2d} = \frac{x\_0}{-z\_0(t\*a)}$$

Similar with some difference.

The image space: Origin from left-top corner
so should add Cx Cy as the offset from center to left-top corner.
And in NDC space we assume Z-axis direct out of screen so P(3,2) = -1.


---

