资源简介
世上最牛的23个图像跟踪算法(MATLAB程序):ASLA,SCM,L1APG,TLD,CT等
代码片段和文件信息
function q = affparam2geom(p)
% function q = affparam2geom(p)
%
% 输入 : p,原始参数矩阵;
% 输出 : q,具有几何意义的参数;
% The functions affparam2geom and affparam2mat convert a ‘geometric‘
% affine parameter to/from a matrix form (2x3 matrix).
%
% affparam2geom converts a 2x3 matrix to 6 affine parameters
% (x y th scale aspect skew) and affparam2mat does the inverse.
%
% p(6) : [p(1) p(3) p(4); p(2) p(5) p(6)]
%
% x‘ p(3) p(4) p(1) x
% y‘ = p(5) p(6) p(2) * y
% 1 0 0 1 1
%
% p(3) p(4)
% A =
% p(5) p(6)
%
% q(6) : [dx dy sc th sr phi]
% dxdy : 平移变换
% scsr : 尺度变换
% th : 旋转变换
% phi : 错切变换
%
% Reference “Multiple View Geometry in Computer Vision“ by Richard
% Hartley and Andrew Zisserman.
% Copyright (C) Jongwoo Lim and David Ross. All rights reserved.
A = [ p(3) p(4); p(5) p(6) ];
%% A = USVt = (UVt)(VSVt) = R(th)R(-phi)SR(phi)
[USV] = svd(A);
if (det(U) < 0)
U = U(:2:-1:1); V = V(:2:-1:1); S = S(2:-1:12:-1:1);
end
%%*******平移变换*******%%
q(1) = p(1);
q(2) = p(2);
%%*******平移变换*******%%
q(4) = atan2(U(21)*V(11)+U(22)*V(12) U(11)*V(11)+U(12)*V(12));
phi = atan2(V(12)V(11));
if (phi <= -pi/2)
c = cos(-pi/2); s = sin(-pi/2);
R = [c -s; s c]; V = V * R; S = R‘*S*R;
end
if (phi >= pi/2)
c = cos(pi/2); s = sin(pi/2);
R = [c -s; s c]; V = V * R; S = R‘*S*R;
end
%%*******尺度变换*******%%
q(3) = S(11);
q(5) = S(22)/S(11);
%%*******尺度变换*******%%
q(6) = atan2(V(12)V(11));
q = reshape(q size(p));
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 1836 2008-11-13 07:08 trackers\ASLA\affparam2geom.m
....... 1193 2008-11-13 07:10 trackers\ASLA\affparam2mat.m
....... 452 2008-11-30 02:31 trackers\ASLA\affparaminv.m
....... 1532 2009-04-23 01:39 trackers\ASLA\drawbox.m
....... 809 2011-09-04 07:35 trackers\ASLA\drawtrackresult.m
....... 668 2011-09-22 05:41 trackers\ASLA\img2patch.m
....... 2258 2012-09-09 13:35 trackers\ASLA\initial_tracking.m
....... 4152 2008-05-06 03:46 trackers\ASLA\interp2.cpp
....... 24576 2008-05-06 03:46 trackers\ASLA\interp2.dll
....... 12982 2008-05-06 03:46 trackers\ASLA\interp2.mexa64
....... 10719 2008-05-06 03:46 trackers\ASLA\interp2.mexglx
....... 2200 2010-02-24 00:48 trackers\ASLA\mexLasso.m
....... 1520640 2010-02-24 00:48 trackers\ASLA\mexLasso.mexw32
....... 176128 2012-08-14 07:06 trackers\ASLA\mexLasso.mexw64
....... 105 2011-09-23 00:59 trackers\ASLA\normalizeMat.m
....... 377 2012-10-04 11:19 trackers\ASLA\paraConfig_ASLA.m
....... 1191 2012-04-13 08:18 trackers\ASLA\readme.txt
....... 5899 2012-10-04 09:53 trackers\ASLA\run_ASLA.m
....... 289 2011-09-15 07:14 trackers\ASLA\sampling.m
....... 2985 2012-05-26 09:17 trackers\ASLA\setTrackParam.m
....... 2647 2008-12-01 01:50 trackers\ASLA\sklm.m
....... 5318 2012-05-22 02:12 trackers\ASLA\tracker.m
....... 966 2010-11-02 13:47 trackers\ASLA\warpimg.m
....... 86528 2012-10-09 14:41 trackers\BSBT\BeyondSemiBoostingTracker.exe
....... 661 2012-11-08 15:37 trackers\BSBT\run_BSBT.m
....... 316416 2012-11-08 15:26 trackers\CPF\ObjTrk.exe
....... 667 2012-11-22 12:55 trackers\CPF\run_CPF.m
....... 978 2012-08-01 09:36 trackers\CSK\choose_video.m
....... 1080 2012-08-01 09:34 trackers\CSK\dense_gauss_kernel.m
....... 1152 2012-08-01 08:36 trackers\CSK\get_subwindow.m
............此处省略524个文件信息
- 上一篇:压缩鬼成像matlab代码
- 下一篇:用于研究非线性系统matlab模块
评论
共有 条评论