Last change
on this file since 177 was
37,
checked in by (none), 15 years ago
|
Added original make3d
|
-
Property svn:executable set to
*
|
File size:
768 bytes
|
Line | |
---|
1 | % vgg_H_from_P_plane Given 3D plane and camera, returns 4-by-3 matrix mapping image points to points on the plane.
|
---|
2 | %
|
---|
3 | % H = vgg_H_from_P_plane(A,P), where
|
---|
4 | % A ... size (4,1), scene plane
|
---|
5 | % P ... size (3,4), camera matrix
|
---|
6 | % H ... size (4,3), matrix such that X = x*H, where x (size (3,1)) is an image point
|
---|
7 | % and X is a scene point lying on the scene plane A.
|
---|
8 | % In other words, P*H = s*eye(3), where s is a scalar factor.
|
---|
9 | %
|
---|
10 | % The overall sign of H is chosen such that s*A*vgg_wedge(P) > 0.
|
---|
11 |
|
---|
12 | % T. Werner, Oct 2001
|
---|
13 |
|
---|
14 | function H = vgg_H_from_P_plane(A,P)
|
---|
15 |
|
---|
16 | A = A';
|
---|
17 | p1 = P(1,:);
|
---|
18 | p2 = P(2,:);
|
---|
19 | p3 = P(3,:);
|
---|
20 |
|
---|
21 | H = [vgg_contreps(p2'*p3 - p3'*p2)*A ...
|
---|
22 | vgg_contreps(p3'*p1 - p1'*p3)*A ...
|
---|
23 | vgg_contreps(p1'*p2 - p2'*p1)*A];
|
---|
24 |
|
---|
25 | return
|
---|
Note: See
TracBrowser
for help on using the repository browser.