Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use the FLIR SDK with LabVIEW

Hello everybody!

 

We´re working with the A310PT Flir termographic camera, and we've a requirement to integrate it with Labview, we were in contact with FLIR people and they said that they offer a toolkit to integrate some cameras but that toolkit doesn't include the A310PT Camera, the only way to integrate it is trhough the FLIR SDK.

 

I would like to know if someone have found some information about it, and if we need to consider any labview module or toolkit to get the information  and termographic vision from the camera

 

Thanks in advance!

Daniel C

0 Kudos
Message 1 of 12
(10,475 Views)

Hello Daniel C,

 

I hope you are doing great. I am not familiarized with the FLIR SDK, but I checked the camera specs here: 

 

http://www.flir.com/automation/display/?id=67552

 

The specifications section does not mention if the camera is GigE compliant. This Knowledge Base article could be helpful if you want to use the camera with NI-IMAQdx:

 

http://digital.ni.com/public.nsf/allkb/4331B4AA3AE95233862574C200539A2F

 

Questions:

 

1- Is the camera GigE compliant? If it is: Can you see the camera in MAX?

2- Are you trying to use IMAQdx to communicate with the camera? if not: How are you trying to integrate with the camera?

3- Can you share a link to the FLIR SDK? I will like to check the documentation. 

4- What is the state of your project? Have you establish any sort of communication with the camera from LabVIEW?

 

Regards,

Randy @Rscd27@
0 Kudos
Message 2 of 12
(10,426 Views)

Hello Randy,

 

Thanks for your support, my answers bellow:

 

  • Is the camera GigE compliant? If it is: Can you see the camera in MAX?

According to the specs, the camera works at 100 Mbps ethernet, GigaE Works at 1 Gb/s, but it is an IP camera.

 

  • Are you trying to use IMAQdx to communicate with the camera? if not: How are you trying to integrate with the camera?

The first step is to try to communicate with IMAQdx, in case we can’t, then, using the Nexus SDK (FLIR library), uising the call library function in Labview, control the camera with the functions within the library

 

  • Can you share a link to the FLIR SDK? I will like to check the documentation. 

Attached are the docs related to the SDK, I did not find a link to the docs, they are included when you download the SDK

 

  • What is the state of your project? Have you establish any sort of communication with the camera from LabVIEW?

In this moment, we are looking forward the differents sorts of communication with the camera, after that we will take the best decision, It's important to know if someone have had a similar experience. We hope to start the test with the camera the next week

 

Thanks in advance!

Download All
0 Kudos
Message 3 of 12
(10,414 Views)

Hi Daniel,

 

I came across your posting while looking for answers on a different topic, however I thought I might add some input in case you are still having difficulties -- or for the sake of others who may have similar questions.

 

To answer your first question, the FLIR A310 (and the A310PT variant) is NOT a GigE-compliant cameras. It is an "IP camera" (as you noted), but is not GigE-capable. Therefore, it won't work naturally with IMAQdx, and you will need to jump through some additional hoops to use it with LabVIEW. Conversely, the FLIR A35, A65, A315, and A615 are all GigE-compliant, and work directly with IMAQdx, LabVIEW (and MAX) . 

 

If you are locked into the FLIR A310, there are a number of LabVIEW approaches available, but all of them involve a workaround. You should evaluate your primary application objectives before choosing a direction. Some questions to ask yourself:

 

1) Do you need live camera images in a LabVIEW GUI? Or could you use FLIR IR Monitor or an NVR to display the images, and then just get the evaluation results from pre-defined regions of interest (using telnet or modbus)?

2) What level of image analysis is needed -- just extracting temperature values? Or do you need to use IMAQ functions for some image processing (i.e. target acquisition, motion tracking, etc.)?

3) What are your capabilities for packaging FLIR SDK API calls into a .dll that you can call from LabVIEW?

 

If you need to view and/or process the images in LabVIEW, there are a few options. One is the ThermoVision toolkit for LabVIEW, which was distributed by FLIR. I believe it is essentially obsolete now, but you may still be able to find it online. It can be a bit quirky to use, and it takes some trial-and-error to get everything installed and operational. If you have the capability to roll your own .dll, then the FLIR Atlas SDK may be a better option for you. This is the approach FLIR recommends.  

 

Depending on your application requirements, you may be able to avoid the .dll route, but you will need to get creative. A few years ago, I built a LabVIEW application that streamed images from six FLIR A310 cameras into a LabVIEW panel with embedded VLC display objects (ActiveX containers, if I recall correctly). For communications to the cameras, I maintained telnet sessions -- although we could also have used the modbus interface in the A310.

 

In any event, the answer to the general question, "Can you use a FLIR A310 with LabVIEW?" is, "Yes you can."

 

However, you may need to jump through some hoops. The GigE-compliant FLIR A35 and A315 are much easier to integrate. 

 

I hope this information is useful.

 

Dave Ritter, MoviTHERM

www.movitherm.com 

 

   

0 Kudos
Message 4 of 12
(8,930 Views)

Hi Dave,

 

I'm also working on using LabView to communicate with FLIR A325sc camera.

 

I'm using this sample vi from MoviTherm;

https://movitherm.com/knowledgebase/how-to-grab-an-image-from-flir-a35-a65-using-labview/

 

The MoviTherm's vi is working with my FLIR A325sc camera, however I have some questions regarding its session/camera  selection.

movitherm_screenshot.png

 

In my case, the drop-down selection always shows 'cam 0' , 'cam 1', 'cam 2', and so on. It doesn't show the camera's full name. My questions are:

1. How do I retrieve the camera's full name, I want to show 'FLIR A325sc - SERIALNUMBER and its IP address' in the drop-down selection ?

2. Can I also connect using the IP address of the camera? I want the VI to be able to automatically select the specific camera in the case when I'm using multiple cameras.

 

Thank you in advance. I hope to hear from you soon.

 

 

 

 

0 Kudos
Message 5 of 12
(8,397 Views)

Hi Nerdijoe,

 

In response to your questions:

 

"...the drop-down selection always shows 'cam 0' , 'cam 1', 'cam 2', and so on. It doesn't show the camera's full name. "

 

The camera designation that appears in the drop down is based on the IMAQdx specification. You will notice this is the same ID that MAX assigns to the camera. You can change this in MAX, and it will appear in the pull-down as long as MAX recognizes this to be the same camera. NOTE: This is not assigned based on the camera serial no., so if you connect one FLIR A315 (or the variant, A325sc), and then disconnect this one and connect a different camera, IMAQdx will likely use the same camera file, and there fore the same name for the new camera.

 

To overcome this limitation, you will need to establish the identity of the camera -- which leads to your next questions.  

 

1. How do I retrieve the camera's full name, I want to show 'FLIR A325sc - SERIALNUMBER and its IP address' in the drop-down selection ?

 

The short answer is that you need to poll the camera's registers using property nodes. Open a connection to the camera, wire the open reference to a property node, and then specify the name of the property, and read the current value. (You can find the names of the available properties using NI MAX.)

 

 

2. Can I also connect using the IP address of the camera? I want the VI to be able to automatically select the specific camera in the case when I'm using multiple cameras.

 

To answer this question, and more completely answer the previous one, I have prepared some sample code. (See the attached .png). Hopefully this will help point you in the right direction.

 

Dave

www.movimed.com

 

Message 6 of 12
(8,366 Views)

Hi Dave,

It works! Thank you again for your help!

0 Kudos
Message 7 of 12
(8,288 Views)

Hi Dave,

 

I do have another question regarding the image display from the camera.

 

I'm getting different kind of greyscale image on my LabVIEW app after I open FLIR ResearchIR software. Please see below:

 

flir_image_pallete_0.png

 

However, now If I run the Movitherm's 'Connect Camera A315.vi', stop it and then run my vi, the image will go back to normal greyscale.

 

flir_image_pallete_normal.png

 

Have you come across this kind of issue before?

I tried to tinker around with the 16 Bit Display Mapping, but to no avail.16_bit_display_mapping.png

 

Do you know how to resolve this? 

 

 

Thank you.

 

 

 

0 Kudos
Message 8 of 12
(8,279 Views)

Hi Nerdijoe,

 

My guess is either ResearchIR is changing the imaging mode of the camera to "Radiometric mode", or the IRFormat (i.e. sensor gain) isn't correctly set for your temperature range.

 

So, the short answer to your question is that when you run the sample program, these parameters are explicitly set for LabVIEW operation.

 

But what's going on here, you might ask? First, some background: What is Radiometric Versus TemperatureLinear?

Typically, the FLIR software wants to see the camera set to "Radiometric" measurement mode. However, the FLIR radiometric mode output is a proprietary format, and extracting temperature data from radiometric images is an exercise in reverse engineering.

 

To allow people to get temperature data from the image without disclosing the "secret sauce", FLIR also provides a Temperature Linear image mode on the GeniCAM cameras. This is the preferred mode when using FLIR cameras with LabVIEW.

 

(On a related note, if you change the camera to Temperature Linear mode in LabVIEW, and don't change it back to Radiometric before opening FLIR Tools, the temperatures in FLIR Tools will not be accurate. It appears that FLIR Tools assumes the camera is in Radiometric mode and doesn't verify it or explicitly set the mode. In most of our custom software, we explicitly set to TempLinear at system start-up, and then revert to Radiometric if we know the customer is planning to run FLIR Tools.)

 

The parameters you need to manipulate depends on the FLIR camera model, but in the A3x5 Camera (and equivalents), you need to focus on 2 GeniCAM registers ( --either in NI MAX, or using LabVIEW IMAQdx properties):

 

PixelFormat, and IRFormat.

 

PixelFormat, should be set to Mono16.
IRFormat, should be set to TemperatureLinear 100mK or TemperatureLinear 10mK, depending on the desired temperature resolution. (10mK is for higher resolution, with smaller range. 100mk is for reduced resolution, but greater range/high temp).


To transform the streamed signal to temperature, use the following formulas:

 

TemperatureLinear 10 mK: multiply the signal by 0.01 to get correct temperature, for example: Signal of 50000 will correspond to 500 Kelvin.


TemperatureLinear 100 mK: multiply the signal by 0.1 to get correct temperature, a signal value of 50000 will now instead be 5000 Kelvin.

 

 I hope this information is useful in helping you to understand the different camera measurement modes and temp ranges. 

 

-- Dave

Message 9 of 12
(8,276 Views)

Hey The_Seeker,

I thought I might piggyback this post as it is similar to my predicament. I am able to follow the procedures you've described below and save a temperature linear IR image but I want to be able to save an image in LabVIEW as a radiometric jpeg that I can then turn around and open up in ResearchIR as if I captured the image straight from the ResearchIR GUI. Is there a way to do this from LabVIEW?

0 Kudos
Message 10 of 12
(7,107 Views)