LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

12bit TIFF image saving

Solved!
Go to solution

Good morning anyone, it might sound silly but I am not familiar with IMAQ so please don't be too rude 🙂

I am trying to save an image in a 12 bit tiff format, following the code it is attached hereby, now the problem is that when I am acquiring in the 12bit mode, the image displayed is actually 12 bit of dynamics, but when I save its values of gray start from 32000, up to 36096, like if it was on 16 bit...

Again I am not so familiar with these kind of issues, Is anyone able to help???

Thank you in advance

0 Kudos
Message 1 of 12
(6,409 Views)

@scozia123 wrote:

... so please don't be too rude 🙂 ... following the code it is attached hereby,


Not be be rude, but there is nothing attached. 

0 Kudos
Message 2 of 12
(6,403 Views)

My bad....

Download All
0 Kudos
Message 3 of 12
(6,399 Views)

Still no code attached Smiley Wink (only images of the code).

save_as_tiff

 

save

 

Why attach images, when you can insert them:

Insert Photo.PNG

 

I'll let someone else tell you about style.

0 Kudos
Message 4 of 12
(6,390 Views)

@scozia123 wrote:

, but when I save its values of gray start from 32000, up to 36096, like if it was on 16 bit...


36096 - 32000 = 4096 values. That is 12 bit alright!

 

I'd expect there to be a color table somewhere, that needs to be configured. Could be using the default, that might not suit your needs.

0 Kudos
Message 5 of 12
(6,385 Views)

I have seen this behavior before, I16 images saved as TIF by Labview are read by other applications as unsigned 16bit. If your application doesn't need negative pixel values you can try using unsigned 16bit images in Labview as well.

 

save tif.png

0 Kudos
Message 6 of 12
(6,375 Views)

Good morning everyone and thank you for your help.

I have tried to do as you said, RamonG, but everything remains unchanged, the saved image is a 16 bit image, with 12 level starting from 32000...

I don't even know what to do next.

Thank you for your time

0 Kudos
Message 7 of 12
(6,349 Views)

Can you upload those 2 VIs from the pictures (preferably saved in Labview version 2014) and a saved TIFF image?

And which application do you use to verify the pixel values?

0 Kudos
Message 8 of 12
(6,344 Views)

Good morning RamonG and thank you again for you help, here you can find the two Vi's (where there first is just a part of a bigger one).

I used ImageJ to open it. I am sorry but I couldn't upload the tiff file since it is not possible.

Thank you again

0 Kudos
Message 9 of 12
(6,337 Views)
Solution
Accepted by topic author scozia123

I think something went wrong with your image type in your code and it's still signed 16bit. See proof of concept below.

I16-U16.png

 

You could replace the IMAQ Write File with this attached VI which should work for all image types. It's just the I16 type that has this issue compared with ImageJ.

Save16bit-TIFF.png

0 Kudos
Message 10 of 12
(6,331 Views)