I have a set of images (> 500) and I want to convert them to .PGM format.
Is there some way to do it from a .m file?
Best regards!
UPDATE 06/09/2016
I found the following link, where IRFANVIEW commands to appear, but I have no experience running external commands from matlab. I used the following script:
dir_irfanview=('C:\Program Files (x86)\IrfanView\i_view32.exe');
cmd ='filelist=c:\v\list.txt /convert= c:\vc\*.pgm';
cmd2 = [cmd,dir_irfanview];
system(cmd2);
and I get the following error:
"filelist" is not recognized as an internal or external command, program or batch file.
Note that I used the "i_view32.exe filelist=c:\v\list.txt /convert= c:\vc*.pgm" command in DOS and no problems.
some guidance?
As Jørgen suggested, you can use
system()to call irfanview to convert.Alternatively, you can use
imreadandimwritein a loop to do the job in a more "matlab"-ish way