GigE Camera (Matrix/Linear) - ROI and Pixel Offset management

9 views (last 30 days)
Dear Mathworks Community,
We are working on a application involving GigE Matrix and Linear Cameras, Image Acquisition Toolbox, GigE Support Package (the latest downloaded from the website).
The problems we are facing when working with both standard Matrix cameras and also Linear Camera, is the management of the ROI and of pixels offset.
Offset is needed when you want to move a ROI inside the maximum matrix dimensions.
Here is two simple code:
close all
clear all
clc
imaqreset
vid = videoinput('gige');
src = getselectedsource(vid);
src.DeviceScanType = 'Linescan';
src.ExposureAuto = 'Off';
src.AcquisitionFrameRate = 8000;
src.ExposureTime = 100;
vid.FramesPerTrigger = 4;
vid.ROIPosition = [0 0 1200 4096];
preview(vid)
gige: The frame size has changed from 1200x4096 to 1000x4096 during the acquisition. Ensure that you are
not attempting to perform a sequenced acquisition with a varying region of interest (ROI).
In a few words, in order to make effective a new ROI (new matrix dimension), we have to run the script twice (run -> stop -> run).
1000x4096 was the setting done at first.
When we want to move to a new setting, looks like the camera remembers the previous one and returns the error which stops the program.
If at this point now we run again the code, it will work.
The second (more critical) problem, is that offset in both dimensions seems to be not accessible to Matlab.
Pls see below code and warning output:
close all
clear all
clc
imaqreset
vid = videoinput('gige');
src = getselectedsource(vid);
src.DeviceScanType = 'Linescan';
src.ExposureAuto = 'Off';
src.AcquisitionFrameRate = 8000;
src.ExposureTime = 100;
src.Region0GapXBand2 = 100;
vid.FramesPerTrigger = 4;
preview(vid)
Warning: Resetting the ROI as the max width and height has been updated.
Warning: ExposureTime property adjusted from 100.000000 to 99.942413 by the camera.
Warning: Region0GapXBand2 is not accessible at this time. Most likely another property has disabled it.
Any idea how to solve it?
  2 Comments
James Calamita
James Calamita on 6 May 2015
Edited: Walter Roberson on 6 May 2015
We have an almost identical problem with our Basler racer raL-12288-8gm GigE scan line camera. The camera's ROI parameters can be changed in the SW that came with the camera, but attempting to do the same thing in Matlab results in:
Warning: The ROIPosition property was modified because the offsets have changed within the camera
Warning: Resetting the ROI as the max width and height has been updated
This occurs after setting all of the ROI parameters in the Baser Pylon SW, then switching to Matlab and attempting to capture an image using the imaqtool without changing any parameters.
Anybody else have this problem and a solution for it?
Manisha
Manisha on 7 May 2015
Hi Alessandro and James,
This behavior does seem strange. The videoinput interface makes some assumptions about the ROI properties for camera. It seems that with these particular cameras, this is not working well. Would it be possible for you to contact our technical support so that we could learn more this problem.
We also have a new interface called gigecam for GigE Vision Cameras. Would it be possible for you to try that. The new interface has several improvements for GenICam properties.
Regards, Manisha

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!