Page 1 of 1

how can i improve montage performance for huge montage

Posted: 2009-09-18T05:28:10-07:00
by mstanescu
I have something like 12000 jpegs of 256x256 and i want to montage them in a 150x75 tile configuration.

The thing goes very very slow. When i run montage with -verbose things go really fast like 500 images in first 2 seconds then starts to drop....after about 600 images the performance is about 1 image per second...i cannot actually extrapolate for 12000 but i think ill reach end of universe until my picture is stitched...just kidding :)

My command line is
montage -verbose -geometry +0+0 -tile 156x78 *.jpg ../result.jpg


Any tips and tricks ?

Re: how can i improve montage performance for huge montage

Posted: 2009-09-18T06:16:12-07:00
by magick
Try this command:
  • montage -verbose -size 120x120 -geometry 120x120+0+0 -tile 156x78 *.jpg ../result.jpg

Re: how can i improve montage performance for huge montage

Posted: 2009-09-18T07:14:14-07:00
by mstanescu
magick wrote:Try this command:
  • montage -verbose -size 120x120 -geometry 120x120+0+0 -tile 156x78 *.jpg ../result.jpg
I tried it ..same result. I tried
montage -verbose -size 39936x19968 -geometry 256x256+0+0 -tile 156x78 *.jpg ../result.jpg
montage -verbose -size 256x256 -geometry 256x256+0+0 -tile 156x78 *.jpg ../result.jpg

no difference

This is a 2G ram machine but i watched the memory during run but i see no swapping

total used free shared buffers cached
Mem: 1994056 969792 1024264 0 28392 465904
-/+ buffers/cache: 475496 1518560
Swap: 4008208 180204 3828004

Re: how can i improve montage performance for huge montage

Posted: 2009-09-18T08:15:30-07:00
by magick
Are you using ImageMagick 6.5.6-1? If so you need -define jpeg:size=128x128. If not you can get some improvement if you use the Q8 version of ImageMagick instead of the default Q16. Otherwise, the montage command will complete it just may take several hours. One last option is to build the montage yourself. Create an image canvas and composite one image row at a time.

Re: how can i improve montage performance for huge montage

Posted: 2009-09-18T10:49:45-07:00
by mstanescu
magick wrote: Create an image canvas and composite one image row at a time.
I did that eventually

Re: how can i improve montage performance for huge montage

Posted: 2009-09-18T10:54:05-07:00
by fmw42
try append, it should be easier that composite.

see http://www.imagemagick.org/script/comma ... php#append