reading multiple images from a folder?

조회 수: 1 (최근 30일)
Nisreen Sulayman
Nisreen Sulayman 2015년 6월 16일
댓글: Walter Roberson 2015년 6월 24일
I have about 88 image of 10 patients, number of images for each patient is not equal. I want to read images for each patient from 2 different folders and do some operations then save the results in third folder. How to do this process in a loop? and how to save the results with respect to images' names (Ex: image1: Adel_No_Post1.bmp, image2: Adel_No_Frangi1 ...
how to save the result, result_image: Adel_No_Filtered1)
%folder path E:\Aneurysms_CBIR\Aneu_Post_Contrast
Post_Im=imread('E:\Aneurysms_CBIR\Aneu_Post_Contrast\Adel_No_Post1.bmp');
% folder path E:\Aneurysms_CBIR\Aneu_Frangi_Images
Frangi_Im=imread('E:\Aneurysms_CBIR\Aneu_Frangi_Images\Adel_No_Frangi1.bmp');
% do some operations
h = fspecial('gaussian', [3 3], 0.5);
imf=imfilter(Frangi_Im, h);
imsub=Post_Im-imf;
%save result with name " Adel_No_Filtered1" to a new folder, path:E:\Aneurysms_CBIR\Aneu_Filtered
imwrite(imsub, ['E:\Aneurysms_CBIR\Aneu_Filtered\ Adel_No_Filtered1' '.bmp'], 'bmp');

채택된 답변

Walter Roberson
Walter Roberson 2015년 6월 17일
One thing you did not define for us is how to match file names to individual patients. Or does it not matter, that each number before the .bmp in on directory corresponds to one file in the second directory that has the same number and you just need to pair them?
  댓글 수: 13
Nisreen Sulayman
Nisreen Sulayman 2015년 6월 24일
where is the variable {i} in the input statement?
Walter Roberson
Walter Roberson 2015년 6월 24일
Area{i} = [Props{i}.Area];

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by