[Gimp-user] Reducing noise with multiple exposures

giuliogiuseppecarlo at interfree.it giuliogiuseppecarlo at interfree.it
Sun Dec 2 01:02:40 PST 2007


> Hi,
> giuliogiuseppecarlo at interfree.it (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
> 128M:
> 
> # First cut all
> for i in [a-j].jpg
> do
>   convert ${i} -crop 2560x50 +repage ${i}_%02d.png
> done
> # ~120 sec

Here:
real    0m53.639s
user    0m42.179s
sys     0m3.112s

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

real    0m38.739s
user    0m26.850s
sys     0m3.420s
 
> # Join back, 1x means one column (= full width parts, simpler)
> montage -mode concatenate -tile 1x result_*.png indirect.png
> # ~20 sec
> # Total: ~165

real    0m25.854s
user    0m21.225s
sys     0m0.660s


> 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

Let's try again.

free -m:
             total       used       free     shared    buffers     cached
Mem:           250        115        135          0          2         57
-/+ buffers/cache:         55        195
Swap:          729          0        728

After few seconds, hd is swapping.

After 10 minutes is still swapping.

free -m reports:

             total       used       free     shared    buffers     cached
Mem:           250        247          3          0          0         36
-/+ buffers/cache:        210         40
Swap:          729        377        352

Then, ctrl-c .

> 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 ;] ).

The pc is a pentium 4 1800Mhz with 256 mega of ram ( unfortunatly RIMM, here i'm unable to find modules at decent price, i found once 256mb expansion, for only 90€  ). Disk is a 60GB Maxtor, with hdparm 40 MB/s.

Btw, i'm using imagemagick from debian etch ( imagemagick 6.2.4.5.dfsg1-0.14 )

And i have always found that imagemagick is extremely slow ( converting images is for example much faster with netpbm tools ).

Thank you.

----------------------------------------------------------------------------
DEXGATEMICRO il centralino VoIP multifunzione per l'azienda.
Prova gratuita per 4 utenti!


Scopri tutte le funzionalita' sul sito Dexgate.com
----------------------------------------------------------------------------



More information about the Gimp-user mailing list