09-21-2007 02:14 PM
09-24-2007 03:22 AM
03-05-2010 01:06 PM
I also would like to compress the images in my AVIs to reduce AVI file size and to decrease the time required to read AVI frames from the hard drive. We are using black and white images with 8 bits per pixel. We don't want any reduction in image quality, so we need a lossless compression. According the the AVI Compressor Comparison Example.vi, all of the CODECs on my PC create some reduction in image quality - i.e. they are lossy to various degrees - see attached screenshot of the VI.
What I'm looking for is a lossless 8 bit image compressor. For that matter, I could convert the images to/from arrays of bytes and utilize a generic byte array CODEC to implement my own compression/decompression.
Does anyone know of a lossless compressor for either 8 bit images or byte arrays?
Thanks,
Hans
03-05-2010 03:11 PM
Many years ago I played with PICVideo's lossless codec with fairly good success (though not in LabVIEW). Their page says that their codec works for 8-bit data as well. You could try their evaluation copy and see how well it works out. Be sure to let us know your results.
Eric
03-05-2010 05:19 PM
Thanks for the pointer Eric! I downloaded and installed the evaluation PICVideo Lossless JPEG Codec, then re-ran the AVI Compressor Comparison Example.vi which automatically found the PICVideo Codecs and returned results for them. See attached screenshot of the results.
The Quality for the PICVideo Lossless JPEG Compressor wasn't quite 1000, it was 996.49, which threw me at first, but then I realized that was caused by the PIC Video watermark that is automatically placed on the images by the evaluation version of the Codec. When I looked at the difference image between the uncompressed and PICVideo Lossless, all the pixels were 0, except for the watermarks. So it really is lossless. And for my short test video, it reduced the file size by a factor of 4.
There are a couple catches for my application. One is that the non-evaluation PICVideo Lossless JPEG Codec costs $199 per CPU. The other is that one reason we want to compress is that we want to read back our AVI frames quickly. Since hard drive transfer time is a limiting factor when reading AVI frames, we are hoping that a compressed AVI might actually have a quicker AVI frame read time, even considering that the CPU has to decompress the read image. I need to do some more testing to see how fast the AVI frame read time is when the PICVideo Lossless JPEG Codec is used.
Thanks again Eric.
Hans