Chapter 3 Image Enhancement in the Spatial Domain Chapter 3

advertisement
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
Bit Slicing (Dilimleme)
• Pikseller, bitlerden meydana gelen sayılardır.
• Bir görüntüyü tanımlarken parlaklık aralığını
tarif etmektense, görüntüyü oluşturmaya katkı
sağlayan bitleri ön plana çıkararak belirtmek
mümkündür.
© 2002 R. C. Gonzalez & R. E. Woods
Bit Slicing (Dilimleme)
© 2002 R. C. Gonzalez & R. E. Woods
Bit Slicing (Dilimleme)
© 2002 R. C. Gonzalez & R. E. Woods
Bit Slicing (Dilimleme)
© 2002 R. C. Gonzalez & R. E. Woods
Bit Slicing (Dilimleme)
© 2002 R. C. Gonzalez & R. E. Woods
Bit Slicing (Dilimleme)
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
3. Bölüm
Uzaysal Domende İmge Zenginleştirme
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
• Yerel zenginleştirme yönteminin bir özeti aşağıdaki
gibidir :
• (x,y) koordinatlarındaki bir pikselin değeri f(x,y) ise
bu pikselin zenginleştirildikten sonraki yeni değeri
g(x,y) şöyle verilebilir:
• Eğer msxy ≤ k0 OK
VE
ise ; g (x,y) = E · f (x,y)
• Diğer durumlarda
© 2002 R. C. Gonzalez & R. E. Woods
ise ;
k1SK ≤ σsxy ≤ k2 SK
g (x,y) = f (x,y)
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
The logic operations AND, OR, and NOT form a complete set,
meaning that any other logic operation (XOR; NOR, NAND) can
be created by a combination of these basic elements.
They operate in a bit-wise fashion on pixel data.
EXAMPLE: We are performing a logic AND on two images.
Two corresponding pixel values are 11110 in one image
and 8810 in the second image.
A= 11110 = 011011112
B= 8810 = 010110002
© 2002 R. C. Gonzalez & R. E. Woods
011011112
AND 010110002
010010002
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
 3 4 7


I1 =  3 4 5 
 2 4 6


 6 6 6


I2 =  4 2 6
 3 5 5


 3 + 6 4 + 6 7 + 6   9 10 13 

 

I 3 =  3 + 4 4 + 2 5 + 6  =  7 6 11
 2 + 3 4 + 5 6 + 5   5 9 11

 

© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
İmge Ortalaması
• f (x,y) imgesine η(x,y) gürültüsü eklendiğinde oluşan imgenin g (x,y)
olduğunu düşünelim.
•
g (x,y) = f (x,y) + η(x,y)
1
g ( x, y ) =
K
σ
2
g ( x, y )
© 2002 R. C. Gonzalez & R. E. Woods
K
∑ g ( x, y )
i =1
i
1 2
= σ η ( x, y )
K
E{g ( x, y )} = f ( x, y )
σ g ( x, y ) =
1
K
σ η ( x, y )
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
R = w1 z1 + w2 z 2 + ... + wmn z mn =
© 2002 R. C. Gonzalez & R. E. Woods
∑
mn
wz
i =1 i i
R = w1 r1 + w2 r2 + ... + w9 r9
= ∑i =1 wi ri
9
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
• Piksel değerleri:
(10, 20, 20, 20, 15, 20, 20, 25, 100) ise
Sıralanınca :
(10, 15, 20, 20, 20, 20, 20, 25, 100)
Tam ortadaki yani 5. değer olan 20
merkezdeki piksele atanır.
© 2002 R. C. Gonzalez & R. E. Woods
olur.
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
Tek boyutlu f(x) fonksiyonunun birinci dereceden türevinin tanımı “fark”tır.
Yani:
∂f
= f ( x + 1) − f ( x)
∂x
İkinci dereceden türev yine fark olarak tanımlanır:
∂2 f
= f ( x + 1) + f ( x − 1) − 2 f ( x)
2
∂x
© 2002 R. C. Gonzalez & R. E. Woods
∂ f ∂ y
∇ f = 2 + 2
∂x
∂y
2
2
2
∂2 f
= f ( x + 1, y ) + f ( x − 1, y ) − 2 f ( x, y )
2
∂x
∂2 f
= f ( x, y + 1) + f ( x, y − 1) − 2 f ( x, y )
2
∂y
∇ 2 f = [ f ( x + 1, y ) + f ( x − 1, y ) + f ( x, y + 1) + f ( x, y − 1)] − 4 f ( x, y )
 f ( x, y ) − ∇ 2 f ( x , y )

g ( x, y ) = 
 f ( x, y ) + ∇ 2 f ( x, y )

© 2002 R. C. Gonzalez & R. E. Woods
Eğer Laplace maskesinin
merkez katsayısı negatif ise
Eğer Laplace maskesinin
merkez katsayısı pozitif ise
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
Sadeleştirmeler:
g ( x, y ) = f ( x, y) − [ f ( x + 1, y ) + f ( x − 1, y ) + f ( x, y + 1) + f ( x, y − 1)] + 4 f ( x, y )
= 5 f ( x, y ) − [ f ( x + 1, y ) + f ( x − 1, y ) + f ( x, y + 1) + f ( x, y − 1)]
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
Chapter 3
Image Enhancement in the
Spatial Domain
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
© 2002 R. C. Gonzalez & R. E. Woods
Download