Timeout error with FLIR A65 GigE Camera
Show older comments
EDIT: Problem solved, these settings in image below with respect to windows firewall had to be checked. 2 Days wasted trying to figure this out [head in hands]

I have a script that works perfectly fine on one of my machines. I recently took delivery of a new machine and the same script is throwing the following error when I try to take a snapshot from a FLIR A65 GigE camera.
Error using FLIR_v2 (line 47)
Time out occurred while trying to get a frame from the camera. Modify the 'Timeout' property to change how many seconds 'snapshot'
method waits to return image data.
My script is below and the error is thrown at IR = snapshot(vid);
I have tried turning off firewalls and configuring network adaptor to ipv4 only. I switched back to old machine and it still worked.
I tried changing the packet delay using the advice from https://uk.mathworks.com/matlabcentral/answers/91834-how-do-i-calculate-the-packet-delay-for-a-gige-vision-camera-to-prevent-dropped-frames and still get the same error.
Does anyone have any further ideas that could help solve this issue? Thanks
clear all; close all; clc;
% Variables
FRAMES = 100;
temperatureThresh = 85;
fingerRatio = 0.25;
triangleHeightRatio = 2;
vertices = [];
triangle = [];
target = [];
% Get IP Address of gige camera
camList = gigecamlist;
ipAddress = camList.IPAddress;
%% Connect to FLIR camera
vid = gigecam(ipAddress{1}, 'PixelFormat', 'Mono16');
vid.TemperatureLinearMode = 'On';
vid.SensorGainMode = 'HighGainMode';
vid.TemperatureLinearResolution = 'High';
vid.GevSCPD = 114; % This value was defaulted to 0
%vid.Timeout = 20;
%% Creat video writer
myVideo = VideoWriter('myVideoFile');
myVideo.FrameRate = 10;
open(myVideo)
%% Loop for acquisition and processing
for i = 1:FRAMES
% vertices = [];
% triangle = [];
% target = [];
% Acquire IR image
IR = snapshot(vid);
% Adjust contrast of IR image
I = imadjust(IR,stretchlim(IR),[]);
%%%% Colour temp %%%
%temp_linear = double(getdata(IR, 1, 'uint16'));
temp_linear_stripped = IR -(2^15) - (2^14); %removing the 2 MSB
%the temperature is linear in this format: T = Signal * 0.04
temp_data_kelvin = temp_linear_stripped * 0.04;
%we get the data in Kelvin, so it needs to be converted
temp_data_celcius = temp_data_kelvin - 273.15;
% Normalise
maxT = max(max(temp_data_celcius));
CL = 100.*temp_data_celcius./maxT;
segment = segmentIR1(CL, temperatureThresh);
%%% Combine mask with original image %%%
C = imfuse(temp_data_celcius,segment);
[vertices, triangle, target, twoFingersWidths] = getTarget(fingerRatio, triangleHeightRatio, segment, vertices, triangle, target);
figure(1)
subplot(1,2,1)
imagesc(temp_data_celcius);
hold on
plot(vertices(:,1), vertices(:,2), 'ob')
plot(triangle(1,:), triangle(2,:), 'b')
plot(target(1), target(2), 'xk')
figure(1)
subplot(1,2,2)
imagesc(C);
hold on
plot(vertices(:,1), vertices(:,2), 'ob')
plot(triangle(1,:), triangle(2,:), 'b')
plot(target(1), target(2), 'xk')
frame = getframe(gcf);
writeVideo(myVideo, frame);
end
close(myVideo)
delete(vid);
clear vid;
Answers (0)
Categories
Find more on GigE Vision Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!