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

조회 수: 5 (최근 30일)
I already build my file.fig at GUI: http://i41.tinypic.com/2cz3c5y.jpg ...my 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
Walter Roberson
Walter Roberson 2012년 10월 2일
For example are you using preview() to display the webcam image?
Aziz
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.
axes(handles.axesImage);
% 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
Image Analyst
Image Analyst 2012년 10월 3일
Yes. It is. I have a whole app to view and capture images from a Logitech webcam. Unfortunately I haven't perfected it to the level where I want to upload it to my File Exchange. Maybe I could upload a screenshot of it so you can copy it.
NUR SHOLIHAH RAMLEE
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일

태그

Community Treasure Hunt

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

Start Hunting!

Translated by