# Morfologi citra.

## Presentation on theme: "Morfologi citra."— Presentation transcript:

Morfologi citra

Operasi Morfologi? Merubah bentuk. Morphing

Dasar Operasi Himpunan
Konsep himpunan dalam morfologi citra biner Setiap himpunan menyatakan satu objek. Setiap pixel (x,y) memiliki status : anggota himpunan atau bukan anggota himpuan.

Operasi Translasi dan Pencerminan ( Reflection)
B A z = (z1,z2) (A)z

*For binary images only
Logical Operations* *For binary images only (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Dilation Operations = Himpunan kosong Dilatasi berarti “merentang” A = Objek yang akan direntang B = Struktur element

Dilation Operations (cont.)
Reflection Structuring Element (B) Original image (A) Intersect pixel Center pixel

Dilation Operations (cont.)
Result of Dilation Boundary of the “center pixels” where intersects A

Example: Application of Dilation
“Repair” broken characters (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Erosion berarti “ramping”
Operasi erosi Erosion berarti “ramping” A = Object untuk dirampingkan B = Struktur elemen

Operasi Erosi (cont.) Struktur elemen (B) Citra Asal (A)
Intersect pixel Center pixel

Erosion Operations (cont.)
Result of Erosion Boundary of the “center pixels” where B is inside A

Example: Application of Dilation and Erosion
Menghilangkan objek kecil seperti noise (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Keterkaitan Dilatasi dan Erosi
dimana c = komplemen Bukti:

Operasi Opening atau = Gabungan dari semua bagian dari A yang benar-benar berisi B Opening menghilangkan detail dan sudut (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Contoh Opening

Operasi Closing Closing mengisi celah sempit dan lekukan

Contoh Closing

Hubungan antara Opening dan Closing
Sifat Opening Sifat Closing

Contoh: Aplikasi dari operasi morfologi
Perbaikan Finger print (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Hit-or-Miss Transformation
* dimana X = bentuk yang dideteksi W = window yang berisi X (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Hit-or-Miss Transformation (cont.)
* (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Boundary Extraction Original Boundary image (Images from Rafael C.
Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Hit-or-Miss Operator Definition * Structuring element example _ _ X B=
(X B1)(Xc B2) Hit Miss Structuring element example origin 1 -1 x x x mask B1 mask B2 mask B MATLAB (MATLAB function: bwhitmiss)

Example 1 _ _ X X B1 Xc B2 Xc origin X B * mask B1 mask B2

origin * Interseksi Contoh -1 -1 -1 1 -1 1 1 -1 mask B1 mask B2 mask B
1 -1 mask B1 mask B2 mask B MATLAB _ _ X X B1 Xc B2 Xc X B * Interseksi

Region Filling dimana X0 = p Citra asal Hasil dari region filling
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Extraction of Connected Components
dimana X0 = p (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Example: Extraction of Connected Components
X-ray image of bones Thresholded image Connected components (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Bentuk Struktur Elemen
x = don’t care (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

SELESAI

Gray-Scale Dilation 1-D Case 2-D Case
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Gray-Scale Dilation (cont.)
Original image Reflection of B Subimage + Max Moving window Structuring element B Note: B can be any shape and subimage must have the same shape as reflection of B. Output image

Gray-Scale Erosion 1-D Case 2-D Case
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Gray-Scale Erosion (cont.)
Original image Subimage B - Min Moving window Structuring element B Note: B can be any shape and subimage must have the same shape as B. Output image

Example: Gray-Scale Dilation and Erosion
Original image After dilation Darker Brighter After erosion (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Gray-Scale Opening Opening cuts peaks
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Gray-Scale Closing Closing fills valleys
(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Example: Gray-Scale Opening and Closing
Original image After opening After closing Reduce dark objects Reduce white objects (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Gray-scale Morphological Smoothing
Smoothing: Perform opening followed by closing Original image After smoothing (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Original image (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Top-Hat Transformation
Results of top-hat transform Original image (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Example: Texture Segmentation Application
Small blob Original image Segmented result Large blob Algorithm: 1. Perform closing on the image by using successively larger structuring elements until small blobs are vanished. 2. Perform opening to join large blobs together 3. Perform intensity thresholding (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Example: Granulometry
Objective: to count the number of particles of each size Method: 1. Perform opening using structuring elements of increasing size 2. Compute the difference between the original image and the result after each opening operation 3. The differenced image obtained in Step 2 are normalized and used to construct the size-distribution graph. Size distribution graph Original image (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Gradient Image Original image Surface of at edges look like mountain ridges.

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.