home

PDF (letter size)

Finding image forward projection and its transpose matrix

Nasser M. Abbasi

California State University, Fullerton, Summer 2008   Compiled on January 30, 2024 at 6:49am

Problem

Write the matrix which implements the forward projection and its transpose.

A simple case would be to consider a 2-D object made up of only 4 pixels and one projection. After that think about an object with many pixels and many projections.

Answer

I will use the convention used by the radon transform in Matlab in setting up the coordinates system which is as shown below (diagram from Matlab documentation page).

In our case, we need to perform the following projection, which is at angle \(\theta =-90^{0}\) as follows

The equation for the above mapping is \(g=Hf\), hence we write\[\begin {pmatrix} g_{1}\\ g_{2}\end {pmatrix} =\begin {pmatrix} h_{11} & h_{12} & h_{13} & h_{14}\\ h_{21} & h_{22} & h_{23} & h_{24}\end {pmatrix}\begin {pmatrix} f_{1}\\ f_{2}\\ f_{3}\\ f_{4}\end {pmatrix} \] Hence \begin {align*} g_{1} & =h_{11}f_{1}+h_{12}f_{2}+h_{13}f_{3}+h_{14}f_{4}\\ g_{2} & =h_{21}f_{1}+h_{22}f_{2}+h_{23}f_{3}+h_{24}f_{4} \end {align*}

But \(g_{1}=f_{1}+f_{2}\) from the line integral at the above projection and \(g_{2}=f_{3}+f_{4}\), hence the above 2 equations becomes\begin {align*} f_{1}+f_{2} & =h_{11}f_{1}+h_{12}f_{2}+h_{13}f_{3}+h_{14}f_{4}\\ f_{3}+f_{4} & =h_{21}f_{1}+h_{22}f_{2}+h_{23}f_{3}+h_{24}f_{4} \end {align*}

By comparing coefficients on the LHS and RHS for each of the above equations, we see that for the first equation we obtain\[ h_{11}=1,h_{12}=1,h_{13}=0,h_{14}=0 \] For the second equation we obtain\[ h_{21}=0,h_{22}=0,h_{23}=1,h_{24}=1 \] Hence the \(H\) matrix is\[ H=\begin {pmatrix} 1 & 1 & 0 & 0\\ 0 & 0 & 1 & 1 \end {pmatrix} \] Taking the transpose\[ H^{T}=\begin {pmatrix} 1 & 0\\ 1 & 0\\ 0 & 1\\ 0 & 1 \end {pmatrix} \] Hence if we apply \(H^{T}\) operator onto the image \(g\), we obtain back a \(2\times 2\) image, which is written as\[\begin {pmatrix} 1 & 0\\ 1 & 0\\ 0 & 1\\ 0 & 1 \end {pmatrix}\begin {pmatrix} g_{1}\\ g_{2}\end {pmatrix} =\begin {pmatrix} k_{1}\\ k_{2}\\ k_{3}\\ k_{4}\end {pmatrix} \] Hence \(k_{1}=g_{1},k_{2}=g_{1},k_{3}=g_{2},k_{4}=g_{2}\). In other words, the image is a 4 pixels \(\begin {bmatrix} g_{1} & g_{1}\\ g_{2} & g_{2}\end {bmatrix} \)

\(H^{T}\) can now be viewed as back projecting the image \(g\) into a plane by smearing each pixel \(g_{i}\) value over the plane along the line of sight as illustrated below

1 Case of 45 degree

We repeat the above for \(\theta =45^{0}\)

The equation for the above mapping is \(g=Hf\), hence we write\[\begin {pmatrix} g_{1}\\ g_{2}\\ g_{3}\end {pmatrix} =\begin {pmatrix} h_{11} & h_{12} & h_{13} & h_{14}\\ h_{21} & h_{22} & h_{23} & h_{24}\\ h_{31} & h_{32} & h_{33} & h_{34}\end {pmatrix}\begin {pmatrix} f_{1}\\ f_{2}\\ f_{3}\\ f_{4}\end {pmatrix} \] Therefore \begin {align*} g_{1} & =h_{11}f_{1}+h_{12}f_{2}+h_{13}f_{3}+h_{14}f_{4}\\ g_{2} & =h_{21}f_{1}+h_{22}f_{2}+h_{23}f_{3}+h_{24}f_{4}\\ g_{3} & =h_{31}f_{1}+h_{32}f_{2}+h_{33}f_{3}+h_{34}f_{4} \end {align*}

We see from projection diagram that \(f_{1}=g_{1},f_{3}+f_{2}=g_{2}\) and \(f_{4}=g_{3}\), hence the above 3 equations become\begin {align*} f_{1} & =h_{11}f_{1}+h_{12}f_{2}+h_{13}f_{3}+h_{14}f_{4}\\ f_{3}+f_{2} & =h_{21}f_{1}+h_{22}f_{2}+h_{23}f_{3}+h_{24}f_{4}\\ f_{4} & =h_{31}f_{1}+h_{32}f_{2}+h_{33}f_{3}+h_{34}f_{4} \end {align*}

By comparing coefficients, we obtain from the first equation \(h_{11}=1,h_{12}=0,h_{13}=0,h_{14}=0\) and from the second equation \(h_{21}=0,h_{22}=1,h_{23}=1,h_{24}=0\) and from the last equation \(h_{31}=0,h_{32}=0,h_{33}=0,h_{34}=1\). Hence the \(H\) matrix is\[ H=\begin {pmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 1 & 0\\ 0 & 0 & 0 & 1 \end {pmatrix} \] Using \(H^{T}\) to project the image \(g\) we obtain\[\begin {pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1 \end {pmatrix}\begin {pmatrix} g_{1}\\ g_{2}\\ g_{3}\end {pmatrix} =\begin {pmatrix} k_{1}\\ k_{2}\\ k_{3}\\ k_{4}\end {pmatrix} \] Hence \(k_{1}=g_{1},k_{2}=g_{2},k_{3}=g_{2},k_{4}=g_{3}\), hence the back projection plane is\[ K=\begin {bmatrix} g_{1} & g_{2}\\ g_{2} & g_{3}\end {bmatrix} \] This also can be interpreted as back projecting the image \(g\) on a \(45^{0}\) onto a plane by smearing each pixel value \(g_{i}\) on each pixel along its line of sight as illustrated below