You are on page 1of 2

DETEKSI TEPI

a. Konversi RGB to Grayscale

Konversi Grayscale terdapat 3 metode:

1. Lightness

grayscale= ( max [ R ,G , B ]) + ( min [ R ,G , B ])∗0 . 5

2. Average

( R+G+ B )
grayscale=
3

3. Luminosity

grayscale= ( r∗R ) + ( g∗G ) + ( b∗B )

b. Metode Deteksi Tepi

1. Operator Prewitt

a. The horizontal and vertical derivative approximations

[ ] [ ]
−1 −1 −1 −1 0 1
Gx = 0 0 0 ∗A G y = −1 0 1 ∗A
1 1 1 −1 0 1

b. The Gradien magnitude


G= G 2 + G
x y2

2. Operator Sobel

Istilah lain Sobel–Feldman operator atau Sobel filter.

a. The horizontal and vertical derivative approximations

[ ] [ ]
−1 −2 −1 −1 0 1
Gx = 0 0 0 ∗A G y = −2 0 2 ∗A
1 2 1 −1 0 1

b. The Gradien magnitude



G= G 2 + G
x y2

3. Operator Robert

Istilah lain Cross Operator.

a. The horizontal and vertical derivative approximations

Gx = [ ]
−1 0
0 1
Gy= [ ]
0 −1
1 0

b. The Gradien Magnitude


G= G 2 + G
x y2

c. The Gradient’s Direction

Gy
Θ=tan−1
( )
Gx

You might also like