Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

Introduction to Image Processing

Colorado School of Mines Image and Multidimensional Signal Processing 1


What is an Image?
• An image is a 2D function f(x,y)
– f is the amplitude or “gray level”
– (x,y) are the spatial plane coordinates
– Conceptually, (x,y) are continuous, although in practice we limit them to
discrete (integer) values

• In general, the function value can be vector‐valued


– Example: Color can be represented by (red, green, blue)
r
  
f ( x, y )   g    r , g , b 
T

b
 
• The function domain can be N‐dimensional
– Example: Computed Tomography (CT) images are 3D
– f(x,y,z) represents the x‐ray absorption at point (x,y,z)

Colorado School of Mines Image and Multidimensional Signal Processing 2


Demos

• Matlab
– Display gray scale image
I = imread(‘moon.tif’);
imtool(I);
– Display color image
imtool(‘peppers.png’)
– Plot image as a surface
surf(double(I(1:8:end,1:8:end)))

Colorado School of Mines Image and Multidimensional Signal Processing 3


What is Digital Image Processing?
• DIP refers to computer
processing to
– Extract information
– Restore or correct
aberrations
– Transform image to a more
useful form
• Enhance for viewing
• Compress for storage or
transmission

• Began in earnest in FIGURE 1.4 The first picture of the moon by a U.S.
spacecraft. Ranger 7 took this image on July 31, 1964
1960’s at 9:09 A.M. EDT, about 17 minutes before impacting
the lunar surface.
(Courtesy of NASA.)

Colorado School of Mines Image and Multidimensional Signal Processing 4


Example
• Digital images from remote spacecraft

(August 2012) This image is the first high‐resolution color mosaic from NASA's Curiosity rover, showing
the geological environment around the rover's landing site in Gale Crater on Mars. From
http://mars.jpl.nasa.gov/msl/multimedia/images/

• Also see an interactive panorama at


– http://www.panoramas.dk/mars/greeley‐haven.html

Colorado School of Mines Image and Multidimensional Signal Processing 5


Image Processing vs. Related Areas
• Image Processing (CSCI 510 / EENG 510)
– Usually low level techniques (eg, compression, edge detection)
– Quantitative measurements
– 2D (image in, image out)

• Computer Vision (CSCI 512 / EENG 512)


– Higher level techniques (eg, object recognition)
– Artificial intelligence (emulate human intelligence)
– Semantic (instead of quantitative) output
– 3D
– There is overlap

• Other related fields


– Signal processing, communications
– Photogrammetry
– Pattern recognition

Colorado School of Mines Image and Multidimensional Signal Processing 6


Example Applications
• Industrial
inspection

Colorado School of Mines Image and Multidimensional Signal Processing 7


Example Applications

• Remote sensing

Colorado School of Mines Image and Multidimensional Signal Processing 8


Example Applications
• Target
recognition

Vehicles in a synthetic
aperture radar (SAR)
image

Colorado School of Mines Image and Multidimensional Signal Processing 9


Example Applications
• Medical diagnosis

Xray fluoroscopy image of patient


with knee implant

IVUS
10
Colorado School of Mines Image and Multidimensional Signal Processing
Sources of Image Data

• Normally images are formed from EM radiation


(light, x‐rays, radio waves)

Colorado School of Mines Image and Multidimensional Signal Processing 11


(a) Inject patient
with isotope
(b) Positron
emission
tomography
(c) Gas cloud in
constellation
Cygnus
(d) Radioactive
valve

Gamma
rays
Colorado School of Mines Image and Multidimensional Signal Processing 12
X‐rays

Colorado School of Mines Image and Multidimensional Signal Processing 13


Ultraviolet (a,b) Fluorescence
microscope

Colorado School of Mines Image and Multidimensional Signal Processing 14


Visible

Colorado School of Mines Image and Multidimensional Signal Processing 15


Infra‐red

www.infrared‐cameras.org/.../scope.htm

Colorado School of Mines Image and Multidimensional Signal Processing 16


Microwave

Colorado School of Mines Image and Multidimensional Signal Processing 17


Magnetic resonance imaging (MRI)

Radio
Colorado School of Mines Image and Multidimensional Signal Processing 18
Images formed from other sources
• Ultrasound
• Seismic
• Scanning
electron
microscope

Colorado School of Mines Image and Multidimensional Signal Processing 19


Topics in Digital Image Processing

Colorado School of Mines Image and Multidimensional Signal Processing 20


Matlab Introduction
• Overview
– “Matrix Laboratory”
– An interactive programming environment
– http://www.mathworks.com

• Availability
– On computers in Brown Hall (you need an “adit” logon)
– Can get student version low cost

• Why we are using


– Easy to prototype
– Powerful toolboxes such as the image processing toolbox
– Widely used; good help and documentation

Colorado School of Mines Image and Multidimensional Signal Processing 21


Matlab
• Programming
– Can type on command line, or use a program file (“m”‐file)
– Semicolon at end of line is optional (suppresses printing)
– Control flow (if, for, etc) similar to C
– Differences from C: no variable declarations, no pointers

• Help
– Browser ‐ best source
– Command line
– Web
(http://www.mathworks.com/access/helpdesk/help/techdoc/matlab.s
html)

Colorado School of Mines Image and Multidimensional Signal Processing 22


Matlab
• Everything is a matrix
– a variable is a 1x1 matrix

• Initializing a matrix:
– Example: my_matrix = [1 2 3; 4 5 6; 7 8 9];

• Accessing a matrix (row, column):


– my_matrix(1,2) has the value 2

• Colon operator generates a range


– Example: 1:10 = [1 2 3 4 5 6 7 8 9 10]
– mytest(1, 2:4) is equivalent to mytest(1,[2 3 4])
– mytest(3, :) refers to all elements of row 3

Colorado School of Mines Image and Multidimensional Signal Processing 23


Matlab
• Built‐in functions (exp, sin, log, etc)

• Variables
– whos (view all variables)
– clear all (Clear all variables )
• Types
– double (default)
– Also have integer, unsigned integer, logical, complex
• Expressions
– +,‐,/,*
– Power is ^
– Transpose is ‘ (apostrophe)
– Period indicates point‐by‐point operation

• Plotting example (sin)

Colorado School of Mines Image and Multidimensional Signal Processing 24


Exercises
• Create matrix A and vector x
 1 2 3  .1 
   
A   4 5 6 , x   .2 
 7 8 9  .3 
   
• Add 1 to each element of A

• Take the square root of each element of A


• Multiply A*x
• Create 3x4 matrix B by appending x to A
 1 2 3 .1 
 
B   4 5 6 .2 
 7 8 9 .3 
 

• Show that (AB)T = BTAT

Colorado School of Mines Image and Multidimensional Signal Processing 25

You might also like