Anda di halaman 1dari 11

Pemrosesan Citra Page 1 of 11

Copyright JTEUS, 2006 D:\My Documents\JTEUS\Citra\Citra2006\Modul0.doc


By Nemuel Daniel Pah 25/08/06
Module 0
Digital Image and Image Mode

Digital Image
Digital image is two dimensional representation of image in a form of limited
elements called pixels that has limited value.

x

1 2 3 4 5 6 7 8 9 10

1 255 255 200 200 148 200 200 255 255 255


2 255 200 200 148 148 200 200 200 255 255


3 255 200 148 55 148 55 200 200 255 255


4 255 200 200 148 148 200 200 200 255 255

y
5 255 200 200 148 55 200 200 200 255 255


6 255 148 55 148 148 148 55 200 255 255


7 255 200 148 55 55 55 200 200 255 255


8 255 255 200 200 200 200 200 255 255 255


9 255 255 255 255 200 255 255 255 255 255


10 255 255 255 255 255 255 255 255 255 255


The pixels are arranged in row column format. The pixels are called based
on their matrix index as Image(row,column) or base on their x, y coordinate
as Image(x,y).


Terms in image processing

Spatial Resolution
The number of pixel comprise in a digital image or within a predefined area.


An image with resolution of 480 x 640 An image with resolution of 48 x 64







Pemrosesan Citra Page 2 of 11
Copyright JTEUS, 2006 D:\My Documents\JTEUS\Citra\Citra2006\Modul0.doc
By Nemuel Daniel Pah 25/08/06
Brightness Resolution
The number of different brightness level that can be represented by each pixel
in an image





An image with brightness resolution of 256 (8 bits)








An image with brightness resolution of 8 (3 bits)







Pemrosesan Citra Page 3 of 11
Copyright JTEUS, 2006 D:\My Documents\JTEUS\Citra\Citra2006\Modul0.doc
By Nemuel Daniel Pah 25/08/06

An image with brightness resolution of 4 (2 bits)










An image with brightness resolution of 1 (1 bit)












Pemrosesan Citra Page 4 of 11
Copyright JTEUS, 2006 D:\My Documents\JTEUS\Citra\Citra2006\Modul0.doc
By Nemuel Daniel Pah 25/08/06
Image Mode

Black and White
Black and white image is an image with only 2 brightness resolution (white or
black) represented by 1 and 0, respectively. The image is commonly
represented in binary mode (TRUE for white and FALSE for black).


x

1 2 3 4 5 6 7 8 9 10

1
1 1 1 1 1 1 1 1 1 1

2
1 1 0 0 1 0 0 1 1 1

3
1 1 0 0 1 0 0 1 1 1

4
1 1 0 0 1 0 0 1 1 1
y
5
1 1 1 0 0 0 0 1 1 1

6
1 1 1 1 0 0 0 1 1 1

7
1 1 1 1 1 0 0 1 1 1

8
1 1 1 1 1 0 0 1 1 1

9
1 1 1 1 1 1 1 1 1 1

10
1 1 1 1 1 1 1 1 1 1



An example of a black and white image











Pemrosesan Citra Page 5 of 11
Copyright JTEUS, 2006 D:\My Documents\JTEUS\Citra\Citra2006\Modul0.doc
By Nemuel Daniel Pah 25/08/06
Grayscale Image

Grayscale image is an image with more than 2 brightness resolution. The
image is represented by a matrix with a size of X x Y.


x

1 2 3 4 5 6 7 8 9 10

1
10 25 123 27 0 0 0 0 27 0

2
0 0 100 28 0 0 0 0 28 0

3
0 0 98 0 0 0 0 0 0 0

4
0 0 150 0 0 0 0 0 0 0
y
5
0 5 78 5 5 0 60 0 5 5

6
0 5 45 7 5 0 70 72 7 5

7
0 5 36 4 5 0 0 0 4 5

8
0 5 57 7 5 0 0 0 7 5

9
0 5 58 5 5 0 0 0 5 5

10
0 0 09 0 0 0 0 0 0 0



An example of a black and white image













Pemrosesan Citra Page 6 of 11
Copyright JTEUS, 2006 D:\My Documents\JTEUS\Citra\Citra2006\Modul0.doc
By Nemuel Daniel Pah 25/08/06
RGB Image



The most commonly color image uses RGB mode. In RGB mode, a pixel is
represented by 3 values each for red (R), green (G) and blue (B).



















All color in the color spectrum can be created with these primary colors. The
following table shows some color created by combination of RGB (256 level).


R G B Color
225 0 0
0 255 0
0 0 255
255 0 255
10 100 75
200 50 70
200 200 200
0 0 0


These three primary color is called additive color. They are used to create
color on things that emitting lights such as CRT and LCD screen.
R
B
G
Pemrosesan Citra Page 7 of 11
Copyright JTEUS, 2006 D:\My Documents\JTEUS\Citra\Citra2006\Modul0.doc
By Nemuel Daniel Pah 25/08/06
CMYK Image


CMY (Cyan, Magenta, Yellow) are called subtractive color (or secondary
color). They are used in reflective material such as paper or other printing
material. The reason for using CMYK rather than RGB in printing material is
because it is almost impossible to find a pure red, green or blue ink.

In CMYK mode, a pixel is represented by 4 values each for cyan (C), magenta
(M), yellow (Y) and black (K). When C = 255, M = 255, Y = 255, the color has
to be black. However, it is very difficult to accurately mix the ink of this three
colors to create pure black. For this reason the black (K) value is added to the
CMY color.


















Since C = B + G, when a paper is printed with cyan and illuminated with white
color (white = R+G+B), the red light will be absorbed (subtracted) by the
paper.








The same thing will happen to magenta and yellow. By combining CMY with
variuous level, we can create the whole spectrum of color.
M
K
Y
C
Pemrosesan Citra Page 8 of 11
Copyright JTEUS, 2006 D:\My Documents\JTEUS\Citra\Citra2006\Modul0.doc
By Nemuel Daniel Pah 25/08/06
Relation beetwen RGB and CMY color

The relation is commonly drawn in color cube as bellow.










































C = 255 R
M = 255 G
Y = 255 B


G
R
B
white
green
red
yellow
blue
cyan
magenta
Y
M
C
white
green
red
yellow
blue
cyan
magenta
Pemrosesan Citra Page 9 of 11
Copyright JTEUS, 2006 D:\My Documents\JTEUS\Citra\Citra2006\Modul0.doc
By Nemuel Daniel Pah 25/08/06
HSV Mode

The RGB and CMYK mode are sufficient for creating color image (emitting or
printing) but not for image analysis. Image analysis needs an image mode
that is more natural to human perception.

For human perception, the first four colors in the following table are called
green, the next two are blue and the last two are purple. By just looking at
the RGB combination on the left table, can you match all the RGB value and
the color as show by the arrow? If you found it difficult to match them, it is
because RGB values are not directly related to human perception.


R G B Color Name
80 144 106 Green
149 190 34 Green
35 189 101 Green
74 128 150 Green
111 92 132 Blue
121 210 14 Blue
133 63 161 Purple
46 178 175 Purple

We need a simple number that tells us the name of the color as human see
with their eyes. The simple number is called hue (H). When H = 0 the color is
red. The following are the collor when H = 0.



We call all the above color as red, some are brighter/darker, some are
weaker/stronger. The weaker/stronger of the color is determined by the
saturation (S), while the brighter/darker is determined by value (V).

Try to match the following HSV with the correct color (hue of red is 0 rad or 2
rad, hue of green is 2.09 rad and hue of blue is 4.18 rad). You should find if
easier than RGB.

H S V Color Name
0.05 255 112 Red
2.02 255 112 Red
0.03 195 160 Red
2.02 104 112 Green
2.02 104 56 Green
0.00 195 112 Green
5.86 112 112 Purple
5.58 250 112 Purple

HSV is sometimes called HSI by replacing the term value with intensity, or
HSB for brightness.
Pemrosesan Citra Page 10 of 11
Copyright JTEUS, 2006 D:\My Documents\JTEUS\Citra\Citra2006\Modul0.doc
By Nemuel Daniel Pah 25/08/06
HSV mode is commonly drawn as a color cone.






















Hue is the angle on color plane, saturation is the length from centre to the
selected color, and value is the distance along the grayscale line.

























H
S
V
white
black
Pemrosesan Citra Page 11 of 11
Copyright JTEUS, 2006 D:\My Documents\JTEUS\Citra\Citra2006\Modul0.doc
By Nemuel Daniel Pah 25/08/06
Relation beetwen RGB and HSI color

The relation between RGB and HIS color can be seen as a cone inside the
RGB cube as below



















Converting RGB to HSV with

>

=
G B if
G B if
H

2


[ ]
[ ]

'

+
+


2 / 1
2
2
1
1
) )( ( ) (
) ( ) (
cos
B G B R G R
B R G R


[ ] ) , , min(
) (
3
1 B G R
B G R
S
+ +


) (
3
1
B G R V + +

Converting HSV to RGB with

) 1 ( S V B


1
1
1
1
]
1

+
)
3
( cos
cos
1
H
H S
V R



) ( 1 B R G +
G
R
B
white
green
red
yellow
blue
cyan
magenta

Anda mungkin juga menyukai