How can I use Camera GigE vision?

조회 수: 1 (최근 30일)
walid albugami
walid albugami 2021년 2월 24일
I'm using Appdesigner to control My Camera (it is a GigE Vision Camera).
My objectif is to aquire images from the camera.
i download the package needed for that.
i created the a GigE object. every things went well.
I need to use (preview) before using snapshot.
The code works very slowly (in preview Mode: the image changes every 10 or 20 seconds instead of becoming near realtime), In addition to that: while the camera is connected to the laptop (which it should be), the entire code (even for the operations and components not related to the camera) become very very slow, i can't even move the mouse on my screen or open other window. once i deconnect the camera GigE, every things become normale, all operations could be acheived easily and fast.
i feel that i'm not using the camera with the optimized way.
In startupFcn: i initialize my object as below:
app.cam=gigecam; % initialse an object for the camera.
app.WidthEditField.Value=double(app.cam.Width);
app.HeightEditField.Value=double(app.cam.Height);
app.ExposureTimeEditField.Value=double(app.cam.ExposureTime);
app.GainEditField.Value=double(app.cam.Gain);
app.row=app.cam.Height;
app.colume=app.cam.Width;
app.ExposureTime=app.cam.ExposureTime;
app.Gain=app.cam.Gain;
In Preview Button Pushed: i wrote the part below:
frame=snapshot(app.cam);
im=image(app.UIAxes,zeros(size(frame),'uint8'));
axis(app.UIAxes,'image');
app.UIAxes.Children=preview(app.cam,im);
In snapshot Button Pushed:I wrote the part below :
im1=snapshot(app.cam);
axis(app.UIAxes,'image');
imshow(im1,'parent',app.UIAxes);
best regards

답변 (0개)

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by