-
大小: 1KB文件类型: .zip金币: 2下载: 0 次发布日期: 2024-01-05
- 语言: 其他
- 标签: hand segmentation
资源简介
hand_segmentation hand_segmentation hand_segmentation
代码片段和文件信息
function skin = hand_segmentation(im)
%imgrgb=imread(‘IMG_2755.jpg‘);
[w h]=size(im(::1));
%Laplacian 八邻域模板滤波
h1=[-1-1-1;-19-1;-1-1-1];
bw1=imfilter(imh1);
% bw1=im;
[mnc]=size(bw1);
% delete strFilec;
%将RGB色彩空间转换为Ycbcr色彩空间
imgrgb3=rgb2ycbcr(bw1);
y=imgrgb3(::1);
cb=imgrgb3(::2);
cr=imgrgb3(::3);
%==================================
%在Ycbcr色彩空间中分割肤色区域
cb=double(cb);
cr=double(cr);
y=double(y);
bwycbcr=zeros(mn);
for i=1:m
for j=1:n
if y(ij)<125
cb1=108+(125-y(ij))*10/109;
cr1=154-(125-y(ij))*10/109;
wcb=23+(y(ij)-16)*23.97/109;
wcr=20+(y(ij)-16)*18.76/109;
cb1=(cb(ij)-cb1)*46.97/wcb+cb1;
cr1=(cr(ij)-cr1)*38.76/wcr+cr1;
elseif y(ij)>188
cb1=108+(y(ij)-188)*10/47;
cr1=154+(y(ij)-188)*22/47;
wcb=14+(235-y(ij))*32.97/47;
wcr=10+(235-y(ij))*28.76/47;
cb1=(cb(ij)-cb1)*46.97/wcb+cb1;
cr1=(cr(ij)-cr1)*38.76/wcr+cr1;
else
cb1=cb(ij);
cr1=cr(ij);
end
x1=[-0.819 0.574]*[cb1-109.38;cr1-152.02];
y1=[-0.574 -0.819]*[cb1-109.38;cr1-152.02];
if (x1-1.60).^2/644.6521+(y1-2.41).^2/196.8409<=1
bwycbcr(ij)=1;
else bwycbcr(ij)=0;
end
end
end
%strWrite=strcat(‘a‘strFile1);
%imwrite(bwycbcrstrWrite‘jpg‘);
%figure(1)
%subplot(221);
%imshow(im);
title(‘原始图像‘);
%figure(2)
%subplot(222);
%imshow(bw1);
%figure(3)
title(‘Laplacian滤波‘);
%subplot(223);
%imshow(bwycbcr);
%figure(4)
title(‘Ycbcr皮肤颜色模型‘);
%subplot(224);
%把bwycbcr拉伸到[01]
bw2=imadjust(bwycbcr[01]);
bw2=imageclose(bw2);
skin=bw2;
%去除少像素连通区域
skin=bwareaopen(skinround(w*h/10));
%imshow(skin);
title(‘去除少数像素‘);
%imwrite(skin‘result.bmp‘);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1952 2011-07-15 09:27 hand_segmentation.m
目录 0 2018-04-17 11:31 新建文件夹\
- 上一篇:AUSPLINE 插值程序 arcview插件
- 下一篇:总体经验模态分解
相关资源
- The Alarm Management Handbook - - Bill Hollifi
- The Weibull Distribution A Handbook
- The Handbook of Fixed Income Securities 8th Ed
- 概率分布手册Hand-book on statistical dis
- 《Hands-On Machine Learning with Scikit-Learn
- PCL点云库SACSegmentation用法demo
- LTE 切换算法仿真265910
- Handbook of Functional MRI Data Analysis
-
Handbook of me
taheuristics第2版 - The Garbage Collection Handbook: the Art of Au
- 故障树手册Fault Tree Handbook
- PROBOT Anno手眼标定步骤easy_handeye-眼在
- Safety_First_for_Automated_Driving_handover_to
- Reliability Engineer Handbook
- 数据挖掘原理(英Hand 2003)
- CleanCodeHandbook
- HandBrake视频转换VS2010编译通过
- Hands-On Microservices with Rust - Denis Kolod
- Telco Churn Management Handbook 2《电信业客
- The Certified Reliability Engineer Handbook
- Radar Essentials A Concise Handbook for Radar
- 翻译 Review on Deep Learning Segmentation 应用
- MMX-应用密码学手册英文版 Handbook of
- WAVEGUIDE HANDBOOK
- A Review of Off-line Handwritten Chinese Chara
- CleanCodeHandbook_v1.0.3
- Altera FPGA Cyclone5 datasheet 和 handbook
- NASA系统工程手册 第二版 NASA SYSTEMS
- Hands-On Computer Vision with Julia
- handbook_of_high_frequency_trading
评论
共有 条评论