1 / 11

Combining Multiple Images with Different Focus Depths

Combining Multiple Images with Different Focus Depths. Presented by Steven Scher sscher@ucsc.edu UCSC, CS 290b, Fall 2005. Two Images of the same scene focused at different depths. Focused Near Focused Far. Photos from Haeberli’s website.

kerem
Télécharger la présentation

Combining Multiple Images with Different Focus Depths

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Combining Multiple Imageswith Different Focus Depths Presented by Steven Scher sscher@ucsc.edu UCSC, CS 290b, Fall 2005

  2. Two Images of the same scenefocused at different depths Focused Near Focused Far Photos from Haeberli’s website

  3. Divide Image into High-Frequency & Low-Frequency Components Low-Frequency (Blurry) High-Frequency (Edges) Photos from Haeberli’s website

  4. Quick Way:Blur Each Image for Low FrequenciesSubtract Low From Original for High Freq’s Original Low blur Original Low High Photos from Haeberli’s website

  5. Finding Focus • For Each Pixel in the Final Image • Compare the magnitude of each High-Frequency Component • Take the original pixel value from the image whose High-Frequency Component was higher Photos from Haeberli’s website

  6. Finding Focus Image 1 Image 2 Combination Photos from Haeberli’s website

  7. Advantage of Simple Algorithm:Short Code (Matlab) • img_names = {‘near’,’far’}; • filt = fspecial('gaussian',20,1); % Make blurring filter • for i = 1:length(img_names) • img_rgb{i} = imread(img_names{i}); % Read Images • img_gray{i} = rgb2gray(img_rgb{i}); % Make Gray • img_blurred = imfilter(img_gray{i}, filt); % Blur • img_edges(:,:,i)= abs(double(img_gray{i}) - double(img_blurred)); • end • [temp, index] = max(img_edges,[],3); % Find biggest high-freq mag • best_gray = img_gray{1}; % Combine • for i = 2:length(img_gray) • best_gray(index==i) = img_gray{i}(index==i); • end (My own code)

  8. Example from Matlab Code Focused Near Focused Far (My own photos)

  9. Combined Photo keeps some detail at both focus depths Focused Far Focused Near Combined (My own photos)

  10. Papers to Look at • A Multifocus Method for Controlling Depth of Field • Paul Haeberli • http://www.sgi.com/misc/grafica/depth/index.html • Based on a previous paper • “Pyramid-based computer graphics” • Ogden, Adelson, Berger, & Burt • http://citeseer.csail.mit.edu/adelson84pyramid.html • Also discuss interpolation/extrapolation, mosaicing,

  11. Faces (old pictures) Paul Haeberli Edward Adelson Peter Burt James Bergen Joan Ogden

More Related