Last change
on this file since 37 was
37,
checked in by (none), 14 years ago
|
Added original make3d
|
-
Property svn:executable set to
*
|
File size:
738 bytes
|
Rev | Line | |
---|
[37] | 1 | % A = vgg_plane_from_2P_H(P1,P2,H) From two cameras and inter-image homography, it gets the scene plane.
|
---|
| 2 | %
|
---|
| 3 | % The method is linear and there is no preconditioning - works only for consistent triplet (P1,P2,H).
|
---|
| 4 | %
|
---|
| 5 | % P1, P2 ... double (3,4)
|
---|
| 6 | % H ... double (3,3)
|
---|
| 7 | % A ... double (4,1)
|
---|
| 8 | %
|
---|
| 9 | % It is H = P2*vgg_H_from_2P_plane(A,P1). Try the example at the end of this file.
|
---|
| 10 |
|
---|
| 11 | function A = vgg_plane_from_2P_H(P,P2,H)
|
---|
| 12 |
|
---|
| 13 | Q = [P2*vgg_contreps(P(2,:)'*P(3,:) - P(3,:)'*P(2,:))
|
---|
| 14 | P2*vgg_contreps(P(3,:)'*P(1,:) - P(1,:)'*P(3,:))
|
---|
| 15 | P2*vgg_contreps(P(1,:)'*P(2,:) - P(2,:)'*P(1,:))];
|
---|
| 16 | A = (Q\H(:))';
|
---|
| 17 |
|
---|
| 18 | return
|
---|
| 19 |
|
---|
| 20 |
|
---|
| 21 | P = randn(3,4);
|
---|
| 22 | P2 = randn(3,4);
|
---|
| 23 | A = randn(1,4);
|
---|
| 24 | H = P2*vgg_H_from_P_plane(A,P);
|
---|
| 25 | vgg_plane_from_2P_H(P,P2,H) ./ A
|
---|
| 26 |
|
---|
Note: See
TracBrowser
for help on using the repository browser.