Last active
December 7, 2015 17:37
-
-
Save MinhasKamal/b9d1dcee8d4866c97a0d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
folderName = 'D:\Images\IMAGES_FOR_PROCESSING\lfwcrop_grey\faces'; | |
imagefiles = dir(strcat(folderName, '\*.pgm')); | |
nfiles = length(imagefiles); | |
for i=1:nfiles | |
currentfilename=imagefiles(i).name; | |
I = imread(strcat(folderName, '\', currentfilename)); | |
[pathstr,name,ext] = fileparts(currentfilename); | |
currentfilename = name; | |
imwrite(I, strcat(folderName, '\', currentfilename , '.png')); | |
fprintf('%d image processed \n', i); | |
end | |
fprintf('\n\n## operation successful!!'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment