11-23-2009 12:05 PM
11-24-2009 09:11 AM - edited 11-24-2009 09:12 AM
Hey Bruce,
Unfortunately, the AVI file format only supports 8-bit grey scale or RGB image types. So, there would not be any straight forward way to save your 12 or 14 bit images to video in a gray scale. However, there are some work arounds that would allow you to maintain image depth.
One way would be to save your grayscale image to and RGB file type and roll over the extra bits to another color plane. Check out this Community Example that outlines this method. Alternatively, you could convert your images to arrays and save them directly to a binary file. This would allow you to have whatever bit depth that you would like.
11-24-2009 10:26 AM
Thanks for responding. With high definition video supporting bit depths higher than 8-bits per color I was hoping that there was something already available for this which I might be able to use. AVI is a container so it's possible to cram a lot of different things into an AVI.
It may be possible to save to a QuickTime file using Chris' QuickTime VIs, but I haven't explored this option yet. Are you familiar with this toolset?
Thanks,
Bruce
11-24-2009 10:33 AM
Hey Bruce,
Those QuickTime VI's you pointed out might work for you. However, they look like they are a set of custom VI's that someone has simply put together and shared so I can not be too certain. This would be the first time I have heard of them, so I don't have any personal experience with them. As it says near the top of that page 'Use theses VIs at your own risk (make a backup first)'
11-24-2009 11:57 AM
Well I checked into the QuickTime VIs and these seem to have the same 8-bit limit.
Not directly related to this topic but I was also thinking about that example you provided. I think it may be better if the values are interleaved between the 3 colors instead so that the image still looks respectable when viewing with normal AVI viewers. I still have to try it out but I think it could work.
R G B Value
00000000 00000000 00000000 0
00000000 00000000 00000001 1
00000000 00000001 00000001 2
00000001 00000001 00000001 3
00000001 00000001 00000010 4
...
and so on.
Hopefully it can be optimized to provide good throughput encoding and decoding.
Bruce
11-24-2009 01:18 PM
My brain must not have been functioning properly. That method overflows after 1533!
Oh well, back to the drawing board.
Bruce