LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

on IMAQ ArraytoImage

Solved!
Go to solution

Hi. It might be trivial, but I need your help ...

Basically, I need to convert a 2d array to an image using IMAQ ArraytoImage. The pixel values in the 2d array can be from 0 to 10 let's say but also from 0 to 1024 or 500 to 20000 etc. What I want is to always have a 16 bits image irrespective of the maximum value of the pixels in the 2d array. Apparently, now if your max value in the 2d array is let's say 1000 you get an 10 bits image, if it's 4 you get a 2 bits image? Am I write?

Is there any way to avoid this automatic rescaling and obtain always a 16 bits image?

Thanks for your help. 

0 Kudos
Message 1 of 6
(3,952 Views)

If my understanding is right

 

 

Irrespective of the number you get, You need to fillup your lsb or your msb with some value (Say 0000) and always maintain the 16 bit ratio.

0 Kudos
Message 2 of 6
(3,928 Views)
It's exactly what I did. I "bright up" one of the elements in my array by assigning it a value equal to 2^16, so my image is always a 16 bits….  
0 Kudos
Message 3 of 6
(3,922 Views)

 


It's exactly what I did. I "bright up" one of the elements in my array by assigning it a value equal to 2^16, so my image is always a 16 bits….  

 

so solved?

0 Kudos
Message 4 of 6
(3,919 Views)
Solution
Accepted by topic author Adrian_Bradu
Yep. From my point of view solved, though the solution it's not very very nice ….
0 Kudos
Message 5 of 6
(3,916 Views)

 


the solution it's not very very nice ….
and why is that?

 

 

0 Kudos
Message 6 of 6
(3,913 Views)