MATLAB Answers


To take pictures from FLIR (Cx series) camera every 30 secs

Asked by Jubin Mathai on 30 Jul 2019
Latest activity Commented on by Jubin Mathai on 30 Jul 2019
Below is part of the sample code from FLIR atlas SDK for Matlab (GUI test). I needed the FLIR IR camera to automatically take pictures at timed intervals (every 30 secs). How can I create a loop to make the camera to take pictures every 30 secs?
%It is FlirFileFormat init a ThermalCamera
ImStream = Flir.Atlas.Live.Device.ThermalCamera(true);
%save the stream
handles.ImStream = ImStream;
handles.stop = 1;
%set the Iron palette
pal = ImStream.ThermalImage.PaletteManager;
ImStream.ThermalImage.Palette = pal.Iron;
%read x y position
x = str2num(get(handles.edit4,'String'));
y = str2num(get(handles.edit3,'String'));
oldX = x;
oldY = y;
%add spot
spot = ImStream.ThermalImage.Measurements.Add(System.Drawing.Point(x, y));
while handles.stop
%get the colorized image
img = ImStream.ThermalImage.ImageArray;
%convert to Matlab type
X = uint8(img);


You forgot to ask a question.
Yes, thank you. I have completed the post.

Sign in to comment.


1 Answer

Answer by Jan
on 30 Jul 2019

Use a timer object and insert the code for taking a picture in its callback.
doc timer

  1 Comment

Sign in to comment.