Introduction About Site Map

XML
RSS 2 Feed RSS 2 Feed
Navigation

Main Page | Blog Index

Thursday, December 9th, 2010, 1:01 pm

Creating Animations With GNU Octave and the GNU Image Manipulation Program

The GIMP is an extremely powerful program and animation in the GIMP can be achieved with layers. That’s why I can get so much work done just with Free software and GNU tools like gnuplot. This includes some of the following new examples, which are done by taking screenshots (from the GIMP), stacking them up as layers, and then saving them as a GIF file with the animation option enabled.

The following file, an animated GIF image which comprises 8 frames with 600ms setting them apart (click the image to zoom), shows my new algorithm tracking the heart’s boundaries in a sequence taken from the same slice, which prevents sudden, unregistered change in the intensity values near the point being probed. 16 points are initially fixed in a region, equally spaced although that is not a strict requirement because the program takes any list of points and handles each one in turn. The points are separated by a 5-pixel distance in the x and y axes although that too can vary independently based on parameter input that sets a grid (better initialisation would look for edges of interest). The shown arrows are narrow and crude although an option exists for making them thick (which then hides interesting parts of the image). The shuffle parameters in this case involve a frame size of 9×9 pixels, a shuffle radius of 5 pixels, and a summation of pixel-wise differences.

Fiesta animation (cardiac)

A colour representation of the same images sequence is shown below (click to zoom).

Animation of heart surface

Another newly-implemented method looks at another measure for a window of pixels taken from consecutive frames. It considers a minimum of pixel-wise differences in a given range rather than take the average difference. The results obtained using each of these methods cannot be easily compared without a simplified synthetic set and a proper study would need to involve systematic experiments that look at how varying window size, radius, and calculation method affects overall performance. There is quite a project right there, but it only involves tracking, with or without tagging. Tags can help in identifying good landmark points to start with — points that define an anatomically-meaningful edge to start from and track as the sequence of frames progresses. Eventually, providing a formula for normalising a measure of similarity would be nice. Such a normalisation method — if properly applied — gives a new way of finding landmark points ‘on the move’. Doing so using non-rigid registration (NRR) is not possible for the heart as there is hardly a one-to-one correspondence between points (too much movement). The hope is that by employing a fast tracking algorithm with a good transform which adjusts itself for image intensity, size et cetera, it will be possible to identify edges and perform localised measurements, perhaps even do statistical analysis based on different sets of videos (long-term goal). These ideas are not far fetched and the body of work already done in this area ought to be explored. The novelty is the transform being used to quickly calculate similarity wrt neighbouring points, so existing work look at how to adjust parameters so as to get better results. In this particular problem domain, tracking the heart’s contours reliably and robustly enough is the objective, however it is not simple to do this ‘on he fly’ (speed of video playback for example).

5 Responses to “Creating Animations With GNU Octave and the GNU Image Manipulation Program”

  1. twitter Says:

    Automate your animation with ffmpeg or memcoder. I’ve used the instructions here with some success:

    http://electron.mit.edu/~gsteele/ffmpeg/

    This page is similar.

    http://www.comanswer.com/question/ffmpeg-how-to-i-set-the-images-sequence-to-be-equal-to-the-duration-of-the-movie-with

    You might also try to automate your image annotation with image magic. Gnuplot can be used to generate sequential plots of your data by script then annotation added and finally the sequence animated without too much trouble.

  2. Roy Schestowitz Says:

    Can the “animate” command in ImageMagick achieve this too? Will it allow the user to output to file? Can it stitch files up? For movie-to-image conversion I use avidemux. To be honest, I don’t make animated GIFs so often, so I didn’t look into many options. I’ll see what’s in your links.

  3. Roy Schestowitz Says:

    OK, I’ve looked into it all and bookmarked it. It’s handy, but I still can’t automate movie creation. Back in the days of MATLAB I wrote an extensive GUI which then invoked my callback functions to create a video automatically from each simulation. I’ll have to revisit that code of mine.

  4. Click Here Says:

    In a business, payroll regarded as the sum of all financial documents of wages, salaries, bonuses and deductions for an worker. In the accounting terms and conditions, payroll refers to the quantity of fee made to personnel for the solutions offered by them for the duration of a distinct time. The payroll providers regarded as an important element of any organisation. Payroll considered vital due to payroll and payroll taxes widely influence the company’s internet income and they subjected to the regulations and regulations. An successful payroll technique help in higher morale of workers as they ensured of timely and properly fee of their salaries and wages. It also makes certain appropriate deductions and withholdings in a timely manner. These companies rendered by a 3rd social gathering this sort of as outsources organizations. These organizations preserve a total setup that help an organisation to deal with payroll complexities. A range of these kinds of firms provide numerous companies like sending checks to perform calculations, as properly as, controlling updates. These companies regarded as especially useful for tiny corporations. Getting in a tiny organization, a single want to concentrate on his jobs, as properly as, organization processes like acquiring customers, marketing, delivering services to title a handful of amid a lot of. It gets to be extremely difficult to consider out substantial time to make sure that each employee will get his shell out on time and the correct sum. With the use of outsourced companies, a single do not want to worry about all these problems. The outsourced solutions get treatment of all these issues. Consequently, the time saved by a businessman can be employed on other pertinent firm issues.

  5. Bruce Tellez Says:

    I have to thank you for the efforts you have put in penning this site. I’m hoping to check out the same high-grade content from you in the future as well. In truth, your creative writing abilities has inspired me to get my very own website now ;)|

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:

http://schestowitz.com/Weblog/archives/2010/12/09/gnu-octave-and-gimp/trackback/

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.163 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 —|