I have an image debayering program that I run through command prompt. It can debayer individual images with this command:
DebayerGPU.exe -demosaic DFPD_R -GPU -pattern GRBG -i inputfilename.pgm -o outputfilename.ppm
I'm trying to get it to run on an entire directory of .pgm files, and I discovered the forfiles command.
I've been trying something like:
forfiles /M *.pgm /C "DebayerGPU.exe -demosaic DFPD_R -GPU -pattern GRBG -i @fname.pgm -o @fname.ppm
"
but the debayering program just returns its help window when I run that. I have success looping the debayer program if the files are named the same with increasing numbers, then I can use this for loop:
for %a in (0 1 2 3 4 5 6 7 8 9 10 11 1
2 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
39) do DebayerGPU.exe -demosaic DFPD_R -CPU -pattern GRBG -i single%a.pgm -o si
ngle%a.ppm
and that works, but as of now, forfiles doesn't. I suspect it has something to do with the program not accepting the @fname from forfiles. Any thoughts for how to get around this?
Thanks!