Tải bản đầy đủ (.pdf) (34 trang)

Bài giảng xử lí ảnh Học viện kĩ thuật quân sự Point Processing

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.1 MB, 34 trang )

1/19/2013 1
Image Processing
Point Processing
1.In a digital image point is called pixel (point

≡≡

pixel);
2.Point Processing transforms a pixel’s value to
function of its value alone:
T: f(x,y) →
→→
→ g(x,y)
or G(x,y) = T(f(x,y))
where a=f(x,y), s=g(x,y)
3. Point Processing does not depend on the
values of the neighbors.
1/19/2013 2
Image Processing
Point Processing
1.
1.
Brightness and contrast adjustment
Brightness and contrast adjustment
2.
2.
Gamma correction
Gamma correction
3.
3.
Histogram equalization


Histogram equalization
4.
4.
Histogram matching
Histogram matching
5.
5.
Color correction
Color correction
1/19/2013 3
Image Processing
Point Processing
Point Processing
Origin image
Histogram
equalization
-
-
brightness
brightness
+brightness
+brightness
+contrast -contrast
γ
γγ
γ
γ
γγ
γ
=1.25

=1.25
γ
γγ
γ
γ
γγ
γ
=0.9
=0.9
negative
negative
bit
bit
-
-
plan 5
plan 5
1/19/2013 4
Image Processing
Point Processing
Negative image of image I
Let I is an image with gray levels in the range
Let I is an image with gray levels in the range
[L
[L
*
*
, L
, L
*

*
], i.e.,
], i.e.,
L
L
*
*

≤≤


≤≤

f(x,y)
f(x,y)

≤≤


≤≤

L
L
*
*
,
,
for all (x,y) in an image I.
for all (x,y) in an image I.
The negative transformation is given by:

The negative transformation is given by:
g(x,y) = L
g(x,y) = L
*
*
-
-
f(x,y),
f(x,y),
for all (x,y)
for all (x,y)

∈∈


∈∈

I
I
1/19/2013 5
Image Processing
Point Processing
Ảnh I
Ảnh âm bản của I
1/19/2013 6
Image Processing
Point Processing
Negative image of image I
For a color image I:
For a color image I:

g(x,y).R = LR*
g(x,y).R = LR*
-
-
f(x,y).R
f(x,y).R
g(x,y).G = LG*
g(x,y).G = LG*
-
-
f(x,y).G
f(x,y).G
g(x,y).B = LB*
g(x,y).B = LB*
-
-
f(x,y).B
f(x,y).B
In general, can be choosen
In general, can be choosen
LR*=LG*=LB*
LR*=LG*=LB*
1/19/2013 7
Image Processing
Point Processing
The original
The original
color image
color image
and the

and the
negative
negative
image
image
Negative image
Negative image
1/19/2013 8
Image Processing
Point Processing
Brightness
g(x,y) = f(x,y)*
α
αα
α
for all (x,y) in image
where:
α
αα
α >1 : + brightness
α
αα
α
<1 : - brightness
For color image:
For color image:
g(x,y).R =
g(x,y).R =
α
αα

α
α
αα
α
R
R
*f(x,y).R
*f(x,y).R
g(x,y).G =
g(x,y).G =
α
αα
α
α
αα
α
G
G
*f(x,y).G
*f(x,y).G
g(x,y).B =
g(x,y).B =
α
αα
α
α
αα
α
B
B

*f(x,y).B
*f(x,y).B
α
αα
α=1.45
α
αα
α=0.55
1/19/2013 9
Image Processing
Point Processing
Brightness
g(x,y) = f(x,y)*
α
αα
α
for all (x,y) in image
where:
α
αα
α >1 : + brightness
0<α
αα
α
<1 : - brightness
For color image:
For color image:
g(x,y).R = min{255,
g(x,y).R = min{255,
α

αα
α
α
αα
α
R
R
*f(x,y).R}
*f(x,y).R}
g(x,y).G = min{255,
g(x,y).G = min{255,
α
αα
α
α
αα
α
G
G
*f(x,y).G}
*f(x,y).G}
g(x,y).B = min{255,
g(x,y).B = min{255,
α
αα
α
α
αα
α
B

B
*f(x,y).B}
*f(x,y).B}
α
αα
α=5
α
αα
α=0.55
1/19/2013 10
Image Processing
Point Processing
Logarithm transform
where c,
β
ββ
β
are constants
a
b
c
(a) The origin image
(b) After Log transform: c=50, β
ββ
β=20
(c) After Log transform: c=50, β
ββ
β=1
g(x,y) = c*Log(f(x,y)+
β

ββ
β
)
for all (x,y) in image
1/19/2013 11
Image Processing
Point Processing
Gamma transform
g(x,y) = c*[f(x,y)+β]
Γ
ΓΓ
Γ
where c,
β
ββ
β
and
Γ
ΓΓ
Γ
are constants
a
b
c
(a) The origin image
(b) After gamma transformation: c=1, β
ββ
β=1, Γ=1.25
(c) After gamma transformation: c=1, β
ββ

β=1, Γ=0.90
1/19/2013 12
Image Processing
Contrast stretching
The intensity of a gray image at any coordinates (x, y) is called gray level
(brightness) a of the image at that point.
That is
a = f(x, y)
Let a
min
≤ f(x, y) ≤ a
max
, for all (x,y) in image
then the interval
[a
min
, a
max
]
is called the gray scale.
1/19/2013 13
Image Processing
Contrast stretching
a
max
and a
min
are the maximum
and minimum intensities of a
region or image.

amin=0,
amax=79
amin=100,
amax=150
amin = 0,
amax = 255
1/19/2013 14
Image Processing
Contrast stretching
( )
min
minmax
min
minmax
),(
.),( L
aa
ayxf
LLyxg +


−=
where
a
min

≤≤

f(x, y)


≤≤

a
max
Note:
• f(x,y) = a
min

⇒⇒
⇒ g(x,y) = L
min
• f(x,y) = a
max

⇒⇒
⇒ g(x,y) = L
max
1/19/2013 15
Image Processing
Contrast stretching
Lmin = 100
Lmax = 179
amin = 0
amax = 79
Lmin = 176
Lmax = 255
Lmin = 0
Lmax = 255
1/19/2013 16
Image Processing

Contrast stretching
amin = 0
amax = 255
Lmin = 0
Lmax = 255
1/19/2013 17
Image Processing
Contrast stretching
amin = 0
amax = 123
Lmin = 0
Lmax = 255
1/19/2013 18
Image Processing
Contrast stretching
amin = 0
amax = 104
Lmin = 0
Lmax = 255
1/19/2013 19
Image Processing
Contrast stretching
amin = 0
amax = 233
Lmin = 0
Lmax = 255
1/19/2013 20
Image Processing
Contrast stretching
( )








<
≤≤+



<
=
),(,
,),(,
),(
.
,),(,
),(
2max
21min
12
1
minmax
1min
yxfaL
ayxfaL
aa
ayxf

LL
ayxfL
yxg
where L
min

≤≤

a
1
< a
2

≤≤

L
max
This formula, however, can be somewhat sensitive to outliers and a
less sensitive and more general version is given by:
1/19/2013 21
Image Processing
Contrast stretching
amin = 0
amax = 233
a
1
= 0, a
2
= 50
Lmin = 0, Lmax = 255

1/19/2013 22
Image Processing
Histogram and its transformation
The intensity of a gray image at any coordinates (x,
y) is called gray level (brightness) a of the image at
that point. That is
a = f(x, y)
A histogram, h[a], is the number of times that gray
level a occurs in the image.
1/19/2013 23
Image Processing
Histogram and its transformation
The height in
The height in
this
this
histogram
histogram
corresponds
corresponds
to the number
to the number
of pixels with
of pixels with
a given
a given
brightness
brightness
1/19/2013 24
Image Processing

Histogram and its transformation
The height in
The height in
this
this
histogram
histogram
corresponds
corresponds
to the number
to the number
of pixels with
of pixels with
a given
a given
brightness
brightness
1/19/2013 25
Image Processing
Histogram and its transformation
The histogram can
be normalized so
that the total area
under the
histogram is 1.
Denote p[a] for a
brightness a:
p[a] := h[a] /
Γ
ΓΓ

Γ
where
Γ
is the total
number of pixels
in the image.

×