I'm trying to read AVI files using ImageJ and the BioFormats
AVIReader. I'm basically doing exactly what's shown at: https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/utils/ Read_Image.java To try to turn an AVI into an ImagePlus object. This works fine with 8bit AVI files, but 24bit AVIs are getting messed up. When I read them with AVIReader then getImageCount returns only 1/3 of the expected number of images (180 instead of 540), and although I can transform the 180 images into an ImageStack, it looks corrupted (maybe because it has 3 images overlaid in each slice?). ImageJ itself can open these files and displays the right number of slices (although it incorrectly reports them as 8bit), but I don't know what it's doing which isn't in the plugin example code. Does anyone here know how to do this successfully. Thanks Simon. |
Hi Simon,
currently I am working on improving the "standard" ImageJ AVI_Reader plugin (not the bioformats code). You could try my current version - I have put it online at http://www.iap.tuwien.ac.at/www/surface/tmp/AVI_Reader.java It does not allow you to read part of an AVI file, only the whole file (so you need plenty of memory for long movies). If my plugin does not read the file correctly, you could try with debug mode (Edit>Options>Misc) switched on and send the log to me - I can't promise anything, but maybe I find the reason for the problem. Michael ________________________________________________________________ On 17 Apr 2008, at 15:50, Simon Andrews wrote: > I'm trying to read AVI files using ImageJ and the BioFormats > AVIReader. I'm basically doing exactly what's shown at: > > https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/utils/ > Read_Image.java > > To try to turn an AVI into an ImagePlus object. > > This works fine with 8bit AVI files, but 24bit AVIs are getting > messed up. When I read them with AVIReader then getImageCount > returns only 1/3 of the expected number of images (180 instead of > 540), and although I can transform the 180 images into an > ImageStack, it looks corrupted (maybe because it has 3 images > overlaid in each slice?). > > ImageJ itself can open these files and displays the right number of > slices (although it incorrectly reports them as 8bit), but I don't > know what it's doing which isn't in the plugin example code. > > Does anyone here know how to do this successfully. > > Thanks > > Simon. |
Hi everyone,
a new version of the AVI_Reader is available for testing: http://www.iap.tuwien.ac.at/www/surface/tmp/AVI_Reader.java It is not on the official ImageJ Web site (yet) because I rewrote much of the code and it might have still problems - if you find any, let me know! It would be also possible to include YV16, IYU2 and/or IUYV formats if someone thinks it is worthwhile doing so (let me know) - I have not encountered any of these so far, but maybe older frame grabbers or some cameras produce them? New features (w.r.t. the AVI Reader at the ImageJ Web site): - support for several other formats added, especially some YUV (aka YCbCr) formats - uneven chunk sizes, negative biHeight and audio or second video stream don't cause a problem. - can read part of a file (specify start & end frame numbers) - can convert YUV and RGB to 8-bit - can flip vertically - can create a virtual stack - added slice label: time of the frame in the movie - added a public method 'getStack' that does not create an image window There are still quite a few restrictions, however. Some unusual or complex avi types are not handled correctly. See the notes in the source code for details. Michael |
Free forum by Nabble | Edit this page |