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;