Тёмный

Face , Nose , Eyes Detection (Complete Project Explanation ) with code| Image Processing with MATLAB 

Knowledge Amplifier
Подписаться 29 тыс.
Просмотров 6 тыс.
50% 1

Опубликовано:

 

27 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 40   
@KnowledgeAmplifier1
@KnowledgeAmplifier1 4 года назад
Code: function varargout = Demo3(varargin) % DEMO3 MATLAB code for Demo3.fig % DEMO3, by itself, creates a new DEMO3 or raises the existing % singleton*. % % H = DEMO3 returns the handle to a new DEMO3 or the handle to % the existing singleton*. % % DEMO3('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in DEMO3.M with the given input arguments. % % DEMO3('Property','Value',...) creates a new DEMO3 or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before Demo3_OpeningFcn gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to Demo3_OpeningFcn via varargin. % % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one % instance to run (singleton)". % % See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help Demo3 % Last Modified by GUIDE v2.5 07-Sep-2020 11:09:27 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @Demo3_OpeningFcn, ... 'gui_OutputFcn', @Demo3_OutputFcn, ... 'gui_LayoutFcn', [] , ... 'gui_Callback', []); if nargin && ischar(varargin{1}) gui_State.gui_Callback = str2func(varargin{1}); end if nargout [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); else gui_mainfcn(gui_State, varargin{:}); end % End initialization code - DO NOT EDIT % --- Executes just before Demo3 is made visible. function Demo3_OpeningFcn(hObject, eventdata, handles, varargin) % This function has no output args, see OutputFcn. % hObject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % varargin command line arguments to Demo3 (see VARARGIN) % Choose default command line output for Demo3 handles.output = hObject; % Update handles structure guidata(hObject, handles); % UIWAIT makes Demo3 wait for user response (see UIRESUME) % uiwait(handles.figure1); % --- Outputs from this function are returned to the command line. function varargout = Demo3_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT); % hObject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Get default command line output from handles structure varargout{1} = handles.output; % --- Executes on button press in Start_Webcam. function Start_Webcam_Callback(hObject, eventdata, handles) % hObject handle to Start_Webcam (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) global c; global loopFlag; loopFlag = true; c=webcam; while true if(loopFlag ==false) break; else e=c.snapshot; axes(handles.axes1); imshow(e); drawnow; end end % --- Executes on button press in Face_Detection. function Face_Detection_Callback(hObject, eventdata, handles) % hObject handle to Face_Detection (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) FDetect=vision.CascadeObjectDetector; global loopFlag; global c ; while true if(loopFlag ==false) break; else e=c.snapshot; BB=step(FDetect,e); imshow(e); hold on; for i=1:size(BB,1) rectangle('Position',BB(i,:),'Linewidth',5,'LineStyle','-','EdgeColor','r'); end hold off; drawnow; end end % --- Executes on button press in Eye_Detection. function Eye_Detection_Callback(hObject, eventdata, handles) % hObject handle to Eye_Detection (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) FDetect=vision.CascadeObjectDetector('EyePairBig','MergeThreshold',50); global loopFlag; global c ; while true if(loopFlag ==false) break; else e=c.snapshot; BB=step(FDetect,e); imshow(e); hold on; for i=1:size(BB,1) rectangle('Position',BB(i,:),'Linewidth',5,'LineStyle','-','EdgeColor','r'); end hold off; drawnow; end end % --- Executes on button press in Nose_Detection. function Nose_Detection_Callback(hObject, eventdata, handles) % hObject handle to Nose_Detection (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) global loopFlag; global c ; FDetect=vision.CascadeObjectDetector('Nose','MergeThreshold',30); while true if(loopFlag ==false) break; else e=c.snapshot; BB=step(FDetect,e); imshow(e); hold on; for i=1:size(BB,1) rectangle('Position',BB(i,:),'Linewidth',5,'LineStyle','-','EdgeColor','r'); end hold off; drawnow; end end % --- Executes on button press in Close_Webcam. function Close_Webcam_Callback(hObject, eventdata, handles) % hObject handle to Close_Webcam (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) global loopFlag; loopFlag=false; clear global c; axes(handles.axes1); imshow('Thank.JPG');
@neelamsharma117
@neelamsharma117 4 года назад
Thanks a lot sir
@KnowledgeAmplifier1
@KnowledgeAmplifier1 4 года назад
@@neelamsharma117 Welcome . Happy Learning :-)
@princendinga1774
@princendinga1774 2 года назад
Thank you 🙏
@KnowledgeAmplifier1
@KnowledgeAmplifier1 2 года назад
@@princendinga1774 You are welcome ! Happy Learning & a very Happy New Year :-)
@princendinga1774
@princendinga1774 2 года назад
I’m also looking for face recognizing using finite element method…
@dpursue6093
@dpursue6093 3 года назад
Can you do mouth detection ? I did the same with my mouth but it didn't work.
@terribleloser.24
@terribleloser.24 3 года назад
Can you give an idea how to detect nose and eyes at same time and store/print one if they are detected
@SergioZhink
@SergioZhink 3 года назад
it says Error in Demo3 (line 42) gui_mainfcn(gui_State, varargin{:}); What can i do? thank you so much
@KnowledgeAmplifier1
@KnowledgeAmplifier1 3 года назад
Please share the complete error
@SergioZhink
@SergioZhink 3 года назад
@@KnowledgeAmplifier1 Error using load Unable to read file 'Demo3.fig'. No such file or directory. Error in matlab.graphics.internal.figfile.FigFile/read (line 31) hgDataVars = load(filename, '-mat', '-regexp', '^hg[M]'); Error in matlab.graphics.internal.figfile.FigFile Error in hgload (line 54) FF = matlab.graphics.internal.figfile.FigFile(filename); Error in matlab.hg.internal.openfigLegacy (line 57) [fig, savedvisible] = hgload(filename, struct('Visible','off')); Error in gui_mainfcn>local_openfig (line 286) gui_hFigure = matlab.hg.internal.openfigLegacy(name, singleton, visible); Error in gui_mainfcn (line 158) gui_hFigure = local_openfig(gui_State.gui_Name, gui_SingletonOpt, gui_Visible); Error in Demo33333 (line 42) gui_mainfcn(gui_State, varargin{:});
@SergioZhink
@SergioZhink 3 года назад
@@KnowledgeAmplifier1 do i need to create the .fig file?
@the-patient8178
@the-patient8178 2 года назад
@@SergioZhink hi did you solve the problem ?because I have the same Error in gui_mainfcn (line 95) feval(Varargin{:}); Error in GUI_facedetection (line 42) gui_mainfcn(gui_State, varargin {:}); Please help me
@roynia0330
@roynia0330 3 года назад
Can you do face detection using viola jones algorithm
@KnowledgeAmplifier1
@KnowledgeAmplifier1 3 года назад
Roynia Dewysen , this face detection using viola jones algorithm only! For details , you can refer this link-- in.mathworks.com/help/vision/ref/vision.cascadeobjectdetector-system-object.html Happy Learning :-)
@santharuban8928
@santharuban8928 2 года назад
can we count eye blink rate ??
@maismudhafertaheralmosawi1727
@maismudhafertaheralmosawi1727 3 года назад
can you make code for hand detection
@mattkan3275
@mattkan3275 4 года назад
Nice tutorial !
@KnowledgeAmplifier1
@KnowledgeAmplifier1 4 года назад
Thank You Matt Kan . Happy Coding :-)
@SergioZhink
@SergioZhink 3 года назад
can you share the GUI code? please
@KnowledgeAmplifier1
@KnowledgeAmplifier1 3 года назад
Sergio Gómez ಠ_ಠ check pinned comment , already posted there. Happy Learning :-)
@nishuchauhan2564
@nishuchauhan2564 Год назад
Mera code run ni ho raha hai
@KnowledgeAmplifier1
@KnowledgeAmplifier1 Год назад
Hello NISHU , can you please share what error are you getting?
@leechee9950
@leechee9950 3 года назад
thanks
@KnowledgeAmplifier1
@KnowledgeAmplifier1 3 года назад
Welcome zitao cai ! Happy Learning :-)
Далее
Face Detection on Image using Matlab
7:42
Просмотров 29 тыс.
Viral Video of a Man's Crazy Job Interview
16:02
Просмотров 1,5 млн
Face Recognition Using MATLAB-From Mathworks
37:43
Просмотров 10 тыс.
Realtime Face Detection and Tracking using MATLAB
19:48