Borrar filtros
Borrar filtros

How to process a folder of Images?

2 visualizaciones (últimos 30 días)
MJ Thangaraj
MJ Thangaraj el 29 de Mzo. de 2016
Respondida: Stephen23 el 29 de Mzo. de 2016
I have this code for a single image..now I have to apply this to a Folder of Images,How do I do it?
I=imread('two.jpg');
figure,imshow(I)
title('Original image')
%% Image adjust
Istrech = imadjust(I,stretchlim(I));
figure,imshow(Istrech)
title('Contrast stretched image')
%% Convert RGB image to gray
Igray_s = rgb2gray(Istrech);
figure,imshow(Igray_s,[])
title('RGB to gray (contrast stretched) ')
%% Image segmentation by thresholding
%use incremental value to run this selection till required threshold 'level' is
%achieved
level = 0.08;
Ithres = im2bw(Igray_h,level);
figure,imshow(Ithres)
title('Segmented cracks')
%% Image morphological operation
BW = bwmorph(gradmag,'clean',10);
figure,imshow(BW)
title('Cleaned image')
BW = bwmorph(gradmag,'thin', inf);
figure,imshow(BW)
title('Thinned image')

Respuesta aceptada

Stephen23
Stephen23 el 29 de Mzo. de 2016

Más respuestas (0)

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by