Introduction to Image Processing with MATLAB Medical Imaging Systems

Slides:



Advertisements
Similar presentations
Matlab Image Processing
Advertisements

Introduction to MATLAB The language of Technical Computing.
Image Processing with MATLAB
Automation and Drives SIMATIC HMI The Human Machine Interface for internal use only Scope of Presentation Dept. of Industrial Electronics and Control Eng.
Introduction to Matlab
Introduction to MATLAB for Biomedical Engineering BME 1008 Introduction to Biomedical Engineering FIU, Spring 2015 Lesson 2: Element-wise vs. matrix operations.
Laboratory of Image Processing Pier Luigi Mazzeo
L.Ghadah R. Hadba CT1514-L1.  Computer Graphics :refers to processing of creating a new image from Geometry, Lighting parameters, Materials and Textures.Using.
Image Enhancement in the Frequency Domain (2)
Image Display MATLAB functions for displaying image Bit Planes
MATLAB - Basics Centro de Informática Universidade Federal de Pernambuco Aprendizagem de Máquina – IN1102 Arley Ristar –
IMAGE PROCESSING IN FREQUENCY SPACE Erkki Rämö1.
Graphics CS 121 Concepts of Computing II. What is a graphic? n A rectangular image. n Stored in a file of its own, or … … embedded in another data file.
DREAM PLAN IDEA IMPLEMENTATION Introduction to Image Processing Dr. Kourosh Kiani
Input image Output image Transform equation All pixels Transform equation.
Russell Taylor Week 3. Image File Formats - TIF, JPG, PNG, GIF - which to use? The three most common and important image file formats for for printing,
Matlab tutorial course Lesson 5: Loading and writing data, producing visual output
Math 3360: Mathematical Imaging Prof. Ronald Lok Ming Lui Department of Mathematics, The Chinese University of Hong Kong Lecture 2: Image Transformation.
Gulsah Tumuklu Ozyer MATLAB IMAGE PROCESSING TOOLBOX.
Image Processing:Fundementals Lecture: Introduction –An image is digitized to convert it to a form which can be stored in a computer's memory or.
Frequancy Domain Filtering (FDF) Lab 5. Using FFT (Fast Fourier Transform ) algorithm DFT (Discrete Fourier Transform) & inverse DFT.
CS112 Scientific Computation Department of Computer Science Wellesley College Numb3rs Number and image types.
Chapter Teacher: Remah W. Al-Khatib. This lecture will cover:  The human visual system  Light and the electromagnetic spectrum  Image representation.
Image Representation. Digital Cameras Scanned Film & Photographs Digitized TV Signals Computer Graphics Radar & Sonar Medical Imaging Devices (X-Ray,
Lecture 16 Image Document Formats. Bitmap vs. Vector Images Bitmaps do not generally.
Introduction MATLAB stands for MATrix LABoratory.  Basics  Matrix Manipulations  MATLAB Programming  Graphics  Image types  Image Processing  Useful.
Types of Graphics  Vector Individual scalable objects defined by mathematical equations  Bitmap Pixels (tiny, single-colored square) in a grid Most.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Digital Image Processing Lecture4: Fundamentals. Digital Image Representation An image can be defined as a two- dimensional function, f(x,y), where x.
Chapter 3 Image Files © 2013 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website,
Raster Graphics 2.01 Investigate graphic image design.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter.
Image File Formats. What is an Image File Format? Image file formats are standard way of organizing and storing of image files. Image files are composed.
CMPS1371 Introduction to Computing for Engineers IMAGES.
Lecture 15. A Very Brief Introduction to HTML and XHTML, part IV Instructor: Jie Yang Department of Computer Science University of Massachusetts Lowell.
Digital Image Processing Introduction to MATLAB. Background on MATLAB (Definition) MATLAB is a high-performance language for technical computing. The.
Computer Science 121 Scientific Computing Winter 2014 Chapter 14 Images.
21 st Century Technology. Painting Uses Pixels Quality of image Changes Drawing Uses Vectors or Lines Quality of Image Does NOT Change.
Lecture 27: Image Processing
Image Representation Last update st March Heejune Ahn, SeoulTech.
Image Editing Vocabulary Words Pioneer Library System Norman Public Library Nancy Rimassa, Trainer Thanks to Wikipedia ( help.
MATLAB Programming. Why MATLAB is used ? It can use a simple instruction to compute a very complex mathematical function. It provides high resolution.
Graphics and Image Data Representations 1. Q1 How images are represented in a computer system? 2.
MA/CS375 Fall MA/CS 375 Fall 2002 Lecture 5.
An Introduction to Programming in Matlab Emily Blumenthal
EEE 242 Computer Tools for Electrical Engineering
Introduction to MATLAB’s Signal & Image Processing toolboxes
2.01 Understand Digital Raster Graphics
2.01 Understand Digital Raster Graphics
John Federici NJIT Physics Department
Chapter 3 Image Files © 2013 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website,
Introduction to MATLAB
2.01 Understand Digital Raster Graphics
Chapter 3 Graphics and Image Data Representations
Image Processing Digital image Fundamentals. Introduction to the course Grading – Project: 30% – Midterm Exam: 30% – Final Exam : 40% – Total: 100% –
Ch3 Graphics Overview of Plotting Editing Plots
“Common Pitfalls with Figures and Legends”
Chapter 3 Image Files © 2017 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
Image File Size and File Compression
T490 (IP): Tutorial 2 Chapter 2: Digital Image Fundamentals
2.01 Understand Digital Raster Graphics
Image Enhancement in the
Lecture 2 Introduction to MATLAB
2.01 Understand Digital Raster Graphics
GRAPHICAL DATA EXCHANGE FORMATS .jpg .gif .tif.
CSE 307 Basics of Image Processing
Lesson 5: Multimedia on the Web
Fundamentals of Image Processing Digital Image Representation
Lecture 4 Image Enhancement in Frequency Domain
Presentation transcript:

Introduction to Image Processing with MATLAB Medical Imaging Systems Wally Block BME / Medical Physics 530 Medical Imaging Systems Tuesday 30 November 1999 RSNA, Chicago Observer Evaluation of 3D MR DSA Preview Images

Overview Getting Help 2D Matrix / Image 2D Functions Coordinate system Display Storing images 2D Functions Discrete Fourier Transform 1D DFT fftshift 2D DFT: zero-filling and shifting the image

Getting Started Get a CAE account Log in (Windows or Unix) Create a directory ‘ImLab’ Open Webbrowser and goto course page http://zoot.radiology.wisc.edu/~block/bme_530.html Goto ‘Lecture Material’ Download matlab_intro.m example.fig, example.mat, example.tif Start Matlab Change to directory ‘Imlab’ Either >>cd ImLab Or use the path browser

Getting Help in Matlab Online Help Documentation Help Browser (? In toolbar or >>helpbrowser) Help Functions ( >>help functionname ) Matlab website: www.mathworks.com Demos Documentation Online as pdf files Checkout at CAE

2D Matrix 2D matrix has M rows and N columns Example Note: >>m=zeros(400,200); >>m(1:50,1:100) = 1; Note: Index 1 to M, not 0 to M-1 Origin of coordinate system is in upper left corner Row index increases from top to bottom Coordinate system is rotated in respect to ‘standard’ x-y coordinate system c … 1 2 3 N 1 2 3 r … M

Image Display Display a 2D matrix as an image >>image(m) >>imagesc(m) >>imshow(m) imshow is recommended by MATLAB for image processing Image has MxN pixels = picture elements = dots on display Test the following commands >>axis on >>colorbar >>colormap(jet) >>colormap(gray)

Image Types Medical images are mostly represented as grayscale images Human visual system resolves highest spatial resolution for grayscale contrast Color is sometimes used to superimpose information on anatomical data

Save Image Matrix MATLAB binary format >>save example m -> writes out example.mat Standard image format (bmp,tiff,jpeg,png,hdf,pcx,xwd) >>imwrite(m,’example.tif’,’tif’) -> writes out example.tif Warning: imwrite expects data in range [0…1] If data range outside this [0…1], use mat2gray >>m_2 = mat2gray(m); >>imwrite(m_2,’example.tif’,’tif’)

Save Figure (incl. labels etc) Save in Matlab Figure Format: >File>Save As> in Figure Window -> writes out example.fig Standard image formats >File>Export in Figure Window E.g. jpg, tif, png, eps, … Alternatively, use print, e.g. >>print –deps2 example.eps

Loading 2D Data and Images Load matrix from MATLAB binary format >>load example (loads example.mat) Load matrix from standard image format >>m_in = imread(’example.tif’,’tif’); To check on an image: >>imfinfo(’example.tif’,’tif’) Load figure from Matlab Figure Format (*.fig): >File>Open> ‘example.fig’ in Figure Window ->Check loaded matrices >>whos

Some Common Image Formats TIF (TIFF) Very common, compatible, all purpose image format Allows for lossless compression JPEG Allows for lossy compression (small file size) Very common for internet PNG (portable network graphics) Good for saving MATLAB images for importing into Microsoft docuuments such as Word Dicom THE medical imaging format Lots of header information (patient name & ID, imaging parameters, exam date, …) can be stored Allows for lossy and lossless compression Matlab function ‘dicomread’, ‘dicomwrite’ EPS (Encapsulated Postscript) Graphics format rather than an image format Great for best quality print results Large file size

2D Functions Create a matrix that evaluates 2D Gaussian: exp(-p/2(x2+y2)/s2) >>ind = [-32:1:31] / 32; >>[x,y] = meshgrid(ind,-1*ind); >>z = exp(-pi/2*(x.^2+y.^2)/(.25.^2)); >>imshow(z) >>colorbar x y y’ -1 64x64 matrix x’ 31/32 -1

FT Conventions - 1D 1D Fourier Transform >>l = z(33,:); >>L = fft(l); abs (L) l phase (L) 1 33 64 1 33 64 sample # sample # xmax fN/2 fN x [Matlab] u

1D FT - fftshift Use fftshift >>L1 = fft(fftshift(l)); abs (L1) phase (L1) 1 33 64 1 33 64 sample # sample # xmax fN/2 fN x [Matlab] u

1D FT - 2xfftshift Center Fourier Domain >>L2 = abs (L2) Center Fourier Domain >>L2 = fftshift(fft(fftshift(l))); phase (L2) 1 33 64 sample # -fN/2 (N-1)/N*fN/2 u

fftshift in 2D Use fftshift for 2D functions >>smiley2 = fftshift(smiley);

2D Discrete Fourier Transform >>Z=fftshift(fft2(fftshift(z))); >>whos >>figure >>imshow(real(Z)) >>imshow(real(Z),[]) >>colorbar >>figure >>imshow(imag(Z),[]) >>colorbar Real (Z) Imag (Z)

2D DFT - Zero Filling Interpolating Fourier space by zerofilling in image space >>z_zf = zeros(256); >>z_zf(97:160,97:160) = z; >>Z_ZF = fftshift(fft2(fftshift(z_zf))); >>figure >>imshow(abs(Z_ZF),[]) >>colorbar >>figure >>imshow(angle(Z_ZF),[]) >>colorbar Magnitude (Z_ZF) Phase (Z_ZF)

2D DFT - Voxel Shifts Shift image: 5 voxels up and 2 voxels left >>z_s = zeros(256); >>z_s(92:155,95:158) = z; >>Z_S = fftshift(fft2(fftshift(z_s))); >>figure >>imshow(abs(Z_S),[]) >>colorbar >>figure >>imshow(angle(Z_S),[]) >>colorbar Magnitude (Z_S) Phase (Z_S)

Review of functions … Input / Output Image Display Others >>imread >>imwrite >>imfinfo Image Display >>imshow Others >>axis >>colorbar >>colormap >>meshgrid >>fft, fft2 >>fftshift

More useful functions … Image Display >>title >>xlabel, ylabel >>subimage >>zoom >>mesh Others >>imresize >>imrotate >>imhist >>conv2 >>radon >>roipoly Demos in Image Processing Toolbox >>help imdemos