Help on loop to read images from a folder

I have 1180 images which are stored in a folder and I want to work on them. I have been using manual method to copy and paste the folder link. Can someone help to a Matlab loop codes to read the images. See the code I used, which are correct but I need to automatically read all the images. I am new in Matlab environment.
close all
subplot(2,2,1)
A = imread('D:\Images\Processed_image_slice01.tif');
imagesc(A)
subplot(2,2,2)
B = imread('D:\Images\Compared_images_image_slice01.tif');
imagesc(B)
subplot(2,2,3)
C = B;
C(find(A < 30)) = 0;
imagesc(C)
mean(mean(C(find(C ~= 0))))
subplot(2,2,4)
C = B;
C(find(A > 30)) = 0;
imagesc(C)
mean(mean(C(find(C ~= 0))))

 채택된 답변

dpb
dpb 2014년 6월 11일

1 개 추천

See the FAQ...
I recommend the dir solution almost universally...

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Convert Image Type에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

질문:

Ima
2014년 6월 11일

답변:

dpb
2014년 6월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by