Using Webcam in GUI to view the image,capture image,save image and acquisition

20 ビュー (過去 30 日間)
I already build my file.fig at GUI: problem is the view from the webcam actually display outside the axes box... can anyone solve my problem??.. i also having difficulty to find source code for capture image,save and doing acquisition....
  4 件のコメント
Aziz 2012 年 10 月 3 日
no... im not using the preview() routine...



Image Analyst
Image Analyst 2012 年 10 月 3 日
See this function from my webcam app:
% Turn on the live video preview. Display the bounding box over it if there is one selected.
function TurnOnLiveVideo(handles)
global vidobj; % Video camera object.
% Bail out if there is no video object class instantiated.
if isempty(vidobj), return, end;
% Switch the current graphic axes to handles.axesImage.
% This is where we want the video to go.
% Reset image magnification. Required if you ever displayed an image
% in the axes that was not the same size as your webcam image.
hold off;
axis auto;
% Get the handle to the image in the axes.
hImage = findobj(handles.axesImage, 'Type', 'image');
% Turn on the live video.
preview(vidobj, hImage);
First display something in the axes, for example a splash image or logo, so that this function has an image in the axes to get the handle of.
  3 件のコメント
NUR SHOLIHAH RAMLEE 2018 年 3 月 27 日
hello Image Analyst, may I know how do you do the view, capture, and store it in the file exchange?


その他の回答 (2 件)

Fatma Buharoon
Fatma Buharoon 2016 年 5 月 8 日
where can i insert this code ?

MathWorks MATLAB Hardware Team
MathWorks MATLAB Hardware Team 2021 年 5 月 4 日
編集済み: MathWorks MATLAB Hardware Team 2021 年 5 月 4 日


Find more on Image Acquisition Toolbox Supported Hardware in Help Center and File Exchange


Community Treasure Hunt

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

Start Hunting!

Translated by