
Cargar todas las imágenes de un directorio
Publicado por Tomas (5 intervenciones) el 07/03/2017 20:13:39
Hola a todos.
Necesitó ayuda para modificar el siguiente código de tal forma de que en ves de trabajar con una única imagen, este lo haga con todas las contenidas en un directorio.
Si alguien me pudiese ayudar le agradecería muchísimo.
El código:
Necesitó ayuda para modificar el siguiente código de tal forma de que en ves de trabajar con una única imagen, este lo haga con todas las contenidas en un directorio.
Si alguien me pudiese ayudar le agradecería muchísimo.
El código:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
%% read the input image
close all,clear all;
I=im2double(imread('ImageData\bird\input2.jpg'));
%% get edge map
% Canny edge detector is used here. Other edge detectors can also be used
eth=0.1; % thershold for canny edge detector
edgeMap=edge(rgb2gray(I),'canny',eth,1);
%% estimate the defocus map
std=1;
lambda=0.001;
maxBlur=3;
tic; % about 1 mins for a 800x600 image
[sDMap, fDmap] = defocusEstimation(I,edgeMap,std,lambda,maxBlur);
toc;
imshow(fDmap,[0 maxBlur]);
Valora esta pregunta


0