function h = ut_arrow(x1,x2,col,dummx2)
% ut_arrow(x1,x2): draws a line with arrow from point x1 to point x2;
% ut_arrow(x1,x2,c): use color c
% ut_arrow(x1,x2,c,1): draw line with double arrows
coldefault = 'k';
if nargin>2
coldefault = col;
end
dd = nargin>3;
X = [x1(1) x2(1)];
Y = [x1(2) x2(2)];
h = plot(X,Y,coldefault);
arrowh(X,Y,coldefault,[200 300]);
if dd
X = [x2(1) x1(1)];
Y = [x2(2) x1(2)];
arrowh(X,Y,coldefault,[200 300]);
end
if nargout==0, h=[]; end
end
% ARROWH Draws a solid 2D arrow head in current plot.
%
% ARROWH(X,Y,COLOR,SIZE,LOCATION) draws a solid arrow head into
% the current plot to indicate a direction. X and Y must contain
% a pair of x and y coordinates ([x1 x2],[y1 y2]) of two points:
%
% The first point is only used to tell (in conjunction with the
% second one) the direction and orientation of the arrow -- it
% will point from the first towards the second.
%
% The head of the arrow will be located in the second point. An
% example of use is plot([0 2],[0 4]); ARROWH([0 1],[0 2],'b')
%
% You may also give two vectors of same length > 2. The routine
% will then choose two consecutive points from "about" the middle
% of each vectors. Useful if you don't want to worry each time
% about where to put the arrows on a trajectory. If x1 and x2
% are the vectors x1(t) and x2(t), simply put ARROWH(x1,x2,'r')
% to have the right direction indicated in your x2 = f(x1) phase
% plane.
%
% (x2,y2)
% --o
% \ |
% \|
%
%
% o
% (x1,y1)
%
% Please note that the following optional arguments need -- if
% you want to use them -- to be given in that exact order. You
% may pass on empty vectors "[]" to skip arguments you don't want
% to set (if you want to access "later" arguments...).
%
% The COLOR argument is quite the same as for plots, i.e. either
% a string like 'r' or an RGB value vector like [1 0 0]. If you
% only want the outlines of the head (in other words a non-solid
% arrow head), prefix the color string by 'e' or the color vector
% by 0, e.g. to get only a red outline use 'er' or [0 1 0 0].
%
% The SIZE argument allows you to tune the size of the arrows. If
% SIZE is a scalar, it scales the arrow proportionally. SIZE can
% also be a two element vector, where the first element is the
% overall scale (in percent), the second one controls the width
% of the arrow head (again, in percent).
%
% The LOCAITON argument can be used to tweak the position of the
% arrow head. If a time series of x and y coordinates are given,
% you can use this argument to place the arrow head for instance
% at 20% along the line. It can be a vector, if you want to have
% more than one arrow head drawn.
%
% Both SIZE and LOCATION arguments must also be given in percent,
% where 100 means standard size, 50 means half size, respectively
% 100 means end of the vector, 0 beginning of it. Note that those
% "locations" correspond to the cardinal position "inside" the
% vector, in other words the "index-wise" position.
%
% This little tool is mainely intended to be used for indicating
% "directions" on trajectories -- just give two consecutive times
% and the corresponding values of a flux and the proper direction
% of the trajectory will be shown on the plot. You may also pass
% on two solution vectors, as described above.
%
% Note, that the arrow heads only look good in the original axis
% settings (as in when the routine was actually started). If you
% zoom in afterwards, the triangle will get distorted.
%
% HANDLES = ARROWH(...) will give you a vector with the handles
% to the patches created by this function (if you want to modify
% them later on, for instance).
%
% Examples of use:
% x1 = [0:.2:2]; x2 = [0:.2:2]; plot(x1,x2); hold on;
% arrowh(x1,x2,'r',[],20); % passing entire vectors
% arrowh([0 1],[0 1],'eb',[300,75]); % passing 2 points
% arrowh([0 1],[0 1],'eb',[300,75],25); % head closer to (x1,y1)
% Author: Florian Knorn
% Email: florian@knorn.org
% Version: 1.14
% Filedate: Jun 18th, 2008
%
% History: 1.14 - LOCATION now also works with lines
% 1.13 - Allow for non-solid arrow heads
% 1.12 - Return handle(s) of created patches
% 1.11 - Possibility to change width
% 1.10 - Buxfix
% 1.09 - Possibility to chose *several* locations
% 1.08 - Possibility to chose location
% 1.07 - Choice of color
% 1.06 - Bug fixes
% 1.00 - Release
%
% ToDos: - Keep proportions when zooming or resizing; has to
% be done with callback functions, I guess.
%
% Bugs: None discovered yet, those discovered were fixed
%
% Thanks: Thanks also to Oskar Vivero for using my humble
% little program in his great MIMO-Toolbox.
%
% If you have suggestions for this program, if it doesn't work
% for your "situation" or if you change something in it -- please
% send me an email! This is my very first "public" program and
% I'd like to improve it where I can -- your help is kindely
% appreciated! Thank you!
function handle = arrowh(x,y,clr,ArSize,Where)
%-- errors
if nargin < 2
error('Please give enough coordinates !');
end
if (length(x) < 2) || (length(y) < 2),
error('X and Y vectors must each have "length" >= 2 !');
end
if (x(1) == x(2)) && (y(1) == y(2)),
error('Points superimposed - cannot determine direction !');
end
if nargin <= 2
clr = 'b';
end
if nargin <= 3
ArSize = [100,100];
end
handle = [];
%-- check if variables left empty, deal width ArSize and Color
if isempty(clr)
clr = 'b'; nonsolid = false;
elseif ischar(clr)
if strncmp('e',clr,1) % for non-solid arrow heads
nonsolid = true; clr = clr(2);
else
nonsolid = false;
end
elseif isvector(clr)
if length(clr) == 4 && clr(1) == 0 % for non-solid arrow heads
nonsolid = true;
clr = clr(2:end);
else
nonsolid = false;
end
else
error('COLOR argument of wrong type (must be either char or vector)');
end
if nargin <= 4
if (length(x) == length(y)) && (length(x) == 2)
Where = 100;
else
Where = 50;
end
end
if isempty(ArSize)
ArSize = [100,100];
end
if length(ArSize) == 2
ArWidth = 0.75*ArSize(2)/100; % .75 to make arrows it a bit slimmer
else
ArWidth = 0.75;
end
ArSize = ArSize(1);
%-- determine and remember the hold status, toggle if necessary
if ishold,
WasHold = 1;
else
WasHold = 0;
hold on;
end
%-- start for-loop in case several arrows are wanted
for Loop = 1:length(Where),
%-- if vectors "longer" then 2 are given we're dealing with time series
if (length(x) == length(y)) && (length(x) > 2),
j = floor(length(x)*Where(Loop)/100); %-- determine that location
if j >= length(x), j = length(x) - 1; end
if j == 0, j = 1; end
x1 = x(j); x2 = x(j+1); y1 = y(j); y2 = y(j+1);
else %-- just two points given - take those
x1 = x(1); x2 = (1-Where/100)*x(1)+Where/100*x(2);
y1 = y(1); y2 = (1-Where/100)*y(1)+Where/100*y(2);
end
%-- get axe ranges and their norm
OriginalAxis = axis;
Xextend = abs(OriginalAxis(2)-OriginalAxis(1));
Yextend = abs(OriginalAxis(4)-OriginalAxis(3));
%-- determine angle for the rotation of the triangle
if x2 == x1, %-- line vertical, no need to calculate slope
if y2 > y1,
p = pi/2;
else
p= -pi/2;
end
else %-- line not vertical, go ahead and calculate slope
%-- using normed differences (looks better like that)
m = ( (y2 - y1)/Yextend ) / ( (x2 - x1)/Xextend );
if x2 > x1, %-- now calculate the resulting angle
p = atan(m);
else
p = atan(m) + pi;
end
end
%-- the arrow is made of a transformed "template triangle".
%-- it will be created, rotated, moved, resized and shifted.
%-- the template triangle (it points "east", centered in (0,0)):
xt = [1 -sin(pi/6) -sin(pi/6)];
yt = ArWidth*[0 cos(pi/6) -cos(pi/6)];
%-- rotate it by the angle determined
没有合适的资源?快使用搜索试试~ 我知道了~
基于双目视觉的人脸三维重建算法matlab仿真+仿真录像
共226个文件
jpg:179个
m:39个
mat:7个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 5 下载量 121 浏览量
2022-11-01
22:39:01
上传
评论 2
收藏 17.95MB RAR 举报
温馨提示
1.版本:matlab2021a,包含程序仿真操作录像,可以跟着操作出仿真结果 2.领域:人脸三维重建 3.内容:基于双目视觉的人脸三维重建算法matlab仿真,输入双目相机拍摄的多个人脸图片,然后进行配准,最后重建得到三维的人脸曲面。
资源详情
资源评论
资源推荐
收起资源包目录
基于双目视觉的人脸三维重建算法matlab仿真+仿真录像 (226个子文件)
操作录像0034.avi 66.89MB
subject4_Middle_2.jpg 133KB
subject1_Middle_2.jpg 132KB
subject1_Right_2.jpg 111KB
subject4_Right_2.jpg 110KB
subject2_Middle_2.jpg 109KB
subject4_Left_2.jpg 108KB
subject1_Left_2.jpg 105KB
subject2_Right_2.jpg 99KB
subject2_Left_2.jpg 96KB
subject4_Middle_1.jpg 77KB
subject1_Middle_1.jpg 77KB
subject4_Middle_837.jpg 75KB
subject1_Middle_727.jpg 75KB
subject4_Middle_419.jpg 75KB
subject1_Middle_365.jpg 75KB
subject4_Middle_1673.jpg 75KB
subject4_Middle_1255.jpg 74KB
subject1_Middle_1453.jpg 74KB
subject1_Middle_1090.jpg 74KB
subject1_Middle_1816.jpg 74KB
subject1_Right_1.jpg 64KB
subject4_Right_1.jpg 64KB
subject4_Left_1.jpg 63KB
subject2_Middle_1.jpg 62KB
subject4_Right_837.jpg 62KB
subject1_Right_729.jpg 62KB
subject1_Right_365.jpg 62KB
subject4_Left_837.jpg 61KB
subject1_Right_1093.jpg 61KB
subject4_Right_1673.jpg 61KB
subject1_Right_1457.jpg 61KB
subject4_Right_419.jpg 61KB
subject4_Right_1255.jpg 61KB
subject1_Left_1.jpg 61KB
subject4_Left_1673.jpg 61KB
subject4_Left_419.jpg 61KB
subject4_Left_1255.jpg 60KB
subject2_Middle_835.jpg 60KB
subject2_Middle_418.jpg 60KB
subject2_Middle_1252.jpg 60KB
subject2_Middle_1669.jpg 60KB
subject1_Left_729.jpg 58KB
subject1_Left_365.jpg 58KB
subject1_Left_1457.jpg 58KB
subject1_Left_1093.jpg 58KB
subject2_Right_1.jpg 56KB
Calibratie 1_R_2585.jpg 56KB
subject2_Left_1.jpg 55KB
Calibratie 1_R_545.jpg 55KB
subject2_Right_1252.jpg 54KB
subject2_Right_418.jpg 54KB
subject2_Right_835.jpg 54KB
subject2_Right_1669.jpg 54KB
Calibratie 1_R_681.jpg 53KB
Calibratie 1_R_1769.jpg 53KB
subject2_Left_835.jpg 53KB
subject2_Left_418.jpg 52KB
Calibratie 1_M_2585.jpg 52KB
subject2_Left_1252.jpg 52KB
subject2_Left_1669.jpg 52KB
Calibratie 1_R_1497.jpg 52KB
Calibratie 1_R_409.jpg 52KB
Calibratie 1_R_817.jpg 52KB
Calibratie 1_R_1905.jpg 51KB
Calibratie 1_R_1.jpg 50KB
Calibratie 1_R_1633.jpg 50KB
Calibratie 1_M_545.jpg 49KB
Calibratie 1_M_681.jpg 48KB
Calibratie 1_R_137.jpg 48KB
Calibratie 1_M_1905.jpg 48KB
Calibratie 1_M_817.jpg 47KB
Calibratie 1_R_1361.jpg 46KB
Calibratie 1_R_273.jpg 45KB
Calibratie 1_R_1225.jpg 45KB
Calibratie 1_M_1769.jpg 45KB
Calibratie 1_R_2041.jpg 45KB
Calibratie 1_R_1089.jpg 45KB
Calibratie 1_R_2449.jpg 45KB
Calibratie 1_M_409.jpg 45KB
Calibratie 1_M_1497.jpg 44KB
Calibratie 2_M_1597.jpg 44KB
Calibratie 2_M_1730.jpg 44KB
Calibratie 1_M_1.jpg 43KB
Calibratie 2_M_2395.jpg 43KB
Calibratie 2_M_1331.jpg 43KB
Calibratie 2_M_1863.jpg 43KB
Calibratie 2_M_1.jpg 43KB
Calibratie 2_M_2262.jpg 43KB
Calibratie 2_M_1464.jpg 42KB
Calibratie 2_M_2528.jpg 42KB
Calibratie 1_M_1633.jpg 42KB
Calibratie 2_M_2129.jpg 42KB
Calibratie 2_M_932.jpg 42KB
Calibratie 2_M_1996.jpg 42KB
Calibratie 2_R_2395.jpg 42KB
Calibratie 1_M_2041.jpg 42KB
Calibratie 2_R_1597.jpg 42KB
Calibratie 2_R_1863.jpg 42KB
Calibratie 1_M_2313.jpg 42KB
共 226 条
- 1
- 2
- 3
fpga和matlab
- 粉丝: 16w+
- 资源: 2557
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- MI4803-VB一款SOP8封装2个P-Channel场效应MOS管
- unity快速入门-最快速的入门
- MI4803A-VB一款SOP8封装2个P-Channel场效应MOS管
- MI4801-VB一款SOP8封装2个P-Channel场效应MOS管
- 多变量线性回归的简单表示机代码实现
- 羊驼家族Ollama,window版本,本地大模型
- Java面试题+Java并发编程(J.U.C)+Java8实战+Redis+kafka
- 源码工程文件-libmodbus-test
- wx036校园快递平台系统-springboot+vue+uniapp-小程序.zip(可运行源码+sql文件+文档)
- Kotlin基础.pdf(39页,包含基础篇和进阶篇)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论5