Saturday, 17 August 2013

Command loop for processing on a directory of images

Command loop for processing on a directory of images

I have a program called GPU Debayer that converts images using this
command-line code:
DebayerGPU.exe -demosaic DFPD_R -CPU -pattern GRBG -i inputpic.pgm -o
outputpic.ppm
I was previously dealing with folders of images whose file names were the
same except the ends were numbered 0-39. As such, I was debayering the
folders like this in cmd prompt.
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
Now, I need to deal with one folder holding many sets of these images now
labled filename0000 - filename0039 But, there are, like I said, a few of
these. I.e., 120 images, 40 with the names "filename0000 - filename0039" ,
40 named "filename25_0000 - filename25_0039" and 40 named "filename37_0000
- filename37_0039".
Is there any sort of way or loop to debayer ALL of these images with one
script? I have imagemagick on my machine. And if anyone is familiar with
the GPU Debayer, this is the tool i'm using. It seems to have some sort of
repeat function
maybe?http://www.fastcompression.com/products/debayer/debayer.htm
Thanks for any ideas!!

No comments:

Post a Comment