470 likes | 756 Views
PERBAIKAN CITRA. Introduction. Apa itu perbaikan citra ? Proses peningkatan kualitas visual dari citra karena proses pengambilan gambar yang tidak ideal. (Tidak fokus, gerakan blurring, illumminasi yang jelek, dll) Menilai kualitas visual citra. A Plague in Image Processing: Blur.
E N D
Introduction • Apa itu perbaikan citra? • Proses peningkatan kualitas visual dari citra karena proses pengambilan gambar yang tidak ideal. (Tidak fokus, gerakan blurring, illumminasi yang jelek, dll) • Menilai kualitas visual citra EE465: Introduction to Digital Image Processing
A Plague in Image Processing: Blur • Dari mana blur itu berasal? • Optical blur: kamera out-of-focus • Motion blur: Kamera bergerak • Mengapa perlu deblurring? • Mengganggu secara visual • Target yang salah untuk kompressi • Jelek untuk dianalisa • Numerous applications in astronomical imaging, biomedical imaging, biometrics ... EE465: Introduction to Digital Image Processing
Restoration Images EE465: Introduction to Digital Image Processing
Another Example EE465: Introduction to Digital Image Processing
The Real (Optical) Solution Before the repair After the repair EE465: Introduction to Digital Image Processing
Application (II): Medical Image Deblurring (Deconvolution) EE465: Introduction to Digital Image Processing
Application (III): Law Enforcement Motion-blurred license plate image EE465: Introduction to Digital Image Processing
Restoration Example EE465: Introduction to Digital Image Processing
A Grand Challenge in Iris Recognition out-of-focus iris image EE465: Introduction to Digital Image Processing
+ Modeling Blurring Process • Linear degradation model y(m,n) x(m,n) h(m,n) blurring filter additive white Gaussian noise EE465: Introduction to Digital Image Processing
Blurring SNR + The Curse of Noise z(m,n) y(m,n) x(m,n) h(m,n) EE465: Introduction to Digital Image Processing
Image Example BSNR=10dB x(m,n) BSNR=40dB h(m,n): 1D horizontal motion blurring [1 1 1 1 1 1 1]/7 EE465: Introduction to Digital Image Processing
Mengapa butuh metode non linier ? • Proses pemodelan degradasi citra dengan linear system muncul terutama karena dapat dinyatakan secara matematis • Tetapi ada fenomena dalam visualisasi dan pencitraan secara fisik sulit dijelaskan degna persamaan sederhana secara linier • Examples: relationship between illumination and luminance on a complex surface, quantization of intensity values, Gamma-correction in display devices EE465: Introduction to Digital Image Processing
Point Operations Overview Point operations are zero-memory operations where a given gray level x[0,L] is mapped to another gray level y[0,L] according to a transformation y L x L L=255: for grayscale images EE465: Introduction to Digital Image Processing
Lazy Man Operation y L x L No influence on visual quality at all EE465: Introduction to Digital Image Processing
Digital Negative L x 0 L EE465: Introduction to Digital Image Processing
Contrast Stretching yb ya x a b 0 L EE465: Introduction to Digital Image Processing
Clipping x a b 0 L EE465: Introduction to Digital Image Processing
Range Compression x 0 L c=100 EE465: Introduction to Digital Image Processing
Kesimpulan operasi titik • Pemetaan f(x) mengahasilkan hasil perbaikan yang berbeda beda • Bagaimana memilih fungsi f(x) yang sesuai untuk sembarang citra? • One systematic solution is based on the histogram information of an image • Histogram equalization and specification EE465: Introduction to Digital Image Processing
Histogram based Enhancement Histogram of an image represents the relative frequency of occurrence of various gray levels in the image MATLAB function >imhist(x) EE465: Introduction to Digital Image Processing
Why Histogram? It is a baby in the cradle! Histogram information reveals that image is under-exposed EE465: Introduction to Digital Image Processing
Another Example Over-exposed image EE465: Introduction to Digital Image Processing
How to Adjust the Image? Histogram equalization Basic idea: find a map f(x) such that the histogram of the modified (equalized) image is flat (uniform). Key motivation: cumulative probability function (cdf) of a random variable approximates a uniform distribution Suppose h(t) is the histogram (pdf) EE465: Introduction to Digital Image Processing
Histogram Equalization Uniform Quantization Note: y cumulative probability function L 1 x L 0 EE465: Introduction to Digital Image Processing
MATLAB Implementation function y=hist_eq(x) [M,N]=size(x); for i=1:256 h(i)=sum(sum(x= =i-1)); End y=x;s=sum(h); for i=1:256 I=find(x= =i-1); y(I)=sum(h(1:i))/s*255; end Calculate the histogram of the input image Perform histogram equalization EE465: Introduction to Digital Image Processing
Ic. Histogram Equalization • Histogram: diagram yang menunjukkan jumlah kemunculan grey level (0-255) pada suatu citra • Histogram processing: • Gambar gelap: histogram cenderung ke sebelah kiri • Gambar terang: histogram cenderung ke sebelah kanan • Gambar low contrast: histogram mengumpul di suatu tempat • Gambar high contrast: histogram merata di semua tempat Histogram processing: mengubah bentuk histogram agar pemetaan gray level pada citra juga berubah PERTEMUAN KE-6
Ic. Histogram Equalizationinall grey level and all area (1) • Ide: mengubah pemetaan greylevel agar sebarannya (kontrasnya) lebih menyebar pada kisaran 0-255 • Sifat: • Grey level yang sering muncul lebih dijarangkan jaraknya dengan grey level sebelumnya • Grey level yang jarang muncul bisa lebih dirapatkan jaraknya dengan grey level sebelumnya • Histogram baru pasti mencapai nilai maksimal keabuan (contoh: 255) PERTEMUAN KE-6
Ic. Histogram Equalizationinall grey level and all area (2) • mengubah pemetaan grey level pada citra, dengan rumus: PERTEMUAN KE-6
Ic. Histogram Equalizationinall grey level and all area (3) • Contoh : citra dengan derajat keabuan hanya berkisar 0-10 • Citra Akhir: 1 9 9 9 5 9 5 9 5 5 9 1 5 5 5 5 9 10 10 1 • Citra awal: 3 5 5 5 4 5 4 5 4 4 5 3 4 4 4 4 5 6 6 3 PERTEMUAN KE-6
Ic. Histogram Equalizationspecific grey level (hist. specification) • Histogram equalization tidak dilakukan pada seluruh bagian dari histrogram tapi hanya pada bagian tertentu saja PERTEMUAN KE-6
Image Example after before EE465: Introduction to Digital Image Processing
Histogram Comparison after equalization before equalization EE465: Introduction to Digital Image Processing
Application (I): Digital Photography EE465: Introduction to Digital Image Processing
Application (II): Iris Recognition after before EE465: Introduction to Digital Image Processing
Application (III): Microarray Techniques after before EE465: Introduction to Digital Image Processing
Frequency-Domain Techniques (I): Unsharp Masking g(m,n) is a high-pass filtered version of x(m,n) • Example (Laplacian operator) EE465: Introduction to Digital Image Processing
MATLAB Implementation % Implementation of Unsharp masking function y=unsharp_masking(x,lambda) % Laplacian operation h=[0 -1 0;-1 4 -1;0 -1 0]/4; dx=filter2(h,x); y=x+lambda*dx; EE465: Introduction to Digital Image Processing
1D Example xlp(n) x(n) g(n)=x(n)-xlp(n) EE465: Introduction to Digital Image Processing
2D Example MATLAB command >roidemo EE465: Introduction to Digital Image Processing
Frequency-Domain Techniques (II): Homomorphic filtering Basic idea: Illumination (low freq.) reflectance (high freq.) freq. domain enhancement EE465: Introduction to Digital Image Processing
Image Example after before EE465: Introduction to Digital Image Processing
Summary of Nonlinear Image Enhancement • Understand how image degradation occurs first • Play detective: look at histogram distribution, noise statistics, frequency-domain coefficients… • Model image degradation mathematically and try inverse-engineering • Visual quality is often the simplest way of evaluating the effectiveness, but it will be more desirable to measure the performance at a system level • Iris recognition: ROC curve of overall system • Microarray: ground-truth of microarray image segmentation result provided by biologists EE465: Introduction to Digital Image Processing