Title: Intro1
1Introduction to Biomedical EngineeringDigital
Image Processing
- Topics
- Fundamentals of DIP Scenes Digital Images
Image Resolution Criteria - Mathematical Preliminaries
- Visual Perception
- Image Digitization
- Image Enhancement
- Medical Imaging Facilities and Methodologies
2Fundamentals of DIP
- Ultimate Goal To help better
- understand, interpret the
- content of the image
3Scenes and Images
- Optical image of the scene produced by a lens
- a scene -gt an image (via a lens)
- an image illumination pattern (recorded by
sensors) - sensor response varies with color
light rays
Object
lens
image
u
v
1/u 1/v 1/f (f focal length)
4Digital Images and Image Resolution Criteria
- An Image ??A Picture
- Any 2D function that bears information
- Denoted f(x,y) or f(x), where f() is the
brightness or gray values in BW image, or RGB
values in color image - f(x,y) y
-
-
x
5- Properties of Brightness
- Real
- Non-negative
- Bounded (due to finite field of view)
- Image Examples
- x-ray absorption, proton density distribution of
MR images, radar images, temperature profile,
luminance of a scene, drawings
A tumor at choroid plexus region (2124s4.11)
6- Digital Image Processing
- To process a picture using digital techniques,
i.e., computers - A typical image processing system
- Digitizer To sample and quantize an image into
digital form of discrete picture elements (pixel
, pel)
Image Maker
Scene
Image
Digitizer
Users
Display
CPUs
Storage
7- Sampling and quantization
- Light dots are not integer samples
- round-off or truncation is needed gt error
- larger dynamic range may alleviate this problem
dynamic range
gray levels
quantization domain
samples
sampling domain
8- Image Resolution Criteria minimal separation
that intensity variation can still be discerned - Resolution ...
- as d gets smaller and smaller, two peaks merge
into one, i.e., d metric resolution is lost
ideal case
real case
d
9- Human eye under visible light and viewing
distance can resolve separation resolution is
tied to grain size of the silver halides
crystals. - Examples
- A film in electron microscopy is 520 ?m
- 300 dpi (dot per inch) corresponds to 85 ?m
- 10 ?m resolution of a Xenopus laevis embryo
(microscopic MRI)
10- Typical human visual system can resolve
approximately 0.003 times of the viewing distance
to the object
11Mathematical Preliminaries
- f(x,y) y
- Digital Picture Function
- analytically well-behaved, i.e., bounded,
integrable, have Fourier transform pairs, etc.
x
12- Operations on pixels
- point by point operations, e.g., difference image
- local operations, e.g., edge detection
- geometric operation, e.g., image translation
- Problems with pixels on the border
- Assume equal to zero
- Define a sub-picture excluding those
borderingosed, repetition, (problem oriented)
13- Arithmetic Operations
- Addition p q, Subtraction p - q
- Multiplication p q, Division p q
q (2124s4.3)
p (2124s4.2)
(p-q) 0.5 128
p - q
14- Logic Operations
- AND pANDq (also, p q)
- OR pORq (also, p q)
- COMPLEMENT NOTq (also, )
- EXCLUSIVE OR pXORq
- Example of COMPLEMENT
- before after
- Examples of logic operations on binary images
(from RCG fig. 2.14)
15- Logic Operations
- p q
- pANDq
- pORq
- pXORq
16Visual Perception
- Reasons to studying human vision
- 1. Interpretation (detection, recognition,
classification, ...) - 2. Information storage and display
- 3. Feature enhancement, correction, image
processing, algorithm development and design ...
17- Gestalt laws of organization
- A visual field is usually seen as consisting of a
small number of regions (objects on a background)
that abide the following rules - law of similarity
- law of proximity closely clustered entities tend
to group together. - law of good continuation smooth curve effect
- law of closure closed figures tend to be seen as
a unit
18- law of simplicity (least information). Example
Kopfermann cubes, the left one is easily seen as
3D cube because its simpler and more familiar to
us - law of common fate (time or spatial varying
images). Example uniform motion of a collection
of objects is easily seen as a single unit
19- Webers law
- Human visual perception is sensitive to luminance
contrast rather than the absolute luminance
values - f0 luminance of the object
- fs luminance of its surrounds
- f0 - fs ?f just noticeable difference in
luminance
20- Simultaneous apparent brightness depends
strongly on the local background intensity
21- Mach bands The response of the visual system to
abrupt changes in luminance (edges or contours)
display overshoots (mach bands), which have the
effect of enhancing or deblurring the edges
22 Ebbinghaus illusion
23Zollner illusion
24The Benussi ring
25The Benary cross (although the lower triangle has
more black in its vicinity, it looks
darker because it is seen as outside the black
cross)
26Filling in from edges having gaps
27Image Digitization
- Digitization Sampling and Quantization
- f(x,y) an image f(i,j) an image element, pixel,
or pel - Sampling partitioning the image as an ordered
pairs of elements (a,b), with a and b being
integers. a 0 .. N-1, b 0 .. M-1 - Quantization Assigning a real value to the
sampled image elements (pixels). In black and
white images, this value is called the gray level - For an NxM digital image with 2L gray levels, it
requires NxMxL bits to represent it
28- Example of a digitized image
- A tumor at choroid plexus region (2124s4.11)
29- To better represent the picture, M, N, and L
should be large. Nothing is gained, however, by
increasing M, N, and L beyond the resolution
capabilities of the receiver. - Question How to choose M, N and L for a fixed
data size (bytes)?
30- Image Sampling - 1D case
- One dimensional sampling function
- Let f(t) denote the 1D signal and T be the
sampling period
t
0
T 2T ... nT ...
-T
0
31- Two dimensional Sampling
- Ideal sampling function
y
x
32- Sampling and Reconstruction from sampled data
f(t)
F(w)
-fc
fc
fs(t)
Fs(w)
-fc
fc
-1/T
1/T
f(t)
F(w)
-fc
fc
-1/T
1/T
33- Two problems associated with the reconstruction
of the original signal from its samples - 1. If f(t) is not a bandlimited signal, i.e.,
- F(w) ? 0, -8 w 8 or fc 8
- 2. If 1/T is not sufficiently distanced.
- Both cases result overlapped spectrum, a
phenomenon called aliasing. - For bandlimited signal, the sufficient condition
to reconstruct the original signal back from its
sampled signal is - 1/T 2 fc
- where fc is the bandwidth of the original signal.
The lower bound is called the Nyquist rates or
Nyquist frequency.
34Image Enhancement
- Purposes To make an image better appealing and
easier to deal with than the original image - Three categories
- 1. Spatial domain methods operate on the images
itself, examples as - Point processing, e.g., image averaging logic
operation contrast stretching ... - Mask processing, e.g., filtering or mask
operation, (blurring, median
35- 2. Frequency domain methods work on the Fourier
transformed output of the image, examples from
the convolution theory - g(x,y) f(x,y) ??h(x,y)
- gt G(u,v) F(u,v) H(u,v)
- gt certain properties of F(u,v) can be
- emphasized into G(u,v)
- gt spatial domain g(x,y) F-1G(u,v)
- 3. Combination of the above two categories
36- Spatial Domain Methods
- Point processing enhancement
- Image intensity transformation
- Negative image
L-1
T(r)
s
0
L-1
r
37- Contrast stretching to increase the dynamic
range of the gray levels in the image
38- Dynamic range compression
- linear scaling
- input range R, output range L
- output gray level s (r-I0)L/R
- I0 lower bound of the input
- logarithm scaling s c log(1 r)
- useful when the input range is very large, e.g.,
106, and the brightest parts are dominating (from
RC Gonzalez)
39- Histogram Processing
- A histogram is a plot of the number of gray
level, rk, its occurrencesk, 0kL-1, versus the
range of gray levels normalized to the total
number of pixels, n - Histogram of a dark image
- Histogram Equalization to equalize the histogram
according to its probability density function
40- Image subtraction
- g(x,y) f(x,y) - h(x,y)
Image subtraction enhancement (a) mask image (b)
image with mask subtracted out (after injection
of dye into the bloodstream) (from RC Gonzalez)
41- Image averaging consider a noisy image
M 1
M 2
M 16
M 8
M 32
M 128
(from RC Gonzalez)
42- Spatial Filtering (Mask processing)
- lowpass filtering eliminating high frequency
components gt image blurring (from RC Gonzalez)
43- highpass filtering sharpening edges or fine
details in an image gt deblurring (from RC
Gonzalez)
44- Derivative filters
- averaging ? integration gt blurring
- difference ? differentiation gt sharpening
- Gradient operator
In discrete case
45- Consider the digital image
At point z5
?f(z5-z4)2(z5-z2) 21/2
z5-z4z5-z2
Laplacian operator
Digital Laplacian has the effect of increasing
the ramp steepness, and of increasing the
contrast at the edges
46- High-emphasis filtering
- differentiation enhances high spatial frequencies
- integration weakens high frequencies
- the effect of subtracting a Laplacian from an
image itself
47Original (2124s4.1)
Laplace(3x3)
Laplace-(3x3)
High Emphasis
48- Various image processing effects
Original
Smooth
1 1 1 1 1 1 1 1 1
Shadow
Sharpen
-2 -1 0 -1 1 1 0 1 2
-1 -1 -1 -1 -12 -1 -1 -1 -1
49Original
Trace edge
1 1 1 1 1 1 1 1 1
1 1 1 0 0 0 -1 -1 -1
-1 0 1 -1 0 1 -1 0 1
Dither (Floyd-Steinberg)
Reduce Noise (median filter)
50Grad-NW (3x3)
Grad-N (3x3)
Laplace (5x5)
Laplace (9x9)
51Grad-W (7x7)
High-Emphasis (3x3)
Hat (5x5)
Hat (13x13)
52Mean (5x5)
Mean (15x15)
Gauss (15x15)
Gauss (5x5)
53Original
Subtract Background
Enhance Contrast
Equalize
54- Frequency domain processing
aOriginal (2124s4.1)
bFFTa
cHigh_passb
dIFFTc
55- Two pictures are worth more than ten thousand
words