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:
805 bytes
|
Rev | Line | |
---|
[37] | 1 | function T = vgg_conditioner_from_pts(Pts,isotropic)
|
---|
| 2 |
|
---|
| 3 | % VGG_CONDITIONER_FROM_PTS - Returns a conditioning matrix for points
|
---|
| 4 | %
|
---|
| 5 | % T = vgg_conditioner_from_pts(Pts [,isotropic])
|
---|
| 6 | %
|
---|
| 7 | % Returns a DxD matrix that normalizes Pts to have mean 0 and stddev sqrt(2)
|
---|
| 8 | %
|
---|
| 9 | %
|
---|
| 10 | %IN:
|
---|
| 11 | % Pts - DxK list of K projective points. Last row is ignored.
|
---|
| 12 | % isotropic - optional; if present then T(1,1)==T(2,2)==...==T(D-1,D-1).
|
---|
| 13 | %
|
---|
| 14 | %
|
---|
| 15 | %OUT:
|
---|
| 16 | % T - DxD conditioning matrix
|
---|
| 17 |
|
---|
| 18 | % Yoni, Thu Feb 14 12:24:48 2002
|
---|
| 19 |
|
---|
| 20 | Dim=size(Pts,1);
|
---|
| 21 |
|
---|
| 22 | Pts=vgg_get_nonhomg(Pts);
|
---|
| 23 | Pts=Pts(1:Dim-1,:);
|
---|
| 24 |
|
---|
| 25 | m=mean(Pts,2);
|
---|
| 26 | s=std(Pts');
|
---|
| 27 | s=s+(s==0);
|
---|
| 28 |
|
---|
| 29 | if nargin==1
|
---|
| 30 | T=[ diag(sqrt(2)./s) -diag(sqrt(2)./s)*m];
|
---|
| 31 | else % isotropic; added by TW
|
---|
| 32 | T=[ diag(sqrt(2)./(ones(1,Dim-1)*mean(s))) -diag(sqrt(2)./s)*m];
|
---|
| 33 | end
|
---|
| 34 | T(Dim,:)=0;
|
---|
| 35 | T(Dim,Dim)=1;
|
---|
Note: See
TracBrowser
for help on using the repository browser.