Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: GUI Axes display a live video has a obvious time delay
Replies: 1   Last Post: Apr 16, 2012 10:40 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Songpo

Posts: 3
Registered: 4/15/12
GUI Axes display a live video has a obvious time delay
Posted: Apr 16, 2012 10:31 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello everyone,

I made a GUI using GUIDE with one Axes component, which is fill most of the screen. One camera is connected with the laptop, and the live video is displayed on the Axes component. There is a obvious time delay. Is there anyone who can modify my code to make it more efficient? Another problem is after I close the GUI, the execution in the Loop would not stop, it is still trying to capture one image and display. Is there some way to stop this?

More description:
pixels of screen 1600x900. Axes 1600x883; pixels of image 1600x896; I added my code to the Opening_Fcn of the GUI.

imaqreset;
obj=videoinput('winvideo', 1,'RGB24_1600x896');
set(obj,'framesperTrigger',9999);
start(obj);
set(gcf, 'Position', get(0,'Screensize'));
while (exist('hObject','var'));
Icamx=getdata(obj,1);
Iam=Icamx(8:888,:,:);% as Axes is smaller than image, part of the image is display.
axes(handles.axes_video);
axis off;
image(Iam);
flushdata(obj);
end
stop(obj);
delete(obj);
clear obj;
imaqreset;



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.