SlideShare a Scribd company logo
1 of 51
The Stepping Stone To International Journey www.ti.pnp.ac.id
TEKNOLOGI INFORMASI
POLITEKNIK NEGERI PADANG
Enhancement
Based on Filtering
AINIL MARDIAH, M.Cs.
Program Studi Teknologi Rekayasa Perangkat Lunak
Jurusan Teknologi Informasi
Politeknik Negeri Padang
Email: ainilmardiah@pnp.ac.id
The Stepping Stone To International Journey www.ti.pnp.ac.id
Filtering
• Domain Spasial
- Langsung menerapkan pemfilteran ke domain spasial
seperti tingkat intensitas dan lokasi
• Domain Frekuensi
- Ubah gambar menjadi domain frekuensi
- Terapkan pemfilteran ke respons frekuensi
The Stepping Stone To International Journey www.ti.pnp.ac.id
Image Enhancement by Spatial
Domain Filtering
The Stepping Stone To International Journey www.ti.pnp.ac.id
Image filtering
Memodifikasi pixel di dalam sebuah citra berdasarkan beberapa
fungsi lingkungan lokal (local neighborhood) dari setiap piksel
10 5 3
4 5 1
1 1 7
7
Local image data Modified image data
Some function
The Stepping Stone To International Journey www.ti.pnp.ac.id
Spatial Filtering
• Satu versi sederhana: linear filtering (convolution)
- Ganti setiap pixel dengan kombinasi linear dari masing-masing
neighbor
• Resolusi untuk kombinasi linear disebut “kernel” (atau “mask”,
“filter”)
10 5 3
4 5 1
1 1 7
8
Local image data Modified image data
0 0 0
0 0.5 0
0 1 0.5
kernel
The Stepping Stone To International Journey www.ti.pnp.ac.id
Spatial Filtering
w(-1,-1) w(-1,0) w(-1,1)
w(0,-1) w(0,0) w(0,1)
w(1,-1) w(1,0) w(1,1)
Mask coefficients
menunjukkan susunan
koordinat
The Stepping Stone To International Journey www.ti.pnp.ac.id
Convolution
Jika F adalah citra, H adalah kernel (dengan ukuran 2k+1 x 2k+1), dan G
adalah citra output
𝐺 𝑖, 𝑗 =
𝑢=−𝑘
𝑘
𝑣=−𝑘
𝑘
𝐻 𝑢, 𝑣 𝐹 𝑖 − 𝑢, 𝑗 − 𝑣
Ini disebut operasi konvulusi (convolution):
G = H * F
The Stepping Stone To International Journey www.ti.pnp.ac.id
Convolution
1 -1 -1
1 2 -1
1 1 1
Convolution kernel, 𝝎
1 1 1
-1 2 1
-1 -1 1
2 2 2 3
2 1 3 3
2 2 1 2
1 3 2 2
Input Image, f
The Stepping Stone To International Journey www.ti.pnp.ac.id
Convolution
1 1 1
-1 2 1
-1 -1 1
2 2 2 3
2 1 3 3
2 2 1 2
1 3 2 2
1 1 1
-1 2 1
-1 -1 1
4 2 2 3
-2 1 3 3
2 2 1 2
1 3 2 2
5
Input Image, f
Output
Image, g
The Stepping Stone To International Journey www.ti.pnp.ac.id
Convolution
1 1 1
-1 2 1
-1 -1 1
2 2 2 3
2 1 3 3
2 2 1 2
1 3 2 2
1 1 1
-1 2 1
-1 -1 1
-2 4 2 3
-2 -1 3 3
2 2 1 2
1 3 2 2
5 4
Input Image, f
Output
Image, g
The Stepping Stone To International Journey www.ti.pnp.ac.id
Convolution
1 1 1
-1 2 1
-1 -1 1
2 2 2 3
2 1 3 3
2 2 1 2
1 3 2 2
1 1 1
-1 2 1
-1 -1 1
2 -2 4 3
2 -1 -3 3
2 2 1 2
1 3 2 2
5 4 4
Input Image, f
Output
Image, g
The Stepping Stone To International Journey www.ti.pnp.ac.id
Convolution
1 1 1
-1 2 1
-1 -1 1
2 2 2 3
2 1 3 3
2 2 1 2
1 3 2 2
1 1 1
-1 2 1
-1 -1 1
2 2 -2 6
2 1 -3 -3
2 2 1 2
1 3 2 2
5 4 4 -2
Input Image, f
Output
Image, g
The Stepping Stone To International Journey www.ti.pnp.ac.id
Convolution
1 1 1
-1 2 1
-1 -1 1
2 2 2 3
2 1 3 3
2 2 1 2
1 3 2 2
1 1 1
-1 2 1
-1 -1 1
2 2 2 3
4 1 3 3
-2 2 1 2
1 3 2 2
5 4 4 -2
9
Input Image, f
Output
Image, g
The Stepping Stone To International Journey www.ti.pnp.ac.id
Convolution
1 1 1
-1 2 1
-1 -1 1
2 2 2 3
2 1 3 3
2 2 1 2
1 3 2 2
1 1 1
-1 2 1
-1 -1 1
2 2 2 3
-2 2 3 3
-2 -2 1 2
1 3 2 2
5 4 4 -2
9 6
Input Image, f
Output
Image, g
The Stepping Stone To International Journey www.ti.pnp.ac.id
5 4 4 -2
9 6 14 5
11 7 6 5
9 12 8 5
Final output Image, g
Convolution
The Stepping Stone To International Journey www.ti.pnp.ac.id
Linear filters: examples
Original Identical image
The Stepping Stone To International Journey www.ti.pnp.ac.id
Linear filters: examples
Original Shifted left
By 1 pixel
The Stepping Stone To International Journey www.ti.pnp.ac.id
Linear filters: examples
Original
1 1 1
1 1 1
1 1 1
Blur (with a mean filter)
* =
The Stepping Stone To International Journey www.ti.pnp.ac.id
Linear filters: examples
Original
1 1 1
1 1 1
1 1 1
0 0 0
0 2 0
0 0 0
-
Sharpening filter
(accentuates edges)
=
*
The Stepping Stone To International Journey www.ti.pnp.ac.id
Smoothing Linear Filters
𝑔 𝑚, 𝑛 =
𝑖=−𝐼
𝐼
𝑗=−𝐽
𝐽
𝑤 𝑖, 𝑗 𝑓(𝑚 − 𝑖, 𝑛 − 𝑗)
𝑖=−𝐼
𝐼
𝑗=−𝐽
𝐽
𝑤(𝑖, 𝑗)
Normalization of coefficient to ensure 0 ≤ g(m,n) ≤
L-1
The Stepping Stone To International Journey www.ti.pnp.ac.id
Smoothing Linear Filters
original blurred thresholded
The Stepping Stone To International Journey www.ti.pnp.ac.id
Gaussian Kernel
The Stepping Stone To International Journey www.ti.pnp.ac.id
Gaussian filters
= 30 pixels
= 1 pixel = 5 pixels = 10 pixels
The Stepping Stone To International Journey www.ti.pnp.ac.id
Gaussian filter
• Hapus komponen “high-frequency” dari citra (low-pass filter)
The Stepping Stone To International Journey www.ti.pnp.ac.id
Otsu Method
The Stepping Stone To International Journey www.ti.pnp.ac.id
Otsu Method
W𝑒𝑖𝑔ℎ𝑡 𝑊𝑏 =
8+7+2
36
= 0.4722
Mean 𝜇𝑏 =
(0×8)+(1×7)+(2×2)
17
= 0.6471
Variance 𝜎𝑏
2
=
0−0.6471 2×8 + 1−0.6471 2×7 + 2−0.6471 2×2
17
=
0.4187×8 + 0.1246×7 + 1.8304×2
17
= 0.4637
W𝑒𝑖𝑔ℎ𝑡 𝑊𝑓 =
6+9+4
36
= 0.5278
Mean 𝜇𝑓 =
(3×6)+(4×9)+(5×4)
19
= 3.8947
Variance 𝜎𝑓
2
=
3−3.8947 2×6 + 4−3.8947 2×9 + 5−3.8947 2×4
19
=
4.8033××6 + 0.0997×9 + 4.8864×4
19
= 0.5152
Within Class Variance 𝜎𝑊
2
= 𝑊𝑏𝜎𝑏
2
+ 𝑊𝑓𝜎𝑓
2
= 0.4722 × 0.4637 + 0.5278 × 0.5152 = 0.4909
The Stepping Stone To International Journey www.ti.pnp.ac.id
Otsu Method
The Stepping Stone To International Journey www.ti.pnp.ac.id
Otsu Method
The Stepping Stone To International Journey www.ti.pnp.ac.id
Thresholding By Probability
• Berguna untuk mendeteksi objek dengan warna tertentu seperti
api, asap, banjir, dll
- Kumpulkan citra dengan warna tertentu
- Hitung rata-rata dan variance untuk setiap pixel channel
- Hitung probabilitas pixel baru menggunakan probabilitas
gaussian dengan melatih (training) rata-rata dan standar
deviasi
The Stepping Stone To International Journey www.ti.pnp.ac.id
Thresholding By Probability
• Case: deteksi asap
- Hitung rata-rata dan variance dari data training
The Stepping Stone To International Journey www.ti.pnp.ac.id
PDF Function of Smoke
The Stepping Stone To International Journey www.ti.pnp.ac.id
Smoke Detection Results
The Stepping Stone To International Journey www.ti.pnp.ac.id
Connected Component Labeling
The Stepping Stone To International Journey www.ti.pnp.ac.id
Region-based Segmentation
• Daerah berkembang
- Mulai dari titik benih dan periksa titik lingkungan.
• Watershed / Flood Fill
- Terinspirasi dari cara mengisi air
• Segmentasi sebagai pengelompokan
- Nilai intensitas ditetapkan sebagai data untuk
dikelompokkan
The Stepping Stone To International Journey www.ti.pnp.ac.id
Region Growing
• Dimulai dengan kumpulan piksel awal K (initial seed(s))
• Tambahkan ke pixel p di K yang berdekatan dengan q jika 𝐼𝑝 − 𝐼𝑞 < 𝑇
• Ulangi hingga tidak ada perubahan
The Stepping Stone To International Journey www.ti.pnp.ac.id
Watersheds Segmentation
• Bayangkan citra gray level sebagai bidang
(landscape)
• Setitik air yang jatuh di titik mana pun akan
mengalir ke tempat terendah di landscape
• Untuk tempat terendah di landscape,
terdapat sekumpulan titik, yang disebut
cekungan atau lembah yang menampung
air, di mana setitik air akan mengalir ke titik
minimum tertentu
• Batasan antar cekungan yang berdekatan
membentuk batas air (watershed)
The Stepping Stone To International Journey www.ti.pnp.ac.id
Watershed Sample
The Stepping Stone To International Journey www.ti.pnp.ac.id
Segmentation as Clustering
• Menampilkan pixel citra sebagai vector fitur
• Contohnya, setiap pixel bisa ditampilkan sebagai
- intensitas, memberikan vektor fitur 1 dimensi
- Warna, memberikan vektor fitur 3 dimensi
- Warna + koordinat, memberikan vektor fitur 5 dimensi
• Kelompokkan mereka menjadi kelompok k, contoh segmen k
- Pengelompokkan K-means biasanya digunakan
The Stepping Stone To International Journey www.ti.pnp.ac.id
Feature Vector
1.Vektor fitur berdasarkan warna
2. Vektor fitur berdasarkan warna dan lokasi
The Stepping Stone To International Journey www.ti.pnp.ac.id
K-Mean Clustering Result
Di kasus ini K-means (K=2) secara otomatis menemukan
threshold yang bagus (anatar 2 klister)
The Stepping Stone To International Journey www.ti.pnp.ac.id
K-Means Clustering Result
The Stepping Stone To International Journey www.ti.pnp.ac.id
K-Means Clustering Result
The Stepping Stone To International Journey www.ti.pnp.ac.id
Feature-based Method
• Disebut deteksi
• Gunakan fitur objek yang ingin dibatasi
- Latih objek sampel terlebih dulu menggunakan metode
machine learning tertentu
• Gunakan jendela geser (sliding window) untuk menemukan
objek serupa yang mungkin ada di citra
- Ukuran objek tetap
- Secara komputasi mahal
The Stepping Stone To International Journey www.ti.pnp.ac.id
Segmentation by Detection
• Sliding windows: “geser” kotak di sekitar citra dan klasifikasikan
setiap potongan citra di dalam kotak apakah berisi objek yang
penting atau tidak.
• Contoh kasus
- Human detector
• Pertama kita kumpulkan sampel dua kelas
• Ekstraksi fitur dari dataset dan pelajari mereka menggunakan
machine learning
The Stepping Stone To International Journey www.ti.pnp.ac.id
Human Detection
Kita ingin menemukan/membatasi semua manusia di citra
The Stepping Stone To International Journey www.ti.pnp.ac.id
Human Detection
• Sliding window:
- periksa setiap
jendela dengan
ukuran tetap dalam
skala yang berbeda,
- ekstrak fitur di
jendela,
- mengklasifikasikan
jendela,
- Pasca-pengolahan
The Stepping Stone To International Journey www.ti.pnp.ac.id
Human Detection
• Sliding window:
- periksa setiap
jendela dengan
ukuran tetap dalam
skala yang berbeda,
- ekstrak fitur di
jendela,
- mengklasifikasikan
jendela,
- Pasca-pengolahan
The Stepping Stone To International Journey www.ti.pnp.ac.id
Human Detection
• Sliding window:
- periksa setiap
jendela dengan
ukuran tetap dalam
skala yang berbeda,
- ekstrak fitur di
jendela,
- mengklasifikasikan
jendela,
- Pasca-pengolahan
The Stepping Stone To International Journey www.ti.pnp.ac.id
Human Detection
• Sliding window:
- periksa setiap
jendela dengan
ukuran tetap dalam
skala yang berbeda,
- ekstrak fitur di
jendela,
- mengklasifikasikan
jendela,
- Pasca-pengolahan
The Stepping Stone To International Journey www.ti.pnp.ac.id
Detection Evaluation
• Deteksi adalah benar jika titik potong (intersection) kotak
pembatas, dibagi dengan union (gabungan) kedua kotak
tersebut lebih dari 50%
𝑎0 =
𝑎𝑟𝑒𝑎 𝐵𝑝 ∩ 𝐵𝑔𝑡
𝑎𝑟𝑒𝑎 𝐵𝑝 ∪ 𝐵𝑔𝑡
The Stepping Stone To International Journey www.ti.pnp.ac.id
Post-Test (Quiz)
1.Kenapa kita harus pre-processing data? [20 poin]
2. Jelaskan bagaimana memperbaiki kualitas dataset citra? [15
poin]
3. Jelaskan bagaimana meningkatkan kuantitas dataset citra? [15
poin]
4. Apakah tujuan dari segementasi? [15 poin]
5. Jelaskan tiga strategi dari segmentasi/deteksi citra? [30 poin]

More Related Content

Recently uploaded

283649986-MATERI-RISIKO-DAN-TK-PENGEMBALIAN-ppt.ppt
283649986-MATERI-RISIKO-DAN-TK-PENGEMBALIAN-ppt.ppt283649986-MATERI-RISIKO-DAN-TK-PENGEMBALIAN-ppt.ppt
283649986-MATERI-RISIKO-DAN-TK-PENGEMBALIAN-ppt.pptmumtaza6
 
Jual Obat Cytotec Di Palembang 0823.2222.3014 Pusat Pelancar Haid Ampuh Berga...
Jual Obat Cytotec Di Palembang 0823.2222.3014 Pusat Pelancar Haid Ampuh Berga...Jual Obat Cytotec Di Palembang 0823.2222.3014 Pusat Pelancar Haid Ampuh Berga...
Jual Obat Cytotec Di Palembang 0823.2222.3014 Pusat Pelancar Haid Ampuh Berga...ssupi412
 
Jual Cytotec Di Sinjai Ori 👙082122229359👙Pusat Peluntur Kandungan Konsultasi
Jual Cytotec Di Sinjai Ori 👙082122229359👙Pusat Peluntur Kandungan KonsultasiJual Cytotec Di Sinjai Ori 👙082122229359👙Pusat Peluntur Kandungan Konsultasi
Jual Cytotec Di Sinjai Ori 👙082122229359👙Pusat Peluntur Kandungan Konsultasissupi412
 
5e6a9e119c2fedec04b90d50fcb7700901916.pdf
5e6a9e119c2fedec04b90d50fcb7700901916.pdf5e6a9e119c2fedec04b90d50fcb7700901916.pdf
5e6a9e119c2fedec04b90d50fcb7700901916.pdfFendryGustianVandell
 
Jual Cytotec Di Sumba Ori 👙082122229359👙Pusat Peluntur Kandungan Konsultasi
Jual Cytotec Di Sumba Ori 👙082122229359👙Pusat Peluntur Kandungan KonsultasiJual Cytotec Di Sumba Ori 👙082122229359👙Pusat Peluntur Kandungan Konsultasi
Jual Cytotec Di Sumba Ori 👙082122229359👙Pusat Peluntur Kandungan Konsultasissupi412
 
PPT usaha Air Minum masak untuk jualan- Umum fix.pptx
PPT usaha Air Minum masak untuk jualan- Umum fix.pptxPPT usaha Air Minum masak untuk jualan- Umum fix.pptx
PPT usaha Air Minum masak untuk jualan- Umum fix.pptxfirbadian97
 
WA 0821-2636-0569, Sekolah Pra Nikah Janda Duda Di Semarang
WA 0821-2636-0569, Sekolah Pra Nikah Janda Duda Di SemarangWA 0821-2636-0569, Sekolah Pra Nikah Janda Duda Di Semarang
WA 0821-2636-0569, Sekolah Pra Nikah Janda Duda Di SemarangKelas Online Pra Nikah Nikah
 
Jual Cytotec Blora 👗082322223014👗Pusat Peluntur Kandungan Konsultasi
Jual Cytotec Blora 👗082322223014👗Pusat Peluntur Kandungan KonsultasiJual Cytotec Blora 👗082322223014👗Pusat Peluntur Kandungan Konsultasi
Jual Cytotec Blora 👗082322223014👗Pusat Peluntur Kandungan Konsultasissupi412
 
Persyaratan Adminduk - Disdukcapil Kab. Kebumen
Persyaratan Adminduk - Disdukcapil Kab. KebumenPersyaratan Adminduk - Disdukcapil Kab. Kebumen
Persyaratan Adminduk - Disdukcapil Kab. KebumenPemdes Wonoyoso
 

Recently uploaded (11)

283649986-MATERI-RISIKO-DAN-TK-PENGEMBALIAN-ppt.ppt
283649986-MATERI-RISIKO-DAN-TK-PENGEMBALIAN-ppt.ppt283649986-MATERI-RISIKO-DAN-TK-PENGEMBALIAN-ppt.ppt
283649986-MATERI-RISIKO-DAN-TK-PENGEMBALIAN-ppt.ppt
 
Jual Obat Cytotec Di Palembang 0823.2222.3014 Pusat Pelancar Haid Ampuh Berga...
Jual Obat Cytotec Di Palembang 0823.2222.3014 Pusat Pelancar Haid Ampuh Berga...Jual Obat Cytotec Di Palembang 0823.2222.3014 Pusat Pelancar Haid Ampuh Berga...
Jual Obat Cytotec Di Palembang 0823.2222.3014 Pusat Pelancar Haid Ampuh Berga...
 
Jual Cytotec Di Sinjai Ori 👙082122229359👙Pusat Peluntur Kandungan Konsultasi
Jual Cytotec Di Sinjai Ori 👙082122229359👙Pusat Peluntur Kandungan KonsultasiJual Cytotec Di Sinjai Ori 👙082122229359👙Pusat Peluntur Kandungan Konsultasi
Jual Cytotec Di Sinjai Ori 👙082122229359👙Pusat Peluntur Kandungan Konsultasi
 
5e6a9e119c2fedec04b90d50fcb7700901916.pdf
5e6a9e119c2fedec04b90d50fcb7700901916.pdf5e6a9e119c2fedec04b90d50fcb7700901916.pdf
5e6a9e119c2fedec04b90d50fcb7700901916.pdf
 
Jual Cytotec Di Sumba Ori 👙082122229359👙Pusat Peluntur Kandungan Konsultasi
Jual Cytotec Di Sumba Ori 👙082122229359👙Pusat Peluntur Kandungan KonsultasiJual Cytotec Di Sumba Ori 👙082122229359👙Pusat Peluntur Kandungan Konsultasi
Jual Cytotec Di Sumba Ori 👙082122229359👙Pusat Peluntur Kandungan Konsultasi
 
PPT usaha Air Minum masak untuk jualan- Umum fix.pptx
PPT usaha Air Minum masak untuk jualan- Umum fix.pptxPPT usaha Air Minum masak untuk jualan- Umum fix.pptx
PPT usaha Air Minum masak untuk jualan- Umum fix.pptx
 
WA 0821-2636-0569, Sekolah Pra Nikah Janda Duda Di Semarang
WA 0821-2636-0569, Sekolah Pra Nikah Janda Duda Di SemarangWA 0821-2636-0569, Sekolah Pra Nikah Janda Duda Di Semarang
WA 0821-2636-0569, Sekolah Pra Nikah Janda Duda Di Semarang
 
Obat Aborsi Bandung ( Ampuh ) 082223109953 Jual Cytotec Asli Obat Telat Bulan...
Obat Aborsi Bandung ( Ampuh ) 082223109953 Jual Cytotec Asli Obat Telat Bulan...Obat Aborsi Bandung ( Ampuh ) 082223109953 Jual Cytotec Asli Obat Telat Bulan...
Obat Aborsi Bandung ( Ampuh ) 082223109953 Jual Cytotec Asli Obat Telat Bulan...
 
Jual Cytotec Blora 👗082322223014👗Pusat Peluntur Kandungan Konsultasi
Jual Cytotec Blora 👗082322223014👗Pusat Peluntur Kandungan KonsultasiJual Cytotec Blora 👗082322223014👗Pusat Peluntur Kandungan Konsultasi
Jual Cytotec Blora 👗082322223014👗Pusat Peluntur Kandungan Konsultasi
 
Persyaratan Adminduk - Disdukcapil Kab. Kebumen
Persyaratan Adminduk - Disdukcapil Kab. KebumenPersyaratan Adminduk - Disdukcapil Kab. Kebumen
Persyaratan Adminduk - Disdukcapil Kab. Kebumen
 
Obat Aborsi Medan 082223109953 Klinik Jual Obat Aborsi Di Medan
Obat Aborsi Medan 082223109953 Klinik Jual Obat Aborsi Di MedanObat Aborsi Medan 082223109953 Klinik Jual Obat Aborsi Di Medan
Obat Aborsi Medan 082223109953 Klinik Jual Obat Aborsi Di Medan
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Topik 04 - Image Enhancement (Filtering).pptx

  • 1. The Stepping Stone To International Journey www.ti.pnp.ac.id TEKNOLOGI INFORMASI POLITEKNIK NEGERI PADANG Enhancement Based on Filtering AINIL MARDIAH, M.Cs. Program Studi Teknologi Rekayasa Perangkat Lunak Jurusan Teknologi Informasi Politeknik Negeri Padang Email: ainilmardiah@pnp.ac.id
  • 2. The Stepping Stone To International Journey www.ti.pnp.ac.id Filtering • Domain Spasial - Langsung menerapkan pemfilteran ke domain spasial seperti tingkat intensitas dan lokasi • Domain Frekuensi - Ubah gambar menjadi domain frekuensi - Terapkan pemfilteran ke respons frekuensi
  • 3. The Stepping Stone To International Journey www.ti.pnp.ac.id Image Enhancement by Spatial Domain Filtering
  • 4. The Stepping Stone To International Journey www.ti.pnp.ac.id Image filtering Memodifikasi pixel di dalam sebuah citra berdasarkan beberapa fungsi lingkungan lokal (local neighborhood) dari setiap piksel 10 5 3 4 5 1 1 1 7 7 Local image data Modified image data Some function
  • 5. The Stepping Stone To International Journey www.ti.pnp.ac.id Spatial Filtering • Satu versi sederhana: linear filtering (convolution) - Ganti setiap pixel dengan kombinasi linear dari masing-masing neighbor • Resolusi untuk kombinasi linear disebut “kernel” (atau “mask”, “filter”) 10 5 3 4 5 1 1 1 7 8 Local image data Modified image data 0 0 0 0 0.5 0 0 1 0.5 kernel
  • 6. The Stepping Stone To International Journey www.ti.pnp.ac.id Spatial Filtering w(-1,-1) w(-1,0) w(-1,1) w(0,-1) w(0,0) w(0,1) w(1,-1) w(1,0) w(1,1) Mask coefficients menunjukkan susunan koordinat
  • 7. The Stepping Stone To International Journey www.ti.pnp.ac.id Convolution Jika F adalah citra, H adalah kernel (dengan ukuran 2k+1 x 2k+1), dan G adalah citra output 𝐺 𝑖, 𝑗 = 𝑢=−𝑘 𝑘 𝑣=−𝑘 𝑘 𝐻 𝑢, 𝑣 𝐹 𝑖 − 𝑢, 𝑗 − 𝑣 Ini disebut operasi konvulusi (convolution): G = H * F
  • 8. The Stepping Stone To International Journey www.ti.pnp.ac.id Convolution 1 -1 -1 1 2 -1 1 1 1 Convolution kernel, 𝝎 1 1 1 -1 2 1 -1 -1 1 2 2 2 3 2 1 3 3 2 2 1 2 1 3 2 2 Input Image, f
  • 9. The Stepping Stone To International Journey www.ti.pnp.ac.id Convolution 1 1 1 -1 2 1 -1 -1 1 2 2 2 3 2 1 3 3 2 2 1 2 1 3 2 2 1 1 1 -1 2 1 -1 -1 1 4 2 2 3 -2 1 3 3 2 2 1 2 1 3 2 2 5 Input Image, f Output Image, g
  • 10. The Stepping Stone To International Journey www.ti.pnp.ac.id Convolution 1 1 1 -1 2 1 -1 -1 1 2 2 2 3 2 1 3 3 2 2 1 2 1 3 2 2 1 1 1 -1 2 1 -1 -1 1 -2 4 2 3 -2 -1 3 3 2 2 1 2 1 3 2 2 5 4 Input Image, f Output Image, g
  • 11. The Stepping Stone To International Journey www.ti.pnp.ac.id Convolution 1 1 1 -1 2 1 -1 -1 1 2 2 2 3 2 1 3 3 2 2 1 2 1 3 2 2 1 1 1 -1 2 1 -1 -1 1 2 -2 4 3 2 -1 -3 3 2 2 1 2 1 3 2 2 5 4 4 Input Image, f Output Image, g
  • 12. The Stepping Stone To International Journey www.ti.pnp.ac.id Convolution 1 1 1 -1 2 1 -1 -1 1 2 2 2 3 2 1 3 3 2 2 1 2 1 3 2 2 1 1 1 -1 2 1 -1 -1 1 2 2 -2 6 2 1 -3 -3 2 2 1 2 1 3 2 2 5 4 4 -2 Input Image, f Output Image, g
  • 13. The Stepping Stone To International Journey www.ti.pnp.ac.id Convolution 1 1 1 -1 2 1 -1 -1 1 2 2 2 3 2 1 3 3 2 2 1 2 1 3 2 2 1 1 1 -1 2 1 -1 -1 1 2 2 2 3 4 1 3 3 -2 2 1 2 1 3 2 2 5 4 4 -2 9 Input Image, f Output Image, g
  • 14. The Stepping Stone To International Journey www.ti.pnp.ac.id Convolution 1 1 1 -1 2 1 -1 -1 1 2 2 2 3 2 1 3 3 2 2 1 2 1 3 2 2 1 1 1 -1 2 1 -1 -1 1 2 2 2 3 -2 2 3 3 -2 -2 1 2 1 3 2 2 5 4 4 -2 9 6 Input Image, f Output Image, g
  • 15. The Stepping Stone To International Journey www.ti.pnp.ac.id 5 4 4 -2 9 6 14 5 11 7 6 5 9 12 8 5 Final output Image, g Convolution
  • 16. The Stepping Stone To International Journey www.ti.pnp.ac.id Linear filters: examples Original Identical image
  • 17. The Stepping Stone To International Journey www.ti.pnp.ac.id Linear filters: examples Original Shifted left By 1 pixel
  • 18. The Stepping Stone To International Journey www.ti.pnp.ac.id Linear filters: examples Original 1 1 1 1 1 1 1 1 1 Blur (with a mean filter) * =
  • 19. The Stepping Stone To International Journey www.ti.pnp.ac.id Linear filters: examples Original 1 1 1 1 1 1 1 1 1 0 0 0 0 2 0 0 0 0 - Sharpening filter (accentuates edges) = *
  • 20. The Stepping Stone To International Journey www.ti.pnp.ac.id Smoothing Linear Filters 𝑔 𝑚, 𝑛 = 𝑖=−𝐼 𝐼 𝑗=−𝐽 𝐽 𝑤 𝑖, 𝑗 𝑓(𝑚 − 𝑖, 𝑛 − 𝑗) 𝑖=−𝐼 𝐼 𝑗=−𝐽 𝐽 𝑤(𝑖, 𝑗) Normalization of coefficient to ensure 0 ≤ g(m,n) ≤ L-1
  • 21. The Stepping Stone To International Journey www.ti.pnp.ac.id Smoothing Linear Filters original blurred thresholded
  • 22. The Stepping Stone To International Journey www.ti.pnp.ac.id Gaussian Kernel
  • 23. The Stepping Stone To International Journey www.ti.pnp.ac.id Gaussian filters = 30 pixels = 1 pixel = 5 pixels = 10 pixels
  • 24. The Stepping Stone To International Journey www.ti.pnp.ac.id Gaussian filter • Hapus komponen “high-frequency” dari citra (low-pass filter)
  • 25. The Stepping Stone To International Journey www.ti.pnp.ac.id Otsu Method
  • 26. The Stepping Stone To International Journey www.ti.pnp.ac.id Otsu Method W𝑒𝑖𝑔ℎ𝑡 𝑊𝑏 = 8+7+2 36 = 0.4722 Mean 𝜇𝑏 = (0×8)+(1×7)+(2×2) 17 = 0.6471 Variance 𝜎𝑏 2 = 0−0.6471 2×8 + 1−0.6471 2×7 + 2−0.6471 2×2 17 = 0.4187×8 + 0.1246×7 + 1.8304×2 17 = 0.4637 W𝑒𝑖𝑔ℎ𝑡 𝑊𝑓 = 6+9+4 36 = 0.5278 Mean 𝜇𝑓 = (3×6)+(4×9)+(5×4) 19 = 3.8947 Variance 𝜎𝑓 2 = 3−3.8947 2×6 + 4−3.8947 2×9 + 5−3.8947 2×4 19 = 4.8033××6 + 0.0997×9 + 4.8864×4 19 = 0.5152 Within Class Variance 𝜎𝑊 2 = 𝑊𝑏𝜎𝑏 2 + 𝑊𝑓𝜎𝑓 2 = 0.4722 × 0.4637 + 0.5278 × 0.5152 = 0.4909
  • 27. The Stepping Stone To International Journey www.ti.pnp.ac.id Otsu Method
  • 28. The Stepping Stone To International Journey www.ti.pnp.ac.id Otsu Method
  • 29. The Stepping Stone To International Journey www.ti.pnp.ac.id Thresholding By Probability • Berguna untuk mendeteksi objek dengan warna tertentu seperti api, asap, banjir, dll - Kumpulkan citra dengan warna tertentu - Hitung rata-rata dan variance untuk setiap pixel channel - Hitung probabilitas pixel baru menggunakan probabilitas gaussian dengan melatih (training) rata-rata dan standar deviasi
  • 30. The Stepping Stone To International Journey www.ti.pnp.ac.id Thresholding By Probability • Case: deteksi asap - Hitung rata-rata dan variance dari data training
  • 31. The Stepping Stone To International Journey www.ti.pnp.ac.id PDF Function of Smoke
  • 32. The Stepping Stone To International Journey www.ti.pnp.ac.id Smoke Detection Results
  • 33. The Stepping Stone To International Journey www.ti.pnp.ac.id Connected Component Labeling
  • 34. The Stepping Stone To International Journey www.ti.pnp.ac.id Region-based Segmentation • Daerah berkembang - Mulai dari titik benih dan periksa titik lingkungan. • Watershed / Flood Fill - Terinspirasi dari cara mengisi air • Segmentasi sebagai pengelompokan - Nilai intensitas ditetapkan sebagai data untuk dikelompokkan
  • 35. The Stepping Stone To International Journey www.ti.pnp.ac.id Region Growing • Dimulai dengan kumpulan piksel awal K (initial seed(s)) • Tambahkan ke pixel p di K yang berdekatan dengan q jika 𝐼𝑝 − 𝐼𝑞 < 𝑇 • Ulangi hingga tidak ada perubahan
  • 36. The Stepping Stone To International Journey www.ti.pnp.ac.id Watersheds Segmentation • Bayangkan citra gray level sebagai bidang (landscape) • Setitik air yang jatuh di titik mana pun akan mengalir ke tempat terendah di landscape • Untuk tempat terendah di landscape, terdapat sekumpulan titik, yang disebut cekungan atau lembah yang menampung air, di mana setitik air akan mengalir ke titik minimum tertentu • Batasan antar cekungan yang berdekatan membentuk batas air (watershed)
  • 37. The Stepping Stone To International Journey www.ti.pnp.ac.id Watershed Sample
  • 38. The Stepping Stone To International Journey www.ti.pnp.ac.id Segmentation as Clustering • Menampilkan pixel citra sebagai vector fitur • Contohnya, setiap pixel bisa ditampilkan sebagai - intensitas, memberikan vektor fitur 1 dimensi - Warna, memberikan vektor fitur 3 dimensi - Warna + koordinat, memberikan vektor fitur 5 dimensi • Kelompokkan mereka menjadi kelompok k, contoh segmen k - Pengelompokkan K-means biasanya digunakan
  • 39. The Stepping Stone To International Journey www.ti.pnp.ac.id Feature Vector 1.Vektor fitur berdasarkan warna 2. Vektor fitur berdasarkan warna dan lokasi
  • 40. The Stepping Stone To International Journey www.ti.pnp.ac.id K-Mean Clustering Result Di kasus ini K-means (K=2) secara otomatis menemukan threshold yang bagus (anatar 2 klister)
  • 41. The Stepping Stone To International Journey www.ti.pnp.ac.id K-Means Clustering Result
  • 42. The Stepping Stone To International Journey www.ti.pnp.ac.id K-Means Clustering Result
  • 43. The Stepping Stone To International Journey www.ti.pnp.ac.id Feature-based Method • Disebut deteksi • Gunakan fitur objek yang ingin dibatasi - Latih objek sampel terlebih dulu menggunakan metode machine learning tertentu • Gunakan jendela geser (sliding window) untuk menemukan objek serupa yang mungkin ada di citra - Ukuran objek tetap - Secara komputasi mahal
  • 44. The Stepping Stone To International Journey www.ti.pnp.ac.id Segmentation by Detection • Sliding windows: “geser” kotak di sekitar citra dan klasifikasikan setiap potongan citra di dalam kotak apakah berisi objek yang penting atau tidak. • Contoh kasus - Human detector • Pertama kita kumpulkan sampel dua kelas • Ekstraksi fitur dari dataset dan pelajari mereka menggunakan machine learning
  • 45. The Stepping Stone To International Journey www.ti.pnp.ac.id Human Detection Kita ingin menemukan/membatasi semua manusia di citra
  • 46. The Stepping Stone To International Journey www.ti.pnp.ac.id Human Detection • Sliding window: - periksa setiap jendela dengan ukuran tetap dalam skala yang berbeda, - ekstrak fitur di jendela, - mengklasifikasikan jendela, - Pasca-pengolahan
  • 47. The Stepping Stone To International Journey www.ti.pnp.ac.id Human Detection • Sliding window: - periksa setiap jendela dengan ukuran tetap dalam skala yang berbeda, - ekstrak fitur di jendela, - mengklasifikasikan jendela, - Pasca-pengolahan
  • 48. The Stepping Stone To International Journey www.ti.pnp.ac.id Human Detection • Sliding window: - periksa setiap jendela dengan ukuran tetap dalam skala yang berbeda, - ekstrak fitur di jendela, - mengklasifikasikan jendela, - Pasca-pengolahan
  • 49. The Stepping Stone To International Journey www.ti.pnp.ac.id Human Detection • Sliding window: - periksa setiap jendela dengan ukuran tetap dalam skala yang berbeda, - ekstrak fitur di jendela, - mengklasifikasikan jendela, - Pasca-pengolahan
  • 50. The Stepping Stone To International Journey www.ti.pnp.ac.id Detection Evaluation • Deteksi adalah benar jika titik potong (intersection) kotak pembatas, dibagi dengan union (gabungan) kedua kotak tersebut lebih dari 50% 𝑎0 = 𝑎𝑟𝑒𝑎 𝐵𝑝 ∩ 𝐵𝑔𝑡 𝑎𝑟𝑒𝑎 𝐵𝑝 ∪ 𝐵𝑔𝑡
  • 51. The Stepping Stone To International Journey www.ti.pnp.ac.id Post-Test (Quiz) 1.Kenapa kita harus pre-processing data? [20 poin] 2. Jelaskan bagaimana memperbaiki kualitas dataset citra? [15 poin] 3. Jelaskan bagaimana meningkatkan kuantitas dataset citra? [15 poin] 4. Apakah tujuan dari segementasi? [15 poin] 5. Jelaskan tiga strategi dari segmentasi/deteksi citra? [30 poin]