Anda di halaman 1dari 4

Piecewise Linear Transformation Function

1. Contrast Stretching
Pada transformasi ini terdapat dua buah titik point perubahan di dalam fungsi transformasinya
dimana gambar yang memiliki pixel buram mengarah ke gelap akan semakin gelap dan pixel
dengan buram ke arah terang akan semakin terang.
Contoh :
4 3 2 1 ? ? ? ?
3 1 2 4 ? ? ? ?
5 1 6 2 ? ? ? ?
2 3 5 6 ? ? ? ?

Dianggap terdapat titik s


dan r :
s1 = 2, r1 = 3
s2 = 6, r2 = 5

r Formula s Rounding
0 𝐬𝟏 𝟐 0
𝐟 = 𝒇𝟎 ( ) =𝟎 ( )=𝟎
𝐫𝟏 𝟑
1 𝐬𝟏 𝟐 1
𝐟 = 𝒇𝟏 ( ) = 𝟏 ( ) = 𝟎, 𝟔
𝐫𝟏 𝟑
2 𝐬𝟏 𝟐 1
𝐟 = 𝒇𝟐 ( ) = 𝟐 ( ) = 𝟏, 𝟑
𝐫𝟏 𝟑
3 𝐬𝟐 − 𝐬𝟏 𝟔−𝟐
= 𝟐 + (𝟑 − 𝟑) (𝟓 − 𝟑) = 2 2
f = 𝐬𝟏 + (𝒇𝟑 − 𝐫𝟏 ) ( )
𝐫𝟐 − 𝐫𝟏
4 𝐬𝟐 − 𝐬𝟏 𝟔−𝟐
= 𝟐 + (𝟒 − 𝟑) (𝟓 − 𝟑) = 4 4
f = 𝐬𝟏 + (𝒇𝟒 − 𝐫𝟏 ) ( )
𝐫𝟐 − 𝐫𝟏
5 𝑰𝒎𝒂𝒙 − 𝐬𝟐 𝟕−𝟔
= 𝟔 + (𝟓 − 𝟓) (𝟕 − 𝟓) = 6 6
f = 𝐬𝟐 + (𝒇𝟓 − 𝐫𝟐 ) ( )
𝑰𝒎𝒂𝒙 − 𝐫𝟐
6 𝑰𝒎𝒂𝒙 − 𝐬𝟐 𝟕−𝟔
= 𝟔 + (𝟔 − 𝟓) (𝟕 − 𝟓) = 6,5 7
f = 𝐬𝟐 + (𝒇𝟔 − 𝐫𝟐 ) ( )
𝑰𝒎𝒂𝒙 − 𝐫𝟐
7 𝑰𝒎𝒂𝒙 − 𝐬𝟐 𝟕−𝟔
= 𝟔 + (𝟕 − 𝟓) (𝟕 − 𝟓) = 7 7
f = 𝐬𝟐 + (𝒇𝟕 − 𝐫𝟐 ) ( )
𝑰𝒎𝒂𝒙 − 𝐫𝟐
Sebelum Sesudah

4 3 2 1 4 2 1 1
3 1 2 4 2 1 1 4
5 1 6 2 6 1 7 1
2 3 5 6 1 2 6 7
2. Gray Level Slicing
3 4 5

6 6 7

1 2 2

L = 8, t1 = 3, t2 = 6
7 7 7

With Background 7 7 0

0 0 0

7 7 7

Without Background 7 7 7

1 2 2
3. Bit Plane Slicing

→ image ipecah menjadi bit-bit yang terdiri dari Most Significant Bit (MSB) Plane, Central
Plane, dan Least Significant Bit (LSB) Plane.

Contoh :
Anggap gambar adalah 3 bit grey level image (n=3) dibawah ini :

1 3 0 6
4 2 2 3
4 5 7 5
5 6 7 2
Diubah menjadi

001 011 000 110


100 010 010 011
100 101 111 101
101 110 111 010

MSB Central Plane LSB


0 0 0 1
0 1 0 1 1 1 0 0
1 0 0 0
0 1 1 1 0 0 0 1
1 1 1 1
0 0 1 0 0 1 1 1
1 1 1 0
0 1 1 1 1 0 1 0

Untuk n =4 maka terdiri dari MSB, CP1, CP 2, dan LSB, begitu seterusnya.

Anda mungkin juga menyukai