source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/zisserman/vgg_multiview/vgg_conditioner_from_image.m @ 37

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
Line 
1function [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
11if nargin<2
12  r = c(2);
13  c = c(1);
14end
15
16f = (c+r)/2;
17C = [1/f 0 -c/(2*f) ;
18     0 1/f -r/(2*f) ;
19     0 0 1];
20
21if nargout > 1
22  invC = [f 0 c/2 ;
23          0 f r/2 ;
24          0 0 1];
25end
Note: See TracBrowser for help on using the repository browser.