How can I use Camera GigE vision?
    5 次查看(过去 30 天)
  
       显示 更早的评论
    
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 个评论
回答(0 个)
另请参阅
类别
				在 Help Center 和 File Exchange 中查找有关 GigE Vision Hardware 的更多信息
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
