Presentation is loading. Please wait.

Presentation is loading. Please wait.

Program Studi S-1 Teknik Informatika FMIPA Universitas Padjadjaran

Similar presentations


Presentation on theme: "Program Studi S-1 Teknik Informatika FMIPA Universitas Padjadjaran"— Presentation transcript:

1 D10K-6C01 Pengolahan Citra PCD-05 Algoritma Pengolahan Citra 2 Area Process
Program Studi S-1 Teknik Informatika FMIPA Universitas Padjadjaran Semester Genap

2 Algoritma Pengolahan Citra 2
Operasi berbasis area (Area Process) Deskripsi Area Process A category of image-processing techniques that calculate the value of each output-image pixel from the corresponding input-image pixel and its neighbours. Examples include halftoning, sharpening and median filtering. Point Process vs Area Process Point processes: operate on a pixel based solely on that pixel’s value. Area processes: use the input pixel as well as the pixels around it to generate a new pixel. Point processes are easily implemented as “look -up tables”.

3 Limitations of Point Operations
They don’t know where they are in an image They don’t know anything about their neighbors Most image features (edges, textures, etc) involve a spatial neighborhood of pixels If we want to enhance or manipulate these features, we need to go beyond point operations

4 What Point Operations Can’t Do
Blurring/smoothing Sharpening

5 Pixel Neigborhood Any pixel p(x, y) has two vertical and two horizontal neighbors, given by This set of pixels are called the 4-neighbors of P, and is denoted by N4(P). Each of them are at a unit distance from P.

6 Pixel Neigborhood The four diagonal neighbors of p(x,y) are given by,
This set is denoted by ND(P). Each of them are at Euclidean distance of from P.

7 Pixel Neigborhood The points ND(P) and N4(P) are together known as 8-neighbors of the point P, denoted by N8 (P). Some of the points in the N4, ND and N8 may fall outside image when P lies on the border of image.

8 Terminologi Lainnya Pixel Adjacency Pixel Connectivity Path
Connected Components Regions Boundaries Distances (Jarak)

9 Konvolusi

10 Konvolusi Image 1 6 3 2 9 11 10 5 7 8 4 1/9 New value:
5 7 8 4 1/9 Filter/mask/ operator New value: 6/9 + 9/9 + 7/9 + 0/9 + 2/9 + 8/9 + 2/9 + 9/9 + 10/9 = 5.889 Image 03

11 Konvolusi 1 6 3 2 9 11 10 5 7 8 4 1/9 5 Filtered Image:
Original Image: Filtered Image: 1 6 3 2 9 11 10 5 7 8 4 1/9 5 value = 1x1/9 + 6x1/9 + 3x1/9 + 2x1/9 + 11x1/9 + 3x1/ x1/9 + 10x1/9 + 6x1/9 = 47/9 = 5.222 03

12 Konvolusi 1 6 3 2 9 11 10 5 7 8 4 1/9 5 7 Filtered Image:
Original Image: Filtered Image: 1 6 3 2 9 11 10 5 7 8 4 1/9 5 7 value = 6x1/9 + 3x1/9 + 2x1/9 + 11x1/9 + 3x1/9 + 10x1/ x1/ x1/ x1/9 = 60/9 = 6.667 03

13 Konvolusi 1 6 3 2 9 11 10 5 7 8 4 5 7 5 5 6 5 4 5 6 Filtered Image:
Original Image: Filtered Image: 1 6 3 2 9 11 10 5 7 8 4 5 7 5 5 6 5 4 5 6 03

14 PROBLEM PADA KONVOLUSI (BOUNDARY PROBLEM)
Bagaimana untuk menentukan piksel-piksel yang berada pada batas citra Solusi: Zero padding Treat the empty cells in the convolution window as zero Fit-Position Start convolving at the first position where the window doesn’t overlap the image Enlarging Enlarging the original image before convolving by duplicating the edges Wrapping Wrap the image.

15 Penanganan Boundary Pixels

16 Spatial Filtering The word “filtering” has been borrowed from the frequency domain. Filters are classified as: Low-pass (i.e., preserve low frequencies) High-pass (i.e., preserve high frequencies) Band-pass (i.e., preserve frequencies within a band) Band-reject (i.e., reject frequencies within a band)

17 Spatial Filtering Linier Spatial FIltering Teknik
Dengan mask (konvolusi) Tanpa mask Kombinasi: Filer morfologis Mask/Operator/Subwindows Matriks berukuran kecil, pada umumnya bujursangkar dan berordo ganjil Digunakan dalam proses konvolusi

18 Ilustrasi Output Image w(i,j) f(i,j)

19 Efek-efek Spatial Filtering
Smoothing/Blurring Low-pass (i.e., preserve low frequencies) Sharpening High-pass (i.e., preserve high frequencies) Edge Detection Emboss

20 Filter Low Pass

21 Smoothing original 3x3 9x9 15x15

22 Smoothing dg Gaussian Mask
The weights are samples of the Gaussian function σ = 1.4 mask size is a function of σ :

23

24 CONVOLUTION MASKS LAIN
Embossing Blurring Sharpening W=9a-1

25 HIGH PASS FILTERING Tujuan Lawan dari Low Pass Filtering
Mempertajam tepi citra Lawan dari Low Pass Filtering Nama lain : edge sharpening Pengolahan Citra Dijital

26 HIGH PASS FILTERING Syarat Contoh
Elemen filter boleh positif, negatif atau nol Jumlah semua elemen pada filter adalah 0 atau 1 Contoh Pengolahan Citra Dijital

27 Sharpening Filters (High Pass filtering)
Useful for emphasizing transitions in image intensity (e.g., edges).

28 Sharpening Filters (cont’d)
Note that the response of high-pass filtering might be negative. Values must be re-mapped to [0, 255] sharpened images original image

29 Sharpening Filters: Unsharp Masking
Obtain a sharp image by subtracting a lowpass filtered (i.e., smoothed) image from the original image: - =

30 Sharpening Filters: High Boost
Image sharpening emphasizes edges but details (i.e., low frequency components) might be lost. High boost filter: amplify input image, then subtract a lowpass image. (A-1) + =

31 Sharpening Filters: High Boost (cont’d)
If A=1, we get a high pass filter If A>1, part of the original image is added back to the high pass filtered image.

32 Sharpening Filters: High Boost (cont’d)

33 Sharpening Filters: Derivatives
Taking the derivative of an image results in sharpening the image. The derivative of an image can be computed using the gradient.

34 Sharpening Filters: Derivatives (cont’d)
The gradient is a vector which has magnitude and direction: or (approximation)

35 Sharpening Filters: Derivatives (cont’d)
Magnitude: provides information about edge strength. Direction: perpendicular to the direction of the edge.

36 Sharpening Filters: Gradient Computation
Approximate gradient using finite differences: sensitive to vertical edges Δx sensitive to horizontal edges

37 Sharpening Filters: Gradient Computation (cont’d)

38 Example

39 Sharpening Filters: Gradient Computation (cont’d)
We can implement and using masks: (x+1/2,y) good approximation at (x+1/2,y) (x,y+1/2) * * good approximation at (x,y+1/2) Example: approximate gradient at z5

40 Sharpening Filters: Gradient Computation (cont’d)
A different approximation of the gradient: good approximation (x+1/2,y+1/2) * We can implement and using the following masks:

41 Sharpening Filters: Gradient Computation (cont’d)
Example: approximate gradient at z5 Other approximations Sobel

42 Example

43 Sharpening Filters: Laplacian
The Laplacian (2nd derivative) is defined as: (dot product) Approximate derivatives:

44 Sharpening Filters: Laplacian (cont’d)
Laplacian Mask detect zero-crossings

45 Sharpening Filters: Laplacian (cont’d)
Sobel Laplacian

46 Filtering Median Filtering Averaging Filter Minimum/Maksimum Filter
Menghilangkan impulse noise (bedakan dengan Gaussian Noise yang dapat dihilangkan dengan Low-pass filter) Impulse noise has a number of pixels that have conspicuosly wrong intensities like 0 or 255 Averaging Filter Mengganti nilai piksel fokus dengan rata-rata jumlah piksel dalam window Minimum/Maksimum Filter Mengganti nilai piksel fokus dengan nilai piksel minimum/maksimum piksel sekitar

47 Median Filter

48 Ilustrasi Median Filer
3x3 median 7x7 median

49 Filter Morfologis Kasus Khusus Filtering Dua operasi dasar:
erosi : menipiskan Dilasi : menebalkan Operasi gabungan: opening : an erosion followed by a dilation closing: a dilation followed by an erosion Menggunakan mask/operator yang disebut structuring element Jenis Structuring element: Block, Plus, Cross, Ring, Square Definisi:

50 Jenis-jenis Structuring Element
Box Plus Cross Dot Square Custom

51 Erosi Erosi

52 Dilasi Dilasi

53 Ilustrasi Erosi Dilasi

54 Ilustrasi Erosi Dilasi

55 Skeletonization one-pixel thick,
through the "middle" of the object, and, preserves the topology of the object.

56 Hole Filing

57 BLOB separation

58 Hole Removal

59 MATLAB

60

61 Examples: Deblurring

62 Examples: Image Enhancement

63 Examples: Image Registration

64 Examples: Image Segmentation

65 Examples: Spatial Transformation

66 Examples: Measuring Image Features


Download ppt "Program Studi S-1 Teknik Informatika FMIPA Universitas Padjadjaran"

Similar presentations


Ads by Google