Home

Indigo Systems LabVIEW 7 Toolkit User's Guide For

image

Contents

1. Interface Name Dispose of the IMAQ image when done IMPORTANT Set up continuous image acquisition Name of current VI Nam lose the IMAQ Session Set up image embedded at x 50 y 325 in this VI Include title bar title set in IMAQ WindDraw n done IMPORTANT aze a f f I f a Notice that we again begin with E242 Image Display Setup VI and then continue to set Image Acquisition Setup VI as in Example 2 VI The acquisition loop is also set up in a similar manner WA but the Histogram VI is new This VI calculates the histogram of all the image pixels It can be applied to 8 bit or 12 bit images The number of bins in the histogram can be set by the user but the default setting of zero will result in automatic adjustment of the number of bins in the histogram to the image resolution 256 for 8 bit images 4096 for 12 bit images 2 2 4 Ex3 Example 3 VI Modified Color palettes apply false color schemes to 8 bit images For example a color palette might assign the color bright red to a very high intensity pixel while assigning the color dark blue to a very low intensity pixel Many color palettes have been developed for a variety of different purposes often allowing important features in an image to be enhanced color The Indigo LabVIEW Toolkit provides support for two sets of palettes The global variable Indigo Palettes Global VI contains a number of standard color palettes pr
2. e li a Indigo Systems LabVIEW 7 Toolkit Ig E Version 1 10 B load 3 2 4 F Load Thermoteknix Color Palette by Name VI Load Thennoteknix Color Palette by Name Loads the specified Tx Color Palette from the specified file Palette name and file name must be exact Palette names are case sensitive Palette Name Tx Pal Data eae Intensity LT la Path es error in code find Once Find Thermoteknix Palette Names VI has been used to find the available palettes in a load def file US D Load Thermoteknix Color Palette by Name VI can be used to load a particular palette If the names were extracted from the def file by Load Thermoteknix Color Palette by Name VI they are automatically exact and loading proceeds with little difficulty The palette data is reported in the cluster at right in the form of five arrays The first is an array of the intensities of the fixed points Then there are arrays with the corresponding RGB values and finally an array of fill methods These can be extracted from the cluster using the LabVIEW unbundled tool as usual Inputs Path to def file dialog 1f empty 51 Indigo Systems LabVIEW 7 Toolkit Version 1 10 Palette Name must be exact Error Cluster Outputs Cluster containing Thermoteknix palette data Error Cluster H Tx to 3 2 5 Construct IMAQ Palette VI Construct IMAQ LY Palette Converts a Thermoteknix palette to a Lab YIEW I MA palette Tx Pal Da
3. mO Mi 3 1 6 Image Compression lInit VI Initialize Image Data Compression MUST run this ONCE before using AGC Fixed Limit Data Compression Do NOT run this per image Error out A E This VI initializes the dll used by image compression VI It 1s essential that the initialization VI execute before the compression VI If the Init routine is not run first the likely result is a system crash and loss of any unsaved Lab VIEW code The Init VI should not be run for each image as this will be too time consuming However if the image changes size for any reason e g edge removal 1s turned on dynamically or a new ROI is applied then the Init VI must be run again Inputs Image Reference to IMAQ image of size and type to be compressed Error Cluster Outputs Error Cluster 36 Le e l I Indigo Systems LabVIEW 7 Toolkit Ig E Version 1 10 Image 3 1 7 tue Image Display Setup VI Image Display Setup Sets up details of image display format for specified window Image not required Ir Window Number 0 15 6 tal Zoom Factor 16 to 16 Name of Parenk Panel Im Coordinates Color Palette A Position Error out This VI formats the display of the IMAQ image destined for the specified IMAQ window The zoom factor will zoom into or out of an Image making the window up to 16 times larger with a zoom factor of positive 16 or sixteen times smaller with a zoom factor of negative 16 The title bar can
4. 8 1 21 Set Gain Mode VI This VI sets the gain mode to normal f or low t Inputs IMAQ Session In Gain Mode 91 Le e e li La Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 Error ln Outputs IMAQ Session Out Error Out IT 8 1 22 Set IT VI This VI attempts to set the integration time for the Alpha NIR camera to the requested value Determination of which integration mode is appropriate short normal long is automatic Not all Alpha NIR cameras support the same range of integration times and thus errors are common with set I this VI Use of J Set IT with Error Check VI is recommended Inputs IMAQ Session In Requested IT Error In Outputs IMAQ Session Out Error Out Es 8 1 23 Set IT with Error Check VI IT CE This VI uses Set IT VI as a subVI An attempt is made to set the IT to the requested value and the camera IT is then read If the camera has not accepted the requested IT 1 e if an error is generated the camera 1s set to reference IT which can be a default value or can be connected to Read the output of Read Camera IT VI so that the original value is retained when an unsupported IT is requested by the user Inputs IMAQ Session In Requested IT Reference IT Error In Outputs IMAQ Session Out Actual IT Error Out 92 Le e li La Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 8 1 24 EJ Set Orientation VI This VI sets the orientation of the image fr
5. Hit the stop button Le e e li La Indigo Systems LabVIEW 7 Toolkit In Ig l Version 1 10 Let s look at the diagram for Example 2 VI di No Error P image when done Narre of current Set up continuous wi f IMPORTANT image acquisition Dispose of the IMPORTANTI Note that we now begin with the VI setup Image Display Setup VI This VI sets up the image display according to the user s needs Hoover over the icon and observe the various connections In this case we have elected to embed the image in a VI front panel To do this we must specify the exact name of the VI and the coordinates where we would like to embed the image Since the image is to be embedded in the panel of the VI that calls Image Display Setup VI we have used the standard LabVIEW functions current VI s path constant and strip path to obtain the name of the calling VI Save a copy of Example 2 VI in a convenient location Try changing the coordinates of the embedded image and run the VI again Be sure not to save any changes to the original While in edit mode note that the VI panel will still scroll under the embedded image It is often advisable to set the VI properties of an application to disable scrolling when an image is embedded This will prevent users who are inexperienced with LabVIEW programming from inadvertently scrolling important parts of the front panel under the image or out of the visible range while running Usually
6. To install Indigo LabVIEW Toolkit you will need the following 1 1 1 IBM compatible Pentium based computer Pentium III 800 MHz or better recommended 1 1 2 XGA 1024 x 768 or better screen resolution 1 1 3 Windows 2000 or Windows XP operating system 1 1 4 100 MB of available hard drive space 200 MB or more recommended 1 1 5 256 MB RAM memory 512 MB recommended 1 1 6 National Instruments LabVIEW 7 0 Express or higher full development version 1 1 7 National Instruments IMAQ version 2 6 or higher and IMAQ Vision Development Module version 7 0 or higher In order to run the IEEE 1394 examples the NI IMAQ 1394 Driver Version 1 5 or higher is required 1 1 8 National Instruments PCI 1422 Frame Grabber Card 1 1 9 A supported Indigo Systems camera 1 1 10 National Instruments cable for the Indigo Systems camera not required for Indigo LabVIEW Toolkit installation but needed for full operation of the software 1 2 Installing the Indigo LabVIEW Toolkit Indigo LabVIEW Toolkit is provided on a CD To install simply copy the Indigo LabVIEW Toolkit folder to a convenient location on your hard drive Right click on each of the files and deselect read only Be sure National Instruments LabVIEW IMAQ and IMAQ Vision have been installed on the target machine The toolkit should be installed on the same logical drive as IMAQ and IMAQ Vision P e e l L Indigo Systems LabVIEW 7 Toolkit li I o I Version 1 10
7. original diagram The altered image is finally displayed per iteration using the IMAQ WindDraw function The loop acquires and displays continuously until the stop button on the front panel is pressed and then the IMAQ session is closed and images are discarded 2 2 3 E 3 Example 3 VI Minimize or close Example 2 VI and open Example 3 VI Example 3 Run to display a continuous image imbedded in this panel with a histogram Uses histogram image display setup and image aquisition setup From toolkit em 0 for default according bo image type Calculate every nth image 0 disables histogram ui Interface Name mgd Histogram 12000 10000 SODO 6000 4000 2000 0 i i I i i S 500 0 1000 0 1500 0 2000 0 2500 0 3000 0 3500 0 4000 0 Intensity Standard Deviation p 00 Mean value p 00 Le l Indigo Systems LabVIEW 7 Toolkit Ig l Version 1 10 Enter your interface name and hit run Notice that the embedded image 1s again displayed as in Example 2 VI but now there is also a histogram displayed to the right of the image Set the histogram update period calculate every nth image control to 0 and notice that the histogram 1s disabled Set this control to 10 and notice that the image updates rapidly while the histogram updates only every tenth image Adjust the number of bins 1n the histogram and observe the results Stop the VI and switch to the diagram Let s look at the diagram for Example 3 VI
8. s al Tx to Manual The Thermoteknix palette is then converted to an IMAQ color palette using MAS Construct IMAQ Palette VI Other VIs in the Thermoteknix Palette Utilities library open a def file and find the names of all the Liu load palettes in the file Load Thermoteknix Palette GUI VI provides a simple graphical user interface to facilitate working with these palettes In addition a function to convert IMAQ palettes to LabVIEW color tables is included so that IMAQ and or Thermoteknix color palettes can be used with Lab VIEW picture controls 2 2 6 E Example 5 VI Minimize or close Example 4 VI and open Example 5 VI e l lia Indigo Systems LabVIEW 7 Toolkit Ig Version 1 10 Example 5 NUC and BPR Corrects for non uniformity and replaces bad pixels In an example image When file dialog appears navigate to the settings file that was delivered with your camera InterFace Name error out This example illustrates the use of the Non Uniformity Correction NUC and Bad Pixel Replacement BPR routines included in the toolkit library NUC and BPR llIb Readers unfamiliar with NUC and BPR may wish to take a detour to section 3 3 where the algorithms are discussed If external NUC and BPR are appropriate for your Indigo Systems camera a settings file will have been provided with the camera Locate this file and run Example 5 VI A file dialog will ask you to navigate to the settings file An image will then
9. 1 3 Overview of Libraries in the Indigo LabVIEW Toolkit Indigo LabVIEW Toolkit is a set of image acquisition and analysis subroutines and dlls for the LabVIEW IMAQ programming environment that provides the user with acquisition storage retrieval display and processing of still images and video using supported Indigo Systems Cameras It is assumed that the user is at least somewhat proficient with the LabVIEW IMAQ programming environment Diagrams for many of the VIs in the toolkit are password protected Chapter 2 contains a tutorial featuring a tour of several example applications developed using Indigo LabVIEW Toolkit VIs Chapter 3 contains a description of each VI in the Toolkit Chapter 4 lists error codes specific to the Indigo LabVIEW Toolkit Chapter 5 contains concluding remarks and references for further help Le e e l La Indigo Systems Lab VIEW 7 Toolkit mn IGO Version 1 10 2 Getting Started 2 1 Indigo LabVIEW Toolkit Overview Five VI libraries are included in the toolkit Toolkit Examples llb contains a series of example applications developed using VIs from the other libraries included in the Indigo LabVIEW Software Toolkit These can serve to illustrate the use of the toolkit VIs and in some cases can serve as starting points for developing custom applications Indigo LabVIEW Toolkit Main llb is the main library containing high level functions that most software developers will use most often These include VI
10. 6 images msb or most significant byte The number of images is header 6 2716 header 5 7 NUC BPR elements Isb 8 NUC BPR elements msb The number of elements in the NUC BPR tables is header 8 2 16 header 7 9 12 Camera PN 13 16 Camera SN 17 20 Camera VN 21 24 Camera options 25 26 Case Temp 27 28 FPA Temp 29 30 FPA Mode 31 Long Int Mode 32 Ext Int time 33 34 Int Time 35 Short Int Time 36 37 VDetCom 38 61 not in use 62 Integration time us lsb 63 Integration time us msb The integration time in microseconds is header 63 2516 header 62 64 Sync Mode 0 Internal 1 External The next section contains the NUC and BPR tables The data is stored as a set of three image arrays The first one is the gains table then the offsets then the bad pixel map The tables are identical in size and format to viewable images If the image has M columns and N rows it will have M x N elements each two bytes For example if the image is 316 x 252 pixels then each image occupies 79632 elements or 159264 bytes Thus the first 130 bytes of the settings file are the header the next 159264 bytes are gains then 159264 bytes of offsets then 159264 bytes of bad pixels map The gains are all multiplied by 1000 In other words an entry in the gain table of 1050 represents a gain factor of 1 05 Similarly 2048 is added to each offset In other words an entry of 2059 in the offset table represents an off
11. 7 Toolkit Ig 7 Version 1 10 Inputs Image Rows 252 Image Columns 316 Gray level 4095 Test Image black gray vertical stripes horizontal stripes cross hatch black Error Cluster Outputs Image Array 8 bit IMAQ test image out 12 bit test image out Image array Error Cluster atl in t 3 4 2 D _ Invert Palette VI Invert Color Palette Inverts a color palette Color Palette Out This VI inverts an IMAQ color palette For example running this routine on a palette in which red is hot and blue is cold will produce a new palette in which red is cold and blue is hot Inputs IMAQ Color Palette In Error Cluster Outputs Inverted IMAQ Color Palette Out Error Cluster 70 Indigo Systems LabVIEW 7 Toolkit Version 1 10 remo int 3 4 3 piki Remove Integers from String VI from String Removes integers from string This VI removes all integers from an input string Inputs String In Error Cluster Outputs String Sans Integers Error Cluster Gi 3 4 3 1 IndigoGlobal VI IndigoGlobal Contains items used frequently by Merlin software Image IMAQ Session This global variable contains references to the current IMAQ image and IMAQ session for use in a variety of VIs 71 Le e l I Indigo Systems LabVIEW 7 Toolkit Ig E Version 1 10 color 3 4 4 Indigo Palettes Global VI Indigo Palettes Global Contains standard Indigo Systems Color Palettes FUSION Mo GREEN WHITEHOT Inve
12. Instruments Framer Grabber Board are operating properly To do this navigate to NI Measurement and Automation Explorer MAX There is probably a shortcut to MAX on your desktop Go to Devices and Interfaces and find your IMAQ board You should see something like the following IMAQ PCI 1422 1mg0 We are after the interface name that follows the colon If you used the default settings during installation the interface name is probably img0 Click on the and you should see something like the following Channel 0 Indigo Systems Alpha NIR Click on this and then hit the grab button beneath the menu bar You should see an image from the camera If no image is acquired then the camera board or related software have probably not been properly installed Please reinstall and try again 7 3 Top Level Vis Double click on the library Alpha NIR Control Kit llb The VIs fa Alpha NIR GUI VI and a Alpha NIR Control VI will launch The Alpha NIR GUI VI control panel pops up when the VI runs presenting the user with a simple GUI for controlling the most common camera functions It is designed to be used as a stand alone application or can be called from a larger application Alpha 79 e li a Indigo Systems LabVIEW 7 Toolkit Ig j Version 1 10 NIR Control VI is designed to be used as a subroutine to control the camera when user input is provided separately or is not required Camera control and settings parameters are passed vi
13. NUC and BPR VI and NUC and BPR VI are used See the discussion of p Camera GUI VI and E Example 5 VI in Chapter 2 for examples of the use of NUC and BPR VIs Inputs Error Cluster Outputs Error Cluster 61 Indigo Systems LabVIEW 7 Toolkit Version 1 10 init 3 3 5 Initialize NUC and BPR VI Initialize Indigo dll Initializes dll for HUC and BPR 1 Loads tables with file dialog if requested path is not found 2 Generates error and does not complete steps below if user cancels dialog or if file header indicates images are 0 x 0 3 Does some basic error on nuc and bpr tables 4 Creates blank tables ff tables in file are not valid 5 Initializes dil with tables from file or blank tables Camera Settings File valid tables Gains Table Offsets Table el ECH Columns 104 Ery BPM Table Error in NUC This VI initializes the NUC and BPR dll It must be run prior to running bp NUC and BPR VI The initialization of the NUC and BPR dll takes time and should not be done per Image However Ei Nuc initialization of the dll is required anytime the image changes size When bo Initialize NUC and BPR VI is run the E file 1s loaded from the a path dialog of path not specified the tables are checked using E Check BPM VI l Check Gains VI and Ge Check Oftsets VI If the tables are not found an error is returned and the dll is not initialized If tables are found and are 62 e l lia I
14. Read Camera Settings VI but it can be used separately Familiarity with the icd file will be required for use of this VI Inputs IMAQ Session In Error ln Outputs IMAQ Session Out 90 Le e l La Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 VDetCom Error Out 8 1 19 Receive Camera VI This VI receives serial data from the Alpha NIR camera It is used as a subVI in many of the higher level VIs in the toolkit Data and function code are returned in raw byte form and familiarity with the icd file is necessary to interpret the outputs Inputs IMAQ Session In Error In Outputs IMAQ Session out Data Function Code Error Out CH 8 1 20 Select Gain Mode VI a ain LL image SYNC Mode Select Gain Mode VI and several similar VIs brient Select Image Orientation VI Mode Select son Sync Mode VI Select Video Mode VI are low level VIs that are used in EMHAlpha NIR GUL VI to achieve a radio button functionality for front panel controls When initialize is high the Boolean input array is written directly to the Boolean output array If initialize is low then the Boolean input array is compared to its value the last time the VI was run If one of the Booleans has been set to high since the last run the corresponding element in the Boolean output array is set high and the others are set low Few programmers will use these VIs separately Inputs Booleans In Initialize Outputs Booleans Out Changed
15. There are two ways to do this using MAA Alpha NIR GUL VI Although the controls and indicators are not shown on the front panel this VI allows the programmer to wire an IMAQ Session In to this VI when it 1s used as a subVI and the IMAQ session out can then be passed to the next VI If the IMAQ Session In terminal is not wired the user will be queried for an interface name and an IMAQ session will be opened This new IMAQ session will be closed when the user hits the exit button if Pass Session is wired to false or is not wired If Pass Session is set to true the IMAQ session will be passed out of this VI It can be used by other IMAQ functions but it should be closed before the calling application exits Reserved IMAQ Image This VI uses IMAQ Image number 15 It 1s recommended that programmers do not use IMAQ Image number 15 elsewhere in their code if they are using E Alpha NIR GUI VI Inputs IMAQ Session In Pass Session Error ln Outputs IMAQ Session Out Error Out 7 3 2 Alpha NIR Control VI 81 e l Indigo Systems LabVIEW 7 Toolkit Ig Version 1 10 Alpha NIR Camera Control imaq In IMAG Session out Integration Time us em Video Mode Orientation syne f internal Gain Mode dt low Error in no error Error out Minimize or close Alpha NIR GULVI and open Alpha NIR Control VI This VI will not run unless the IMAQ Session In is wired To use the VI place it on a block diagram as follows
16. VI are the 8 bit image pixels U8 data type and the minimum and maximum intensity used in the compression routine If for any reason the minimum intensity is fed into this VI or calculated from the histogram data is less than zero then zero will be used as the minimum intensity in the compression routine Similarly if the maximum intensity fed into this VI or calculated from the histogram data is larger than 4095 then 4095 will be used as the maximum intensity in the compression routine E Mi I E e e It is essential that Ken Image Compression Init VI be run before this VI is run If this is not done a system crash is likely But the Init VI should not be run each time an image is compressed See E E instructions for the Init VI Also Close Toolkit Library VI should be run once just before the application that used image compression closes Inputs Inpimage the input image pixels array I16 data type Maximum Intensity 0 ignored if AGC 1s selected Minimum Intensity 0 ignored if AGC 1s selected Fixed Limits AGC fixed limits Mean 0 ignored if fixed limits is selected Sigma 0 ignored if fixed limits 1s selected Sigmas for limit 0 ignored if fixed limits is selected Error Cluster Outputs Image pixels out U8 Minimum Intensity employed in intensity windowing Maximum Intensity employed in intensity windowing Error Cluster 35 Le l Indigo Systems LabVIEW 7 Toolkit Ig ia Version 1 10
17. and BPR to the ROI has the advantage of increasing video throughput since fewer calculations are required but considerably more coding 1s needed to implement NUC and BPR on ROIs Programmers interested in pursuing this may wish to contact Indigo Systems Corporation for guidance The first pages of the manual contain contact information After the user exits from the acquisition loop the IMAQ session is closed the NUC and BPR library s TU bpr is closed using Close NUC_BPR Library VI and IMAQ images are destroyed using IMAQ Dispose VI All three of these steps are important 2 2 7 da Camera GUI VI Minimize or close Example 5 VI and open Camera GUL VI 21 Indigo Systems LabVIEW 7 Toolkit Version 1 10 Interface Name Manual l open em AGC o s Weed if cursors aset visible This example is much more complicated that the others It is designed to illustrate the use of the Toolkit VIs along with IMAQ and LabVIEW functions to produce a complete application Let s look at the diagram for Camera GUL VI 22 Le Qe l Indigo Systems LabVIEW 7 Toolkit Ig 7 Version 1 10 Ee srList Name of current VI Set up image embedded at x 50 y 325 in this VI Include title bar title set in IMAQ WindDraw Imade As in the other examples we begin by configuring image display and image acquisition using GU a at o ojo Image Display Setup VI and then continue to El Image Acquisition Setup
18. ann LL 3 acq 3 1 4 set Image Acquisition Setup HI 32 E 3 1 5 l2b 6b OE EE 34 E 3 1 6 ININ mage Compression Init EE 36 mage 3 1 7 SETUP mage Display Setup HI 37 DI 3 1 8 LUIN Reert bt 38 ui load 3 1 9 ENE ro TTT TE 39 Indigo Systems LabVIEW 7 Toolkit Version 1 10 ll Alls Mi 3 1 10 IU JA MH Lo E E E 40 remove 3 1 11 ODES Remove Edges FI 41 3 1 12 PAVE SAVE to Disk ssssc ssssscssssssssssascssssssesssassssssascsssastesssassscssqascsssassesqsasscssaasccssascessasssssassetcsns 43 3 1 13 E Single TAA 44 select 3 1 14 Dal wl Gar Coior Bolente HI 46 3 2 THERMOTEKNIX PALETTE UTILITIES LLB ssssescssssseesvssssescestssssasssuvensanqosgarsabksensenguscansaktesnvoassosaseuzlanfesnoehso 47 DL load 3 2 1 ekpall Load Thermoteknix Palette GUL TL r ADD D E nn 48 3 2 2 def Load Thermoteknix Palette File HI 49 find 3 2 3 pals Find Thermoteknix Palette Nomes HI 50 3 2 4 Tx Pall Load Thermoteknix Color Palette AN E 51 T EE MAG Construct IMAO Palette HI 32 3 2 6 table MaRe EN EE 53 3 3 NON UNIFORMITY CORRECTION AND BAD PIXEL RERPLACEMENT 54 3 3 1 i e UO EE 58 3 3 2 sim ae o EE FF FRFRRRRFrTTTTTFTTTTTFTTTTEFTET 59 3 3 3 E E FFRTrRT7T7 m east eiaasanay E caseneasaes 60 Nuc bpr 3 3 4 close Close NUC BPR L brans HI 61 ax 3 3 5 amp bpr Initialize NUC and DDpLI o EEn ED EEDD EEE AEDE E E AD EEE D EEEa aa an 62 MUC
19. be displayed imbedded as usual in the panel If convenient point the camera at a fairly uniform surface so that the Image appears as a relatively Le e e li La Indigo Systems LabVIEW 7 Toolkit Ig l Version 1 10 uniform shade of gray Switch off BPR using the front panel control Careful examination of the image should reveal a small number of bad pixels that will most likely appear as black or white specs often near the edge of the image If no bad pixels appear do not be concerned It is possible that your camera has absolutely no bad pixels Now turn off NUC You should see some variations in the image perhaps in the form of vertical or horizontal striations This reflects the non uniformity of the gains and offsets of individual pixels in the focal plane Turn NUC and BPR on and notice that the image returns to its original quality Let s look at the diagram for Example 5 VI i No Error gt IMAQ Interface Name DU bpr clase E ee IL error out File dialog to settings file EIE Narre Of Current vi As in previous examples we set up image display and image acquisition and then acquire continuously 1n a loop until the user hits the stop button However before attempting to set up image display and image acquisition we first use init i initialize NUC and BPR VI to initialize the NUC and BPR dll This initialization VI accepts as an input a file path to the settings file but since we d
20. be displayed or not according to the title bar selector and the image can be set to visible or hidden By default IMAQ images are displayed in a separate window that can be dragged to any desired location on the screen closed and minimized Even if the VI that produced the image is closed the IMAQ image will remain Often it is better to embed an image in a Lab VIEW panel making it part of the panel When this is done the IMAQ image will move when the VI panel window is moved but the panel will still scroll under the image When embedding is selected the name of the panel must be specified exactly The coordinates of the upper left corner of the image can also be specified along with an optional color palette The coordinates and the color palette can be updated dynamically 37 A e li es Indigo Systems LabVIEW 7 Toolkit Ig r Version 1 10 Inputs Image IMAQ window number to be configured 0 IMAQ zoom factor to be applied to specified window 1 Title bar selector f Hide show selector t Embed selector f Name of panel in which image should be embedded must be exact Screen coordinates of image 0 0 Color Palette Error Cluster Outputs Error Cluster 3 1 8 lte Invert Revert VI Invert and or Revert Inverts and or reverts an image Image out Inverted Image Ref Reverted Image Ref Error in error out a OJ E 38 Le Qe l Indigo Systems LabVIEW 7 Toolkit Ig i Version 1 10 Th
21. is moved but the panel will still scroll under the image When embedding is selected the name of the panel must be specified exactly The coordinates of the upper left corner of the image can also be specified along with an optional color palette The coordinates and the color palette can be updated dynamically Inputs Image IMAQ window number to be configured IMAQ zoom factor to be applied to specified window Title bar selector Hide show selector Embed selector Name of panel in which image should be embedded Screen coordinates of image Color Palette Error Cluster Outputs Error Cluster CI 8 1 6 IndigoAlphaGlobal VI This global variable contaims a number of variables used throughout the toolkit CH 8 1 7 Interface Dialog VI This VI pops up as a dialog box asking the user to enter the name of the IMAQ interface from which data is to be acquired Many systems may have more than one interface Outputs Interface Name Cancelled 8 1 8 Gediiud Read camera settings VI This VI reads the settings of an Alpha NIR camera Interpretation of the settings requires familiarity with the camera s icd file The camera settings are returned as a byte array with elements as follows 86 Setting Camera ID Case T FPAT FPA mode Long Int Md Ext Int T Int Time Sht Int Time VDetCom Not all Alpha NIR cameras Indigo Systems LabVIEW 7 Toolkit Bytes 16 bytes 2 bytes 2 Bytes 2 bytes I Byte I Byte 2 bytes I Byte 2 Byte
22. short int imer LT us scs senko rik A rs rv Ve l ce kuk keo ekba 90 read 8118 De Read der om HI 90 8 1 19 liva GIN E VP o EE 9 ain 8 1 20 Wade Select Gain Mode HI 9 8 1 21 aain Set Gain Mode HI 9 IT 8 1 22 E EEN 92 KEN set IT 8 1 23 Serdi wE rrOr CHECK orrera 92 8 1 24 EJ Set Orientation VI soen ERE E A AA EIEE 93 8 1 25 Te SOL EE 93 DE B 1 26 BEALS Status LI 93 8 2 OTHER VIS IN THE TOOLKIT iienenenononsuseseseseserenenenersrsrstrtrtr trose r ertve re reto ts trenen S Pere DEDE PEPPES EPES S ES Perene reene eseses esenea 94 o vi ROR COD EE 94 10 CONCLUDING REMARKS WEEN 95 Le o l L Indigo Systems Lab VIEW 7 Toolkit mn IGO Version 1 10 Introduction Indigo LabVIEW Toolkit is a set of image acquisition and analysis subroutines and dlls for the LabVIEW IMAQ programming environment The Toolkit provides the user with acquisition storage retrieval display and processing of still images and video using Indigo Systems Cameras It is assumed that the user is at least somewhat proficient with the LabVIEW IMAQ programming environment Additional information concerning LabVIEW and IMAQ training are available at the National Instruments web page at www ni com Custom software development for selected Indigo Systems imaging products is available from WinSoft Corporation at www winsoft com The block diagrams for many of the VIs in this toolkit are password protected 1 1 Hardware and Software requirements
23. the menu bar You should see an image from the camera If no Image is acquired then the camera board or related software have probably not been properly installed Please reinstall and try again Double click on the VI library Toolkit Examples llb The following six top level VIs will be available Example 1 VI Example 2 VI Example 3 VI Example 4 VI Example 5 VI and Camera GUI VI Each of the examples is discussed below It is assumed that the Indigo Systems camera and National Instruments Frame Grabber boards have been correctly installed 2 2 1 Ex 1 Example 1 VI Open Example 1 VI by double clicking on the name of the VI in the library The VI front panel can be minimized maximized or closed using the buttons in the upper right corner as usual in Windows applications This is a very simple example that shows the most basic use of some of the VIs in the toolkit Error out Example 1 Run to display a continuous image Interface Name Running Example 1 VI Type the name of your interface into the interface name control and hit the run button You should see another VI front panel pop up and you should see an image pop up in a separate window Note that the image window can hide behind other windows on your desktop Wave your hand in front of the camera to verify continuous acquisition of images and then hit the stop button on the pop up VI Let s now look at the diagram for Example 1 VI Le e e li La Indigo Systems LabV
24. to Disk VI Read Header Array Elements from File VI Read Header Array Elements from File VI Le e li La Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 5 Concluding Remarks The Indigo Systems LabVIEW Software Toolkit provides a set of functions that are useful when developing applications that user Indigo Systems cameras Future updates will expand the functionality of the Toolkit Technical support and custom software development are available from Indigo Systems Corporation at 805 964 9797 www indigosystems com 74 kh fe indigo Indigo Systems LabVIEW Toolkit For Indigo Alpha NIR Cameras v 1 1 ve e e l La Indigo Systems Lab VIEW 7 Toolkit In IGO Version 1 10 6 Introduction Indigo Alpha NIR LabVIEW Toolkit is a set of image acquisition and camera control subroutines for the LabVIEW IMAQ programming environment It 1s assumed that the user is at least somewhat proficient with the LabVIEW IMAQ programming environment Additional information concerning LabVIEW and IMAQ training are available at the National Instruments web page at www ni com Custom software development for selected Indigo Systems imaging products is available from WinSoft Corporation at www winsoft com The block diagrams of many of the low level VIs contained in this toolkit are password protected Indigo Alpha NIR LabVIEW Tookit is most powerful when used in conjunction with the more general Indigo LabVIEW Toolkt The more general toolkit
25. use of this VI Inputs IMAQ Session In Error In Outputs IMAQ Session Out FPA Temperature Error Out 8 1 15 liimer Read Int Timer VI This VI returns the contents of the normal integration timer register as a byte array with two Aphis elements It 1s used as a subVI in Read Camera Settings VI but it can be used separately Familiarity with the icd file will be required for use of this VI Inputs IMAQ Session In Error In Outputs IMAQ Session Out Integration Timer 89 Le e l La Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 Error Out 8 1 16 Read long int mode VI This VI returns the long integration mode register as a byte array with one element It is used as a alpha subVI in Read Camera Settings VI but it can be used separately Familiarity with the icd file will be required for use of this VI Inputs IMAQ Session In Error ln Outputs IMAQ Session Out Long integration mode Error Out 8 1 17 Read short int timer VI This VI returns the contents of the short integration timer register as a byte array with one element alpha It is used as a subVI in Read Camera Settings VI but it can be used separately Familiarity with the icd file will be required for use of this VI Inputs IMAQ Session In Error ln Outputs IMAQ Session Out Short Integration Timer Error Out Ch read 8 1 18 Read VdetCom VI SE This VI returns VdetCom as a byte array with two elements It 1s used as a subVI in
26. 1 Read Case Temperature Vl This VI returns the temperature of the Alpha NIR case as a two element byte array It is used as a alone subVI in Read Camera Settings VI but it can be used separately Familiarity with the icd file will be required for use of this VI Inputs IMAQ Session In Error ln Outputs IMAQ Session Out Case Temperature Error Out 8 1 12 Read Extended Integration Timer VI This VI returns the contents of the extended integration timer register as a byte array with one Aphis element It is used as a subVI in Read Camera Settings VI but it can be used separately Familiarity with the icd file will be required for use of this VI Inputs IMAQ Session In Error In Outputs IMAQ Session Out Extended Integration Timer Error Out 88 Le e l La Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 read 8 1 13 Read FPA Node VI This VI returns the contents of the extended FPA mode register as a byte array with two elements It alna is used as a subVI in Read Camera Settings VI but 1t can be used separately Familiarity with the icd file will be required for use of this VI Inputs IMAQ Session In Error ln Outputs IMAQ Session Out FPA Mode Error Out CH 8 1 14 Read FPA Temp VI This VI returns the FPA temperature register as a byte array with two elements It is used as a subVI SE in Read Camera Settings VI but it can be used separately Familiarity with the icd file will be required for
27. 3 3 6 amp BPR NUC and BPR Vl 0 ccccccccccccccccccccsccccccuucccccucccccuecccuuuecccuucscceuuecescsuscssuausesceuuescssuueccsuuusccsuuuceseuecceuauses 63 read EPR 3 3 7 EEFE EE EE 64 pead Gains 3 3 8 File Read Gains from Settings File HI 66 read offset 3 3 9 Ele Read Offsets from Settings File VI EEN 67 mi read ile 3 3 10 Healer Read Header Array Elements from FilehHf EERE EEE 68 3 4 LOW LEVEL TOOLKIT UTILITIES s esseescescescessessessesscessescessesveassescessessessesveavsescescesvessesvenvcascescescesvesse 69 Indigo Systems LabVIEW 7 Toolkit Version 1 10 3 4 1 Ja e EE 69 Iert 3 4 2 D Invert 12 AA 70 remove integers 3 4 3 Remove Integers from String HI 71 color 3 4 4 Ei Ma co si ark Global E 72 3 5 OTHER LIBRARIES AND VIS IN THE LOOLKIT sasa santabobonnaisosons osta kuton ksomas oi E bao nesala TAEAE ER ES IJ IOM RT UL TTT TITT TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT 73 5 CONCLUDING REMARK E 74 EN TRODUC TION RE 76 6 1 HARDWARE AND SOFTWARE REOUTIREMENTS DDE EA PEED ODEEADPN ES PEPES SEEDS DEEDS nE onnenn ann 76 6 2 INSTALLING THE INDIGO ALPHA NIR LABVIEW TOOLKIT AA 76 6 3 INDIGO ALPHA NIR LABVIEW TOOLKIT ONERNIDW reann enana reao E NTE rE erian 78 T GEITINGSIARIED ooe EEEa eE ATASA AAE Aaaa 79 7 1 INDIGO ALPHA NIR LABVIEW TOOLKIT OVERVIEW cceesesssneceeeeeeseesneeeeeeceeessenaaeeeeceesseesaaeeeeeeeeeeesaaaeeeeeeeeeeas 79 Tee VARYING CAME
28. 82 Le e li La Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 Invert amp Revert Y error out error in KO error GL In this example we have initialized the IMAQ session and passed the session to Alpha NIR Control VI We have set the camera to internal sync normal video mode inverted and reverted image orientation 1000 microseconds integration time and high gain mode We have closed the IMAQ Session Out from the VI IMAQ Sessions must be closed before your application terminates See IMAQ documentation for more information Inputs IMAQ Session In Gain Mode Integration Time Orientation Video Mode Sync source Error In Outputs IMAQ Session Out Error Out 8 Lower Level and Other VIs 8 1 Lower Level Toolkit VIs This chapter contains brief descriptions of the low level VIs in Alpha NIR Control llb Many programmers will not use most of these VIs directly but they are used in the top level VIs described in chapter 2 Direct use of the following low level VIs are likely to be particularly useful to 83 Le e l La Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 programmers seeking to customize camera control Camera Write Read VI bt Read IT CE R camera settings VI Read Camera IT VI Set IT with Error Check VI 8 1 1 Bytes2Short VI This is a low level utility that converts a two element array of 8 bit integers to a sixteen bit integers Most programmers will not use thi
29. AQ resource The image can be displayed to an IMAQ image window and or saved to disk in jpg png bmp and tiff formats Note that 12 bit images are compressed to 8 bits for saving to disk See save image to disk VI for additional information Edge removal is available as well If this image is displayed to an IMAQ image window the IMAQ defaults will be used unless this window has been previously formatted using er m setup Image Display Setup NL For applications in which acquisition speed is not an issue this VI may be a satisfactory acquisition routine Tremendous increases in acquisition speed are possible using the lower level setup and acquire routines in the main library Outputs of Single Image VI include a Boolean variable that indicates whether an image has successfully been acquired the number of columns and rows in the image after edge removal if selected and the image itself This VI is thus useful for checking basic camera operation in the initialization portion of a more complex application requiring faster acquisition See Camera GULVI in Toolkit Examples llb for an 44 Indigo Systems LabVIEW 7 Toolkit Version 1 10 ve indigo example Also the tutorial portion of this manual includes an exercise that uses this VI to build a simple application Inputs Outputs Interface Name often img0 Image Name IndigoImage Save image to disk f File path dialog if empty Image file type bmp Di
30. EW 7 Toolkit Ig ii Version 1 10 3 1 12 22 2 Save to Disk Save Image to Disk Saves in selectable file formats Acquired imag 6 bit pi map out Error ont This VI saves an image to disk in the selected format The standard bmp jpg png and tiff formats are currently supported The color palette defaults to standard gray scale white hot 1f the palette connector is unwired A file dialog will be called if the file path is not wired Note that 12 bit images will be compressed to 8 bits for saving to disk This compression is accomplished by dividing all of the 12 bit intensity values by 16 The resulting image pixels are provided as an output array If the input image is already 8 bit no further compression will be applied Inputs Image to be saved File Path dialog if not connected File Type bmp Color Palette Error Cluster Outputs Array of 8 bit image pixels Error Cluster 43 e l I Indigo Systems LabVIEW 7 Toolkit Ig j Version 1 10 3 1 13 image Single Image VI Acquire Single Image Acquires a single image from the specified interface and determines its size Interface Mame Acquired image Image name Merlin Image Image Acquired Save 8 bit Image to Disk c3 Not A Path File Path BMP File Type Display Image 6 fe LI Image window For display 0 15 Remove Edges a BR Edge size Columns Home Error in no error error out This VI acquires a single image from the specified IM
31. EW 7 Toolkit Version 1 10 CONTENTS PINT RODUC HON ERT TTT TRRERRTRTT 7 1 1 HARDWARE AND SOFTWARE REQUIREMENTS sssssssssnooonnnostno ont tb stro norra nreo DEEA PEES PD ERAD P EEE SPEEDS EEEE SEED EEEa nnana nn 7 1 2 INSTALLING THE INDIGO LABVIEW TOOLKIT E 7 1 3 OVERVIEW OF LIBRARIES IN THE INDIGO LABVIEW TOOLKIT 8 GETTING S PAR FED 15 55 5 65 5 6684 X earo OKO REO EIO KAO DEO KEKO GEKO KUNO KEKO KENO KAO KIAN O KANON RAN KODON KUKE KO KAO KENO KEKO KEON 9 2 1 INDIGO LABVIEW TOOLKIT OVERVIEW ssssccessssccsssssccssssscssassesqsassesussesqsssseqssssessssseeqsssseqsssseqnsssseesss 9 VN E 9 ul Ex 217712 a HI 10 merlin VALA SE e er JET FTITTTTTTETFFTT FTTTL L la merlin uo TERNARA A tnta tntantentanseenaenn tn tantantantantantantaneaei 14 merlin 2 2 4 Ex S Example 3 VI Moditfied tataari titist s taratar Etin EA AA rE nE NEE a aaraa n aneneen 15 merlin 22 Ex 4 EE 16 Indigo 2 2 6 EX 27 Example SV ecccccccccccccscscscscscsesesesvsvsvsvsvsvsvsvssususucssesevavevavevevavavavavavavavsvsvsvsvsusesesesesesesacavacaueseseseseseceees 18 m 227 EMIS Camera E1 0 A A 2 TOOLKIT VIREFERENC E zs orta ks eka Oak Da AKRA KO OK ROOKE A O Ea KR Kak KKK RK 28 3 1 INDIGO LABVIEW TOOLKIT VANE craris eege 28 7 3 1 1 close Close Toolkit i a EE 26 u 3 1 2 MSIE Continuous Image E 29 WA 3 1 3 hist Tie TN ecstacy rhe ain aes E tbe ch tan ttc rm cea OE ope ets ae
32. IEW 7 Toolkit In Ig I Version 1 10 Interface Name error out Set up continuous Acquire Close the Dispose of the IMA image acquisition IMA Session image when done gegen IMPORTANT IMPORTANT The first VI in the diagram 1s Image Acquisition Setup VI This sets up the image acquisition parameters such as interface name Image name memory location on board or on computer edge removal selection and edge size for removal Most of the inputs are unconnected in this example because the defaults are satisfactory The most important output of this VI 1s the IMAQ session LA The IMAQ session must be connected to the next VI in the chain Continuous Image Acquire VI Double click on the VI s icon to open the front panel Notice that this is the pop up VI that appeared when Example 1 VI was run Right click on the icon and verify under VI properties that the window display has been customized to include the pop up feature Continuous Image Acquire VI has as inputs the IMAQ session that must be connected window number for display defaults to IMAQ window zero a color palette input that allows false color schemes to be applied to the image and an image title that appeared at the top of the IMAQ image The IMAQ session out of Continuous Image Acquire VI must be connected to the next VI the IMAQ Close Session VI It is essential that all IMAQ programs close their IMAQ sessions at the end of a run Failing to do this will li
33. ND DISFLA Tx Pal Ur ka select tl La EI Invert Pa IL TF Pal ml Ea eta gE Remove Edges Notice that this is a more sophisticated use of color palettes than was illustrated in the previous select examples In Camera GUI VI the user can change color palettes during operation using Set Color Palette VI Operate the associated buttons and observe the operations Consider again the diagram for Camera GUI VI 26 Le Qe l Indigo Systems LabVIEW 7 Toolkit Ig Version 1 10 A a No Error KN p onononnonononOoODOoODOOOOOOOOOOOOOOOOOOEJ po jp Ennonononononnonononnonononnononononno References for altered images Pol Inverted lIMAOf p bits rap p bits goe Shifted or compressed oeron Interface Name B bits 7 Labs fo Det d mm ERT gt Scale Editable mE a eee mm ee 5 J close close H cose B ot using edge removal mej L VW E Ja f ou MUST run INIT AGC li p mage acquisition before using the AGC Fixed imit data compression ame of current VI Set up image embedded at x 50 y 325 in his VI Include title bar compression dll is closed using Close Toolkit Library VI the NUC and BPR dll is closed using LIC pr Close NUC BPR Library VI and all IMAQ images are destroyed using IMAQ Dispose VI 27 je e li a Indigo Systems LabVIEW 7 Toolkit Ig 7 Version 1 10 A Toolkit VI Reference
34. RA OPERATIOUN sariini an a I E a Ea 79 Teo dro IE OIN hs TT A y y FPFPF TTU F7E 79 731 IINU ha NIR GUL VL sen iiin 80 7 3 2 CONTR Alpha NIR Control H l 8 LOWER LEVEL AND HEB Wegen deene geed geed eege 83 8 1 IMO e Ee KO 0 0 UK E 83 6 1 1 EE 84 8 1 2 Camera Virile RKead ARTE E EEES 84 L FPA 8 1 3 RED Display FPA Register HI 84 MN aco 8 1 4 sel Image Acquisition Setup for Alpha HI 85 Image 6 1 5 SEE Image Display Setup for Alpha VI ciccosccsecesaccasraeatdsccaeessacnassstdacedanchanasaidsaecasacasnassaddanedaasdanassidsancacaaacs 85 E 8 1 6 AIPM tie AfnboatZiobal bt 86 8 1 7 ELI e Dialog IT 86 Alpi 6 1 8 ings Read camera Settings HI 86 read 8 1 9 WESI Redd Camera ID VA EEE EE P E 87 Indigo Systems LabVIEW 7 Toolkit Version 1 10 Read 8 1 10 EE DOE REVO OMERO D Vl sukaco nae KO KUN KEK EKK ASA KEN KO KE KEKO VEKTO KE AMEN KION KA KURVA EE KES KEA KASA Ka Sa SS read 6 1 11 ESEI Redd CASE Temperature NI ui snr Kr p lA 88 ext irit 8 1 12 time Read Extended Integration Timer VI s sssssssssssssssssssssssssssssssssssssss sss e 88 read 8 1 13 FPA Read FPA Mode HI 89 a read oko IELU REAd TE A T CMO EE 59 In 8 1 15 JINAN Mere 1 I I L EE AH eng o 10 MOLE KORO lone Uu EE 90 sht int 8 1 17 SM Redd
35. This chapter contains an overview of each VI in the toolkit libraries Indigo LabVIEW Toolkit Main llb Thermoteknix Palette Utilities llb and Low Level Toolkit Utilities llb One additional library Extlibspdlb available at the National Instruments web site is included here for convenience The library Toolkit Examples llb is described in chapter 2 It is recommended that the reader examine the use of the VIs described below in the examples before attempting to use them in custom applications The icon name and front panel of each VI is presented below followed by a description and a list of inputs and outputs An asterisk on an input indicates that it is required for the VI to run and parenthesis enclose defaults and brief comments about inputs and outputs where appropriate 3 1 Indigo LabVIEW Toolkit Main llb IN mo 3 1 1 Close Toolkit Library VI Close Toolkit dlls Error aut This VI closes the dll used for Image data compression This VI should be run once as the E mu P Mu a Init e E application closes if 2b 8b Image Compression VI and Ga Image Compression Init VI are used 28 p e li e Indigo Systems LabVIEW 7 Toolkit Ig j Version 1 10 See the discussion of Camera GUI VI in Chapter 2 for an example of the use of image compression VIs Inputs Error Cluster Outputs Error Cluster Ea 3 1 2 Continuous Image Acquire VI iContinuous Image Acquire Acquires IMAQ images continuously from the r
36. VI Provided no error is generated during setup we enter the sequence structure frame 0 In this frame we initialize some variables and the appearance of the cursors on the histogram 23 Indigo Systems LabVIEW 7 Toolkit Version 1 10 Jo Error KN J 0O References for altered images Pol Invertedl lIMAOF E bits 7 imag p bits gt IMAQ E Shifted or compressed IMO E Jo DeF S SI 1 pescale Minimum tot koj gt Scale Editable ku a X p ay nuc Ms e e 5 J close L close 8 ou MUST run INIT AGC before using the AGC Fixed imit data compression ame of current VI Get up image embedded at x 50 y 325 in his VI Include title bar OOODOOOOOODOOOODODODODODODOOOOOOOOOOODODODODODOODOOOOOOOOOODODODODOODOOOODODODOODOODOODODODOO title set in IMAQ WindDraw A The next frame of the sequence structure contains the main acquisition loop the while loop Before E KR l Init the main loop we initialize Automatic Gain Control using Image Compression Init VI Image intensity compression or windowing is discussed later in the manual Users unfamiliar with image A Mu i Init intensity windowing may wish to take a detour to the discussion of kal Image Compression u Init VI and Ju Compression VI in sections 3 14 3 15 before proceeding 24 Le e li e Indigo Systems LabVIEW 7 Too
37. a the connector pane to Alpha NIR Control VI sr i ZIMdlAlpha NIR GUI VI Alpha NIR Camera Control Sub Panels Integration Time e a A0 000E 0 Microseconds FPA Status Sync Mode Image Orientation Internal External Hormal Invert Revert Invert A Revert error in no Error error out Gain Mode Video Mode High Gain Low Gain Hormal Test Test patternd pattern 2 Running MSA Alpha NIR GULVI Run the VI A pop up window will ask you to enter the name of the interface you want to acquire data from The name of the interface was determined in section 2 2 above and is probably img0 Type in the name continue After a few second delay the current camera settings are displayed on the front panel along with a continuously acquired image from the camera If the camera was in external sync mode it was reset to Internal sync Change some of the settings such as Image orientation video mode and so on Observe the results Hit the FPA and Status buttons and observe the pop up panels that display additional camera parameters such as the contents of the FPA register Additional information about the FPA register can be obtained from the Alpha NIR icd file This VI can be used as a subVI When it is called the front panel will open allowing the user to control the camera 80 Le e e li La Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 IMAQ Sessions In order to communicate with a camera an IMAQ session must be opened
38. bit 12 bit 14 bit or 16 bit images With an 8 bit image there is no ambiguity The data type of the image defines the resolution and there is no need to wire the Image 40 Le Qe l Indigo Systems LabVIEW 7 Toolkit Ig 7 Version 1 10 resolution input However 12 14 and 16 bit images all use the I16 data type and thus it 1s necessary to wire the image resolution to 4096 12 bit 16384 14 bit or 65536 16 bit If a 12 bit image is fed into this VI but the image resolution is not set then the image resolution will default to 65536 Pixels in the original image that have a value of zero would be assigned the intensity 65535 in the output Image while pixels with the 12 bit maximum intensity of 4095 would be assigned the intensity 65535 4095 61440 in the output image The inverted image input should be wired to the IMAQ create image VI with the appropriate image type selected Inputs Image in Invert image Reference to inverted IMAQ image Image resolution 1 needed only for 12 bit or 14 bit images Error Cluster Outputs Inverted polarity image out Error Cluster 3 1 11 ledges Remove Edges VI Remove Edges Removes the specified number of pixels from all edges of the image ME d H doe size ROL d oio Image In Image out eu au eee Error In LUES 41 Le e l La Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 This VI removes the specified number of pixels from each edge of th
39. ction to the NUC and BPR functions is internal to the dll and does not need to be wired by the LabVIEW programmer Inputs Input image pixels NUC on BPR on Error Cluster Outputs Corrected image pixels Error Cluster read 3 3 7 Fic_ Read BPR from Settings File VI Read Bad Pixels Array BFR File Header status code 64 Le e li La Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 init Nuc This VI loads the Bad Pixel Map from the specified settings file It is used as a sub VI by L amp bpt Initialize Library VI but can also be used as a stand alone in principle The file header for the read Fil settings file must be read first using Read Header VI and passed to this VI Most programmers will not use this VI directly Inputs BPR File Path File Header Error Cluster Outputs Bad Pixel Map Rows Columns Error Cluster 65 pe e e li a Indigo Systems LabVIEW 7 Toolkit Ig E Version 1 10 pead 3 3 8 Read Gains from Settings File VI Read Gains Array File dialog if file not found Ouputs include file header rows columns file path copy or dialog results and gains table Gains File Gains file path Mot A Path if cancelled Columns Error in not an error code init Nuc This VI loads the Gains Table from the specified settings file It is used as a sub VI by L ber Initialize Library VI but can also be used as a stand alone in principle The file header for t
40. distinguish between images sequences and settings file in the discussion that follows Each of the three sections is described briefly m the figure and then in more detail The header contains information about the software version the camera e its senal number and information about the camera settings at the time the SEqUENCE Was acquired The MJC and BPM tables are next This information is stored in the form of three images arrays see bdow The first contains the gain correction factors for each pixel multiplied by 1000 The second contains the offset corrections with 2046 added to each entry The thirdis the bad pixel map with ls representing bad pixels and U s representing good pixels The image arrays are stored next Fach imageis stored as an array of 16 bit data although current Indigo owstems cameras make use of 12 bits The header portion of the sequence file contains the software and hardware settings in use at the time the image sequence was acquired Header elements and comments each element is a 16 bit or 2 byte integer 0 major software version number 55 Le e e li La Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 I minor software version number 2 number of elements in header Allows for future expansion of the header file while maintaining compatibility with older sequence and settings files 3 columns in each image 4 rows in each image 5 images lsb or least significant byte
41. e input image This is often employed to remove defective pixels that are frequently found near the edge of a focal plane Edge Ea sej s as o Jo l l removal is included in Image Acquisition Setup VI which uses this routine It is also possible to turn on or off edge removal or change the size of the edge to be removed while acquisition is in E E progress However some care must be taken when using this VI in combination with Image Compression VI If the size of the image is changed during acquisition and image intensity Fe Mi Init compression or windowing is employed it is essential that Ga Image Compression Init VI be run before the resized image is subjected to data compression If this is not done the likely result is a system crash with loss of any unsaved LabVIEW code In Camera GUI VI in Toolkit Example llb this problem is solved by applying edge removal after data compression Data compression always takes place on the full size image and the edges are removed just before final display This approach has the advantage of simplifying the code On the other hand reinitializing the dll and applying compression to the smaller image has the advantage of increasing the frame acquisition rate Inputs Image mn Edge removal selector f Edge size in pixels 0 Error Cluster Outputs Image with or without edges ROI X resolution Y resolution Error Cluster 42 Le Qi l Indigo Systems LabVI
42. e interface name must be exactly correct and can be obtained for your system using National Instruments Automation Explorer The image name is optional and defaults to Indigolmage The memory location to which images are written can be either the system computer RAM or the RAM on the IMAQ board Often each new image will overwrite the previous image and thus memory is not an issue However if multiple images or 32 Le e li La Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 Image sequences are to acquired use of RAM can be considerable Consult documentation for your system and board to determine the amount of memory available in each case If edge removal is selected the specified number of pixels will be removed from each edge of the image This is often employed to remove bad pixels that are frequently found near the edge of the focal plane Inputs Interface Name often img0 see MAX Image Name IndigoImage Memory location System Edge Removal Select f Edge size for edge removal 0 ignored if edge removal is not selected Error Cluster Outputs IMAQ Session Image reference to IMAQ image Region of Interest for edge removal Error Cluster 33 pe e li a Indigo Systems LabVIEW 7 Toolkit Ig E Version 1 10 2h sbImage Compression VI Image Data Compression YI This YI maps a 12 bit image ko an 8 bit image as follows Pixels in 12b Pixels in 8b p min D min lt p lt mak p min 255f max mi
43. e will overwrite the previous image and thus memory is not an issue However if multiple images or image sequences are to acquired use of RAM can be considerable Consult documentation for your system and board to determine the amount of memory available in each case The more general Indigo LabVIEW Toolkit contains the similar VI Image Acquisition Setup VI that has additional features Inputs Interface Name often img0 see MAX Image Name Memory location Error Cluster Outputs IMAQ Session Image reference to IMAQ image Region of Interest for edge removal Error Cluster 8 1 5 Image Display Setup for Alpha VI This VI formats the display of the IMAQ image destined for the specified IMAQ window The zoom factor will zoom into or out of an image making the window up to 16 times larger with a zoom factor of positive 16 or sixteen times smaller with a zoom factor of negative 16 The title bar can be displayed or not according to the title bar selector and the image can be set to visible or hidden By default IMAQ images are displayed in a separate window that can be dragged to any desired location on the screen closed and minimized Even if the VI that produced the image is closed the IMAQ image will remain Often it is better to embed an image in a LabVIEW panel making it part 85 Le e l La Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 of the panel When this is done the IMAQ image will move when the VI panel window
44. er Indigo Systems cameras Future updates will expand the functionality of the Toolkit Technical support and custom software development are available from Indigo Systems 805 964 9797 or www indigosystems com 95
45. esource specified in the IMAQ session input Must run Acquisition Setup V I before this VI IMAQ Session In IMAQ Session Out Image Title IndigoMerlin Image In Window Number 0 15 La This VI initiates continuous image acquisition to the specified image window E image acquisition setup VI must have been run before this VI is called and the IMAQ handle generated 29 Le e e li La Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 there must be passed to this VI If setup Image display Setup VI has been run the image will be displayed as per settings If not IMAQ default settings will be used to display the image This VI will pop up when called and will acquire and display images continuously until the stop button is pressed Inputs IMAQ session in Image Title Indigolmage Image In reference to image to be acquired IMAQ image window number 0 15 defaults to 0 Color Palette Error Cluster Outputs IMAQ session out Error Cluster 30 e l Indigo Systems LabVIEW 7 Toolkit Ig l Version 1 10 3 1 3 Lhist_ Histogram VI Histogram Calculates the histogram of the input image with the specified number of bins Calculates a new histogram for every nth imagewhere nis specified as an input Histogram FA Bins 0 for default according to image typet UNS Calculate every nth image 0 disables a l fe 1000 0 000 0 Inte
46. he read Fil settings file must be read first using Read Header VI and passed to this VI Most programmers will not use this VI directly Inputs Gains Table File Path File Header Error Cluster Outputs Gains Table Rows 66 Indigo Systems LabVIEW 7 Toolkit Version 1 10 Columns Error Cluster fea offse le 3 3 9 Ei i Read Offsets from Settings File VI Read Offsets Offzet File Columns Header Par oe Error in not an error init Nuc This VI loads the Offsets Table from the specified settings file It is used as a sub VI by Initialize Library VI but can also be used as a stand alone in principle The file header for the read settings file must be read first using Read Header VI and passed to this VI Most programmers will not use this VI directly Inputs Offsets File Path File Header Error Cluster Outputs Offsets Table Rows 67 Indigo Systems Lab VIEW 7 Toolkit Version 1 10 Columns Error Cluster read 3 3 10 Read Header Array Elements from File VI This WI uses low level read file VI to obtain the header info From asettinos File or image sequence File iagram and or documentation for header elements new File path Elements in header This VI loads the Header Array Elements from the specified settings file It is used as a sub VI by init Nuc Initialize Library VI but can also be used as a stand alone in principle Most programmers w
47. id not connect this input a file dialog resulted Note that the initialization function in this dll MUST be called before other functions in the dll are called Failure to initialize the dll may result in a system crash The dll should not be initialized per frame as this will slow acquisition In the acquisition loop the IMAQ image is converted to an array and this array is passed to MUC amp BPRINUC and BPR VI The array of corrected image pixels is then converted back to an IMAQ image for display Caution 20 Le e l La Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 The NUC and BPR routine uses data from the settings file that include the gain and offset of each pixel in the focal plane as well as a bad pixel map Initialization of the dll involves passing these tables of data from LabVIEW to the dll It is essential that the correct settings file for the particular camera serial number specific be used Also it is essential that the entire image be passed to both init nuc MOC bprllnitialize NUC and BPR VI and a UC and BPR VI An attempt to use these VIs on an image of a different size will likely result in a system crash In particular any ROI selection should take place after NUC and BPR have been completed Using the lower level VIs in NUC and BPR IIb it is possible to get around this limitation and apply NUC and BPR routines directly to an ROI rather than selecting the ROI from a corrected image Applying NUC
48. ill not use this VI directly Inputs Settings File Path Prompt if file not found Error Cluster Outputs File Path to Settings File Elements in Header Header Error Cluster 68 Indigo Systems LabVIEW 7 Toolkit Version 1 10 3 4 Low Level Toolkit Utilities 3 4 1 Test Image VI Test Image Creates a number of 16 bit test images and the corresponding image arrays Image Arrav Dm ENN Cm 12 b Image Gut Gray Level A bit test image error in no error error out This VI produces a variety of simple images and equivalent 16 bit image arrays It is useful for making reference images and test images and for debugging some image processing routines The user can select from among the following test images Black and gray images are uniform while the vertical stripes image contains stripes of width four pixels that alternate between the gray level and 0 black Horizontal stripes works similarly and cross hatch contains both horizontal and vertical stripes Note that connecting the 12 bit image directly to IMAQ WindDraw VI can yield unexpected results because IMAQ WindDraw VI scales floating point and images with integer pixels greater than 8 bits for display according to Display x y src x y min 255 max min Thus a 16 bit image with a uniform gray level of 3000 will appear black when displayed by IMAQ WindDraw VI See IMAQ documentation for more details 69 Le Qe l Indigo Systems LabVIEW
49. includes many image analysis and processing functions 6 1 Hardware and Software requirements To install Indigo Alpha NIR LabVIEW Toolkit you will need the following 6 1 1 IBM compatible Pentium based computer Pentium III 800 MHz or better recommended 6 1 2 XGA 1024 x 768 or better screen resolution 6 1 3 Windows NT or Windows 2000 operating system 6 1 4 100 MB of available hard drive space 200 MB or more recommended 6 1 5 256 MB RAM memory 512 MB recommended 6 1 6 National Instruments LabVIEW 7 0 Express or higher full development version 6 1 7 National Instruments IMAQ version 2 6 or higher and IMAQ Vision Development Module version 7 0 or higher 6 1 8 National Instruments PCI 1422 Frame Grabber Card 6 1 9 Indigo Systems Alpha NIR camera 6 1 10 National Instruments cable for the Alpha NIR camera not required for Indigo Alpha NIR LabVIEW Toolkit installation but needed for full operation of the software 6 2 Installing the Indigo Alpha NIR LabVIEW Toolkit Indigo Alpha NIR LabVIEW Toolkit is provided on a CD 76 Le o li ke Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 To install simply copy the Indigo Alpha NIR LabVIEW Toolkit folder to a convenient location on your hard drive Right click on each of the files and deselect read only Be sure National Instruments LabVIEW IMAQ and IMAQ Vision have been installed on the target machine The toolkit should be installed on the same
50. is VI inverts flips vertically or reverts flips horizontally and image The inverted image and reverted image references should be wired to the IMAQ create image VI and the image in should be wired to the image that 1s to be inverted or reverted The invert and revert selectors are independent Neither either or both functions can be selected during operation Inputs Invert image selector f Revert image selector f Image in Inverted Image Reference Reverted Image Reference Error Cluster Outputs Inverted reverted Image out Error Cluster 3 1 9 Load Palette Load Color Palette Loads a def color palette Path to def file Palette g error in 39 Le e l lia Indigo Systems LabVIEW 7 Toolkit Ig j Version 1 10 This VI uses VIs in the Thermoteknix Palette Utilities llb to load color palettes from Thermoteknix def files Inputs Path to def file Error Cluster In Outputs Palette Inverted Palette Error Cluster Out 3 1 10 2 Polarity VI i Polarity Inverts the polarity of an image A pixel value Pij is replaced by resolution pij If resolution is not set the image type is used to determine the resolution e g 8 bit or 16 bit Image resolution ignored if not set 0 Se Invert Image Image in Image out E Error in status code This VI inverts the polarity of an image so that high intensity pixels become low intensity pixels and vice versa This VI can accept 8
51. kely result in a system crash Finally all IMAQ windows are closed It 1s often advisable to set the VI properties of an application to hide the abort button and force the user to stop the application via a front panel button thus allowing the programmer to terminate execution in a controlled manner To access this capability right click on the VI icon and select VI Properties In the pop up window select Window Appearance and then Customize Deselect Show Abort Button This technique is employed in this and other examples included in the Toolkit Notice that error propagation is included in this example VIs in this toolkit include an error input cluster and an error output cluster Use of the error propagation and error handling features in LabVIEW is strongly encouraged p e l lia Indigo Systems LabVIEW 7 Toolkit Ig E Version 1 10 Each of the Indigo LabVIEW Toolkit VIs in this example and the following examples are described more fully in chapter 3 2 2 2 Ex Example 2 VI Minimize or close Example 1 VI and open Example 2 VI Example 2 Run to display a continuous image imbedded in this panel InterFace Name ot code Type your interface name into the control and hit run Notice that the image now appears to be built into the VI panel We say that it is embedded in the front panel of Example 2 VI Hit the polarity revert and invert buttons and observe the results ideally while waving your hand in front of the camera
52. le indigo Indigo Systems LabVIEW 7 Toolkit User s Guide For Indigo Systems Cameras Version 1 10 321 0026 10 September 2003 Indigo Systems Corp Le o l L Indigo Systems Lab VIEW 7 Toolkit In IGO Version 1 10 If You Need Help Technical Support If you need help at any time with the installation or use of the Indigo LabVIEW Toolkit please call Client Services at Indigo Systems 805 964 9797 or visit our website at www indigosystems com and click on the Client Services button Disclaimer In no event shall Indigo Systems or its representatives be liable for any consequential damages whatsoever including without limitation damages for loss of business profits business interruption loss of business information or other loss arising out of the use of or inability to use the Indigo LabVIEW Toolkit Copyright Trademarks and Version Copyright 2002 Indigo Systems Corp All rights reserved No part of this document may be reproduced stored in a retrieval system or transmitted in any form or by any means electronic mechanical photocopying recording or otherwise without prior written consent of Indigo Systems Corp 05 2002 Initial Release This manual was updated to Indigo LabVIEW Toolkit version 1 0 09 2003 Update to include operation with current NI software See Section 1 1 for details Indigo Systems is a registered trademark of Indigo Systems Corporation 1 2 Indigo Systems LabVI
53. lements equal to 1000 or a gain correction of one of size rows x columns is returned Inputs Rows Columns Gains Table Error Cluster Outputs Gains Table Valid true if submitted table is valid Error Cluster 59 e l Indigo Systems LabVIEW 7 Toolkit Ig l Version 1 10 3 3 3 Check Offsets VI Check Offsets Checks to make sure offsets table exists and all entries are between 0 and 4096 Returns all 0 s no offsets if offsets are not valid NOTE The NUC dll subtracts 2046 from all of the offsets in the table Thus an offset entry in the table with a value of 2046 corresponds to an offset of O no offset This arrangement allows the offset values to be stored in unsigned integer Format Offsets Out G m C a Offsets In Valid Table error ouk This VI performs basic error checks on the offsets table For example all offsets should be between 0 and 4095 If the submitted offsets table is not valid a blank offsets table with all elements equal to 2048 or an offset correction of zero of size rows x columns is returned Inputs Rows Columns Offsets Table Error Cluster Outputs Offsets Table Valid true if submitted table is valid Error Cluster 60 Le Qe l Indigo Systems LabVIEW 7 Toolkit Ig ii Version 1 10 mL 3 3 4 Close NUC BPR Library VI This VI closes the dll used for NUC and BPR This VI should be run once as the application closes init ERI DU NIC if Initialize
54. lkit Ig Version 1 10 p Camera GUI VI contains a number of functions that operate on each image so a sequence structure is used inside the acquisition while loop to organize the code Let s call this the inner sequence structure In inner frame 0 we acquire an image This image is passed via a sequence local to frame l where polarity inversion is applied if selected by the user In inner frame 2 the histogram of the image is calculated In inner frame 3 shown below the histogram parameters are accessed using local variables The histogram mean and standard deviation along with upper and lower cursor mu u limits are fed into Compression VI If the user has selected automatic gain control on the front panel then the intensity window limits will be mean plus minus an integer number of standard deviations On the other hand if the user has selected manual cursors then these values will serve as the limits of the intensity window Note that the image is converted to an array before passing to the compression routine and is then converted back to an image after compression Note that the reference image for the conversion of the compressed image from an array to an image is an 8 bit image type m t ActCrsr si urson POSX i oni E See H RRE lo FRAME 3 AGC 25 Le e li a Indigo Systems LabVIEW 7 Toolkit Ig l Version 1 10 In inner frame 5 the color palette is selected as shown below FRAME 5 APPLY PALETTES A
55. logical drive as IMAQ and IMAQ Vision 71 P e e li L Indigo Systems LabVIEW 7 Toolkit li I o I Version 1 10 6 3 Indigo Alpha NIR LabVIEW Toolkit Overview Indigo Alpha NIR LabVIEW Toolkit is a set of image acquisition camera control subroutines for the LabVIEW IMAQ programming environment It is assumed that the user is at least somewhat proficient with the LabVIEW IMAQ programming environment Chapter 2 contains a description of the more commonly used high level VIs included in the toolkit Chapter 3 contains a description of other VIs in the Toolkit Chapter 4 lists error codes specific to the Indigo Alpha NIR LabVIEW Toolkit Chapter 5 contains concluding remarks and references for further help 78 Le e e l La Indigo Systems Lab VIEW 7 Toolkit mn IGO Version 1 10 7 Getting Started 7 1 Indigo Alpha NIR LabVIEW Toolkit Overview The Indigo Alpha NIR LabVIEW Toolkit is contained in the VI library Alpha NIR Control Kit lIb Most programmers will use only two of the VIs in the toolkit Camera GUI VI and Camera Control VI These are both top level VIs that will open when the programmer double clicks on the lb file The remaining VIs are lower level subVIs that most programmers will not use Brief descriptions of the lower level VIs are included in Chapter 3 of this manual 7 2 Verifying Camera Operation Before we attempt to use the toolkit we will check to make sure your Indigo Systems Alpha NIR camera and National
56. n p mar foo Max and min are inputs to this YI if ACG is False and are mean of p q sigma of p where q is an integer if AGC is true Calls a dll called indilibmerlin dll Input is image data in the form of a ZD array Use the IMAQ image zarray and IMAQ array gt image Is to convert back and forth You MUST run Image Compression IMIT YI before running this VI inpimage pixels 12 bik outinage LG bit mr l NEI Min Intensity Sigma mon AGC Fixed Limits 6 mon em Max Intensity Sigmas For lim 6 mon Fixed FI d error in no error status code 7 mmm This VI compresses a twelve bit image to an eight bit image The compression proceeds as follows Pixels in 12 b image Pixels in 8 b image Pj lt Imin 0 Imin lt Pij lt Imax Pij Imin 255 Umax Imin ij gt Imax 255 Imax and Imin are inputs to this VI if AGC Fixed Limits is set to Fixed Limits If automatic gain control AGC is selected Imax and Imin are calculated from the histogram data as follows Imax mean sigmas for lim sigma 34 Le e l La Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 MN Imin mean sigmas for lim sigma The image data is fed into this VI in the form of a 2D integer array 116 data type Use the IMAQ image to array and array to image VIs to switch back and forth as needed This is illustrated in Camera GUI VI in the Toolkit Examples library The outputs of this
57. nd Bad Pixel Replacement This section of the manual describes the use of Non Uniformity Correction NUC and Bad Pixel Replacement BPR routines contained in the Toolkit The NUC and BPR algorithms are contained in dll s called by the VIs provided in the Lab VIEW library NUC and BPR lIIb The library contains e AUC init DU HU bpr three high level VIs Lber Initialize NUC and BPR VI NUC and BPR VI and Close NUC BPR Library VI The library also contains a larger number of low level VIs Most programmers will use only the high level VIs A description of the algorithms follows Non Uniformity Correction NUC Pixels in a focal plane typically have a range of gains and offsets Indigo Systems IRVista software includes a utility that allows the user to measure the gain and offset of each pixel in the focal plane and then construct a settings file that contains a gain and offset correction for each pixel Many Indigo cameras are supplied with one or more settings files Corrected pixel values are then calculated according to corrected __ se fj G Fi 0 Note that G j and Ojj are not the measured gains and offsets of the pixels but rather correction terms to make the gains and offsets uniform across the focal plane Bad Pixel Replacement BPR Most focal planes contain a few defective pixels that cannot be corrected by the NUC routines The data from these pixels are typically replaced by data from one or more nearby pixels The algo
58. ndigo Systems LabVIEW 7 Toolkit Ig Version 1 10 valid they are used to initialize the dll If tables are found but are not valid then blank tables are used to initialize the dll Inputs Path to camera settings file Dialog if not specified Error Cluster Outputs Bad Pixel Map Gains Table Offsets Table Rows in image Columns in image Valid true 1f submitted tables are valid Error Cluster 3 3 6 NUC and BPR VI This YI calls the Bad Pixel Replacement BPR and Non Uniformity Correction NUC routines To use an alternate MLUCIBPR routine write a new dll that implements the BRP and NUC routines The input to Ehe call Function should be a 12 or 14 bit image and the output should be a corrected 12 or 14 bit image and a corrected image that has been scaled to amp bit Must use init function before using this function Crution An cero inthe D Ah routines can eres L av if SS att Mie cays NK ON 16b corrected image pixels out al Cm error in error out status code 63 p e li e Indigo Systems LabVIEW 7 Toolkit Ig j Version 1 10 This VI applies the Non Uniformity and Bad Pixel Replacement algorithms to the input image array The NUC and BPR algorithms are described in the introductory remarks in section 3 3 Note that init Nuc Initialize NUC and BPR VI must be run before this VI is called Note that passing of gains and offsets tables as well as the bad pixel map from the initialization fun
59. nix Palette File VI Load Thermoteknix Palette File Loads an entire deif file Output is array of strings each element a line in the def file Path Path to def File lt Not A Path A Error in This VI loads an entire def file these files are not very large The text array at right contains the entire text of the file one line per array element The file path can be specified as an input to this VI If the input file path is empty or not a path a file dialog will be called In either case the path to the loaded def file is provided as an output Inputs Path to def file dialog 1f empty Error Cluster Outputs Path to def file not a path if cancelled Array containing all lines of text from def file Error Cluster 49 Le Qi l Indigo Systems LabVIEW 7 Toolkit Ig i Version 1 10 Find 3 2 3 Find Thermoteknix Palette Names VI Load Thermoteknix Palette Names Finds the Thermoteknix Palette names in a deit file File dialog if file name is not specified Path ko def File Error in D This VI uses Load Thermoteknix Palette File VI as a subVI to load an entire def file The names of the Thermoteknix color palettes contained in the file are then extracted and reported to the user 1n the string array at right Inputs Path to def file dialog if empty Error Cluster Outputs Path to def file not a path if cancelled Array of palette names from the def file Error Cluster 50 pe
60. nsity Standard Deviation mon Mean value mon Error in no error WA This VI calculates the histogram of an IMAQ image Histogram VI works on either 8 bit or 12 bit images The user can specify the number of bins in the histogram but 1f this 1s not connected or is set to zero the histogram will default to a number of bins equal to the possible intensities in the image For example the histogram for a 12 bit image would default to 4096 bins The user can specify the frequency with which the histogram is updated If this is set to 1 the histogram will update for each image If it 1s set to zero the histogram will not update Since histogram calculations are time consuming programmers often choose to update the histogram perhaps every tenth image The mean and standard deviation outputs are for the last image for which a histogram was calculated 31 Le Qe l Indigo Systems LabVIEW 7 Toolkit Ig Version 1 10 Inputs Image reference to IMAQ image Number of bins in histogram see discussion of defaults above Calculate histogram for every nth image 1 Error Cluster Outputs Histogram cluster Mean Standard Deviation Error Cluster La 3 1 4 Image Acquisition Setup VI 4 Image Acquisition Setup Sets up image aquisition Interface name image name and memory location are required inputs IMAQ Session ROI For edge removal o size error out This VI sets up image acquisition parameters Th
61. o Systems LabVIEW 7 Toolkit Ig ii Version 1 10 3 3 1 Check BPM VI Check BPM Checks to make sure badpixel table exists and contains only zeros and ones Returns rowsxcolumns tables with all zeros all good if BPM input is not valid Users can add more sophisticated error checks f BPM ut BPM In Valid kako mm T error in error out This VI performs basic error checks on the bad pixel map data For example all of the elements in the table should be either zeros or ones If the submitted bad pixel map is not valid a blank bad pixel map with all zeros all good pixels of size rows x columns is returned Inputs Rows Columns Bad Pixel Map Error Cluster Outputs Bad Pixel Map Valid true if submitted table is valid Error Cluster 58 Le Indigo Systems LabVIEW 7 Toolkit Ig ii Version 1 10 3 3 2 Check Gains VI Check Gains Checks to make sure gains table exists and all gains are between 0 and 4095 Note that gains are multiplied by 1000 for storage to allow use of U16 data type Thus a gain of 1 is stored as 1000 a gain of 1 2 as 1200 Returns all 1000 s funform pixels if gains are not walid wm Em Gains Quek bk Gains In Valid Table Cam mm Error in error out This VI performs basic error checks on the gains table For example all gains should be between 0 and 4095 If the submitted gains table is not valid a blank gains table with all e
62. of Thermoteknix Palettes The Indigo Systems LabVIEW Software Toolkit includes a set of VIs designed to facilitate use of Thermoteknix color palettes Each is described below See also Example 4 VI and Camera GUI VI in Toolkit Examples llb 47 je o li a Indigo Systems LabVIEW 7 Toolkit Ig 7 Version 1 10 pu load 3 2 1 eksl Load Thermoteknix Palette GUI VI Palette selector 10 Color Rainbow error in This VI includes a simple graphical user interface and features file dialogs It can be used as a pop up window from an application but it can also be used as a stand alone application When this VI is run the user is queried for a path to a def file The entire def file is then loaded and the names of the Thermoteknix color palettes it contains are extracted and presented to the user in the text ring The user then selects a color palette and hits load The equivalent IMAQ palette is calculated and is presented to the user at the right Inputs Path to def file dialog if empty Palette Selector Load f Error Cluster Outputs Equivalent IMAQ color palette Error Cluster LJ ena load Hie to SubVIs def pals Tx Fal IMAG The subVIs found in Load Thermoteknix Palette GUI VI can be used separately to construct custom routines that load Thermoteknix color palettes Each of these subVIs 1s described below 48 Le Ge Indigo Systems LabVIEW 7 Toolkit Ig Version 1 10 m 3 2 2 Load Thermotek
63. olor palette at the start of each run See Camera GUI in the Examples library to learn about loading and selecting color palettes during runtime InterFace Name Paletke File Path Favorite Palette Name Color Rainbow This example is designed to illustrate the use of Thermoteknix Color Palettes in Indigo camera applications Support for use of these palettes is extensive and this example illustrates only a simple application of these popular palettes Let s look at the diagram for Example 4 VI Indigo Systems LabVIEW 7 Toolkit Version 1 10 Set up continuous ale Dispose of the image acquisition image when done IMPORTANT Load Ttx Paktte and Convert to IMAQ Narre and path must be exact IMPORTANTI Most of the example is similar to Example 2 VI and Example 3 VI but notice that the color palette connection for Seil Image Display Setup VI is now connected to a series of VIs associated with Thermoteknix Color Palettes These VIs can be found in the Thermoteknix Palette Utilities library In this example we load a favorite Thermoteknix palette To load a particular palette we can use Hload Ir Eet Load Thermoteknix Color Palette by Name VI which requires as inputs the name of the palette and the file path to the color palette file that contains this palette Thermoteknix palette files have the extension def The structure of the files is discussed later in the Toolkit Programmer
64. om the IMAQ camera Normal inverted reverted and inverted amp reverted orientations are available Inputs IMAQ Session Image Orientation Error ln Outputs IMAQ Session Error Out 8 1 25 Short2bytes VI This VI 1s a low level function that converts a 16 bit short integer to a byte array with two elements Element zero contains the most significant bits and element one contaims the least significant bits Inputs Short integer Outputs Byte Array 8 1 26 Etatus Status Vl This VI pops up a display of the FPA temperature registry the firmware version registry and the Indiqe case temperature registry It is used in MMA Alpha NIR GUL VI Inputs IMAQ Session in Error In Outputs IMAQ Session Out FPA Temperature Array Case Temperature Array Firmware Version Array Error Out 93 y Le e li La Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 8 2 Other VIs in the Toolkit For the programmer s convenience copies of IMAQ Serial Write VI IMAQ Serial Read VI and a copy of Make Child VI with the name Make Child for Alpha VI are included in the toolkit In addition one custom control Exit ctl is included 9 Error Codes Error VI 6000 Invalid Integration Mode Read Camera IT VI 94 Le e li La Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 10 Concluding Remarks The Indigo Systems LabVIEW Software Toolkit provides a set of functions that are useful when developing applications that us
65. ors An example Thermoteknix palette is shown below Annotations added to the file are set off by square brackets and green text Additional information about Thermoteknix color palettes can be found at www thermoteknix com Graded Rainbow 8 Number of fixed points in the palette Intensity red green blue fill method 00000 36 255 0 255 1 7300 255 1 109 0 255 255 1 1460 12801 182 255 255 0 1 219 255001 255 255 255 255 1 The first line contains the name of the palette The second line contains the number of fixed points in the color palette and the remainder of the palette definition consists of 8 bit data used to assign RGB values to image pixels with particular 8 bit intensity values For example the Graded Rainbow palette assigns to image pixels with intensity value 36 a red value of 255 a green value of 0 and a blue value of 255 Thus an image pixel with intensity 36 would appear purple after application of this palette The last number on each line determines how RGB values should be assigned to intensities between the fixed points in the palette If the fill method is 0 then intensities between fixed points are assigned RGB values equal to those at the next higher fixed point Thus pixels with intensities between 1 and 36 would be assigned RGB values 255 0 255 in this palette If the fill method is 1 then RGB values are assigned to intermediate intensities via linear interpolation Software Toolkit VIs for use
66. ovided by Indigo Systems Corporation and these can be connected directly to the Color Palette inputs on a number of VIs in the toolkit In addition the Toolkit supports the use of popular color palettes from Thermoteknix Le e e li a Indigo Systems LabVIEW 7 Toolkit Ig j Version 1 10 Corporation The use of Thermoteknix palettes is described in Example 4 VI below For now we will use the Indigo palettes color Open the diagram for Example 3 VI and save it under a different name Insert Indigo Palettes Global VI This VI is in the Low Level Toolkit Utilities library Select the REDHOT palette and change the global to a read global Connect to the palette input The diagram should look like the one below A No Error P Bins 0 for default according to image type IO Name of current VI Set up image embedded Acquire Loop with histogram at 50 2 Upd h image hen done x 50 y 325 in very nti IMPORTANT this VI Include title bar title set in IMAQ WindDraw Run the VI and observe the image Stop the VI select another color palette and run agaim Camera GUL VI shows a way to change the color palette dynamically 2 2 5 E 7 Example AV Minimize or close Example 3 VI and open Example 4 VI pe e li e Indigo Systems LabVIEW 7 Toolkit Ig E Version 1 10 Example 4 Thermoteknix Palettes This YI uses Is from the Thermoteknix Palette Utilities library to load a favorite Thermoteknix c
67. rithm employed in the Toolkit averages the nearest good pixel in each of four directions x X y y to replace the data from the bad pixel For example in the partial image below the pixels marked with X s are defective while the rest are good In this example pixels 3 4 and 3 5 are bad Pixel 3 4 would be replaced by the average of pixel 3 3 3 6 2 4 4 4 Similarly pixel 3 5 would be replaced by the average of pixels 3 3 2 5 4 5 3 6 54 Te e e l La Indigo Systems Lab VIEW 7 Toolkit In IGO Version 1 10 NUC and BPR Data The Indigo Settings Files NUC and BPR data is specific to a particular focal plane During manufacture by Indigo Systems each focal plane is carefully calibrated against uniform sources of known intensity The results of the calibration include a gain and offset for each good pixel in the focal plane as well as a map of the bad pixels These are provided in the form of a settings file In turnkey Indigo Systems software packages such as IR Vista see www indigosystems com an image sequence file is simply a settings file with images appended The structure of Indigo settings and sequence files is as follows An image sequence or settings file is a LabVIEW standard I16 data file It consists of three sections the header the NUC and BPR tables and the images A settings file 1s simply an image sequence file with zero viewable images and thus we do not
68. rted FUSION Inverted MO REEN Inverted WHITEHOT a A Inverted REDHOT Inverted RAINECI Inverted NO YELLOW Inverted SEPIA I ko GR bo E p p B This global variable contains the standard Indigo Systems color palettes and their inverses These can be used to apply false color to 8 bit IMAQ images and can be converted to LabVIEW color color table tables using make color table VI in the Thermoteknix palette library Zi Indigo Systems LabVIEW 7 Toolkit Version 1 10 ve indigo 3 5 Other Libraries and Vls in the ToolKit Extlibsp llb contains VIs used to embed an IMAQ image in a virtual instrument panel This library is available at the National Instruments web site but is included here for convenience In addition the VI Make Child VI available at the National Instruments web site 1s included in the Low Level Toolkit Utilities library 4 Error Codes Error 5001 Image size is zero or no image acquired Invalid resolution setting Invalid image type for polarity inversion Palette not found Tx Palette load cancelled or palette file not found Unsupported image type for save Invalid Header file Number of images in header is different from images in file Invalid header file Image size is zero 5003 5004 5005 5006 5007 5009 5010 73 VI Single Image VI Polarity VI Polarity VI Load Thermoteknix Palette by name VI Load Thermoteknix Palette file VI Save Image
69. s Version 1 10 Array Elements 0 I5 16 17 18 19 20 21 22 23 24 25 26 21 28 Le indigo support all of these settings If this VI is used to read camera settings that are not supported by a particular camera zeros will be reported for those setting Inputs Outputs IMAQ Session In Error In IMAQ Session Out Integration Time microseconds Camera Array 29 Elements true 1f expected 29 elements are acquired Error Out Ch read 8 1 9 Read Camera ID VI This VI reads the Alpha NIR Camera ID It is used as a subVI in Read Camera Settings VI but can be used separately It returns a total of 16 bytes in four arrays of four elements each part number serial number firmware version number options Familiarity with the icd file will be required for use of this VI Inputs Outputs IMAQ Session In Error In IMAQ Session Out Part Number Serial Number Firmware Version Options Error Out 87 Le o l L Indigo Systems Lab VIEW 7 Toolkit In IGO Version 1 10 8 1 10 t _ Read Camera IT VI Nae This VI reads the Alpha NIR camera s current integration time setting It is used as a subVI in Read Camera Settings VI but can be used separately Outputs include the current integration time in microseconds correct regardless of the IT mode extended normal short Inputs IMAQ Session In Error In Outputs IMAQ Session Out Integration Time microseconds Error Out read 8 1 1
70. s VI directly Inputs Byte Array Outputs Short 16 bit integer 8 1 2 Camera Write Read VI Low level read write for the Alpha NIR camera Function selector determines function code sent to camera and any needed data must be included in the send data array See Indigo Systems Alpha NIR icd documentation for more information Inputs IMAQ Session In Function Read Write selector Send Data Error In Outputs IMAQ Session Out Receive Data Sent Stream Function Code Error Out FPA 8 1 3 Display FPA Register VI This VI displays the contents of the FPA register in binary form The meaning of the bits is as follows IMAQ Session In must be wired Bits Right to Left Invert 1 enabled 0 disabled Revert 1 enabled 0 disabled Integration Mode 1 short 0 normal 84 Le e e l La Indigo Systems LabVIEW 7 Toolkit In IGO Version 1 10 Integration Cap 1 210 fF 0 10 fF FPA Skimming 1 enabled 0 disabled Inputs IMAQ Session In Error In Outputs IMAQ Session Out FPA Register Error Out 8 1 4 Image Acquisition Setup for Alpha VI This VI sets up image acquisition parameters The interface name must be exactly correct and can be obtained for your system using National Instruments Automation Explorer The image name is optional and defaults to IndigoImage The memory location to which images are written can be either the system computer RAM or the RAM on the IMAQ board Often each new imag
71. s to configure image acquisition and image display acquire and save images process images and so on Low Level Toolkit Utilities llb includes some useful low level functions that are incorporated into the VIs in Indigo LabVIEW Toolkit Main llb and Toolkit Examples IIb Thermoteknix Palette Utilities llb contains VIs designed to facilitate the use of color palettes developed by Thermoteknix Corporation www Thermoteknix com with images acquired by Indigo Systems cameras Extlibsp llb contains VIs used to embed an IMAQ image in a virtual instrument panel This library is available at the National Instruments web site but is included here for convenience 2 2 Examples Before we attempt to use the examples we will check to make sure your Indigo Systems camera and National Instruments Framer Grabber Board are operating properly To do this navigate to NI Measurement and Automation Explorer MAX There is probably a shortcut to MAX on your desktop Go to Devices and Interfaces and find your IMAQ board You should see something like the following IMAQ PCI 1422 img0 We are after the interface name that follows the colon If you used the default settings during installation the interface name is probably img0 Click on the and you should see something like the following Le l Indigo Systems LabVIEW 7 Toolkit Ig l Version 1 10 Channel 0 Indigo Systems 320 x 256 Click on this and then hit the grab button beneath
72. set of 11 This allows the gains and offsets to be stored as 16 bit unsigned integers In the bad pixel map bad pixels are ones and good pixels are zeros 56 y Le e l La Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 During operation the image data is corrected as follows Pi corrected Gij Pij Oj where Pj is the column 1 row j pixel Gij refers to gains and Ou refers to offsets The viewable images are stored sequentially following the NUC and BPR tables each occupying M x N x 2 bytes Details of Data Format Actual 2D image data whether viewable or part of the NUC BPR portion of the file is written as a long string of bytes using the standard LabVIEW Write I16 file command The data is written as r0 c0 cl r0 cM rl c0 rl cl rl cM tN cM where 10 refers to row 0 and cl refers to column 1 If the data is read back using the standard Lab VIEW read characters function that data will appear in this order in hex format Note that a common source of confusion with LabVIEW data files is that data is stored backwards as bigendian numbers This is because LabVIEW was originally written for Mac OS Su 00000001 00000000 Byte4 Byte3 Byte2 Bytel LabVIEW BIGENDIAN 90000001 00000001 00000001 Bytel Byte2 Byte3 Byte4 Win C LITTLE ENDIAN 00000000 The remainder of section 3 3 describes the individual VIs contained in the NUC and BPR library 57 Le Indig
73. splay image f IMAQ Window for display 0 Edge removal f Edge size Pixels to remove from edge 0 Error Cluster Acquired image Image acquired Image rows Image Columns Error Cluster 45 Le Indigo Systems LabVIEW 7 Toolkit Ig Version 1 10 3 1 14 F3 Set Color Palette VI Set Color Palette Sets color palette to an Indigo standard or loads a det File Palette Palette Out d whitehot whitehot Path ignored for Indigo standards Color Palette Out color This VI allows selection of color palettes either from the Indigo Palettes Global VI or from Thermoteknix def files This VI uses a shift register to pass the current color palette unless the user has requested a change When a change has been requested the new palette is loaded This structure select allows Set Color Palette VI to be used within an acquisition loop without significant loss of execution speed Inputs Indigo palette name Path to def file dialog if empty Invert palette f Load Thermoteknix f Error Cluster Outputs Palette name Palette Error Cluster 46 Le e e l La Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 3 2 Thermoteknix Palette Utilities IIb This section of the manual describes the use of Thermoteknix color palettes with Indigo Systems cameras Thermoteknix color palettes are contained in text files with the extension def These files can be opened with standard text editors and word process
74. ta Intensities e A wm Ge M kk e IMAQ Palette Dram Fil Method LI error que Mi load Once US Dal Load Thermoteknix Color Palette by Name VI has been used to obtain the il Tx to Thermoteknix palette data it can be passed to LM42 Construct IMAQ Palette NI which will then perform the calculations required to produce an equivalent IMAQ palette The Thermoteknix palette data is passed to this VI as five arrays containing the intensities Red Green Blue and fill methods 52 EN e li e Indigo Systems LabVIEW 7 Toolkit Ig 7 Version 1 10 for the fixed points in the palette These arrays should be bundled into a cluster 1n the order shown on the panel Inputs Thermoteknix Palette Data Error Cluster Outputs IMAQ color palette Error Cluster color 3 2 6 Make Color Table VI Make Color Table Makes a LabVIE Color Table from an IMAQ color palette LabVIEW Color Table C iN error Que This VI produces a color table for use with LabVIEW pictures from an IMAQ color palette This is particularly useful when LabVIEW picture controls are used on a front panel in place of IMAQ image windows and is needed when using LabVIEW image file saving routines instead of the IMAQ image file saving routines Inputs IMAQ Color Palette Error Cluster Outputs LabVIEW Color Table Error Cluster 33 Le e l L Indigo Systems LabVIEW 7 Toolkit In Ig I Version 1 10 3 3 Non Uniformity Correction a
75. users will not have access to edit mode since applications are typically distributed as executables To disable scrolling right click on the VI icon and select VI Properties In the pop up window select Window Appearance and then Customize Deselect Show Scroll Bars This technique is employed in this and other examples included in the Toolkit We next use the Image Acquisition Setup VI as in Example 1 VI If no error 1s detected we then begin to acquire and display images Note the while loop that copies an image per iteration Oe Fai from the buffer and then passes it to Polarity VI and then to ltl Invert Revert VI Notice that each of these VIs accepts an input image and a reference to the altered image for example e l Indigo Systems LabVIEW 7 Toolkit Ig j Version 1 10 polarity inverted image in polarity VI In Example 2 VI we have chosen to wire the reference inputs to newly created IMAQ images with different names As an alternative we could have wired the input image to both the image input and the altered image reference But this would cause the polarity inverted image for example to overwrite the original with permanent loss of the original image This can cause a variety of bad outcomes In your saved copy of Example 2 VI disconnect the reference to the newly created Pol Inverted Image and connect the image from the IMAQ copy function to that input as well as the image input Run the VI and observe the results Restore the

Download Pdf Manuals

image

Related Search

Related Contents

• Manual del propietario  PIANO P6D PRESTIGE .3022 §2  Manuale - PCE Instruments    Packungsinhalt - Support  Connaissances et attitudes des clients masculins  zione. Il livello d`alcool nel sang  AS-i Master Module User`s Manual  

Copyright © All rights reserved.
Failed to retrieve file