This widget could not be displayed.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ save U16 tif images

Dear all,

 

I am new to Labview, I have been looking through the forum to find a solution to my problem but I am struggling to find one.

 

I have a Q-Click camera and I need to use Labview to acquire  multiple images (tile) that than I will go stitch together to form one image. The camera saves the images as unsigned 16 bit in tif format. If I try to save it as a tif it reads out the I16 value if I use .png the image has the correct values but each tile has a different intensity range based ( I think) on the scaling of each image acquire. I have tried everything I can possibly find on the internet but nothing work, can I have some help?

 

 

I think ( but I might be wrong) that the issue lies in this part of the labview set up I have inherited(screenshot below) but I cannot change the value to U16 .

 

 

 

Thank you for any help

 

Best wishes

Maria

0 Kudos
Message 1 of 14
(3,133 Views)

That screenshot failed...

0 Kudos
Message 2 of 14
(3,122 Views)

Hi,

 

I have attached a png with the screenshot and also the screen shot of how the data get saved. 

My Qclick camera safes the data as TIF but in the original version of lavbiew I received the data were saved as png (image attached), I than changed that to tif but that still didn't solve the issue. 

 

Thank you

Maria

 

 

Download All
0 Kudos
Message 3 of 14
(3,114 Views)

sorry I correct myself my camera apparently save 12 bit ( link to camera specification https://docs.wixstatic.com/ugd/349fa6_095c04c15c7849daa5bd255a078608e5.pdf_)

 

However when I open the image with matlab it reads it as uint16.

 

Thank you

Maria

0 Kudos
Message 4 of 14
(3,111 Views)

UINT16 is a reasonable container for 12 bit data.

0 Kudos
Message 5 of 14
(3,104 Views)

That I know already but still my the dynamic range of my image is not correct.

 

I have tried to follow this post without much success https://forums.ni.com/t5/LabVIEW/12bit-TIFF-image-saving/td-p/3838385

 

I have attached how my image looks like when I use the png saving option as suggested by the general guidance for IMAQ write file2

 

 

0 Kudos
Message 6 of 14
(3,097 Views)

You initialize that IMAQ image as I16. That's not an U16...

0 Kudos
Message 7 of 14
(3,077 Views)

Thank you for your help 

 

I don't have the option to use U16. If I add labview stops because it reads error.

 

I a previous post it was explained that the IMAQ initialising cannot be done using U16.

 

 

Also in this post they talk about U16 but I still cannot understand if there is a solution

https://forums.ni.com/t5/LabVIEW/Managing-U16-images-in-Labview-IMAQ-Vision/td-p/477095

 

Thank you

Maria

 

0 Kudos
Message 8 of 14
(3,064 Views)

The maximum of an u16 is twice that of an i16. So than simply won't fit. An i32 would be the next best thing...

0 Kudos
Message 9 of 14
(3,054 Views)

Thank you, I will try tomorrow.

However, today I have tried several set up and my issue is the following:

 

According to the info on IMAQ write file 2 :

Use bit depth? (false) When saving a signed 16-bit image to a PNG file, NI Vision must convert the data to an unsigned format and shift the data so that most significant bit is always the leftmost bit. Set this parameter to TRUE to use the bit depth information attached to image to perform these conversions. Set this parameter to FALSE to bias the image by adding a constant value to all the pixels in the image such that the lowest negative pixel value in the image maps to zero, and then shifting the image data based on the highest pixel value in the image. The default is FALSE.

My labview is set up that while the image are aquired they are displayed...the displayed images looks totally fine but when they are saved with a weird   autoadjust based on the brightes and darkest element in the image and each tile appear to have a very different dinamc range. My image looks like a chess board. 

 

Now, as the image displayed while acquiring are in the correct scale and dynamic range but each tile when saved has is autoscaled, is it correct to assume that the issue is in the saving process? Is there another way or a matlab script I can use to save my tile to avoid this issue?

 

If I save the images as TIF I don't have this issue, however I have the problem that my image with a range from about 32679 to 36650 ( both positive, I do not have access to image right now so I posted some value from memory), the different between the highest value and the lowest is of about 3085 should it be 4096 for 12 bit? If the number pbtained by the highest and lowest intensity does not relate to 12 but can I still normalise the image to 12 bit?

 

I am so confused!

 

Thank you for your help

 

Best wishes

Maria

 

 

0 Kudos
Message 10 of 14
(3,041 Views)