Biomedical Image Processing Jason Thong Gabriel Grant 1
2
Motivation from the Medical Perspective MRI, CT and other biomedical imaging devices were designed to assist doctors in their diagnosis and treatment of patients As engineers, we must design tools with the end-user in mind (medical professionals, not engineers) Need to know criteria of a good medical image this depends on the application Can optimize image processing to take advantage of the specific technology (MRI is better for soft tissues and has higher contrast resolution whereas CT is better for bones and has higher spatial resolution) Recent increase in computational power facilitates exploration of new image processing algorithms 3
Segmentation Divide the image by identifying different physical objects Three broad types: Automatic Semi-automatic Atlas-based (will be discussed later) 4
Segmentation > Automatic > Edge Detection Gray Level First Derivative 5
Segmentation > Automatic > Thresholding By inspecting image histogram, a threshold point can be selected 6
Segmentation > Automatic > Thresholding At higher- and lower-than-optimal points image quality suffers. Original, 20%, 40%, 55%, 75% Thresholds 7
Segmentation > Automatic > Thresholding Threshold point is not always so well defined Original, Histogram, 25%, 50%, 75% Thresholds 8
Segmentation > Semi-automatic > Region Growing Start from a seed a small group of pixels Grow the seed by adding neighboring pixels, based on edge rules Problems: Selection of a good seed Creation of effective edge rules Stop Condition(s) 9
Segmentation > Semi-automatic > Active contours (snakes) Allows user to roughly outline an object Computer corrects the outline 10
Noise Generally, noise in electronic sensors can come from electrons deviating from their theoretical path, caused mainly by heat Noise in biomedical images can also come from photon scattering (Rayleigh, Compton) The raw image is blurry This noise can be filtered Manipulating the pixels directly is called filtering in the time or spatial domain A more powerful method is to filter the image in the frequency domain, specifically, to modify the Fourier Transform of an image 11
Fourier Series and Transform The Fourier Series is a way to convert any signal into a summation of sinusoids But a n cos (nt) + b n sin (nt) can be expressed as c n cos (nt + θ). The Fourier Transform is kind of like c n as a function of n. The Inverse Fourier Transform 12
Interpreting the Fourier Transform In this example, there is a large peak at ω = 4 in the Fourier Transform This means the signal is close to but not exactly a sinusoid with a frequency of 4 rad/s 13
DFT (Discrete Fourier Transform) A computer works only on discrete data Input x n and transform X k are discrete and finite in length No negative frequency, thus summation starts at n=0 Cannot analyze frequency higher than data sampling rate, thus upper limit of summation is finite Inverse DFT Multidimensional DFT (images have 2 dimensions) 14
FFT (Fast Fourier Transform) A simple implementation is O(n 2 ) Many different FFT algorithms, most common is Cooley-Turkey Divide and conquer method the idea is to calculate the Fourier Transform from only the even index inputs, then calculate it for the odd index inputs, then add the two results Done recursively, thus requires log 2 n stages Total run time is O(n log 2 n) 15
FFT (continued) = WTF? M = N/2, so you have: (even) + (complex coefficient)*(odd) (even) (complex coefficient)*(odd) k in first half k in second half Important: 1 multiplication generates both terms 16
FFT In Block Form x n inputs X f FFT output Even index transform Odd index transform Just the final stage in FFT 17
Basic unit of computation The Butterfly Involves only 1 complex multiplication and 2 complex additions Complex coefficients can sometimes be factorized, thus requiring the minimum amount of computation 18
FFT Implementation The order of the inputs have changed Entering the final stage, the even indexes are on the top 4 lines and the odd on the bottom. Repeating this idea back towards the initial stage, the initial index is the reverse in binary of the final index (ex. s 4 -> S 1 ) 19
Filtering in the Frequency Domain Input image Pre-processing Fourier Transform Filter function Inverse Fourier Transform Post-processing Filtered image Time domain Frequency domain Time domain 20
Pre-Processing and Post-Processing Done in the time or spatial domain acts directly on the pixels Typically an image is multiplied by (-1) x+y so that the Fourier Transform of the new image is centered in the frequency domain (low frequencies are now in the center, high frequencies outside) The post-processing must inverse the pre-processing FT without (-1) x+y FT with (-1) x+y 21
Frequency Filtering Sharp transitions (like the edges between different tissues) are the high frequencies in a Fourier Transform these are the details in an image The general appearance (like the general shape of an object) are the low frequencies these come from the smooth areas of an image A high pass filter (in the frequency domain) will enhance the boundaries between different tissues in a biomedical image, but it will also enhance noise A low pass filter will smooth out an image, thus making it blurry Filtering in the frequency domain is done by multiplying the FT by a filter function. The equivalent filtering in the time domain would require convolution. 22
2D Fourier Transforms (A MatLab Experiment) Fourier Transform Real data Inverse Fourier Transform Complex data (MatLab function only shows real component of data) 23
IFT IFT 24
IFT IFT 25
Ideal Filters in Frequency Domain F(ω) is the Fourier Transform For a low pass filter: H(ω) 1 H(ω) = 0 F(ω) < F 0 1 F(ω) > F 0 F 0 is the cutoff frequency A high pass filter is simply 1 minus the low pass filter: H(ω) = 1 F(ω) < F0 0 F(ω) > F0 H(ω) 1 F 0 F(ω) F 0 F(ω) 26
Ideal Filters in Frequency Domain An ideal filter in the frequency domain is non-ideal in the time domain. The filtered image has artifacts. It turns out that an ideal filter in the time domain requires a non-ideal filter in the frequency domain. 27
Gaussian Filters H(ω) The Gaussian distribution is: 1 The Gaussian low pass filter is H(ω) = exp(-f 2 (ω) / 2F 02 ) F 0 = cutoff frequency H(ω) F 0 F(ω) The high pass filter is 1 minus the low pass filter 1 H(ω) = 1 - exp(-f 2 (ω) / 2F 02 ) F 0 The Gaussian filter does not create artifacts. F(ω) 28
A Filtered Image 29
Registration Matches two images of the same object or scene 30
Registration > Uses To fuse different sensors or times Matching PET to MR fmri To detect changes over time patient returns for second round of imaging To form one large image from several smaller ones To recognize an object by registering it's image to a model (atlasbased segmentation, mentioned above) 31
Registration > Method Transform sensed (target) image to match reference (source) image: preprocess determine transformation function (by applying to sensed image, deformed result has geometry of the reference image) resample the sensed image in the new geometry 32
Registration > Transformations Rigid body Translation Rotation Affine (adds scaling) Feature-based Elastic 33
Registration > Transformations > Rigid Body Principal Axes Registration (PAR) for full volume images (sensed and reference image must have same field-of-view) must compute: centroid principal axes 34
Registration > Transformations > Rigid Body Iterative Principal Axes Registration (IPAR) Can be used with partial volumes Useful for PET where field of view is less than MR 35
Registration > Transformations Iterative Feature-Based Registration matches "landmark points" from source and target Elastic Deformation Based Registration considers the target image to be deformable attempts to minimize deformation 36
Research at McMaster Jie Wu - Segmentation and Recognition Analysis of Human Organs in Magnetic Resonance Image Weiguang Guan, Research Engineer - Visualization Support with RHPCS C. Lambacher; W.F.S. Poehlman; M. Kamath; M. Noseworthy - Using a Plugin Architecture for Medical Image Processing 37
References http://www.cme.wisc.edu/online/radiology/renalarteries/pitfalls.htm http://cnx.org/content/m10250/latest/ http://www.cs.wright.edu/~agoshtas/cvpr04_registration_tutorial.html http://www.dspguide.com/ch12/2.htm http://www.ece.mcmaster.ca/%7exwu/4bf3outline.htm http://en.wikipedia.org/wiki/fast_fourier_transform http://en.wikipedia.org/wiki/mri http://en.wikipedia.org/wiki/volume_rendering http://www.facor.info/mri3d.htm http://grus.berkeley.edu/~jrg/ngst/fft/fft.html http://homepages.inf.ed.ac.uk/rbf/hipr2/gsmooth.htm http://hyperphysics.phy-astr.gsu.edu/hbase/nuclear/mri.html#c1 http://idlastro.gsfc.nasa.gov/idl_html_help/filtering_an_imageiry.html#wp1022814 http://www.itk.org/ http://mathworld.wolfram.com/ http://medic.rad.jhmi.edu/dpham/ http://medic.rad.jhu.edu/pbazin/ http://www.nlm.nih.gov/research/visible/visible_human.html http://www.rhpcs.mcmaster.ca/~guanw/software.html http://www.roseradiology.com/3thighscanimaging.htm http://siptoolbox.sourceforge.net/ Lathi, B. P. Linear Systems and Signals. New York: Oxford University Press, 2005. Pham, Dzung L. et al. A Survey of Current Methods in Medical Image Segmentation. Annual Review of Biomedical Imaging. January 1998. Zill, Dennis G. and Cullen, Michael R. Advanced Engineering Mathematics, Second Edition. Sudbury: Jones and Baerlett, 2000. 38