2009 Blair Bohannan
Back to Psych 204 Projects 2009
Project Title - MATLAB image processing tutorial
This page accompanies a MATLAB tutorial which simulates some artifacts that might be found in MR images. Their causes, and in some cases corrections, are demonstrated in the code. One- and two-dimensional examples are provided.
Image artifacts in this tutorial include DC Offset, Quadrature Ghosting, RF Noise, Gradient, and Frequency-Sampling Jitter. Information on the first four topics can be found in Hornak, Joseph P. The Basics of MRI, Chapter 11. More information on the mathematical derivations can be found in Smith, Julius O. Mathematics of the Discrete Fourier Transform (DFT). A full reference list can be found at the end of this page.
About the tutorial
This tutorial consists of a MATLAB (.m) script and some image files. Unzip the files to a folder and either add to path or set the MATLAB workspace to this folder before starting the tutorial.
The tutorial uses cells, and each section below corresponds to a cell in the tutorial. To evaluate a cell in the tutorial, first navigate into it. Ctrl+Enter evaluates the current cell, and Ctrl+Shift+Enter evaluates and moves to the next cell. Variables are re-used throughout the tutorial, so start at the first cell and work through the tutorial in order.
The tutorial package contains a selection of image files. Those titled "stimulus##.tif" (including the one used on this page) are from an image set prepared by Roozbeh Kiani. The associated publication can be found here. Used with permission.
Tutorial
Cell I. Loading images for analysis
The first cell simply loads an image, converts it to grayscale, and sets the size of the image. nPix, the variable setting the number of pixels in the x and y dimensions, should be a power of 2 for faster FFT calculation.
This figure contains the image in grayscale.