400 likes | 422 Views
Discover the importance of automated analysis of biomedical images and learn various methods of image segmentation using Matlab's image processing toolbox. Improve quantitative analysis and refine image segmentation for accurate results. Lab reports due at the end of the day.
E N D
Biomedical Engineering Coursework Module:(Biomedical) Image Analysis Vicente Grau, Jens Rittscher Institute of Biomedical Engineering
Today’s schedule • 9:45-11 Intro to Biomedical Image Analysis • 11-1 Matlab Practical in IBME-CDT teaching room • 1-2 Lunch break • 2-5 Matlab Practical in IBME-CDT teaching room • Lab reports due by the end of the day • Email reports to vicente.grau@eng.ox.ac.uk
Why automated analysis of biomedical images? Image use is increasing and will continue in the foreseeable future Data volumes associated to individual studies are also increasing fast Quantitative analysis should be the norm Even in visual analysis, discarding non-relevant areas can make a big difference Important for segmentation and registration algorithms
Medical Imaging – the curse of modality: MRI Ultrasound X-ray PET Good spatial resolution High temporal resolution CT dceMRI High spatial resolution Ionising radiation; Projective Functional imaging Specific radioactive tracers E.g. for metabolic function Spatial vs temporal resolution Good spatial resolution Ionising radiation
Segmentation Assign a label to each pixel (voxel) depending on the anatomical structure it belongs to
Segmentation is one of the core topics in biomedical image analysis, both in clinical and basic science applications Quantitative analysis of the images Three-dimensional visualisation Image-guided surgery Longitudinal studies Building computational models ...
Importing images in Matlab imread Be aware of the data type: A=double(A); %convert to double Displaying images in Matlab imshow imagesc impixelinfo Many problems arise from errors in image displaying
Images are matrices A = imread(‘brain2.bmp’); figure(); imagesc(A); B = imread(‘brain3.bmp’); figure(); imagesc(B); diffAB = A – B; figure(); imagesc(diffAB);
Image processing functions in Matlab (Help -> Image Processing Toolbox) iptdemos Image Display and Exploration GUI Tools Spatial Transformation and Image Registration Image Analysis and Statistics Image Arithmetic Image Enhancement and Restoration Linear Filtering and Transforms Morphological Operations Region-Based, Neighborhood, and Block Processing Colormap and Color Space Functions Miscellaneous Functions
Histograms – Image segmentation by thresholding HISTOGRAM PIXEL INTENSITY
Applying a threshold to an image WRONG!! RIGHT im_seg=zeros(sizex, sizey); for i=1:sizex for j=1:sizey if(im_orig( i, j)>Thres) im_seg( i, j ) = 1; else im_seg( i, j ) = 0; end end end im_seg = (im_orig>Thres); im_seg = double(im_seg); Don’t forget the semicolon
Separating connected regions (“islands”) im_labeled = bwlabeln ( im_seg ); Use impixelinfo to get the labels assigned to each one of the regions
Removing undesired regions im_labeled (im_labeled ~= 42) = 0;
EROSION Remove external pixels: those where, if we place a certain structuring element, part of it will lie outside of the object. Pixel removed STRUCTURING ELEMENT Pixel maintained
EROSION im_eroded = imerode ( im_labeled, strel ( ‘disk’, 1) );
EROSION im_eroded = imerode ( im_eroded, strel ( ‘disk’, 1) );
EROSION im_eroded = imerode ( im_eroded, strel ( ‘disk’, 1) );
DILATION im_dilated = imdilate ( im_labeled, strel ( ‘disk’, 1) );
DILATION im_dilated = imdilate ( im_dilated, strel ( ‘disk’, 1) );
DILATION im_dilated = imdilate ( im_dilated, strel ( ‘disk’, 1) );
Erosion removes bridges, separates islands, reduces overall size Dilation fills holes, joins islands, increases overall size
OPENING: Erosion + dilation Opening removes bridges, separates islands but approximately maintains overall size
CLOSING: Dilation + erosion Closing fills holes, joins islands but approximately maintains overall size
AUTOMATIC THRESHOLDING Histogram minima may correspond to segmentation thresholds Other methods: k-means, Otsu
ADAPTIVE THRESHOLDING Apply local thresholds
REGION GROWING Start from an initial seed
REGION GROWING Iteratively “grow” the segmented region by incorporating adjacent points that meet a certain criterion
REGION GROWING Iteratively “grow” the segmented region by incorporating adjacent points that meet a certain criterion
REGION GROWING The process ends when a certain stopping criterion is met In Matlab it can be implemented using dilations
What you will do in the lab… • Try basic image segmentation methods using matlab’s image processing toolbox: • Image I/O • Image display • Image thresholding for segmentation • Refinement of image segmentation • Write a lab report including screen snapshots • Ready by the end of the day • Enjoy!