1. 首页 > 科技

如何用实验证明fusiform face area(ffa)专家的面部特异性或专业性假设?

如何用实验证明fusiform face area(ffa)专家的面部特异性或专业性假设?

求写C++实验程序。由基类圆类派生圆柱体类

展开全部

我得到了你想要的结果,下面是完整的代码:#include class Circle

{

public:

Circle(double R)

{

this->R = R;

this->pi = 3.1415;

}

protected:

double GetArea() const

{

double area = this->pi * this->R * this->R;

std::cout << "圆的面积是:" << area << std::endl;

return area;

}

private:

double R;

double pi;

};class Column : public Circle

{

public:

Column(double R, double H) : Circle(R)

{

this->H = H;

}

void GetVol() const

{

double vol = this->H * Circle::GetArea();

std::cout << "圆柱的体积是:" << vol << std::endl;

}

private:

double H;

};int main()

{

double R = 10.0;

double H = 20.0;

Column col(R, H);

col.GetVol();

system("pause");

}

开机人脸识别验证如何设置

人像识别VeriFace3.5使用帮助文档

[url]support1.lenovo/lenovo/wsi/htmls/detail_12608719185313802.html[/url]

define_source宏当中怎么用f_area得到face的面积?

#define SfDebug 0

//定义宏SfDebug 代表0

#ifndef FlagOn

#define FlagOn(_F,SF)((_F) & (_SF))

#endif

//没定义FlagOn定义FlagOn其内容两数值相与

#define SF_LOG_PRINT( _dbgLevel, _string ) \

(FlagOn(SfDebug,(_dbgLevel)) ? DbgPrint _string : ((void)0))

//FlagOn(SfDebug,(_dbgLevel)) 返真输DbgPrint _string 否则输

应用写:

SF_LOG_PRINT( 1, this is a test" ) //SfDebug0所FlagOn永远假啥输

你好 我想做一个肤色的人脸检测研究 要用到肤色模型,比如rgb算法之类的 用matlab软件,但不知道如何下手

  function facedetec()

  sum=0;

  % clc,close all;

  iptsetpref('ImshowBorder', 'tight')

  f=imread('faces.jpg');

  Ori_Face=f;

  copy=f;

  img=f;

  % figure,imshow(f);

  f=rgb2ycbcr(f);%rgb转换为ycbcr

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  % figure,imshow(f);

  f_cb=f(:,:,2);

  f_cr=f(:,:,3);

  f= (f_cb&gt;=100) &amp; (f_cb&lt;=127) &amp; (f_cr&gt;=138) &amp;(f_cr&lt;=170) ;

  %皮肤颜色在ycbcr色度空间的分布范围为:100&lt;=cb&lt;=127,138&lt;=cr&lt;=170

  figure(1); imshow(f);

  %K=medfilt2(f,[5 5]);%5×5中值滤波,去除噪声

  %figure,imshow(f);

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%利用开闭运算的方法消除噪声

  se=strel('square',3);

  f=imopen(f,se);

  f=imclose(f,se);

  figure(2),imshow(f);

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%填孔处理

  f=imfill(f,'holes');

  figure(3),imshow(f);

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%重构法

  fe=imerode(f,ones(8,7));

  fo=imopen(f,ones(8,7));

  f=imreconstruct(fe,f);

  figure(4),imshow(f);

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%相关匹配,作用不大,可注释掉

  %w=ones(3);%w为模板大小.

  %f=imfilter(f,w);

  %figure(5),imshow(f);

  % [M,N]=size(f);

  % f=fft2(f);

  % w=conj(fft2(w,M,N));

  % g=real(ifft2(w.*f));

  % gs=gscale(g);

  % figure,imshow(gs);

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  %人脸候选区筛选时,由于头部部分重合,以及头部与其他

  %部分,例如衣服等的连接,对筛选造成了困难,故应先利用

  %闭运算操作,断开连接,再进行处理.

  se1=strel('square',8);

  f=imerode(f,se1);

  f=imdilate(f,se1);

  figure(6),imshow(f);

  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%区域连通

  [L,num]=bwlabeln(f,4);

  for i=1:num;

  [r,c]=find(L==i);

  r_temp=max(r)-min(r);

  c_temp=max(c)-min(c);

  temp=size(r);

  sum=sum+temp(1);

  area_sq=r_temp*c_temp;

  area=size(find(L==i),1);

  ratio=area/area_sq;

  if (r_temp/c_temp&lt;0.8)|(r_temp/c_temp&gt;2)|temp(1)&gt;2000|temp(1)&lt;200|ratio&lt;0.6

  %脸部区域&lt;250的去掉,一般为手或其他干扰.

  %利用脸部宽长比的大概上下限来确定一个模板范围.

  %矩形面积area_sq=目标区长度*宽度,目标区面积为area,若area/area_sq&lt;0.6,认为不是人脸区,删除之.

  for j=1:temp(1);

  L(r(j),c(j))=0;

  end

  else

  continue;

  end

  end

  L=bwperim(L,8);%边缘检测,检测出人脸的边缘区域

  L=uint8(L);

  z=find(L(:)&gt;0);

  L(z)=255;

  % ave=sum/num;%ave=696.

  figure(7),imshow(L);

  L_r=L;

  L_g=L;

  L_b=L;

  L_rgb=cat(3,L_r,L_g,L_b);%在原图上加框

  % figure,imshow(L_rgb);

  img1_r=min(L_r+img(:,:,1),255);

  img1_g=min(L_g+img(:,:,2),255);

  img1_b=min(L_b+img(:,:,3),255);

  img1=cat(3,img1_r,img1_g,img1_b);

  figure(8),imshow(img1);