1
Fields, 08, HmZhu
Medical Image Processing Using Transforms
Hongmei Zhu, Ph.DDepartment of Mathematics & Statistics
York [email protected]
MR
What do we want when we see a doctor?
patients doctorsus
Medical image processing
Increase the chance of making right decisions on diagnosis, treatment, prediction, prevention, …
Purpose of medical image processing
2
UltraSound
MRI
X-ray CT
5Fields, 08, HmZhu
General Questions Concerned
• Are the images good enough to make diagnosis?
• If not, how can we improve image quality? • What information can we draw from images?• Can the information aid disease diagnosis?
6Fields, 08, HmZhu
Outlines
• Image Quality•Gray value transforms•Histogram processing•Transforms in image space • Transforms in Fourier space • Transforms in Time-frequency space
3
Registration
Filtering
Correction
Segmentation
Analysis
Visualization
Validation
Standard pipeline for medical image processing
Filtering
8Fields, 08, HmZhu
References
1. Gonzalez, R. C., Woods, R. E. and Eddins S. L. (2004). Digital Image processing. Pearson Prentice Hall; www.ImageProcessingPlace.com
2. www.sprawls.org2. http://docs.gimp.org/en/3. http://www.gnu.org/software/octave/doc/interpreter/4. http://www.mathworks.com/access/helpdesk/help/helpdesk.h
tml5. http://www.math.ufl.edu/help/matlab-tutorial/matlab-
tutorial.html
Fields, 08, HmZhu
1. Digital Image Quality
4
10Fields, 08, HmZhu
Image Quality
www.sprawls.org
11Fields, 08, HmZhu
Contrast Sensitivity
www.sprawls.org
12Fields, 08, HmZhu
Contrast Sensitivity
www.sprawls.org
5
13Fields, 08, HmZhu
Image Blurring
www.sprawls.org
14Fields, 08, HmZhu
Image Blurring
www.sprawls.org
15Fields, 08, HmZhu
Image Blurring
www.sprawls.org
6
16Fields, 08, HmZhu
Image Blurring
www.sprawls.org
17Fields, 08, HmZhu
Images with different noise levels
www.sprawls.org
18Fields, 08, HmZhu
Effects of noise
www.sprawls.org
7
19Fields, 08, HmZhu
Effects of Noise and Blur
www.sprawls.org
Fields, 08, HmZhu
2. Gray Value Transforms
21Fields, 08, HmZhu
Histogram
Histogram shows the distribution of image intensity, often displayed as a bar graph.
( )
[ ]
The histogram of a digital image with gray levels in the range [0, L-1] is defined as
where : the th gray level, 0 1: the number of pixels having gray levels
k k
k k
k k
h g n
g k g , L-n g
=
∈
8
22Fields, 08, HmZhu
Normalized Histogram
Normalized histogram estimates the probability distribution of occurrence of gray levels
( )
[ ]
Normalized histogram of a digital image with gray levels in the range [0, L-1] is defined as
where : the th gray level, 0 1: the number of pixels having gray levels : the total num
kk
k k
k k
np g n
g k g , L-n gn
=
∈
ber of pixels in the image
Histogram Processing
Dark: focuses on low values of thegray scales
Bright: biased towards the high sideof the gray scales
Low contrast: has a narrow histogramHigh contrast: covers a broad range
of the gray scales
24Fields, 08, HmZhu
Gray Value Transformations
( )
A gray level transformation of a digital image with gray levels in the range [0, L-1] is defined as
where : the original/input gray levels: the transformed/output gray levels: gray level transfo
s T r
rsT
=
rmation
9
25Fields, 08, HmZhu
Gray Value Transformations
26Fields, 08, HmZhu
Image Negatives: s = L-1-r
27Fields, 08, HmZhu
Gray Value Transformations
10
28Fields, 08, HmZhu
Log Transformations: s = c log(1+r) (r ≥ 0)
29Fields, 08, HmZhu
Power-Law Transformations
30Fields, 08, HmZhu
Power-Law Transformations: s = c rγ
11
31Fields, 08, HmZhu
Power-Law Transformations: s = c rγ
32Fields, 08, HmZhu
Contrast stretching transforms
33Fields, 08, HmZhu
Contrast stretching transforms
( )( )
11 Es T r
m r= =
+
12
34Fields, 08, HmZhu
Slicing transforms
35Fields, 08, HmZhu
Slicing transforms
Fields, 08, HmZhu
2. Histogram Processing
13
37Fields, 08, HmZhu
Histogram Equalization
( ) ( ) ( )
( ) ( ) ( )
0
1 1
1
1
r
r
k kj
k k r jj j
s T r L p d
rs T r L p r
nn
ω ω
= =
= = −
= = − =
∫
∑ ∑
The probability density function of the output levels s is uniform. For digital images, the equalization transform becomes
where is the total number of the pixels in the image.
38Fields, 08, HmZhu
Histogram Equalization
39Fields, 08, HmZhu
Example: 3-bit image
14
40Fields, 08, HmZhu
Example: 3-bit image
41Fields, 08, HmZhu
Example: Pollen
42Fields, 08, HmZhu
Example: Pollen
T(r)
15
43Fields, 08, HmZhu
Example: Pollen
44Fields, 08, HmZhu
Example: Mars_Moon
45Fields, 08, HmZhu
Example: Mars_Moon
16
46Fields, 08, HmZhu
Histogram Matching
( ) ( ) ( )
( ) ( ) ( )( )
0
0
1
1 ,
.
r
r
z
z
z
s T r L p d
z
H z L p d s
z p z
z
ω ω
ω ω
= = −
= − =
=
∫
∫
results in intensity levels s that is uniform distributed.Suppose we define a variable such that
where intensity level has the specific density Then we have
( ) ( )
( )( )
1 1 .
r
z
H s H T r
p r
p z
− −= ⎡ ⎤⎣ ⎦That is, we transform intensity levels r with density function to intensity levels z with specific density
function .
47Fields, 08, HmZhu
Histogram Matching
Fields, 08, HmZhu
3. Application: MR Intensity Calibrations
17
49Fields, 08, HmZhu
MR Image Intensity Calibration
50Fields, 08, HmZhu
MR intensity variation
• MR signal intensity doesn’t have a fixed unit of measure
• Although the relative difference between tissue types will remain roughly constant from scan to scan, the absolute value of the scale is not fixed
• May pose a problem in image segmentation or quantification
51Fields, 08, HmZhu
Overview
Methods• Scaling or windowing (quick, intra-patients)• Transforming to a “standard” histogram (inter-
patients, various setting)
Task• For the same tissues in all-same-settings, the
resulting image intensities should be same or close• For the same tissues in similar settings, the
resulting image intensities should be similar
18
Method 1: Scaling or windowing
• Quick• Can achieve display uniformity
I1 I2 I3
• May not be fine enough for quantitative image analysis across different imaging protocols
( )( )CSFi
CSFii Imean
ImeanII
,
,1ˆ ⋅=
min,1min,max,
min,1max,1min, )(ˆ I
IIII
IIIii
iii +−−
⋅−=
or
53Fields, 08, HmZhu
Method 2: transformation
ModelBimodal histogram
Range of intensity of interests
Method 2: transformationPiecewise linear mapping
19
after scaling
original
aftertransformation
Example: histogram standardization
Eg: for different patients
Eg: For an non-brain region
20
Eg3: From different scanners
59Fields, 08, HmZhu
Remarks
• The transform chosen for standardization has to be 1-to-1 and monotonically increasing
• The intensity calibration for patients is better done in disease-removed images or in an non-disease homogenous region.