91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

利用matlab實現基于膚色的人臉檢測以及GUI設計,換圖片測試需調整膚色均值

資源截圖

代碼片段和文件信息

function?[boxsface_numduration]=face_detect(imagethresholdmin_size)
????if?isempty(image)
????????boxs=[];
????????face_num=0;
????????duration=0;
????????return?;
????end?

????if?(nargin==1)
????????threshold?=0.5;
????????min_size=40;
????elseif?(nargin==2)
????????min_size=40;
????end

????%fprintf(‘%f?%d\r\n‘thresholdmin_size);
????min_area=min_size*min_size;
????tic;
????YCbCr=rgb2ycbcr(image);
????[height?width?channel]=size(YCbCr);
????cb=double(YCbCr(::2));
????cr=double(YCbCr(::3));
????Ecb?=?(cb-117.4316);
????Ecr?=?(cr-148.5599);
????prob=exp((-0.0019)*Ecb.^2+(0.0004)*(Ecb).*(Ecr)+(-0.0033)*Ecr.^2);
????z=prob./max(max(prob));%---------------------------------------------------------complextion?probability
????z?=?im2bw(zthreshold);
????%figure;imshow(z);title(‘Set?threshold‘)%-----------------------------------threshold
????se=strel(‘square‘3);
????f=imopen(zse);
????f=imclose(fse);
????%figureimshow(f);%open?and?close?processing;
????f=imfill(f‘holes‘);
????%figureimshow(f);%fill?holes?in?the?Img
????se1=strel(‘square‘4);
????f=imerode(fse1);
????f=imdilate(fse1);
????%figureimshow(f);%----------------------------------------------------erosion?and?expansion;
????[Lnum]=bwlabel(f4);

????for?i=1:num;%region?loop;
????????[rc]=find(L==i);
????????len=max(r)-min(r)+1;
????????wid=max(c)-min(c)+1;

????????area_sq=len*wid;
????????area=size(r1);
????????len_wid_ratio=len/wid;
????????area_sq_ratio?=area/area_sq;

???????for?j=1:size(r1)%pixel?loop;
????????????if(len_wid_ratio<.8)|(len_wid_ratio>2.4)|area<(min_area)|area_sq_ratio<0.65
????????????????L(r(j)c(j))=0;%not?zero?pixel?=0;
????????????else
????????????????continue;
????????????end
????????end
????end

????w=L&z;

????[Lnum]=bwlabel(w4);
????if?num>0?
?????????boxs=zeros(num4);
?????????face_num=num;
????????for?i=1:num
????????????[r?c]=find(L==i);
????????????r_min=min(r);r_max=max(r);
????????????c_min=min(c);c_max=max(c);
????????????boxs(i1)=c_min;%x1
????????????boxs(i2)=r_min;%y1
????????????boxs(i3)=c_max;%x2
????????????boxs(i4)=r_max;%y2
????????end
????else
????????boxs=[];
????????face_num=0;
????end
?duration=toc;?
?end

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-04-16?15:21??基于膚色的人臉檢測GUI\
?????文件????????2253??2017-12-05?01:04??基于膚色的人臉檢測GUI\face_detect.m
?????文件????????5103??2017-12-06?01:45??基于膚色的人臉檢測GUI\GUI.fig
?????文件????????3860??2017-12-12?22:32??基于膚色的人臉檢測GUI\GUI.m
?????目錄???????????0??2018-04-16?15:21??基于膚色的人臉檢測GUI\test_iamge\
?????文件???????11219??2017-12-04?00:23??基于膚色的人臉檢測GUI\test_iamge\10.jpg
?????文件???????16142??2017-12-04?00:57??基于膚色的人臉檢測GUI\test_iamge\11.jpg
?????文件???????90738??2017-12-04?01:37??基于膚色的人臉檢測GUI\test_iamge\123.jpg
?????文件???????36185??2017-12-04?01:29??基于膚色的人臉檢測GUI\test_iamge\14.jpg
?????文件???????48041??2018-04-11?16:57??基于膚色的人臉檢測GUI\test_iamge\20140317083911630349[1].jpg
?????文件???????31781??2017-08-05?23:35??基于膚色的人臉檢測GUI\test_iamge\8.jpg
?????文件???????62824??2018-04-11?16:57??基于膚色的人臉檢測GUI\test_iamge\97e46e4c262ab077-e08426d869a2e1cb-ca42dc3a62c006fa857f7458dd96891b[1].jpg
?????文件??????356099??2018-04-11?16:58??基于膚色的人臉檢測GUI\test_iamge\D525D7E5EE9EC0C8E1958DB524[1].jpg
?????文件???????91020??2017-12-04?12:38??基于膚色的人臉檢測GUI\test_iamge\test1.jpg
?????文件???????96877??2017-12-04?12:38??基于膚色的人臉檢測GUI\test_iamge\test2.jpg

評論

共有 條評論