Ch02 - 醫學影像處理實驗室

advertisement
Chapter 2
Image Formation
Chuan-Yu Chang (張傳育)Ph.D.
Dept. of Computer and Communication Engineering
National Yunlin University of Science & Technology
chuanyu@yuntech.edu.tw
http://mipl.yuntech.edu.tw
Office: ES709
Tel: 05-5342601 Ext. 4337
Image Formation



Through medical imaging modalities, 2-D and 3-D
images of an organ can be obtained using transmission,
emission, reflectance, diffraction, nuclear resonance…
4-D time-varying image sequences of a 3-D organs, ex.
beating heart.
An analog image is described by the spatial distribution
of brightness or gray-levels that reflect a distribution of
detected energy.


The image can be displayed using a medium such as paper or
film.
The image may show


A black-and-white image with gray-levels representing.
A true color image with red, green, and blue components.
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
2
Image Formation


Three basic colors, red, green and blue (RGB)
could be used as three variables for
representing color images.
When combined together, the red, green and
blue intensities can produce a selected color
at a spatial location in the image.
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
3
Color Models

The RGB Color Model


Each color appears in its primary spectral
components of red, green and blue .
The number of bits used to represent each pixel in
RGB space is called the pixel depth.
Schematic of the RGB color cube.
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
4
Color Models (cont.)

Example

Generating the hidden face planes and a cross
section of the RGB color cube.
RGB 24-bit color cube
The three hidden surface planes
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
5
Color Models (cont.)

Example (cont.)
Generating the RGB image of the cross-sectional color plane (127, G, B)
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
6
Color Models (cont.)

Safe RGB color, All-system-safe color, Safe Web
color, Safe browser color



216 colors are common to most systems
Each of the 216 safe colors is formed from three RGB
values, each value can only be 0, 51, 102, 153, 204,
or 255.
The values 000000 and FFFFFF represent black and
white, respectively.
The RGB safe-color cube
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
7
Color Models (cont.)
Valid values of each RGB component in a safe color
The 216 safe RGB colors
All the grays in the 256-color RGB system
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
8
Color Models (cont.)

The HSI Color Model





When humans view a color object, we describe it by its hue,
saturation, and brightness.
Hue is a color attribute that describes a pure color.
Saturation gives a measure of the degree to which a pure
color is diluted by white light.
Brightness is a subjective descriptor that is practically
impossible to measure. (所以用intensity來取代brightness)
HSI color model decouples the intensity component from
the color-carrying information (hue and saturation) in a
color image.
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
9
Color Models (cont.)

Conceptual relationships between the RGB and HSI
color models
 Intensity的強度是沿著黑色(0,0,0)和白色(1,1,1)兩點的
直線。
 HSI色彩空間是由一垂直intensity軸,以及位於平面上
與此軸垂直的彩色點軌跡所表示。
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
10
Color Models (cont.)


HSI describe colors as points in a cylinder whose central axis
ranges from black at the bottom to white at the top with neutral
colors between them, where angle around the axis corresponds
to “hue”, distance from the axis corresponds to “saturation”, and
distance along the axis corresponds to “lightness”, “value”, or
“brightness”.
HSI conceptually represents a double-cone or sphere (with white
at the top, black at the bottom, and the fully-saturated colors
around the edge of a horizontal cross-section with middle gray at
its center).
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
11
Color Models (cont.)
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
12
Color Models (cont.)
Converting colors from RGB to HSI
 
H 
360 
if B  G
if B  G
1




R  G   R  B 




2
  cos1 
1/ 2 
2
 R  G   R  B G  B  





S  1

3
min(R, G, B)
RG B
1
I  ( R  G  B)
3
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
13
Color Models (cont.)

Converting colors from HSI to RGB

RG sector
0  H  120

S cos H 
R  I 1 


 cos(60  H ) 

GB sector
H  H  120

BR sector
G  1  ( R  B)
B  I (1  S )
120  H  240
R  I (1  S )

S cos H 
G  I 1 


 cos(60  H ) 
B  1  ( R  G)
240  H  360
H  H  240
G  I (1  S )

S cos H 
B  I 1 


 cos(60  H ) 
R  1  (G  B)
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
14
Image Coordination System


In the process of image formation, the object coordinates are
mapped into image coordinates.
G=R(F-T)
 where G and F are image and object domain coordinate systems.
 R and T are rotation and translation matrices.
 Translation is a vector subtraction operation
 Scaling is a vector multiplication operation.
 In 3D rotation, three rotations about three axes can be defined in
a sequence to define the complete rotation transformation.
b
y
Radiating
Object f(a,b,g)
g
Image g(x,y,z)
Image Formation
System
h
z
Image
Domain
Object
Domain
a
x
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
15
Image Coordination System (cont.)

Rotation of G(a,b,g) about b by an angle  such that
G1  , ,    R Ga , b , g 
 cos
R   sin 
 0

Rotation of
G1  , ,  
sin 
cos
0
0
0
1
about a by an angle f such that
G 2 ,  ,   Rf G1  , ,  
0
0 
1
Rf   0 cosf sin f 
 0  sin f cosf 
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
16
Image Coordination System (cont.)

Rotation of
G 2 ,  , 
about b by an angle y such that
Fx, y, z   Ry G 2 ,  , 
 cosy
Ry   siny
 0
siny
cosy
0
0
0 
1
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
17
Linear System and Impulse Response

Image formation system is a linear spatially invariant system


The response of imaging system should be consistent, scalable and
independent of the spatial position of the object being images.
A system is said to be linear if it follows two properties: scaling
and superposition
haI1 x, y, z   bI2 x, y, z   ahI1 x, y, z  bhI 2 x, y, z 
where a and b are scalar multiplication factors
I1(x,y,z) and I2(x,y,z) are two inputs to the system represented by
the response function h.

In real-world situation, it is difficult to find a perfectly linear imageformation system.

Non-linear system can be modeled with piecewise linear properties under
specific operating considerations.
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
18
Principle of Image Formation

Image Formation: External Source
經過image-formation
system的轉換,將反射
y 量轉換成物體影像。
物體接受放射源的照射,
並產生反射。
b
Radiating
Object
Image
Image Formation
System
h
Selected
Cross-Section
g
Image
Domain
Object
Domain
z
x
a
放射源(可能是光或輻
射) ,照射某物體。
Radiation
Source
Reconstructed
Cross-Sectional
Image
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
19
Principle of Image Formation

Image Formation: Internal Source
b
y
Radiating
Object
Image
Image Formation
System
h
Selected
Cross-Section
g
Image
Domain
Object
Domain
z
x
a
放射物體發出輻射。
經過image-formation
system的轉換,將輻射
射量轉換成物體影像。
Reconstructed
Cross-Sectional
Image
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
20
Pin-Hole Imaging



The pin-hole imaging method is used in many biomedical
imaging systems including the nuclear medicine imaging
modalities SPECT and PET.
The radiation from the object plane enters into the image
plane through a pin-hole.
The pin-hole is called the focal plane.
y
x
z
f(x1,y1)
Pin-hole
g(x2,y2)
z1
Object Plane
z2
Focal Plane
Image Plane
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
21
Pin-Hole Imaging


If a point in the object plane is considered to have
(x1, y1, -z1) coordinates mapped into the image plane
as (x2, y2, z2) coordinates, then
Magnification
z 2 x1
z 2 y1
x2  
and y 2  
factor
z1
z1
Generalizing the object plane with two-dimensional
coordinate system (a,b) and the corresponding
image plane with the coordinate system (x,y), the
general response function can include the
magnification factor M so that the image formation
equation can be expressed as
h( x, y;a , b )  h( x  Ma , y  Mb )
g ( x, y)  





h( x  Ma , y  Mb ) f (a , b )dadb
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
22
Fourier Transform

Fourier Transform is a linear transform that
provides information about the frequency
spectrum of the signal.



Used in image processing for image enhancement,
restoration, filtering and feature extraction to help
image interpretation and characterization.
Used in image reconstruction methods for medical
imaging systems.
The Fourier Transform can be applied to a
signal to obtain frequency information.
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
23
Fourier Transform (cont.)

A two dimensional Fourier Transform, FT of an image
g(x,y) is defined as

G(u, v)  FT{g ( x, y)} 


 j 2 ( ux  vy)
g
(
x
,
y
)
e
dxdy

 


Since Fourier Transform is a linear transform, the inverse
transform can be used to obtain the original from spatial
frequency information if no filtering is performed in the
frequency domain.
A two-dimensional inverse Fourier transform is defined
as
g ( x, y)  FT 1{G(u, v)} 



j 2 ( ux  vy)
G
(
u
,
v
)
e
dudv

 

醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
24
Fourier Transform (cont.)


Fourier transform provides a number of
useful properties for signal- and imageprocessing application including:
Linearity
FT{ag( x, y)  bh( x, y)}  aFT{g ( x, y)}  bFT{h( x, y)}

Scaling
FT{g (ax, by)} 

Translation
1 u v
G , 
ab  a b 
FT{g ( x  a, y  b)}  G(u, v)e j 2 (uavb)
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
25
Fourier Transform (cont.)

Convolution

Cross-correlation

FT  
 

FT  
 

g
(
a
,
b
)
h
(
x

a
,
y

b
)
d
a
d
b
  G (u, v) H (u, v)




g
(
a
,
b
)
h
*
(
x

a
,
y

b
)
d
a
d
b
  G (u, v) H * (u, v)




Auto-correlation

Parseval’s Theorem

FT  
 


2
g
(
a
,
b
)
g
*
(
x

a
,
y

b
)
d
a
d
b
  G (u, v)G * (u, v) | G (u, v) |






  g (a , b ) g * ( x, y)dxdy   
 

G(u, v)G * (u, v)dudv
 
Separability
g ( x, y)  g x ( x) g y ( y)
FT{g ( x, y)}  FTx{g x ( x)}FTy{g ( y)}
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
26
Fourier Transform
128
在空間域的垂直條紋,
在頻率欲將呈現水平方
線的脈衝亮點
128
Figure 2.5. (a) A vertical stripe image generated from a sinusoidal waveform
of a period of 8 pixels and (b) the logarithmic magnitude image of its Fourier transform
Figure 2.6. (a) A rotated stripe image and (b) the logarithmic magnitude image
of its Fourier transform.
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
27
Fourier Transform
Figure 2.7. (a) An image with a square region at the center and
(b) the logarithmic magnitude image of its Fourier transform.
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
28
Radon Transform

The random transform defines projections of
an object mapping the spatial domain of the
object to its projection space.


Let us define a two-dimensional object function
f(x,y) and its Randon transform by R{f(x,y)}.
The Radon transform is defined by the projection
P(p,) in the polar coordinates systems as
P( p, )  R{ f ( x, y )}   f ( x, y )dl
L
where the line integral is defined along the path L
such that
x cos  y sin   p
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
29
Radon Transform (cont.)
y
Sampled along the p
axis and are defined
by the angle .
q
p
f(x,y)

將箭頭方向上所有f(x,y)
相加(積分) ,可獲得p
方向上的投影值。
x
p
P(p,)
將物體投影到P(p,)
也就是方向p,角度的投影。

Line integral projection P(p,) of the two-dimensional Radon transform.
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
30
Radon Transform (cont.)

The polar coordinate system (p,) can be
converted into rectangular coordinates in the
Randon domain by using a rotated coordinate
system (p,q)
x cos  y sin   p
 x sin   y cos  q
The above implies

R{ f ( x, y)}  J ( p) 
 f ( p cos  q sin  , p sin   q cos )dq

醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
31
Radon Transform (cont.)

The significance of using the Randon transform for
computing projections in medical imaging is that an
image of a human organ can be reconstructed by backprojecting the projections acquired through the imaging
scanner.
Projection p
1
A
The reconstructed objects may
have geometrical or aliasing
artifacts because of the limited
number of projections used in the
imagi ng a nd reconst ruct ion
object s, a l arge n umbe r of
projections should be used.
Reconstruction
Space
B
Projection p3
Projection p2
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
32
Sampling



Whether the spatial sampling frequency is adequate
to capture the fine details of the object?
Nyquist criterion determine the optimal sampling
rate for discretization of an analog signal without the
loss of any frequency information.
To avoid any loss of information or aliasing artifact,
an analog signal must be sampled with a sampling
frequency that is at least twice the maximum
frequency present in the original signal.
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
33
Sampling (cont.)


In sampling a 1-D signal, a sampling function is defined
as a series of 1-D delta functions.
For a 2-D image, a 2-D distribution of delta functions is
defined as
s( x, y) 


  ( x  j x, y  j y)
j1  j 2  
1
2
where △x and △ y are the spacing of data points to be
sampled in x and y directions.
Figure 2.10. (a) A 2-D distribution of Gaussian impulses in the spatial domain
and (b) its representation in the Fourier domain.
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
34
Sampling (cont.)

The sampled version of the image fd[x,y] is given by
f d [ x, y]  f a ( x, y)s( x, y) 



  f ( j x, j y) ( x  j x, y  j y)
j1  j 2  
a
1
2
1
2
Let’s consider, x and y to be the spatial frequencies
in x and y direction, and Fs( x, y) to be the Fourier
transform of the sampled image fd[x,y]. Using the
convolution theorem
1
Fs (x ,  y ) 
xy


  F (
j1  j 2  
a
x
 j1xs ,  y  j2 ys )
where Fa(x, y) is the Fourier transform of the analog
image fa(x,y) and xs and xy represent the Fourier
domain sampling spatial frequencies such that
xs  2 / x
xy  2 / y
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
35
Sampling (cont.)




For a good discrete representation, the sampling
process must not cause any loss of frequency
information.
The multiplication operation of fa(x,y) with the
sampling signal s(x,y) would create a convolution
operation in the Fourier domain resulting in multiple
copies of the sampled image spectrum with the
2/△x and 2/△y spacing in x and y directions,
respectively.
To recover the signal without any loss, the multiple
copies of the image spectrum must not overlap.
The overlapped region of image spectrum will create
aliasing and the original signal or image cannot be
recovered by any filtering operation.
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
36
Sampling (cont.)

Assume that the image as the 2-D signal in the
spatial domain is band limited, that is, the Fourier
spectrum Fa(x, y) is zero outside the maximum
frequency components xmax and ymax in x and y
direction.

y
ymax
Fa(x, y)
xmax
xmax
x
ymax
(a)
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
37
Sampling (cont.)

To avoid overlapping of image spectra, it is necessary
that
xs x max  2f x max
and
ys y max  2f y max
fxmax and fymax are the
maximum spatial
frequencies available in
the image in x and y
direction.
Good sampling of the
band-limited image
signal
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
(b)
38
Sampling (cont.)
Since the sampling frequency is
lower than the Nyquist rate, multiple
copies of the sampled spectrum
overlap causing the loss of highfrequency information in the
overlapped regions.
Result in aliasing
artifacts in the image
Overlap regions
To remove the aliasing artifact,
a low-pass filter is required in
the Fourier domain
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
(c)
39
Sampling (cont.)
Logarithmic magnitude of
the Fourier transform of
the sinusoidal signal
Sinusoidal signal of a
period of 1.8 pixels
Log |F(x, 0)|
x
Log |F(x, 0)|
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
40
Discrete Fourier Transform

The Discrete Fourier Transform (DFT), F(u,v) of an
image f(x,y) is defined as
1
F (u , v) 
MN


  f ( x, y )e
x 0
 xu yv 
 j 2   
M N 
y 0
where u and v are frequency coordinates in the Fourier
domain.
The inverse DFT in two dimensions can be defined as
f ( x, y ) 

M 1 N 1
1
MN
M 1 N 1
  F (u, v)e
u 0
 xu yv 
j 2   
M N 
v 0
The numerical implementation of DFT and Fast FT (FFT)
may make some approximations and finite computations.
These errors may cause artifacts in the image spectrum
and may not allow an implementation of Fourier
transform to be exactly reversible.
醫學影像處理實驗室(Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
41
Download