资源简介
手动进行人脸特征点标定的matlab程序,使用起来非常的方便,且可自动生成特征点存储文件。

代码片段和文件信息
%
function annotate(a)
%
% function annotate( imagetype )
%
% Example of a : a = ‘G:\my document\FaceTestData\‘;
%
% Reads and displays all images in the current dir one by one.
%
% When an image is displayed annotation can be done by left-
% clicking the mouse. Press ‘e‘ to end annotation and write
% a corresponding asf-file in the current dir. Use plotasf()
% to view the resulting asf-file.
%
% Example usage: annotate(‘bmp‘);
%
% Write ‘help imread‘ to see supported filetypes.
%
% if isempty(find(imagetype == ‘.‘))
% eval( sprintf(‘dirlist=dir(‘‘%s*.%s‘‘);‘ a imagetype ) ); % get a dir list of all images of type ‘imagetype‘
% else
dirlist = dir(a);
% end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% for each image in the current directory
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i=3:length(dirlist)-1
%%%%%%%%%%%%%%%%%%%%%%
% load and show image
%%%%%%%%%%%%%%%%%%%%%%
image_filename=dirlist(i).name;
eval(sprintf(‘[imgcmap]=imread(‘‘%s%s‘‘);‘aimage_filename));
figure;
axis ij;
imagesc(img);
axis image;
colormap( cmap );
eval(sprintf(‘title(‘‘%s‘‘);‘image_filename));
s=size(img);
height=s(1);
width=s(2);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% annotate image with points
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end_botton = 0;
point_count = 0;
path_count = 0;
while end_botton~=‘e‘ & end_botton~=‘b‘
[points end_botton]=markpath( point_count );
if end_botton == ‘s‘
break;
end
s=size(points);
npathpoints = s(1);
if npathpoints==0
break;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% create a path point matrix
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
P_path = zeros( npathpoints 7 );
P_path(:1) = path_count; % path number
if end_botton==‘o‘
P_path(:2) = 4; % point type = open path
else
P_path(:2) = 0; % point type = closed path
end
P_path(:3) = points(:1)/width; % relative x positions
P_path(:4) = points(:2)/height; % relative y positions
P_path(:5) = [point_count:point_count+npathpoints-1]‘; % point number
if end_botton==‘c‘
% closed path
P_path(:6) = [point_count+npathpoints-1 point_count:point_count+npathpoints-2]‘; % connects_from
P_path(:7) = [point_count+1:point_count+npathpoints-1 point_count]‘; % connects_to
else
% open path (default)
P_path(:6) = [point_count point_count:point_count+npathpoints-2]‘; % connects_from
P_path(:7) = [point_count+1:point_count+npathpoints-1 point_count+npathpoints-1]‘; % connects_to
end
if point_count==0
% create point matrix
P = P_path;
else
% add to point matrix
P = [P; P_path];
end
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 29172 2003-11-04 16:24 biaodian\27_14.jpg
文件 3476 2012-12-21 15:15 biaodian\annotate.m
文件 2253 2010-04-03 23:22 biaodian\annotate27.asv
文件 2274 2010-04-03 23:22 biaodian\annotate27.m
文件 428429 2008-08-27 18:46 biaodian\code\04000_05_01_fit.png
文件 3482 2010-04-03 23:22 biaodian\code\annotate.m
文件 2253 2010-04-03 23:22 biaodian\code\annotate27.asv
文件 2274 2010-04-03 23:22 biaodian\code\annotate27.m
文件 953 2010-04-03 23:22 biaodian\code\formatasf.m
文件 374 2010-04-03 23:22 biaodian\code\getasfpath.m
文件 370 2010-04-03 23:22 biaodian\code\image2gray.m
文件 1712 2010-04-03 23:22 biaodian\code\markpath.m
文件 4275 2010-04-03 23:22 biaodian\code\normface905.asv
文件 4351 2010-07-16 12:07 biaodian\code\normface905.m
文件 571 2010-04-03 23:22 biaodian\code\plotasf.m
文件 939 2010-04-03 23:22 biaodian\code\readasf.m
文件 238 2010-04-03 23:22 biaodian\code\removeext.m
文件 214 2010-04-03 23:22 biaodian\code\replaceext.m
文件 312 2010-04-03 23:22 biaodian\code\showmarkedimage.m
文件 29 2010-04-03 23:22 biaodian\code\test-annotate.m
文件 0 2010-07-16 11:57 biaodian\code\test.txt
文件 29 2010-04-03 23:22 biaodian\code\testAnnotate.m
文件 1234 2010-04-03 23:22 biaodian\code\writeasf.m
文件 90 2010-04-03 23:22 biaodian\code\说明.txt
文件 953 2010-04-03 23:22 biaodian\formatasf.m
文件 374 2010-04-03 23:22 biaodian\getasfpath.m
文件 3382 2003-02-06 23:09 biaodian\image\1.bmp
文件 29172 2003-11-04 16:24 biaodian\image\27_14.jpg
..A.SH. 7168 2012-12-21 14:56 biaodian\image\Thumbs.db
文件 370 2010-04-03 23:22 biaodian\image2gray.m
............此处省略19个文件信息
- 上一篇:单相光伏并网系统
- 下一篇:MIT-BIH数据的 解析代码 rddata.m
相关资源
- 基于小波变换的数字水印算法115024
- matlab_OFDM调制解调(来自剑桥大学)
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
评论
共有 条评论