MATLAB Answers

Increase frame rate of GigE camera by reducing image size

10 views (last 30 days)
laurie stephey
laurie stephey on 14 Dec 2015
Hi there,
I am running a prosilica gx 1050 camera for fast image acquisition. So far I can achieve the max frame rate of 112 fps at full image size (1024 by 1024), but I would like to increase this rate further by decreasing the frame size. AVT (the camera manufacturer) says that by decreasing the height of the image to 512 pixels, I should be able to attain a frame rate of about 170 fps. I did reduce the frame height to 512, but matlab still thinks the max frame rate is 112 and will not let me set anything faster. Here is my code:
datatype='BayerGR8';
numframes=5; %number of frames to record
exposuretime=2500; %exposure time, mirco s
packetsize=9014; %must be less than 9k
packetdelay=1E8; %in microseconds?
transrate=191095159; % must be less than 2 Gbps
camgain=0; %up to 34 dB
filter='none';
framerate=170;
%create a video input object
disp('creating video object')
vid = videoinput('gige',1,datatype);
src = getselectedsource(vid);
triggerconfig(vid, 'Immediate');
%set long timeout to prevent getdata asking for frames before they are
%availible
set(vid,'Timeout',300);
%reduce the frame size
vid.ROIPosition = [0 0 512 512];
%set capture params
vid.FramesPerTrigger=numframes;
src.PacketDelay=packetdelay;
src.AllGainRaw=camgain;
src.ExposureAuto='off';
src.StreamBytesPerSecond=transrate;
src.ExposureTimeAbs=exposuretime;
src.PacketSize=packetsize;
src.AcquisitionFrameRateAbs=framerate;
%start video object
start(vid);
disp('ready for capture')
data = getdata(vid);
disp([num2str(numframes) ' frames acquired'])
When I set numframes=170, I get a warning that the frame rate cannot exceed 112. When I check the value of AcquisitionFrameRateAbs, I see that Matlab has set it to 33 fps.
How do I get Matlab to increase the frame rate accordingly? Any help or tips are appreciated.
Thank you very much, Laurie

  0 Comments

Sign in to comment.

Answers (0)


Translated by