필터 지우기
필터 지우기

Gigecam(), high cpu load after first snapshot().

조회 수: 7 (최근 30일)
Brian
Brian 2018년 10월 2일
댓글: Brian 2018년 10월 12일
Hi
I am acquiring images from two different point grey 'Blackfly BFLY-PGE-50H5M' network cameras. The cameras are triggered by an input from another machine (not a part of the example below). The cameras are loaded via the function gigecam(). Loading the cameras and changing settings does not load the cpu significantly, but first time I call snapshot() to acquire an image the cpu load goes to a high level and stays there. I have made an example. See below. First time I call snapshot(cam1) the cpu load is at 26% and then calling snapshot(cam2) the cpu load is permanently at 52%. Does anyone know if this behavior can be avoided? Doing "clear cam1" is not a good solution as it takes a long time to load the camera again via gigecam() when I want to acquire more images.
clc;
close all;
clear all;
gigecamlist
cam1ID = '16482972';
cam2ID = '14514855';
cam1 = gigecam(cam1ID);
cam2 = gigecam(cam2ID);
cam1.ExposureAuto = 'off';
cam1.ExposureTime = 7000;
cam1.OffsetX = 0;
cam1.OffsetY = 0;
cam1.Width = cam1.WidthMax;
cam1.Height = cam1.HeightMax;
cam1.AcquisitionFrameRateEnabled = 'True';
cam1.AcquisitionFrameRateAuto = 'Off';
cam1.AcquisitionFrameRate = 1;
cam1.GainAuto='Off';
cam1.Gain = 0;
cam1.SharpnessEnabled ='False';
cam1.pgrExposureCompensationAuto = 'Off';
cam1.GevSCPSPacketSize = 9000; %This is the same size as the Jumbo packet
cam1.Timeout =10;
%Here is an example of how to configure some of the camera settings.
cam2.ExposureAuto = 'off';
cam2.ExposureTime = 8000;
cam2.OffsetX = 0;
cam2.OffsetY = 0;
cam2.Width = cam2.WidthMax;
cam2.Height = cam2.HeightMax;
cam2.AcquisitionFrameRateEnabled = 'True';
cam2.AcquisitionFrameRateAuto = 'Off';
cam2.AcquisitionFrameRate = 1;
cam2.GainAuto='Off';
cam2.Gain = 0;
cam2.SharpnessEnabled ='False';
cam2.pgrExposureCompensationAuto = 'Off';
cam2.GevSCPSPacketSize = 9000; %This is the same size as the Jumbo packet
cam2.Timeout =10;
Im1=snapshot(cam1);figure;imshow(Im1)
Im2=snapshot(cam2);figure;imshow(Im2)
Thanks in advance! :-)

채택된 답변

Nikilesh Chilkuru
Nikilesh Chilkuru 2018년 10월 4일
Once the gigecam object is created, it continuously acquires frames from the camera but does not buffer them. When snapshot is called, it just gets the latest frame and passes it to MATLAB. This is the reason you see the constant usage of CPU. This is expected behaviour. For now, clearing the object is the only way to reduce the usage of CPU. Thank you for bringing this up though. I have let the development team know about this issue and they might consider this for our future releases.
  댓글 수: 1
Brian
Brian 2018년 10월 12일
Hi Nikilesh,
Would it be possible in a future version to have at least two options where one is that it only acquires an image when given a trigger command and the current where it just takes the latest acquired image. In my current use of my GigE camera I acquire an image from two different cameras every 20 second for 7 days and I can allow up to 0.25 second delay from I send the signal to the camera until i actually acquires the image.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품


릴리스

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by