07-03-2013 07:04 AM
Hello,
We are using a Basler acA2000-340km camera. I am able to capture frames in 10-bit and 12-bit pixel bit depth successfully. However when I try to save those frames to disk they are only being saved in 8-bit format. I tried using both .tif and .png images. I am using the imgSessionSaveBufferEx() function to save the image.
I noticed in MAX 10-bit and 12-bit acquired frames are correctly being saved as 16-bit images. What am I missing here?
Thank you.
07-03-2013 07:28 AM
I noticed in the camera file used by MAX that the bit depth is being specifically set. I tried doing the same thing in C++ but when I try setting both the IMG_ATTR_BITSPERPIXEL and IMG_ATTR_PIXDEPTH attributes I am getting an error stating that those attributes can't be set. Which attribute am I supposed to use for setting the pixel bit depth of acquired frames?
Thanks.
07-07-2013 02:01 PM
I am saving 16bit images in Png.
Is the image you saving from is 16bit?
Do you want to post code?
Amit,
07-08-2013 06:46 AM
Hello Amit,
Yes the image was acquired in 10-bit and stored in a 16-bit buffer. I tried both TIF and PNG formats. It looks like the problem is that NI needs to be specifically told that the image is 16-bit. I am hoping that I don't need to create customized camera files just to set the bit depth. I was hoping I could do it through one of the attributes.
Are you coding in C++? How are you indicating that you have 16-bit images?