目标:在matlab中GUI环境下通过摄像头读入视频并实时处理(实时可能比较困难)
1、建立GUI界面,通过摄像头读取视频,并灰度化处理。 完整的m文件如下。(matlab2010a)
function varargout = faceDetection(varargin)
% FACEDETECTION M-file for faceDetection.fig
% FACEDETECTION, by itself, creates a new FACEDETECTION or raises the existing
% singleton*.
%
% H = FACEDETECTION returns the handle to a new FACEDETECTION or the handle to
% the existing singleton*.
%
% FACEDETECTION('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in FACEDETECTION.M with the given input arguments.
%
% FACEDETECTION('Property','Value',...) creates a new FACEDETECTION or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before faceDetection_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to fa