MATLAB: Am I unable to log image data to disk at a bit depth of greater than 8 bits per pixel using the Image Acquisition Toolbox 3.3 (R2009a)

avifilediskImage Acquisition Toolboxlogger

I am acquiring image data from a camera that has a bit depth of 10 bits per pixel. I am setting up my VIDEOINPUT object to log data to disk, and I am acquiring data as follows:
file = avifile('logfile.avi');
vid = videoinput('winvideo', 1);
vid.LoggingMode = 'disk&memory';
vid.DiskLogger = file;
start(vid)
file = close(vid.DiskLogger);
delete(vid)
clear vid
However, when I read the AVI file into MATLAB using MMREADER and examine the BitsPerPixel property:
vidObj = mmreader('logfile.avi');
get(vidObj, 'BitsPerPixel')
ans =
8
Each image in the AVI file seems to have a bit depth of only 8 bits per pixel.

Best Answer

This enhancement has been incorporated in Release 2010a (R2010a). For previous product releases, read below for any possible workarounds:
The ability to log image data directly to disk at bit depths greater than 8 bits per pixel is not available in the Image Acquisition Toolbox.
The image data from an external source is logged to disk using the Disk Logger object which is a MATLAB AVI file object. The result of logging image data to a disk is an AVI file. AVI files are limited to a bit-depth of 8 bits per pixel for each color component. If the input data has a bit depth higher than 8 bits per pixel, the data will be scaled and then logged as 8-bit data.
To work around this issue, log the data to memory and bring it into the MATLAB workspace using the GETDATA function. Once the image data is in the MATLAB workspace, you can save them as MAT files. For additional information about the GETDATA function, enter the following command at the MATLAB command prompt:
doc getdata