⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gesture_hu.m

📁 This is a case for recognition of hand gestures using the 7 Hu moments and neural network classifier
💻 M
字号:
%% Script para clasificacion de gestos por monentos de Hu
% ...
clear all
close all
clc
%% Carga la imagen 
tic
I = imread('24.jpg');    % carga imagen
%figure, imshow(I);      % muestra la imagen
I=rgb2gray(I);          % Conversion RGB a gray
%%
%K = imadjust(I,[0.5 1],[]);
K = imadjust(I);
%K =medfilt2(I,[3 3]);
%figure, imshow(K);
%%
JU = im2bw(K,0.55);
%level = graythresh(K);
%JU = im2bw(K,level);
%figure, imshow(JU)
%% Apertura y cierre
se = strel('disk',9);
bw2 = imclose(JU,se);
bw3 = imopen(bw2,se);
figure, imshow(bw3)
%%
%BW2 = bwmorph(bw3,'remove');
%figure, imshow(BW2)
%% Determinar el numero de objetos de la imagen  
[labeled,numObjects] = bwlabel(bw3,8);
%figure, imshow(bw3);
%disp(numObjects);
toc 
%% Calcular los momentos de Hu
tic
HM = HuMom(labeled);
toc

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -