Author Topic: Batch processing *pairs* of files  (Read 1049 times)

Offline jegsav

  • Newcomer
  • Posts: 9
    • View Profile
Batch processing *pairs* of files
« on: 2015 February 13 13:40:43 »
I have 26,674 files containing one type of image (label them A1,A2,A3... A26674) in directory A which pair with  26,674 files containing corresponding images of another type (label them B1, B2, B3... B26674) in another directory B. I want to average (or apply some other binary operation on) A1 and B1 and output to a third file C1 in directory C. I want to do the same for A2 and B2, A3 and C3 etc up to A26674 and B26674. I have more or less got to grips with Image Containers and Pixel Math for single inputs, thanks to tutorials (um.... I note no proper program documentation), but I don't see how to even begin to tackle this job. I guess it should be possible to write a batch processing script, but I can't find any reference on how to do this. (I exaggerate with the number 26,674, but I do actually have quite a lot, many more than I would like to process manually).
Any help would be appreciated.

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2131
    • View Profile
Re: Batch processing *pairs* of files
« Reply #1 on: 2015 February 14 02:59:04 »
It can certainly be done with a rather short script, since you probably dont need a GUI. Have a look at C:\Program Files\PixInsight\src\scripts to find plenty of examples (and simply ignore the GUI parts). You should know JavaScript - there a plenty of tutorials for this popular language on the web.
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)