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. 1192013 2 Image Processing Point Processing 1. Brightness and contrast adjustment 2. Gamma correction 3. Histogram equalization 4. Histogram matching 5. Color correction 1192013 3 Image Processing Point Processing Origin image Histogram equalization brightness +brightness +contrast contrast γ γγ γ γγ γ =1.25 γ γγ γ γγ γ =0.9 negative bitplan 5 1192013 4 Image Processing Point Processing Negative image of image I Let I is an image with gray levels in the range L , L , i.e., L ≤ ≤≤ ≤ ≤≤ ≤ f(x,y) ≤ ≤≤ ≤ ≤≤ ≤ L , for all (x,y) in an image I. The negative transformation is given by: g(x,y) = L f(x,y), for all (x,y) ∈ ∈∈ ∈ ∈∈ ∈I 1192013 5 Image Processing Point Processing Ảnh I Ảnh âm bản của I 1192013 6 Image Processing Point Processing Negative image of image I For a color image I: g(x,y).R = LR f(x,y).R g(x,y).G = LG f(x,y).G g(x,y).B = LB f(x,y).B In general, can be choosen LR=LG=LB 1192013 7 Image Processing Point Processing The original color image and the negative image Negative image
Trang 1Point 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:
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.
Trang 3Origin image
Histogram equalization
-brightness +brightness γγγγ=1.25 γγγγ=0.9
Trang 4Point Processing
Negative image of image I
Let I is an image with gray levels in the range [L*, L*], i.e.,
L* ≤ f(x,y) ≤ L*,
for all (x,y) in an image I
The negative transformation is given by:
g(x,y) = L* - f(x,y),
for all (x,y) ∈I
Trang 5Point Processing
Ảnh I Ảnh âm bản của I
Trang 6Point Processing
Negative image of image I
For a color image I:
g(x,y).R = LR* - f(x,y).R g(x,y).G = LG* - f(x,y).G g(x,y).B = LB* - f(x,y).B
In general, can be choosen
LR*=LG*=LB*
Trang 7Point Processing
The original color image
and the negative image
Negative image
Trang 8αα=0.55
Trang 9For color image:
g(x,y).R = min{255, αR*f(x,y).R}
g(x,y).G = min{255, αG*f(x,y).G}
g(x,y).B = min{255, αB*f(x,y).B}
αα=5
αα=0.55
Trang 10Point Processing
Logarithm transform
where c, β β are constants
abc
(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
Trang 11(a) The origin image(b) After gamma transformation: c=1, βββ=1, Γ=1.25(c) After gamma transformation: c=1, βββ=1, Γ=0.90
Trang 12Let amin ≤ f(x, y) ≤ amax, for all (x,y) in image
then the interval
[amin, amax]
is called the gray scale
Trang 13Contrast stretching
amax and amin are the maximum and minimum intensities of a region or image
amin=0, amax=79
amin=100, amax=150
amin = 0, amax = 255
Trang 14Contrast stretching
min max
min min
max
) ,
(
) ,
a a
a y
x
f L
L y
• f(x,y) = amin ⇒ g(x,y) = Lmin
• f(x,y) = amax ⇒ g(x,y) = Lmax
Trang 15Contrast stretching
Lmin = 100Lmax = 179
amin = 0
amax = 79
Lmin = 176Lmax = 255
Lmin = 0Lmax = 255
Trang 16Contrast stretching
amin = 0amax = 255
Lmin = 0Lmax = 255
Trang 17Contrast stretching
amin = 0 amax = 123
Lmin = 0 Lmax = 255
Trang 18Contrast stretching
amin = 0 amax = 104
Lmin = 0 Lmax = 255
Trang 19Contrast stretching
amin = 0 amax = 233
Lmin = 0 Lmax = 255
Trang 20, )
, ( ,
) ,
(
, )
, ( ,
) ,
(
2 max
2 1
min 1
2
1 min
max
1 min
y x f a
L
a y
x f a
L a
a
a y
x
f L
L
a y
x f L
y x
g
where Lmin ≤ a ≤ 1 < a2 ≤ ≤ Lmax
This formula, however, can be somewhat sensitive to outliers and a less sensitive and more general version is given by:
Trang 21Contrast stretching
amin = 0 amax = 233
a 1 = 0, a 2 = 50 Lmin = 0, Lmax = 255
Trang 22Histogram 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.
Trang 23Histogram and its transformation
Trang 24Histogram and its transformation
Trang 25Histogram and its transformation
The histogram can
Trang 26Histogram and its transformation
h(0) = 1180
amin = 0, amax = 79 Lmin = 0, Lmax = 255
Trang 27Contrast stretching
Trang 28Contrast stretching
Trang 29Equalization
The most common histogram normalization technique is
histogram equalization where one attempts to change the histogram through the use of a function
b = T(a)
where:
a and b is a brightness (gray level).
T(a) satisfies the following conditions:
(1) T(a) is single-valued and monotonically increasing in the interval [0 , L]
(2) T(a) ∈ [0, L] for a ∈ [0, L]
Trang 30Equalization
Remark:
1 The requirement in (1) that T(r) be single valued is
needed to guarantee that the inverse transformation will exist, and the monotonicity condition preserves the
increasing order from black to white in the output image.
a = T −1 (b) for b ∈ [0, L]
2 Condition (2) guarantees that the output gray levels will
be in the same range as the input levels
Trang 31Equalization
Example:
Define
a :gray level in an immage
Γ :total number of pixels in the image
h(a): number of pixel with gray level a in the image
Trang 33Equalization
Trang 34Bài tập
• Cho một ảnh xám kích thước 6×6, mỗi điểm ảnh là một số nằm trong
khoảng [0,100] Ảnh thu được gọi là ảnh F Thực hiện thay đổi sự tương phản với dải xám mới là [0,255].
• Thực hiện biến đổi âm bản và các biến đổi logarit, mũ đối với ảnh F.
• Tính ảnh được cắt theo mặt phẳng bit số 5.
• Vẽ lược đồ xám của ảnh F, đánh giá sơ bộ ảnh F dựa trên lược đồ đó
Biến đổi cân bằng mức xám đối với ảnh F.
• Viết chương trình thực hiện các phép biến đổi điểm ảnh đối với ảnh xám.
• Viết chương trình thực hiện thay đổi độ tương phản.
• Viết chương trình thực hiện phép cân bằng lược đồ mức xám.