资源简介
手动进行人脸特征点标定的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
相关资源
- MIT-BIH数据的 解析代码 rddata.m
- matlab实现的基于颜色直方图的特征匹
- 自适应信号与系统 LMS与RLS算法收敛
- 相空间重构代码-matlab
- css算法 角点检测 matlab
- 非完整轮式移动机器人运动规划与控
- 分水岭算法分割苹果(matlab代码实现
- 该源代码的功能是用matlab来实现链码
- matlab的GUI录音程序,带有界面文件。
- 非常经典的MATLAB人脸识别程序可显示
- 1.5维普matlab程序
-
OQPSK的Matlab_Simuli
nk调制解调仿真系统 - Matlab 2018b 破解文件
- 降低OFDM系统PAPR算法(PTS-SLM-C变换)
- Classification matlab code - Quadratic Discrim
- 数字下变频MATLAB仿真
- UWB matlab程序
- 超分辨的MATLAB程序
- 图像相似度量Matlab代码
- 数字信号处理理论算法与实现课后习
- haar人脸 人眼检测 MATLAB
- s变换的matlab程序
- 应用Matlab产生各种数字调制信号以及
- 基于MATLAB的线性二次型最优控制设计
- KPCA故障诊断matlab实现182088
- 求两幅图像间的-相关系数-matlab-M文件
- matlab中宽带信号的产生
- 基于matlab的车型识别源代码
- matlab 检查数据的周期函数
- matlab仿真.rar
评论
共有 条评论