Monday, March 18, 2013

Learning Tomography: Blur effect



In the simple Back-projection technique, the image appears blurry and we need to pre-filter the sinogram with a ramp filter before computing the 2D reconstruction. Why is this blur effect not observed in the Direct Fourier Reconstruction technique?


Just a small introduction to refresh the various results described in previous posts. With Direct Fourier Reconstruction (DFR), we can obtain with the simplest implementation, an image of Lena (Fig.1) with a foggy background (that can be removed by zero padding the sinogram). In this case, the contours appear sharp.
Fig.1: Lena calculated from BasicFourierRec.js [Link]
However, with the simple back-projection technique [Link], the result appears blurry (Fig. 2).

Fig.2: Lena obtained by Simple Back-Projection Technique [Link]

As there is a direct correspondence between back-projections and Direct Fourier Reconstruction, it is surprising why we don't get blur effect in Fig. 1 !?!

The answer is simple ... this is the way I implement the DFR algorithm in the basic version, because each time, a new 1D-FT row is inserted, the new values replace the old ones (already stored in the 2D Fourier Space).

In the script FourierRecBasic.js [Link], this is done with this line:

    rec_p.putPixelValue(Math.round(x),Math.round(y),pix);

If we want a behavior similar to the back-projection technique, replace the line above by this chunk of code:

var nearest_x = Math.round(x);
var nearest_y = Math.round(y);
var rec_pix =  rec_p.getPixelValue(nearest_x,nearest_y);
rec_p.putPixelValue(nearest_x,nearest_y,rec_pix + pix);


Now, each time we are inserting a new 1D-FT in the 2D Fourier space, we actually add these values to the previous ones (rec_pix + pix) which is exactly what we are doing in simple back-projection technique.
Note: Consequently, the low frequencies (values close to the origin of the 2D Fourier space) are now over-represented with respect to the high frequencies  (far from the origin) yielding a blur effect...

From the test sinogram of Lena [Link], run the Fourier Transform [Link] and run the modified script FourierRecBasic.js. The image of Fig. 3 is now obtained... equivalent to Fig.2.

Fig.3: Modified script by adding frequencies. Lena is now blurred.

Of course, to fix this blur effect, you can filter the image of Fig. 3 with a ramp filter ... and you get the image of Fig.1.

Other crazybiocomputing posts

Further readings are available in ...
  • Learning Tomography Series  [Link]
  • Image Processing TOC [Link]
  •  


     

No comments:

Post a Comment