Dr. Fitri Arnia
Multimedia Signal Processing Research Group (MuSig) Jurusan Teknik Elektro-UNSYIAH
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 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 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,
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
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
dengan adalah hitam dan putih.
Warna yang kita gunakan
Cara sederhana menciptakan citra pseudo-color adalah
menggunakan teknik pemotongan intensitas (intensity slicing).
Perhatikan pembagian tingkat intensitas seperti di bawah ini
dengan adalah hitam dan putih.
Warna yang kita gunakan
M l l l l0 1 2 0 l lM 1 2 1 0,c ,c , ,cM c
Pemotongan Intensitas
Suatu piksel dengan intensitas s diberikan warna
kepadanya jika
Intensitas
diberikan warna
1 k k s l l k c
Suatu piksel dengan intensitas s diberikan warna
kepadanya jika
Contoh 1
Monochrome image of the Picker
Thyroid Phantom Results of intensity slicing into eightcolour 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).
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
Digambarkan sebagai transformasi abu-abu ke warna.
Suatu piksel dengan intensitas s diberikan kepadanya
warna-warna RGB
) ( ), ( ), (s T s T s Tr g b
Tiga transformasi intensitas
Digambarkan sebagai transformasi abu-abu ke warna.
Suatu piksel dengan intensitas s diberikan kepadanya
warna-warna RGB
[T (s),T (s), T (s)]b g
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.
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.
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. 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.
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
pseudo-colouring
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
kita menghitung transformasinya
Citra yang telah di warnai secara pseudo dituliskan dalam bidang
RGB sebagai
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
kita menghitung transformasinya
Citra yang telah di warnai secara pseudo dituliskan dalam bidang
RGB sebagai
) , ( yx I ) , ( ), , ( ), , (x y I x y I x y Ir g b )] , ( ), , ( ), , ( [ ) , (x y I x y I x y I x y Ic r g bExample
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.
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 Low-pass filter for the blueband Band-pass filter for the green
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 Pseudo-coloured frequency information
Outline
Pengolahan citra warna pseudo
Penyajian bidang warna
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
is mapped to a colour
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 is mapped to a colour ] , , [r g b c ]' ,' ,' [ ' r g b c
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
Notice that, typically, n=3.
] ,
,
[s1 s2 sn
Simple colour transformations act independently on each dimension of the colour space.
In this case, if the input colour is the output colour is
Notice that, typically, n=3.
] , , [s1 s2 sn ] , , , [ )] ( , ), ( ), ( [T1 s1 T2 s2 Tn sn t1 t2 tn
RGB example
The colour transformation
inverses the colours in a way reminiscent of the negatives of the
conventional colour films.
] 1 , 1 , 1 [ )] ( ), ( ), ( [Tr r Tg g Tb b r g b
The colour transformation
inverses the colours in a way reminiscent of the negatives of the
conventional colour films.
RGB example
RGB negative Original image
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.
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
Original image heavy on
magenta Corrected image
Transformation function of magenta
1 0
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.
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.
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
Original image Processed image Transformation function of saturation
1 0
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.
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.
Original image Processed image
1 1 1 1 8 1 1 1 1 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.
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.