Converting AVI to grayscale PNG for easier analysis/viewing

An example of a large pixel-count AVI is the Dahlgren et al 2013 article on auroral bursts. This was taken with a 2560×2160 Andor Neo sCMOS camera and this video has 351 frames.

You can try this process to keep in a more widely-compatible MJPEG motion JPEG AVI format, or alternatively you can convert each frame to PNG and use Irfanview or your favorite image browser to flick back and forth between frames. The conversion occurs using ImageMagick (which itself calls ffmpeg in this case).

convert -verbose CMOSvideoshorter_halfspeed.avi -type Grayscale CMOSvideo_%03d.png

in this example, 351 PNGs will be created of about 1MB size each.

Cinepak videos in ImageJ

If someone has sent you an AVI file with Cinepak compression, you may find that ImageJ/FIJI and other contemporary software cannot read the AVI file.

There are two plugins that attempt to address this for ImageJ:

But I found neither of them to work for me on the particular AVI Cinepak video I was given.

Instead, I used FFMPEG to convert to a more modern widely-compatible Motion JPEG format by typing:
ffmpeg -i video1990s.avi -vcodec mjpeg -qscale 1 test.avi

If you need no loss, you can do uncompressed AVI, but note the output file size could be a factor of 10 larger than the Cinepak version:

ffmpeg -i video1990s.avi -vcodec rawvideo out.avi

You can compress to LOSSLESS FFV1 by typing:

ffmpeg -i video1990s.avi -vcodec ffv1 out.avi

You can also convert the AVI to a series of PNG images.

AIDA tools

For those interested in working with data from ASK/ALIS or just seeing how some interesting 3D tomography works, there is a Matlab toolbox at:

or using Subversion, type at Terminal:
svn co "" AIDA_tools

1) cp ~/AIDA_tools/AIDA_startup.m ~/matlabTools/
(or wherever you keep your frequently used scripts)
2) edit this ~/matlabTools/AIDA_startup.m file and make the following changes:
Line 3: AIDA_root = fullfile(‘~’);

then look farther down in the AIDA_startup.m file and add these “min” functions:

% Its version dependent functions, currently M 6.xx and M 7.xx

% Its version dependent functions, currently M 6.xx and M 7.xx

3) I comment out the “warning off” on line 17 of AIDA_startup.m, I like to know Matlab is complaining.

ImageMagick suggested compile options

These options were used to compile ImageMagick 6.7.9-3 and 6.8.0-4.

Before compiling, I urge you to ensure libjasper-dev is installed, so that you can manipulate JPEG2000 images. Try typing:
sudo apt-get install libjasper-dev libpng-dev

Then, type:

./configure --with-modules --with-gslib --with-wmf --with-perl --with-rsvg --with-gvc

Note: you can add HDRI
by adding this option above:

Note: To see if those options actually work, scroll back up about halfway through the console output to see if the compiler could find the modules you’re interested in. Otherwise, you won’t actually have the requested features.

Then do the usual
make install

Note: if you get an error like: cannot open shared object file: No such file or directory
when trying to run ImageMagick, try:

assuming you find it in /usr/local/lib, type:
sudo ldconfig /usr/local/lib