基于matlab的人脸识别源程序内容摘要:
wx,cx, cy, angle) frontalmodel=rgb2gray(frontalmodel)。 model_rot = imresize(frontalmodel,[ly wx],39。 bilinear39。 )。 % 调整模板大小 model_rot = imrotate(model_rot,angle,39。 bilinear39。 )。 % 旋转模板 [l,r,u,d] = bianjie(model_rot)。 % 求边界坐标 bwmodel_rot=imcrop(model_rot,[l u (rl) (du)])。 % 选择模板人脸区域 [modx,mody] =center(bwmodel_rot)。 % 求质心 [morig, norig] = size(bwmodel_rot)。 % 产生一个覆盖了人脸模板的灰度图像 mfit = zeros(size(mult))。 mfitbw = zeros(size(mult))。 [limy, limx] = size(mfit)。 % 计算原图像中人脸模板的坐标 startx = cxmodx。 starty = cymody。 endx = startx + norig1。 endy = starty + morig1。 startx = checklimit(startx,limx)。 starty = checklimit(starty,limy)。 endx = checklimit(endx,limx)。 endy = checklimit(endy,limy)。 for i=starty:endy, for j=startx:endx, mfit(i,j) = model_rot(istarty+1,jstartx+1)。 end。 end。 ccorr = corr2(mfit,mult) % 计算相关度 [l,r,u,d] = bianjie(bwmodel_rot)。 sx = startx+l。 sy = starty+u。 RectCoord = [sx sy (r1) (du)]。 % 产生矩形坐标 clear。 [fname,pname]=uigetfile({39。 *.jpg39。 39。 *.bmp39。 39。 *.tif39。 39。 *.gif39。 },39。 Please choose a color picture...39。 )。 % 返回打开的图片名与图片路径名 [u,v]=size(fname)。 y=fname(v)。 % 图片格式代表值 switch y case 0 errordlg(39。 You Should Load Image File First...39。 ,39。 Warning...39。 )。 case{39。 g39。 39。 G39。 39。 p39。 39。 P39。 39。 f39。 39。 F39。 }。 % 图片格式若是 JPG/jpg、 BMP/bmp、TIF/tif 或者 GIF/gif,才打开 I=cat(2,pname,fname)。 Ori_Face=imread(I)。 subplot(2,3,1),imshow(Ori_Face)。 otherwise errordlg(39。 You Should Load Image File First...39。 ,39。 Warning...39。 )。 end R=Ori_Face(:,:,1)。 G=Ori_Face(:,:,2)。 B=Ori_Face(:,:,3)。 R1=im2double(R)。 % 将 uint8型转换成 double型处理 G1=im2double(G)。 B1=im2double(B)。 RGB=R1+G1+B1。 m=[ ,]。 % 均值 n=[,。 ,]。 % 方差 row=size(Ori_Face,1)。 % 行像素数 column。基于matlab的人脸识别源程序
相关推荐
b 语言语法限制不严格 ,程序设计自由度大 ,程序的可移植性好。 Matlab 还推出了功能强大的适应于图像分析和处理的工具箱 ,常用的有图像 处理工具箱、小波分析工具箱及数字信号处理工具箱。 利用这些工具箱 ,我们可以很方便的从各个方面对图像的性质进行深入的研究。 Matlab 图像处理工具箱支持索引图像、 RGB 图像、灰度图像、二进制图像并能操作 .bmp、 jpg
波)的已调波形,而且 ω1 与 ω2 之间的改变是瞬间完成的。 2FSK 信号的产生如图 所示: 图 2FSK 信号产生方法 2FSK 信号最常用的解调方法是采用的相干检测法,如图 所示 :图 2FSK 相干解调的方法 Simulink 通信工具箱中提供了专门的 FSK 调制和解调模块,应用FSK 调 制模块能方便的产生 2FSK 信号。 因此,设计 2FSK 仿真模型时,只需根据图 所示框图
图像进行二值化,然后轮廓平滑处理后,图像的每个点为两个离散值中的一个,这两个值代表开 (1)与关 (0),即只有黑与白的特殊灰度图像,并且整个图像只有两个域 (如果有多个域需改变参数后重新进行一此剔除干扰对象处理 ),全 1 的域即为车牌区域,并且近似矩形,长宽比为 :1,也可以用这两个特性去检验提取的区域是否为车牌区域。 经区域确定了,即可将车牌的四个边界值确定下来。
(b) A3 (f) A4 (f) 1 1 Digital filter design Digital filter design of the basic requirements Digital filter design must go through three steps : (1) Identification of indicators : In the design of a
a analysis and numerical calculation of the advanced technology and the interactive language environment. As a powerful scientific puting platforms, it almost to satisfy all puting requirements. As
接搜索引擎的新时代。 Lucene 简介 最初 Lucene 是 Apache 软件基金会 Jakarta 项目组 的 子项目,是一个完全开放源码的全文检索工具包。 Lucene的原作者是 Doug Cutting,他是一位资深全文检索专家, VTwin搜索引擎的主要开发者。 2020年 3月 Doug Cutting把 Lucene转移到 SourceFe上, 2020年 10月献给