00001 // This is oxl/mvl/mvl_three_view_six_point_structure.h 00002 #ifndef mvl_three_view_six_point_structure_h_ 00003 #define mvl_three_view_six_point_structure_h_ 00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE 00005 #pragma interface 00006 #endif 00007 //: 00008 // \file 00009 // \author fsm 00010 // Code for computing projective structure from 3 views of 6 points. 00011 // 00012 // The six points are assumed to be: 00013 // 00014 // [ 1 ] [ 0 ] [ 0 ] [ 0 ] [ 1 ] [ X ] 00015 // [ 0 ] [ 1 ] [ 0 ] [ 0 ] [ 1 ] and [ Y ] = Q 00016 // [ 0 ] [ 0 ] [ 1 ] [ 0 ] [ 1 ] [ Z ] 00017 // [ 0 ] [ 0 ] [ 0 ] [ 1 ] [ 1 ] [ T ] 00018 // 00019 // There are up to three solutions. 00020 00021 #include <vnl/vnl_double_4.h> 00022 #include <vnl/vnl_double_3x4.h> 00023 #include <vnl/vnl_matrix.h> 00024 00025 struct mvl_three_view_six_point_structure 00026 { 00027 mvl_three_view_six_point_structure(); 00028 00029 // this flag is currently ignored. 00030 bool verbose; 00031 00032 // These matrices have one row per view and 6 columns. 00033 // The ith view of the jth point is (u(i, j), v(i, j)). 00034 vnl_matrix<double> u; 00035 vnl_matrix<double> v; 00036 00037 // Call this once you have filled in 'u' and 'v'. 00038 bool compute(); 00039 00040 // output data. 00041 struct solution_t 00042 { 00043 bool valid; 00044 vnl_double_3x4 P[3]; // camera matrices. 00045 vnl_double_4 Q; // last world point. 00046 } solution[3]; 00047 }; 00048 00049 #endif // mvl_three_view_six_point_structure_h_