Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

bit depth

Hi,
 
Is there anyway to set bit depth? I am programming using Visual C++ with the NI IMAQ IEEE 1394 package. I can change the bit depth in the MAX to 16bit format but I do not seem to be able to do this in Visual C++ using the
imaq1394SetAttribute (Sid, IMG1394_ATTR_BITS_PER_PIXEL, 16); cmmand
 
The image bit depth seem to be controlled by the MAX instead of the program. Only changes in the MAX can change the image bit depth... Is there any other configuration that I would need to adopt before writing this command?
 
Thanks for your help!
0 Kudos
Message 1 of 3
(3,384 Views)
Hey Water,
 
It looks like you are using the correct command to set the bits per pixel attribute in your C program. How do you know that the function is not working? Are you getting any specific error, or are you trying to use another function on the image that requires the image to be 16 bits? The Bits_Per_Pixel Attribute says the following: Sets/gets the actual bits per pixel. For 16-bit components, this represents the actual bit depth (10-, 12-, 14-, or 16-bit). Is your camera an actual 16 bit camera, or is it another bit depth? What camera are you using?
 
There is another function that you can try running. I would suggest that you run the imaq1394AttributeInquiry2 function. This function determines if the camera supports the specified attribute. If so, the function returns information about the attribute, including minimum and maximum values, and special operation modes. What does this function return for the bits that the camera supports?
 
Let us know if you are getting any errors when you run the imaq1394SetAttribute (Sid, IMG1394_ATTR_BITS_PER_PIXEL, 16); command. If you are not getting any errors, let us know how you know it is not setting the attribute. You could also run the imaq1394GetAttribute after the set attribute function, and what do you get? Let me know if you have any other questions or concerns. Thanks, and have a great day.
 
Regards,
DJ L.
0 Kudos
Message 2 of 3
(3,377 Views)
Hello,

I'm facing the same problem. I use a Megaplus II ES2020 Camera (redlake), the default value for the bitdepth seems to be 10 (result yield by the imaq1394getattribute fonction). I use the imaq1394setattribute fonction and the resulting image is full of distortion, even if I try to set the bitdepth at 10...

I have another question:
Why the displayed image (using imaq1394plotDC fonction) is different from the saved image (using imaq1394savebuffer) in terms of brightness?

Thanks for the help.
0 Kudos
Message 3 of 3
(3,208 Views)