22 May, 2009

ImageMagick - Montage

I love FFMpeg and ImageMagick. Armed with both, you can create some pretty interesting things. For example, you can create a frame consisting of 4 images by issuing the following command:


montage -geometry 720x480+0+0 -tile 2x2 /var/tmp/00000001.jpg /var/tmp/00000002.jpg /var/tmp/00000003.jpg /var/tmp/00000004.jpg /tmp/output.jpg


This will take these 4 images:





To create the following resultant image:

A framed image like the resultant isn't particularly interesting, unless you incorporate a series of them into a video. For example, at work we wished to determine what frame rate would be necessary to drive a vehicle exclusively using a camera. We investigated this by creating a montage video stream with varying frame rates in each frame.

Another fine use would be comparison of file size using alternative video comparisions. For example, imagine a montage frame with each frame demonstrating a different JPEG image, file size and compression ratio. Heck, you could even generate your very own composite video with each of Charlies Angels in each of their own frames. The uses are endless :)

1 comment:

Vishal Vivek said...

Hi, greetings from India.

Thanks for this post. It really helped me give finishing touches to some video related work I was up to.

The official documentation for montage was failing for me somehow.

Thanks again. :)