Massive averaging
Posted: 2009-06-01T16:28:14-07:00
Moin,
I'm trying to average a huge amount of images (22K+) in a serial process where each resulting image n is the average of the previous ones n-1, e.g. img3(img1,img2) and 22000(img1,... img21999).
What I do here is moving one file at a time from srcDir1 to srcDir2 and then average all the images of srcDir2 saving the averaged image into tgtDir
The problems:
- Is there a way to automate the process? I'm currently doing it one-by-one
- So far, each average (now in the 700-something image) takes about 10 minutes. Can I improve the code?
The images are 720x544 RGB 8-bit and I'm running OS X 10.5.7
Any help is appreciated. Thanks!
I'm trying to average a huge amount of images (22K+) in a serial process where each resulting image n is the average of the previous ones n-1, e.g. img3(img1,img2) and 22000(img1,... img21999).
Code: Select all
mv ~/srcDir1/img00700.png ~/srcDir2
convert ~/srcDir2/'*.png' -average ~/tgtDir/00700.png
The problems:
- Is there a way to automate the process? I'm currently doing it one-by-one
- So far, each average (now in the 700-something image) takes about 10 minutes. Can I improve the code?
The images are 720x544 RGB 8-bit and I'm running OS X 10.5.7
Any help is appreciated. Thanks!