[EMAIL PROTECTED] (2007-11-27 at 2026.23 -0000):
> I have tried, but it requires more memory than i have, after 30
> minutes ( with 10 images, each of 5 Megapixels ) it was still
> working ( 256mb ram +768 swap ), whilst with gimp everything, from
> loading to adjusting the opacity, took only about 3 minutes.

I would try the following then: cut the images into manageable parts
(using PNG as format), average the separate "stacks", then glue back
the parts. For example chunks of 50 lines (I looked for a 5MP camera
and it said 2560*1920, so 2560*50). I ran the following commands after
running ulimit -d 131072 -m 131072 -v 131072, to make sure all fits in

# First cut all
for i in [a-j].jpg
  convert ${i} -crop 2560x50 +repage ${i}_%02d.png
# ~120 sec

# Look up the maximum number generated, in this case 38 (starts in 0)
# And average the stacks
for i in $( seq -w 0 38 )
  convert [a-j].jpg_$i.png -average result_$i.png
# ~25 sec

# Join back, 1x means one column (= full width parts, simpler)
montage -mode concatenate -tile 1x result_*.png indirect.png
# ~20 sec
# Total: ~165

I also tried the original approach, it took ~120 secs (~30 without
setting limits, no swapping in any case) and did not crash due the
forced memory limit (original JPEGs were 2560*1920 and ~3MBytes each,
work dir ended being ~180MB with all the intermediate PNGs and the two
final versions):

convert [a-j].jpg -average direct.png

So if you figure why the system was so slow (disk? too many other apps
running? really old CPU?), it would be nice to know. Also memory is
nicer than swap, specially if you are into image editing (just for
when you have to get a new computer or update current ;] ).

Gimp-user mailing list

Reply via email to