## affparam2geom.m ( File view )

• By shepherd 2014-04-13
• View(s)：14
• Point(s)： 1
```			function q = affparam2geom(p)
% function q = affparam2geom(p)
%
% 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)]
%    q(6) : [dx dy sc th sr phi]
%
% Reference "Multiple View Geometry in Computer Vision" by Richard
% Hartley and Andrew Zisserman.

A = [ p(3), p(4); p(5), p(6) ];
%%  A = USVt = (UVt)(VSVt) = R(th)R(-phi)SR(phi)
[U,S,V] = svd(A);
if (det(U) < 0)
U = U(:,2:-1:1);  V = V(:,2:-1:1);  S = S(2:-1:1,2:-1:1);
end
q(1) = p(1);  q(2) = p(2);
q(4) = atan2(U(2,1)*V(1,1)+U(2,2)*V(1,2), U(1,1)*V(1,1)+U(1,2)*V(1,2));

phi = atan2(V(1,2),V(1,1));
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(1,1);
q(5) = S(2,2)/S(1,1);
q(6) = atan2(V(1,2),V(1,1));
q = reshape(q, size(p));
```
...
Expand＞ ＜Close

Point(s): 1

0 lines left, continue to read

## File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
01.96 kB
warpimg.m619.00 B2008-05-04 23:46
estwarp_condens.m1.56 kB2008-05-04 23:46
affparam2geom.m1.18 kB2008-05-04 23:46
sklm.m2.27 kB2008-05-04 23:46
01.96 kB
rc.m417.00 B2008-05-04 23:46
descstat.m642.00 B2008-05-04 23:46
minghsuan_windows.mat4.13 MB2008-05-04 23:46
hall.m2.01 kB2008-05-04 23:46
sklm.m2.28 kB2008-05-04 23:46
dog_windows.mat657.61 kB2008-05-04 23:46
generate_comparison_figure.m1.25 kB2008-05-04 23:46
sylvester_windows.mat4.27 MB2008-05-04 23:46
run_comparison.m2.62 kB2008-05-04 23:46
truepca.m642.00 B2008-05-04 23:46
truepca_svd.m723.00 B2008-05-04 23:46
gram_pca.m954.00 B2008-05-04 23:46
sumsq.m55.00 B2008-05-04 23:46
hall.m2.06 kB2008-05-04 23:46
affparam2mat.m1.09 kB2008-05-04 23:46
drawtrackresult.m3.80 kB2008-05-04 23:46
affparaminv.m452.00 B2008-05-04 23:46
drawbox.m1.42 kB2008-05-04 23:46
trackparamv6.m5.50 kB2008-05-04 23:46
interp2.cpp4.05 kB2008-05-04 23:46
runtracker_hall.m4.40 kB2008-05-04 23:46
affwarpimg.m595.00 B2008-05-04 23:46
esterrfunc.m1.03 kB2008-05-04 23:46
interp2.mexglx10.47 kB2008-05-04 23:46
estwarp_greedy.m1.24 kB2008-05-04 23:46
interp2.dll24.00 kB2008-05-04 23:46
runtracker.m4.40 kB2008-05-04 23:46
trackparam.m5.50 kB2008-05-04 23:46
interp2.mexa6412.68 kB2008-05-04 23:46
showimgs.m1.48 kB2008-05-04 23:46
...
• Sent successfully!
• ivt-2008-05-04.zip
• 1 point

### affparam2geom.m (8.72 MB)

Need 1 point

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

Don't have an account？ Register now
Need any help?
Mail to: support@codeforge.com

### 切换到中文版？

CodeForge Chinese Version
CodeForge English Version

### ^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!

### Warm tip!

Favorite by Ctrl+D