Introduction About Site Map

RSS 2 Feed RSS 2 Feed

Main Page | Blog Index

Friday, December 24th, 2010, 4:55 pm

Making Videos With Animate

A few weeks ago I wrote about turning image sequences into real videos using The GIMP, which is more than just an image editor and my favourite tool for simple videos. But I sought to automate more of the process, so I wrote some Octave code to number the sequence of figures, save them all in raster space under a newly-created directory, and then pass them all using a UNIX-style system call to animate, which is a utility I’ve used for this purpose since 2004. Animate is built in a way that makes it compatible with just about any environment sitting on top of X Server. It allows videos to be saved in so many different formats, including GIF, which makes it easy to open in a lot of programs including Web browsers. Animate also has PDF as an output option — one where frames are separated by pages. This makes it a very powerful tool, which would have been even more powerful had it been possible to save the resultant video from the command line (no such option exists based on the man page). As it stands, making it scriptable is a case of “close, but no cigar” (little human intervention needed). One of this blog’s readers, Twitter, has suggested some other programs that can turn sequences of images into videos without any GUI obstruction. Yes, GUI is trouble in these cases.

The bottom line is, there are many tools for Linux/UNIX which make video composition rather simple and even scriptable (necessary when handling many sets, or sets of 3-D slices). For turning videos into a set of images I use Avidemux. It’s small and simple.

As some example output, here is a video showing how a rough and incorrect estimate deals with cardiac cycle. The crosses represent radii of best circle fit to the surrounding points. There is no constraint in place yet to ensure diffeomorphism.

Slices and frames 220-240 of heart

Expansion accumulator

Directions accumulator

Here is a more properly placed (at least initially) set of landmark points adjusting to fit the heart’s walls.

Slices and frames 200-220 of heart

Expansion accumulator for tracked heart

Directions accumulator for tracked heart

The figures where values are plotted as a function of frame # basically say how much the points move further away from the centre and whether they move clockwise or counterclockwise. These figures correspond to the two videos, where the latter (*tracked.png) belong to the second video.

Technical Notes About Comments

Comments may include corrections, additions, citations, expressions of consent or even disagreements. They should preferably remain on topic.

Moderation: All genuine comments will be added. If your comment does not appear immediately (a rarity), it awaits moderation as it contained a sensitive word or a URI.

Trackbacks: The URI to TrackBack this entry is:

Syndication: RSS feed for comments on this post RSS 2

    See also: What are feeds?, Local Feeds

Comments format: Line and paragraph breaks are automatic, E-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Back to top

Retrieval statistics: 21 queries taking a total of 0.114 seconds • Please report low bandwidth using the feedback form
Original styles created by Ian Main (all acknowledgements) • PHP scripts and styles later modified by Roy Schestowitz • Help yourself to a GPL'd copy
|— Proudly powered by W o r d P r e s s — based on a heavily-hacked version 1.2.1 (Mingus) installation —|