Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

.tif 12bit file read

I have a .tif file produced from a different application (XCAP) that will not open using the readFile vi in the vision development module. I am using LV 8.5.1. The data in the file comes from a 12-bit monochrome CMOS imager. If I open the .tif file in photoshop the data looks fine, and if I resave the file from photoshop then labview will open it. I'd rather not have to open each image by hand in photoshop and was wondering if I am missing something...

The error I get is:
Error -1074395984 occurred at IMAQ ReadFile
  NI Vision does not support the file data type you specified.

thanks for any help!
0 Kudos
Message 1 of 3
(3,479 Views)

Hello trneb,

 

Did you place down the default control for the “File Options” input of the IMAQ ReadFile VI (right-click the input and select Create->Control)? If so, have a look at the “File Data Type” control. In LabVIEW 8.5.1 a bitrate of 12 is not one of the options.

 

One solution is to save the images as 16-bit in your third-party “XCAP” software. This way you will not lose any quality, and you gain the ability to programmatically specify the proper data type for the IMAQ ReadFile VI.

 

I hope this helps 🙂

David G
Sales Engineer - SE Michigan & N Ohio
National Instruments
0 Kudos
Message 2 of 3
(3,453 Views)
If ReadFile won't read the 12-bit TIF directly (sounds like it doesn't, but that is suprising), you could always use a simple program like ImageMagick to do the conversion to 16-bit in a more automated fashion than PhotoShop. You could either call it manually to convert all files in the directory, make a simple batch file, or simply have your LabVIEW program call into it with a shell execute VI to convert it in-place before opening it with ReadFile.
 
-Eric
0 Kudos
Message 3 of 3
(3,443 Views)