08-20-2011 05:43 PM
I have tried to search everywhere how to create a .BIL and .hdr files (ENVI format) by LabVIEW (or related languages) after do line scanning by a hyperspectral camera. Does anyone have the VI source code or library drivers to do it? or Can you suggest me a solution?
08-22-2011
06:19 PM
- last edited on
03-11-2025
07:32 PM
by
Content Cleaner
Hi Link Butler,
To be honest I am not particularly familiar with that file type and the programs that use it. Is your question more related to how to actually acquire the images or how to save them in the proper format?
How does you camera interface to the computer (CameraLink to PCI framegrabber, USB, Firewire, GigE, etc.)? You will very likely use the Vision Acuisition Software drivers to acquire images from the camera. This page on Image Acquisition may also be helpful to you.
I know that this information is not specifically related to the file types you are wondering about, but I believe it will be helpful info regarding image acquisition in LabVIEW.
08-29-2011 08:52 PM
Thank Matt,
We have a hyperspectral imaging system using a Firewire PCO.Camera. from Headwall Photonics. We acquire the hyperspectral images by doing line scanning and store those images into hard disk under ENVI format (a .BIL file and a header file). We cannot save the images into hard disk because we don't know about the format of .BIL file (band interleaved by line).
Headwall has the software to do this but it's close-source software. when I asked them, they wanted to sell the code. We want to develop a ourself software to capture the hyperspectral images (the cube).
08-30-2011 04:12 PM
Hi Link Butler,
I don't believe that there is a direct way of saving and image in the BIL format. However, from the information I have seen online, you will very likely be able to recreate this file type in LabVIEW. Although, the exact arrangements I have seen have been contradictory in some cases, it appears that a BIL file will contain no header information and only contain binary data on the Red, Green, and Blue pixel values of the image.
So, in LabVIEW, we can split the RGB values of a color image using the 'IMAQ ExtractColorPlanes.vi' and then use the 'IMAQ ImageToArray.vi' to breakout each pixel value for the new Red image, Green image, and Blue image. From here, you would want to rearrange the 2D arrays of pixel values according to the BIL standard (again I found conflicting information on this) and write to a binary file.
Attached below is a VI showing how to use the 'IMAQ ExtractColorPlanes.vi' to create a new image for the R, G, and B aspects of a color image.