chapter 2 image formation chuan-yu chang ( 張傳育 )ph.d. dept. of computer and communication...
TRANSCRIPT
Chapter 2Image Formation
Chuan-Yu Chang ( 張傳育 )Ph.D.
Dept. of Computer and Communication Engineering
National Yunlin University of Science & Technology
http://mipl.yuntech.edu.tw
Office: ES709
Tel: 05-5342601 Ext. 4337
2醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
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.
3醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
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.
4醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
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.
5醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Color Models (cont.) Example
Generating the hidden face planes and a cross section of the RGB color cube.
RGB 24-bit color cubeThe three hidden surface planes
6醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Color Models (cont.) Example (cont.)
Generating the RGB image of the cross-sectional color plane (127, G, B)
7醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
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
8醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
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
9醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
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 c
olor is diluted by white light. Brightness is a subjective descriptor that is practically impo
ssible to measure. ( 所以用 intensity 來取代 brightness) HSI color model decouples the intensity component from th
e color-carrying information (hue and saturation) in a color image.
10醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Color Models (cont.) Conceptual relationships between the RGB and HSI colo
r models Intensity 的強度是沿著黑色 (0,0,0) 和白色 (1,1,1) 兩點
的直線。 HSI 色彩空間是由一垂直 intensity 軸,以及位於平面上
與此軸垂直的彩色點軌跡所表示。
11醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Color Models (cont.) HSI describe colors as points in a cylinder whose central axis ran
ges 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).
12醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Color Models (cont.)
13醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Converting colors from RGB to HSI
GBif
GBifH
360
),,min(3
1 BGRBGR
S
)(3
1BGRI
2/12
1 2
1
cosBGBRGR
BRGR
Color Models (cont.)
14醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Color Models (cont.) Converting colors from HSI to RGB
RG sector
GB sector
BR sector
)1( SIB
1200 H
240120 H
360240 H
)60cos(
cos1
H
HSIR
)(1 BRG
120HH )1( SIR
240HH
)1( SIG
)60cos(
cos1
H
HSIG
)60cos(
cos1
H
HSIB
)(1 GRB
)(1 BGR
15醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Image Coordination System
z
Image Formation System
hObject Domain
Image Domain
x
y
Radiating Object f() Image g(x,y,z)
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.
16醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Image Coordination System (cont.)
Rotation of G(,,) about by an angle such that
Rotation of about by an angle such that
,,,,1 GRG
100
0cossin
0sincos
R
,,1G
,,,, 12 GRG
cossin0
sincos0
001
R
17醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Image Coordination System (cont.)
Rotation of about by an angle such that ,,2G
100
0cossin
0sincos
R
,,,, 2GRF zyx
18醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
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
where a and b are scalar multiplication factorsI1(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 image-
formation system. Non-linear system can be modeled with piecewise linear properties under
specific operating considerations.
zyxIbhzyxIahzyxbIzyxaIh ,,,,,,,, 2121
19醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Principle of Image Formation Image Formation: External Source
Reconstructed Cross-Sectional Image
Radiation Source
z
Image Formation
Systemh
Object Domain
Image Domain
Selected Cross-Section
x
yRadiating Object
Image
放射源 (可能是光或輻射 ) ,照射某物體。
物體接受放射源的照射,並產生反射。
經過 image-formation system 的轉換,將反射量轉換成物體影像。
20醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Principle of Image Formation Image Formation: Internal Source
z
Reconstructed Cross-Sectional Image
Image Formation
Systemh
Object Domain
Image Domain
Selected Cross-Section
x
y
Radiating Object
Image
放射物體發出輻射。經過 image-formation system 的轉換,將輻射射量轉換成物體影像。
21醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
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.
Pin-hole
Object Plane Focal Plane Image Plane
f(x1,y1)
g(x2,y2)z1z2
x
z
y
22醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Pin-Hole Imaging If a point in the object plane is considered to have (x
1, y1, -z1) coordinates mapped into the image plane as (x2, y2, z2) coordinates, then
Generalizing the object plane with two-dimensional coordinate system (,) 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
1
122
1
122 and
z
yzy
z
xzx
Magnification factor
),(),;,( MyMxhyxh
ddfMyMxhyxg ),(),(),(
23醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
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.
24醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Fourier Transform (cont.)
A two dimensional Fourier Transform, FT of an image g(x,y) is defined as
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
dxdyeyxgyxgFTvuG vyuxj )(2),()},({),(
dudvevuGvuGFTyxg vyuxj )(21 ),()},({),(
25醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Fourier Transform (cont.)
Fourier transform provides a number of useful properties for signal- and image- processing application including:
Linearity
Scaling
Translation
b
v
a
uG
abbyaxgFT ,
1)},({
)(2),()},({ vbuajevuGbyaxgFT
)},({)},({)},(),({ yxhbFTyxgaFTyxbhyxagFT
26醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Fourier Transform (cont.) Convolution
Cross-correlation
Auto-correlation
Parseval’s Theorem
Separability
),(),(),(),( vuHvuGddyxhgFT
),(*),(),(*),( vuHvuGddyxhgFT
2|),(|),(*),(),(*),( vuGvuGvuGddyxggFT
dudvvuGvuGdxdyyxgg ),(*),(),(*),(
)()(),( ygxgyxg yx)}({)}({)},({ ygFTxgFTyxgFT yxx
27醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Fourier Transform
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.
128
128
在空間域的垂直條紋,在頻率欲將呈現水平方
線的脈衝亮點
28醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
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.
29醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
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
where the line integral is defined along the path L such that
L
dlyxfyxfRpP ),()},({),(
pyx sincos
30醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Radon Transform (cont.)
x
y
q
p
p
f(x,y)
P(p,)
Line integral projection P(p,) of the two-dimensional Radon transform.
Sampled along the p axis and are defined by the angle .
將箭頭方向上所有 f(x,y) 相加 ( 積分 ) ,可獲得 p 方向上的投影值。
將物體投影到 P(p,)也就是方向 p, 角度的投影。
31醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Radon Transform (cont.) The polar coordinate system (p,) can be conv
erted into rectangular coordinates in the Randon domain by using a rotated coordinate system (p,q)
The above implies
dqqpqpfpJyxfR )cossin,sincos()()},({
qyx
pyx
cossin
sincos
32醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
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 back-projecting the projections acquired through the imaging scanner.
Projection p1
Projection p2
Projection p3
Reconstruction Space
A
B
The reconstructed objects may have geometrical or aliasing artifacts because of the limited number of projections used in the imaging and reconstruction objects, a large number of projections should be used.
33醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Sampling Whether the spatial sampling frequency is adequate
to capture the fine details of the object? Nyquist criterion determine the optimal sampling rat
e 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.
34醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
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
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.
2
211
),(),(jj
yjyxjxyxs
35醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Sampling (cont.) The sampled version of the image fd[x,y] is given by
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
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
2
21211
),(),(),(),(],[j
aj
ad yjyxjxyjxjfyxsyxfyxf
2
211
),(1
),(j
ysyxsxaj
yxs jjFyx
F
xxs /2 yxy /2
36醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Sampling (cont.) For a good discrete representation, the sampling pro
cess 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.
37醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
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.
x
y
ymax
xmaxxmax
ymax
Fa(x,y)
(a)
38醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Sampling (cont.) To avoid overlapping of image spectra, it is necessary
that
and
(b)
maxmax 2 xxxs f
maxmax 2 yyys f
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
39醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Sampling (cont.)
(c)
Since the sampling frequency is lower than the Nyquist rate, multiple copies of the sampled spectrum overlap causing the loss of high-frequency information in the overlapped regions.
Result in aliasing artifacts in the image
To remove the aliasing artifact, a low-pass filter is
required in the Fourier domain
Overlap regions
40醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Sampling (cont.)
x
Log |F(x, 0)|
Log |F(x, 0)|
Sinusoidal signal of a period of 1.8 pixels
Logarithmic magnitude of the Fourier transform of
the sinusoidal signal
41醫學影像處理實驗室 (Medical Image Processing Lab.) Chuan-Yu Chang Ph.D.
Discrete Fourier Transform The Discrete Fourier Transform (DFT), F(u,v) of an imag
e f(x,y) is defined as
where u and v are frequency coordinates in the Fourier domain.
The inverse DFT in two dimensions can be defined as
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.
1
0
21
0
),(1
),(N
y
N
yv
M
xujM
x
eyxfMN
vuF
1
0
21
0
),(1
),(N
v
N
yv
M
xujM
u
evuFMN
yxf