Pengolahan Citra Warna 2 Semester Genap 2010/2011 Dr. Fitri Arnia Multimedia Signal Processing Research Group (MuSig) Jurusan Teknik Elektro-UNSYIAH
Outline Pengolahan citra warna pseudo Penyajian bidang warna Pengolahan warna
Pengolahan Citra Warna Pseudo Pengolahan citra warna pseudo menetapkan warna untuk
citra grayscale.
Ini penting karena mata manusia dapat membedakan berjuta
juta warna namun hanya berberapa (lebih sedikit) gradasi abu-abu.
Pewarnaan pseudo banyak aplikasinya untuk citra antara lain:
pada perangkat penangkap cahaya diluar cahaya tampak, sebagai contoh infrared dan X-ray.
Pengolahan Citra Warna Pseudo Citra ledakan matahari yang ditangkap oleh solar probe.
Citra di atas diberi warna dengan teknik pseudo. http://solar-b.nao.ac.jp
Pemotongan Intensitas -Intensity slicing Cara sederhana menciptakan citra pseudo-color adalah
menggunakan teknik pemotongan intensitas (intensity slicing).
Perhatikan pembagian tingkat intensitas seperti di bawah ini
l0 l1 l 2 l M
dengan l0 adalah hitam dan l M putih. Warna yang kita gunakan c0 , c1 , c 2 , , c M 1
Pemotongan Intensitas Suatu piksel dengan intensitas s diberikan warna ck
kepadanya jika
l k s l k 1
Intensitas l M diberikan warna c M 1
Contoh 1
Monochrome image of the Picker Thyroid Phantom
Results of intensity slicing into eight colour regions
Images from the book by Gonzalez and Woods
Transformasi Abu-abu ke warna Cara lain untuk menghasilkan warna pseudo adalah dengan
menggunakan teknik transformasi tingkat keabuan ke warna.
Transformasi tingkat keabuan ke warna didefinisikan oleh
tiga fungsi dari sekumpulan intensitas keabuan menjadi sekumpulan intensitas merah, hijau dan biru.
Transformasi ini bisa dipandang sebagai transformasi yang
terdiri dari tiga transformasi intensitas yang berdiri sendiri (ingat kembali transformasi pada citra abu-abu pada kuliah sebelumnya).
Transformasi Abu-abu ke Warna Tiga transformasi intensitas
Tr ( s ), Tg ( s ), Tb ( s )
Digambarkan sebagai transformasi abu-abu ke warna. Suatu piksel dengan intensitas s diberikan kepadanya warna-
warna RGB
[Tr ( s ), Tg ( s ), Tb ( s )]
Contoh The three intensity transformations are sinusoidal functions. The phases differ, giving to the gray levels of the band corresponding to explosives a colour similar to that of the background.
Example X-ray image of a bag from an airport scanning system. The image at the bottom contains a block of simulated plastic explosives. The previous gray level to colour transformation allows us to see through the explosives.
Example Three different intensity transformations. The gray levels of the explosives have a colour similar to that of the bag.
Example
Using the second transformation, the plastic explosives and the garment bag get similar colours.
Example
The sinusoidal functions vary rapidly near their valleys and are almost constant near the peaks. Using this property and by changing their frequencies and phases we obtain colourings emphasising different ranges of the gray scale.
Penapisan Citra untuk pseudocolouring Cara berbeda untuk melakukan pseudo-colouring, kita menghitung tiga transformasi (yang masing-masing berdiri sendiri) dari citra dan bukan dari tingkat keabuannya. Untuk citra abu-abu I ( x, y ) kita menghitung transformasinya I r ( x, y ), I g ( x, y ), I b ( x, y )
Citra yang telah di warnai secara pseudo dituliskan dalam bidang RGB sebagai I c ( x, y ) [ I r ( x, y ), I g ( x, y ), I b ( x, y )]
Example We compute the Fourier transform of the image and then we apply a high-pass filter to obtain the red band, a band reject filter to obtain the green band and a low-pass filter to obtain the blue band.
We expect high frequency information to be reddish, low frequency information to be bluish and medium frequency information to be greenish.
Example
High-pass filter for the red band
Band-pass filter for the green band
Low-pass filter for the blue band
Example Notice that in the pseudo-coloured image the outer ring of Saturn is much more visible.
Original grayscale image
The red band with high frequency information
Pseudo-coloured
Outline Pengolahan citra warna pseudo Penyajian bidang warna Pengolahan warna penuh
Colour transformations Similarly to the intensity transformations for grayscale images and gray to colour transformations for pseudo-colouring, we have colour to colour transformations. In the RGB space for example, under a colour transformation, each RGB colour c [r , g , b]
is mapped to a colour c' [r ' , g ' , b' ]
Colour transformations Simple colour transformations act independently on each dimension of the colour space. In this case, if the input colour is
the output colour is
[ s1 , s 2 , s n ]
[T1 ( s1 ), T2 ( s 2 ), , Tn ( s n )] [t1 , t 2 , , t n ] Notice that, typically, n=3.
RGB example The colour transformation [Tr ( r ), T g ( g ), Tb (b )] [1 r , 1 g , 1 b ]
inverses the colours in a way reminiscent of the negatives of the conventional colour films.
RGB example
Original image
RGB negative
CMY example Visual inspection of the image shows an excess of magenta.
To balance the colour we convert it to the CMY space and transform the magenta component.
CMY example 1
0
Original image heavy on magenta
Corrected image
1
Transformation function of magenta
HSI example We want to brighten the image using histogram equalisation.
Histogram equalisation on each RGB component will change the hues and the processed image will look unnatural.
HSI example Instead we: Convert the image to the HSI space. We transform the intensity component by applying histogram equalisation on it. In addition, we transform the saturation component to get less saturated colours.
HSI example 1
0
Original image
Processed image
1
Transformation function of saturation
The transformation function of the intensity component was computed by applying histogram equalisation on it.
Filtering of colour images A colour transformation is performed on single pixels. For a given transformation, the new colour of a pixel depends on its original colour only. Similarly to the grayscale images, we can transform a colour image with spatial filters, in which case, the new colour of a pixel depends on its neighbourhood.
Filtering of colour images Some algorithms filter each component of the colour space separately.
1 1 1 1 8 1 1 1 1 Original image
Processed image
Laplacian mask
Each RGB band was separately filtered with a Laplacian mask and the result was subtracted from the original.
Filtering of colour images There exist algorithms that process all components of a colour image simultaneously. The input colours are treated as vectors and are processed in a way that is not equivalent to processing each component separately. Applications of such algorithms include edge detection and image segmentation.