基于Matlab GUI界面肤色静态手势识别

点击下载:完整方案

文件大小:4.5M

代码行数:352行(主程序)

开发环境:Matlab2018、2020

猿创承诺:该源码均通过亲自测试可正常运行

简要概述:基于Matlab GUI界面肤色手势识别,提供了测试图片,手势数字12345。

源码注释:

在这里插入图片描述
运行效果:
在这里插入图片描述

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
以下是一个基于MATLAB GUI界面的孤立词识别程序代码的示例: ```matlab function varargout = isolated_word_recognition(varargin) % ISOLATED_WORD_RECOGNITION MATLAB code for isolated_word_recognition.fig % ISOLATED_WORD_RECOGNITION, by itself, creates a new ISOLATED_WORD_RECOGNITION or raises the existing % singleton*. % % H = ISOLATED_WORD_RECOGNITION returns the handle to a new ISOLATED_WORD_RECOGNITION or the handle to % the existing singleton*. % % ISOLATED_WORD_RECOGNITION('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in ISOLATED_WORD_RECOGNITION.M with the given input arguments. % % ISOLATED_WORD_RECOGNITION('Property','Value',...) creates a new ISOLATED_WORD_RECOGNITION or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before isolated_word_recognition_OpeningFcn gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to isolated_word_recognition_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 isolated_word_recognition % Last Modified by GUIDE v2.5 16-Aug-2021 20:40:25 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @isolated_word_recognition_OpeningFcn, ... 'gui_OutputFcn', @isolated_word_recognition_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 isolated_word_recognition is made visible. function isolated_word_recognition_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 isolated_word_recognition (see VARARGIN) % Choose default command line output for isolated_word_recognition handles.output = hObject; % Update handles structure guidata(hObject, handles); % UIWAIT makes isolated_word_recognition wait for user response (see UIRESUME) % uiwait(handles.figure1); % Initialize the recorder object handles.recorder = audiorecorder(8000, 16, 1); % Set the recording time to 1 second handles.recording_time = 1; % Update handles structure guidata(hObject, handles); % --- Outputs from this function are returned to the command line. function varargout = isolated_word_recognition_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 record_button. function record_button_Callback(hObject, eventdata, handles) % hObject handle to record_button (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Start recording record(handles.recorder, handles.recording_time); % Change the button text set(hObject, 'String', 'Recording...'); % Update handles structure guidata(hObject, handles); % --- Executes on button press in stop_button. function stop_button_Callback(hObject, eventdata, handles) % hObject handle to stop_button (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Stop recording stop(handles.recorder); % Change the button text set(handles.record_button, 'String', 'Record'); % Get the audio data audio_data = getaudiodata(handles.recorder); % Play back the recorded audio soundsc(audio_data, handles.recorder.SampleRate); % Extract MFCC features from the audio data mfcc_features = mfcc(audio_data, handles.recorder.SampleRate); % Classify the spoken word using a pre-trained model load('isolated_word_recognition_model.mat'); % Load the model predicted_label = predict(model, mfcc_features'); % Predict the label % Display the predicted label set(handles.predicted_label_text, 'String', predicted_label); % Update handles structure guidata(hObject, handles); ``` 在此示例中,我们使用MATLAB的GUI工具箱创建了一个GUI界面。用户可以使用该界面录制一个单词的语音,并使用预先训练的模型对该单词进行分类。该界面包括以下组件: - `record_button`:开始录制语音的按钮 - `stop_button`:停止录制语音的按钮 - `predicted_label_text`:显示预测单词标签的文本框 在此示例中,我们使用了一个名为`mfcc`的函数来提取MFCC特征。这是一个自定义函数,需要单独下载和添加到MATLAB路径中。此外,我们还使用了一个预先训练的分类模型,该模型将MFCC特征映射到单词标签。该模型存储在一个名为`isolated_word_recognition_model.mat`的MAT文件中,需要与此代码一起下载并保存在同一目录中。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

索炜达.猿创

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值