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:
558 bytes
|
Rev | Line | |
---|
[37] | 1 | function [C,invC] = vgg_conditioner_from_image(c,r)
|
---|
| 2 | %
|
---|
| 3 | % function [C,invC] = vgg_conditioner_from_image(image_width, image_height)
|
---|
| 4 | %
|
---|
| 5 | % Makes a similarity metric for conditioning image points.
|
---|
| 6 | %
|
---|
| 7 | % Also can be called as vgg_conditioner_from_image([image_width image_height])
|
---|
| 8 | %
|
---|
| 9 | % invC is inv(C), obtained more efficiently inside the function.
|
---|
| 10 |
|
---|
| 11 | if nargin<2
|
---|
| 12 | r = c(2);
|
---|
| 13 | c = c(1);
|
---|
| 14 | end
|
---|
| 15 |
|
---|
| 16 | f = (c+r)/2;
|
---|
| 17 | C = [1/f 0 -c/(2*f) ;
|
---|
| 18 | 0 1/f -r/(2*f) ;
|
---|
| 19 | 0 0 1];
|
---|
| 20 |
|
---|
| 21 | if nargout > 1
|
---|
| 22 | invC = [f 0 c/2 ;
|
---|
| 23 | 0 f r/2 ;
|
---|
| 24 | 0 0 1];
|
---|
| 25 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.