Home > 12-Single-View-Geometry > exercise_12_9_condition_P.m

exercise_12_9_condition_P

PURPOSE ^

% exercise 12.9 conditioning

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

% exercise 12.9 conditioning

 Wolfgang Förstner
 wfoerstn@uni-bonn.de

 last changes: Susanne Wenzel 04/18
 wenzel@igg.uni-bonn.de

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %% exercise 12.9 conditioning
0002 %
0003 % Wolfgang Förstner
0004 % wfoerstn@uni-bonn.de
0005 %
0006 % last changes: Susanne Wenzel 04/18
0007 % wenzel@igg.uni-bonn.de
0008 
0009 clc
0010 close all
0011 clearvars
0012 
0013 disp('-------------------------------------------------------------')
0014 disp('Result of exercise 12.9 on conditioning the projection matrix')
0015 disp('-------------------------------------------------------------')
0016 
0017 % given projection matrix
0018 P = [0.0012682807017 -0.0006478859649   0.0003109824561  -0.1611793859649
0019      0.0008165263157  0.0010670263157   0.0001048421052  -2.1127144736842 
0020      0.0000002017543  0.0000000350877   0.0000004561403  -0.0008359649122];
0021 
0022 % transformation matrix for conditioning image coordinates
0023 disp('Transformation matrix for conditioning image coordinates')
0024 Tx = [1 0 -1500;0 1 -1000;0 0 1500]                                        %#ok<*NOPTS>
0025 
0026 % transformation matrix for conditioning object coordinates
0027 disp('Transformation matrix for conditioning object coordinates')
0028 TX = [1 0 0 -500; 0 1 0 -1500;0 0 1 -150; 0 0 0 100]
0029 
0030 % conditioned projection matrix
0031 disp('Conditioned projection matrix')
0032 Pb = (Tx)*P*inv(TX)                                                        %#ok<MINV>
0033 
0034 % condition number of given projection matrix
0035 disp('Condition number of given projection matrix')
0036 condition_P = cond(P)
0037 
0038 % condition number of conditioned projection matrix
0039 disp('Condition number of conditioned projection matrix')
0040 condition_Pb = cond(Pb)
0041 
0042 disp('The routine ''cond'' determines the condition number')
0043 disp('of a rectangular matrix from its singular values:')
0044 singular_values = svd(Pb)
0045 condition_number = max(singular_values)/min(singular_values)

Generated on Sat 21-Jul-2018 20:56:10 by m2html © 2005