필터 지우기
필터 지우기

How to process a folder of Images?

조회 수: 2 (최근 30일)
MJ Thangaraj
MJ Thangaraj 2016년 3월 29일
답변: Stephen23 2016년 3월 29일
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')

채택된 답변

Stephen23
Stephen23 2016년 3월 29일

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by