You are on page 1of 44

Medical Image Quantification

Xiaogang Wang

Outline

Introduction
Shape quantification

Compactness
Spatial moments
Radial distance measures
Fourier descriptors
Thinning

Texture quantification
Statistical moments
Co-occurrence matrix measures
Spectral measures
2

Medical Image Quantification

Medical image analysis benefits significantly from precise,


fast, repeatable and objective measurements by computing
algorithms. They contribute to visual interpretation and
examination.
Quantitative measurements address many aspects of medical
images

Tissue shape,
Ti
h
size,
i texture
t t
andd density
d it
Musculoskeletal angle, kinematics, and stress
Ventricular motion
Myocardial strain
Blood flow
Tumor growth
Cytometric features

It is
i often
ft based
b d image
i
segmentation
t ti results
lt
3

Shape Quantification

Operate on all the pixels


Compactness
C
Spatial moments

Operate on boundary pixels


Radial distance measures
Fourier descriptors

The essential shape


p information of elongated
g
or
branching structures is encoded in their middle lines
Length,
g , angle,
g , curvature and orientation

Examples of benign (a) and malignant (b) microcalcifications in mammograms.

FF

benign
g

Malignant

Distributions of normalized compactness C


C, and normalized Fourier
descriptor FF for 64 benign and 79 malignant microcalcifications in
mammograms.

Malignant tumor mammograms

Benign tumor in mammograms

Invariance of Shape Quantification

Translation invariant
Scale invariant
Rotation invariant

Compactness

It quantifies how close an object is to the smoothest shape the


circle
P2
C

P is the perimeter
A is the area
Normalize compactness C ' 1 4 / C
It increases with increasing shape complexity
Visual shape roughness perception often may have a good correlation
with C,
C but not always the case

Three regions for which


hich compactness is (a) 13.6,
13 6 (b) 15.4
15 4 and (c) 27.6
27 6
9

Spatial Moments

Analyze the spatial distribution of a segmented region


f (x, y) is a binary image. f (x, y) = 1 if pixel (x, y) is
in the region; otherwise it is zero
M 1
N 1 p q
m

Moments pq x0 y 0 x y f ( x, y ) x, y 0,1,2,3
They provide an effective set of shape descriptors
p+q is the moment order

Translation invariance can be obtained by using


central moments
M 1

pq x 0

where

m10
m00

N 1
(x
y0

x ) p ( y y ) q f ( x, y ) x, y 0,1,2,3

and

m01
m00
10

Spatial Moments

If an image is scaled up by a coefficient s, the scaled


i
image
is
i f (x,
( y)) = f (x/s,
( / y/s),
/ ) andd its
it moments
t will
ill be
b
' pq s p q 2 pq

Scale invariant central moment


pq pq / (00p q 2) / 2

Rotation invariant descriptors

11

Spatial Moments

The orientation of an object, defined as the direction along


which the object is most elongated,
elongated can be obtained with the
angle :

This orientation and the one orthogonal to it are the principal


axes of the object.
j
The eccentricityy of an object
j is given
g
byy
2
1
1

02
i 20

2
411
( 20 02 ) 2

Spatial
p
moments have been used to qquantify
y breast tumors,,
mammographic calcifications and blood cells.

12

Radial Distance Measures

The shape of a structure can be determined by analyzing its


boundary the variations and curvature of which constitute the
boundary,
information to be quantified
Transform the boundary into a 1D signal and analyze its
structure
Measure the radial distance from a central ppoint ((xc, yc) in a
region to each pixel (x(n), y(n)) on the boundary.

(xN-1, yN-1)
(x1, y1)
(x2, y2)

(x , y )
c

(xn, yn)

13

Radial Distance Measures

To achieve scaling invariance, obtain the normalized radial


distance sequence r(n) by normalizing d(n) with the maximal
distance.
Extract shape metrics from r(n)
Entropy

hk is the K-bin probability histogram that represents the distribution of r(n)

Statistical moments
Discrete Fourier transform

14

Fourier Descriptors (Not Required)

The contour can be expressed as an 1D complex sequence


obtained by tracing points (x(n),
(x(n) y(n)) around the contour in a
selected direction starting from a selected pixel

The Discrete Fourier Transform (DFT) of this sequence is

The essential shape information is contained in the low-order


coefficients of d(n), which constitute the Fourier shape
d
descriptors
i t
d(0) is the centroid of the contour and varies with translation.

15

Fourier Descriptors (Not Required)

d(1) relates to the radius of the circle that approximates the


shape and its value is typically nonzero.
nonzero
The magnitudes of the normalized descriptors

The remainingg coefficients are all translation-invariant. But


they depend on the pixel selected as the starting point.
Consider d0((u)) to be the Fourier coefficients obtained by
y
starting the sequence c(n) from pixel p0. If the sequence is
started ns pixel further than p0, the coefficients will be

16

Fourier Descriptors (Not Required)

If the contour is scaled by a factor a, the coefficients are also


scaled by the same factor.
factor
Rotating the contour around the origin by an angle imparts a
multiplicative factor of ej to the Fourier coefficients.
The effects of starting points, scaling and rotation are
summarized as
Fourier descriptors
p
what are invariant to startingg ppoint,,
translation, scale and rotation are obtained with

17

Fourier Descriptors (Not Required)

Another shape factor based on the magnitudes of the


coefficients has been reported to have low sensitivity to noise
as well as invariance to translation, rotation, scale and starting
point

The value of FF varies between 0 and 1,, and it increases with


increasing object shape complexity and roughness

18

Thinning (not required)

In many applications, the essential shape information of a


structure is obtained by representing it with its skeleton made
of the medial lines along the main components of the structure
Thinning algorithms produce the skeleton by using criteria that
search for the medial lines

19

Medial Axis Transform (MAT)


(not required)

Determine the medial line by computing the distance d (i, j)


from each interior pixel i of a binary structure to each
boundary pixel j. When the minimal distance of an interior
pixel i0 occurs for two boundary pixels j1 and j2,

The pixel i0 is labeled as an MAT skeleton pixel.


The complexity
p
y of MAT is high.
g
Many iterative algorithms have been developed to determine
the medial lines with fewer computations.

20

Zhang and Suen Algorithm


(not required)

Iteratively remove a border pixel from the contour of the


binary region only if it meets a set of conditions based on its
neighborhood.
The conditions are designed to ensure that the removal of the
border pixel will not lead to splitting the region to be thinned.
Assume background
g
ppixels are 0 and object
j pixels
p
are 1. Two
sums n(p1) and s(p1) are defined.
n(p1) = 5
s(p1) = 2

21

Zhang and Suen Algorithm


(not required)

n(p1) is defined as the number of nonzero neighbors

s(p
( 1) is
i the
th sum off 0-to-1
0 t 1 transitions
t
iti
in
i the
th sequence off
neighbor pixels, computed by considering all nine transitions
around the pixel p1, starting with p2 to p3 and end with p9 to p2.

22

Zhang and Suen Algorithm


(not required)

Two steps repeat iteratively:


Step 1: determine border pixels which have a value 1 and at least one 88
connected pixel equal to 0 and satisfy all the four conditions.

Condition 1: 2 n(p1) 6. If p1 has only one neighbor, it is the end of a pixel strand
and should not be deleted
deleted. If p1 has 7 neighbors
neighbors, deleting it may deplete the region
and lead to splitting.
Condition 2: s(p1) =1. If the neighborhood has more than one 0-to-1 transition,
delete p1 mayy lead to splitting
p
g the region.
g
Condition 3: p2 * p4 * p6 = 0
Condition 4: p4 * p6 * p8 = 0.
These two conditions are satisfied simultaneously if p4 = 0, or p6 = 0, or p2 = p8 = 0.
When conditions 1 and 2 are met, these three possibilities refer to the three cases
illustrated in the figure below
If all the four conditions are met, p1 is marked for deletion but not deleted until all
the pixels are evaluated. After the complete evaluation, all marked pixels are
deleted.

East border

south border northwest border

23

Zhang and Suen Algorithm


(not required)
Step 2 is applied to the result of step 1, also using the four conditions.
The first two conditions are the same as those of step
p 1, but the other
two are modified as

Condition 3: p2 * p4 * p8 = 0
Condition 4: p2 * p6 * p8 = 0
These two conditions address the cases of north border, west border, and southeast
corner in a manner similar to step 1.
If all the four conditions are met, p1 is marked for deletion but not deleted until all
the pixels are evaluated. After the complete evaluation, all marked pixels are
deleted.

When step
p 2 is completed,
p
the algorithm
g
starts another iteration by
y
applying step 1 to the outcome of step 2.

This iterative process is terminated when no pixel is marked in


step 1 & 2.
2
This algorithm yields a skeleton made of a strand of 8connected pi
pixels.
els
24

Zhang and Suen Algorithm


(not required)

(a) Small section of an image. (b) Outcome of thinning with the Zhang
and Suen algorithm, black pixels remain and gray pixels are removed.

25

Zhang and Suen Algorithm


(not required)

(a)

(b)

(a) Thinning with the MAT. (b) Thinning with the Zhang and Suen algorithm
26

(a) An atomic force microscope image of DNA fragments. (b) Image after thresholding. (c)
Image after thinning with Zhang and Suen algorithm and removing objects that are too short
or touching the edge of the image.

27

Applications of Thinning Algorithms


(not required)

Determine the medial axis


Distances between consecutive pairs of pixels can be added to
obtain an estimate of length
Distance between two pixels that share a side is the width of
one pixel, the distance between two pixels connected at their
corners is 2 times of one ppixel width
2
Applications

Coronary arterial tree analysis


Gastrointestinal endoscopic imaging
Atomic force microscopy images of DNA fragments
O l fundus
Ocular
f d iimaging
i
Quantification of chromosome shapes

28

A normal vein

A vein exhibiting
g beading
g

29

Texture Quantification

Examination of medical images often requires


i t
interpretation
t ti off tissue
ti
appearance, which
hi h is
i generally
ll
described with terms such as smoothness, grain,
regularity
l it or homogeneity.
h
it
This attribute relates to the local intensity variations
andd can be
b quantified
ifi d using
i texture metrics
i

30

Ultrasound image sections of normal liver (a), fatty liver (b) and
liver with cirrhosis (c)

31

Visualized using
the Lambertian
reflection model

Nevus

melanoma

Analysis of tumors in dermatology

32

Statistical Moments

A smooth region contains pixels with values close to each


other and a rough region has wide variability in pixel values
Statistical moments of the region histogram can be used as
texture metrics. The nth moment about the mean for the
histogram h(k) is given by

is the mean value


K iis the
th number
b off gray levels
l l
m2 is called variance correlates well with the visual roughness
perception
m3 and m4 are called skewness and kurtosis. They reflect asymmetry
and uniformity of the histogram.

Th dont
They
d encode
d spatial
i l information
i f
i
33

Co-occurrence Matrix

The spatial information considered is the relative position of


pairs of pixels,
pixels defined with distance d and orientation . A cooccurrence matrix is formed for each chosen (d, ). Typical
choices are
d = 1, when = 0o, 90o
d = 2 , when = 45o, 135o

Each co-occurrence matrix emphasizes streaks in the direction


and a grain size that is at least as large as d.
A K by
b K matrix
i H(d,
H(d ) is
i formed
f
d suchh that
h eachh element
l
hij
is the number of times a pixel with value i and another with
value j are located in the selected related position.
position

34

Co-occurrence Matrix

Example

Image region

Normalized co-occurrence
co occurrence matrix C(d,
C(d ),
) cij hij / ij hij
If K is too large, need to remap the gray values using contrast
enhancement techniques and re-quantize gray values to a
smaller number of gray levels.

35

Co-occurrence Matrix Measures

The angular second moment, also known as energy, quantifies


homogeneity In a homogeneous region,
homogeneity.
region there are few graylevel transitions and most of the pixels have the same or close
values. This concentrates most of the probability on and
around the diagonal of C(d, ), leaving most of Cij elements to
be 0. Therefore, a homogeneous region has higher energy.

It is sensitive to intensity transitions but insensitive to the magnitude of


the transitions

36

Co-occurrence Matrix Measures

The inertia measure quantifies the texture contrast. Large


transitions are emphasized.
emphasized It has low values for homogeneous
regions and high values for inhomogeneous regions with high
contrast.

The inverse difference moment penalizes the regions with high


contrast

37

Co-occurrence Matrix Measures

The entropy measure quantifies the level of randomness in the


region and has its highest value when all cij are equal.
equal This is
the case where all intensity transitions are equally likely. It can
be used to distinguish tissue with somewhat structured texture
from tissue with less structure.

38

Co-occurrence Matrix Measures

Applications

Noninvasive analysis of tumors in dermatology


Classification of heart diseases in echocardiography
Discrimination of prostatic tissues
Analyzing ultrasonic liver images
Quantification of tissue texture surrounding microcalcifications in
mammograms
Analyzing tissue texture in ultrasonic images of the breast

39

Spectral Measures

The discrete Fourier transform (DFT) of an M by N


i
image
region
i f (x,
( y)) iis given
i
by
b

It contains information on the texture orientation,,


grain size and texture contrast of the image

Repetitive global patterns are difficult to describe with spatial


techniques but relatively easy to represent with peaks in the
spectrum

40

Spectral Measures

Power spectrum: the magnitude of the DFT is obtained with

F*(u,
( , v)) is the complex
p conjugate
j g of F(u,
( , v))

S(u, v) can be expressed in polar coordinates as a new function


Q(r, ) where each pixel is indicated by a distance r u 2 v 2
from the origin and an angle tan 1 (v / u ) .
For a texture with a given periodicity and direction, the
spectrum exhibits a peak at the corresponding frequency r and
orientation .

41

Spectral Measures

The presence of texture with a given periodicity in any


direction can be quantified by function

The limits of this summation may need to be restricted if texture in a


selective range of orientations is relevant.

Texture of any size in a desired orientation t can be measured


with

rl and rm are the lower and maximal frequencies of interest, which


should be selected to represent the largest and smallest texture grain
sizes,, respectively.
p
y
42

Spectral Measures

Some measures can be extracted from T(rt) and T(t)


Highest value in each of the two function indicate the dominant
periodicity and orientation
Their means can provide more global representation when periodicity
or orientation are distributed
The variance and other statistical moments of these functions

43

Reading

Isaac H. Bankman, Handbook of Medical Image


P
Processing
i andd Analysis,
A l i 2nd edition
diti
Chapter 15: Two-Dimensional Shape and Texture
Quantification

44

You might also like