LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set acquisition attribute pixel format

Hi, I'm using a Hamamatsu camera and I'd like to acquire 16-bit pixel image instead of 8-bit.  However, it seems to me that the default is 8-bit.  I'm trying to modify the program based on Grab and basic attributes becuase Gain, Exposure and pixel format are the only things I'd like to change.  When the value of pixelformat is set to 0 (seems 0 is the value for 8-bit), it works fine but I don't know how to set to 16-bit becuase when I change it to 1, as I assume that's the value for 16-bit, error message pops out as I run the vi saying it's out of range.  

 

Thank you very much for your help!

Message 1 of 11
(5,567 Views)

Besides, despite that I set the fps as 30, it seems the fps is slower than what it should be considering the exposure time.  Is there a way to know what's the time interval between two frames taken?  Is there a way to set the time interval for frames when taking a sequence?  Thank you.

 

 

0 Kudos
Message 2 of 11
(5,563 Views)

Hi soljiang,

 

I would recommend testing out the configuration and acquisition parameters in Measurement and Automation Explorer (MAX) before moving to setting them programmatically in LabVIEW. If you select your camera in MAX (My System»Devices and Interfaces»NI-IMAQ/IMAQdx devices), there should be tabs for Acquisition Attributes and Camera Attributes. These will contain the same attribute names and values that will be set in LabVIEW. A good strategy is to test the acquisition first in MAX, obtain the desired attribute values or gain an understanding of how they are controlled, and then move to programmatically the controlling the attributes in LabVIEW.

 

Are you able to acquire images at the desired framerate and bit-depth in MAX?

Matt
NI Community Team
National Instruments
0 Kudos
Message 3 of 11
(5,541 Views)

Hi, Matt, 

Thank you for your reply.  Yes, I can select the desired parameter and change them in MAX.  Also in the program that I attached, the attributes listed are the attributes available for the camera.  

 

Best,

Charles

0 Kudos
Message 4 of 11
(5,535 Views)

Hi Charles,

 

If you change the bit depth in MAX, how do you do so? What attributes are set to what value? If 8 bit images are the default it is possible that setting the attribute to 0 is just selecting the default value. If you input 8 or 16 does the program acquire images effectively?

Matt
NI Community Team
National Instruments
0 Kudos
Message 5 of 11
(5,523 Views)

Yes.  I think the default is 8-bit and its binary is 0.  I guess that's also why when I set the value to 0 through explicit function in the program, no error pops out.  However I assume 16-bit is one (which I also verified by looking at the item property of that value setting), but when I explicit wire a 1 to that value property, the error says it's out of the value range.  

0 Kudos
Message 6 of 11
(5,502 Views)

Hi Charles,

 

If you set the PixelFormat to 1 in MAX it acquires a 16 bit image without error? LabVIEW will call the camera properties in the same manner as MAX, so setting PixelFormat to 1 in MAX should be the same as setting it to 1 in LabVIEW. Could you please include a screenshot of the settings in MAX?

 

Thanks!

Matt
NI Community Team
National Instruments
0 Kudos
Message 7 of 11
(5,482 Views)

In max, there's a pull-down menu and it's not binary.  Apparently, it's itemized and I don't know which binary is associated to it.  Since I think the 8-bit is 0, I'd assume 16-bit is 1.

 

 

0 Kudos
Message 8 of 11
(5,462 Views)

Hi Charles,

 

What is the specific Hamamatsu camera model are you using? We may be able to gain some insight by looking at the camera file. There is a relatively general Knowledge Base article on camera files that should provide some additional information on camera files.

Matt
NI Community Team
National Instruments
0 Kudos
Message 9 of 11
(5,450 Views)

Hi,

    I'd like to enquire the same problem as yours, have you solved it yet? Can you share it with me? Thank you!

 Best regards

0 Kudos
Message 10 of 11
(5,312 Views)