MATLAB Resources for FLIR R&D/Science Cameras

 

FLIR is proud to be partnered with MathWorks® to offer MATLAB software solutions for FLIR R&D/Science grade thermal camera users. While there are many ways to pair FLIR’s thermal cameras with the powerful analytics of MATLAB, we’ll get you started with the three common uses listed below. Through tech notes and videos, we demonstrate how to stream data from FLIR’s cameras directly into MATLAB, how to import MATLAB scripts into FLIR’s ResearchIR software, and how to open FLIR ResearchIR movie files directly in MATLAB for further analysis and data processing. We also included sample programs to help you better understand how to leverage the power of FLIR thermal cameras with MATLAB’s advanced programming environment.

Learn how FLIR uses MATLAB to accelerate its product development
 

Using FLIR Thermal Cameras in MATLAB

FLIR’s R&D/Science grade thermal cameras integrate seamlessly into MATLAB. The cameras are fully GigE Vision and GeniCam compliant, which makes controlling the camera remotely and streaming fully temperature-calibrated thermal images into MATLAB very straightforward. There is no need for translation of vendor specific SDKs. Instead, the industry-standard interface allows you to quickly set up to stream high sensitivity thermal data from the FLIR camera directly into MATLAB, so you can focus on developing your application.

Using a FLIR GigE Camera in MATLAB


Using MATLAB Scripts in FLIR’s ResearchIR Software

FLIR’s ResearchIR software supports the use of MATLAB image analysis scripts directly in the software. The MATLAB script can be imported as a digital filter into ResearchIR and applied to the live or recorded thermal imagery. Behind the scenes, the thermal image is being passed as an image file to the MATLAB Script, processed, and then passed back to ResearchIR for display and further analysis within ResearchIR. This offers a great tool for leveraging MATLAB image analysis toolkits directly in FLIR’s native ResearchIR software.

Running MATLAB Programs in FLIR ResearchIR Max

 

 

Opening ResearchIR Data in MATLAB

With FLIR’s free FileReader SDK software, you can now use MATLAB to open and analyze thermal images and movies from FLIR’s ResearchIR software. Simply collect thermal data from your FLIR camera in the included ResearchIR software and, using the FileReader SDK and sample MEX code, read the full thermal imagery and parsed header data directly into your program. This allows you to quickly import data you collected with your FLIR camera directly into MATLAB for additional analysis and processing.


Sample MATLAB Code using FLIR’s R&D/Science Thermal Cameras

FLIR has worked with MathWorks to develop some sample programs using FLIR thermal cameras and recorded images. These sample programs demonstrate – through simple code – a few ways to leverage the power of MATLAB with FLIR’s high performance R&D/Science thermal camera solutions. Click the program title below to read a short description of each sample, and get a link to the download.

This sample program opens an infrared movie recorded in FLIR’s ResearchIR software, grabs the first frame and performs a face detection. It then uses that face detection and associated points to draw a region of interest around the face and track it in the subsequent frames within the movie. This sample code uses the FLIR File Reader SDK to open the file and MATLABs Face Detection and Tracking algorithms in their vision toolkits. It’s a great example of using the high contrast you get with thermal imagery in order to do target identification and tracking in movies, which could scale to live image streams as well.

Face Detection and Tracking - Sample Code

This sample program allows the user to select a FLIR thermal movie and line they want to extract. It then extracts that line from each frame in the movie into a TIFF movie, which is saved into the same source movie directory and with the same base name plus "_lin". This new movie can then be opened back up in FLIR’s ResearchIR for additional analysis.

Sometimes the target of interest in your thermal image is taller than wide; so you might turn your FLIR thermal camera on it’s side to align the aspect ratio of the camera to your target. Unfortunately, now all your thermal movies are rotated when played back or analyzed in ResearchIR or your custom software. This short sample program simply rotates the image by 90deg either clockwise or counterclockwise based on a variable in the script file, to correct the imagery for you. It’s ready to use as a ResearchIR filter or within your custom Matlab program.

Image Rotation 90deg - Sample Code

 

Add On Tools for Matlab

FLIR offers two Matlab SDKs to support the use of FLIR thermal cameras and FLIR ResearchIR data files with Matlab:

Atlas SDK

The Atlas SDK for Matlab allows you to programmatically view, analyze, and capture data from FLIR’s uncooled thermal cameras directly in Matlab over FireWire, Gigabit, RTSP, and USB interfaces. The SDK includes a sample application and code to help speed up development time with FLIR’s uncooled microbolometer cameras for R&D/Science applications.

Download Atlas SDK

File Reader SDK

The FLIR File Reader SDK allows you to programmatically read ResearchIR data files in their native format. It includes a mex file that makes it quick and easy to read the data and parse the meta data in each image frame.

Download File Reader SDK