From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting 12 bit data out of 12 bit monochrome CCD (E2V EV71YEM1GE2014-BA9 )

Solved!
Go to solution

Hello, Ravi Antani,

 

I am currently using a E2V ethernet gigabit line scan camera (8 or 12bit resolution). I could get images by using it. But when I tried to get image raw data by using IMAXdx get image data.vi, I got the following results:

 

(1) camera set at 'mono8' resolution

     I got the right image data size, i.e. 2048*100 when I set the width 2048 and the height 100. The 1D data is like 8, 8, 8, 8, 7, 8, 8 --------. 

 

(2) camera set at 'mono12packed' resolution
    I got the image data size: 3072*100 when I set the width 2048 and the height 100. The acquired 1D image raw data is like  8, 238, 8, 8, 238, 8, 9, 160 --------. 

 

Could I ask you how can get the right image raw data 2048*100 from the readout data 3072*100?

 

Many thanks.

 

Zeng

0 Kudos
Message 1 of 4
(2,598 Views)
Solution
Accepted by topic author Roy8

Hi there Zeng,

 

So typically, since this is a relatively separate issue from the previous one, we like to have you create a new thread on the forums. That way, more people are likely to look at it.

 

I will let you know that this might depend on the specific camera you are using. The Get Image Data function always outputs 8-bit values no matter how many bits the pixels are. What's probably happening is that width-wise, alternating pixels will have 4 bits from the value before, and 4 bits from the value after.

 

For example, Value (0,0) in your array has the first eight bits of Pixel (0,0), and then Value (1,0) has the last four bits of Pixel (0,0) and then the first four bits of Pixel (1,0). Value (2,0) then has the last eight bits of Pixel (1,0).

 

I hope this makes sense. You might have to rearrange your data using a loop into a U16 (to fit all 12 bits).

Ravi A.
National Instruments | Applications Engineer
0 Kudos
Message 2 of 4
(2,596 Views)

Hi, Ravi,

 

Many thanks for your support, but I still did not work out this problem:

 

The actrual pixel value should be 8, 8, 8, 8, 7, 8, 8 -------- with camera resolution set at 'mono8' or 'mono12packed'. The value could be rewritten in bits at 8bit  like:

Pixel(0,0): 0000 1000

Pixel(1,0): 0000 1000

Pixel(2,0): 0000 1000

Pixel(3,0): 0000 1000 --------

 

The value could be rewritten in bits at 12bit  like:

Pixel(0,0): 0000 0000 1000

Pixel(1,0): 0000 0000 1000

Pixel(2,0): 0000 0000 1000

Pixel(3,0): 0000 0000 1000 --------

 

Now following your advice, the readout values when camera was set at 'mono12packed' are like:

Readout(0,0):  0000 1000 (the first eight bits of Pixel (0,0) at 12bit), the value is 8 (correct because in agreement with the readout value at 8bit);

 

Readout(1,0):  1000  0000 (the last four bits of Pixel (0,0) and then the first four bits of Pixel (1,0) at 12bit), the value is 128 (incorrect because the readout value is 238 at 'mono12packed' );

 

Readout(2,0):  0000 0000 (the last eight bits of Pixel (1,0) at 12bit), the value is 0 (incorrect because the readout value is 8 at 'mono12packed' )

----

 

Could you please give me more explanation on where is wrong in my analysis above?

 

Thanks. Zeng 

 

0 Kudos
Message 3 of 4
(2,595 Views)

Solved. Thanks.

 

0 Kudos
Message 4 of 4
(2,572 Views)