Timeout error with FLIR A65 GigE Camera

7 visualizaciones (últimos 30 días)
Kristian
Kristian el 15 de Dic. de 2021
Editada: Kristian el 16 de Dic. de 2021
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.
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;
  1 comentario
Kristian
Kristian el 15 de Dic. de 2021
Update....
I connected the camera to an ethernet hub that both machines are also connected to. While the old machine was on, I got the timeout error. When I shut the old machine down, my script started working on the new machine. As soon as I powered up the old machine, the script stopped working again.

Iniciar sesión para comentar.

Respuestas (0)

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by