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

3 vues (au cours des 30 derniers jours)
Jubin Mathai
Jubin Mathai le 30 Juil 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?
if(strcmp(char(disc.Item(index_selected-1).SelectedStreamingFormat),'FlirFileFormat'))
%It is FlirFileFormat init a ThermalCamera
ImStream = Flir.Atlas.Live.Device.ThermalCamera(true);
ImStream.Connect(disc.Item(index_selected-1));
%save the stream
handles.ImStream = ImStream;
handles.stop = 1;
guidata(hObject,handles)
%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));
pause(1);
while handles.stop
%get the colorized image
img = ImStream.ThermalImage.ImageArray;
%convert to Matlab type
X = uint8(img);
axes(handles.axes1);
  3 commentaires
Jubin Mathai
Jubin Mathai le 30 Juil 2019
Yes, thank you. I have completed the post.
Leonid Shmuylovich
Leonid Shmuylovich le 5 Jan 2021
Were you able to get you FLIR CX camera to be detected as a FlirFileFormat type camera? When I try to detect my FLIR C5 is only is detected as an argb mpeg stream. How did you get your camera detected as a FlirFileFormat?

Connectez-vous pour commenter.

Réponses (1)

Jan
Jan le 30 Juil 2019
Use a timer object and insert the code for taking a picture in its callback.
doc timer

Catégories

En savoir plus sur MATLAB Support Package for IP Cameras dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by