source:
proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/BlueCCal/MultiCamSelfCal/MartinecPajdla/utils/p2e.m
@
37
Last change on this file since 37 was 37, checked in by , 14 years ago | |
---|---|
File size: 413 bytes |
Rev | Line | |
---|---|---|
[37] | 1 | function x = p2e(x_) |
2 | ||
3 | %P2E Projective to euclidean coordinates. | |
4 | % x = p2e(x_) Computes euclidean coordinates by dividing | |
5 | % all rows but last by the last row. | |
6 | % x_ ... Size (dim+1,N) Projective coordinates. | |
7 | % x ... Size (dim,N). Euclidean coordinates. | |
8 | % (N can be arbitrary.) | |
9 | ||
10 | if isempty(x_) | |
11 | x = []; | |
12 | return; | |
13 | end | |
14 | dim = size(x_,1) - 1; | |
15 | x = x_(1:dim,:) ./ (ones(dim,1)*x_(dim+1,:)); |
Note: See TracBrowser
for help on using the repository browser.