Digital Photography with Flash and No-Flash Image Pairs Gabriela Martínez Processamento de Imagem IMPA
Red eyes Detection ● The idea here is to compute the "red" difference in both images and keep the extreme points. ● Here the challenge becomes which color space to use.
Red eyes Detection ● RGB - ineffective since RGB is correlated with luminosity ● HSV - ineffective because “redness” difference is split among S and V ● YCrCb - ok
Red eyes Detection ● First we segment the "chrominance" difference image using a low threshold. This gives a binary image of a few probable blobs that could be considered as red-eye. ● The next step is to only select the blobs which pass the high threshold. We obtain a rather robust classification.
Red eyes Detection ● CIE L*a*b - effective since “a” is a luminosity independent measure of red ● But if there is another surface that reflects red light in the image, we could have troubles.
Implementation ● Using Matlab's Image Processing Tool box. ● Calculate: R=F Cr -A Cr, where F is the flash image and A is the ambient image. ● Create detection mask ● Find seed pixels with command find and mark them with bwselect function.
Results
Denoising and Detail Transfer ● Reducing noise in photographic images, long- standing problem. ● Classical solution: Bilateral Filter proposed by Tomasi and Manduchi 1998.
Denoising and Detail Transfer ● Bilateral filter: average together pixels spatiually near and have similar intensity values. A p =(1/k(p))sum(g d (p'-p)g r (A p -A p' )A p' ) k(p)=sum(g d (p'-p)g r (Ap-Ap')) gd, gr are Gaussians with width controlled sig d ( geometric closeness), sig r (intensity range)
Denoising and Detail Transfer ● Joint Bilateral filter: Relies on the flash image as an estimator of the ambient image. A p =(1/k(p))sum(g d (p'-p)g r (F p -F p' )A p' ) k(p)=sum(g d (p'-p)g r (Fp-Fp')) gd, gr are Gaussians with width controlled sig d ( geometric closeness), sig r (intensity range)
Algorithm ● Bilateral Filter calcule: A_base, F_base ● Calcule: F_detail=(F+0.02)/(F_base+0.02) ● Joint Bilateral Filter calcule: A_nr ● Calcule shadow mask: diff(F,A) <t shadow ● Result: (1-M)A_nrF_detail+MA_base
Results
References ● PETSCHNIGG.,G., Digital Photography with Flash and No-Flash Image Pairs. ACM 2004 ● GONZALEZ.,R., Digital Image Processing using MATLAB. Editorial Prentice Hall. ● m ● Bilateral Filtering for Gray and Color Images. COPIES/MANDUCHI1/Bilateral_Filtering.html