Batch processing and storing in individual files
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am processing image files in batches and would like to store the result in individual files. I am making use of batch processing file available in matlab. My code goes like this:
p = which('interphase 1.bmp');
filelist = dir([fileparts(p) filesep '*.bmp']);
fileNames = {filelist.name}'
fileNames =
'interphase 1.bmp'
'interphase 10.bmp'
'interphase 11.bmp'
'interphase 12.bmp'
'interphase 13.bmp'
'interphase 14.bmp'
'interphase 2.bmp'
'interphase 3.bmp'
'interphase 4.bmp'
'interphase 5.bmp'
'interphase 6.bmp'
'interphase 7.bmp'
'interphase 9.bmp'
I = imread(fileNames{1});
imshow(I)
filtering = medfilt2(I);
figure, imshow(filtering)
FilteringSequence = batchProcessFiles(fileNames,@medfilt2);
In the original matlab file, they have made use of implay to play the sequence of batch processed files where they have asked to modify the "parfor" loop inside the "batchProcessFiles" function for storing the data as individual files. I would like to store the results in individual files for further processing. Kindly help me with the modification code for the "parfor" loop so that i can store and process each filtered file individually. Thanks for your response in advance.
2 comentarios
Edric Ellis
el 10 de Sept. de 2012
Does the original code use a FOR loop that you're trying to convert to PARFOR? What happens if you try to convert it?
Respuestas (1)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!