Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

brct_epi_reconstructor Class Reference

#include <brct_epi_reconstructor.h>

List of all members.


Detailed Description

Definition at line 48 of file brct_epi_reconstructor.h.

Public Member Functions

void write_results (const char *fname)
 write result of a frame into a file.
vgl_point_2d< double > get_cur_epipole () const
vcl_vector< vnl_matrix< double > > get_back_projection () const
 get backprojection for debugging.
vnl_matrix< double > get_predicted_curve ()
 predict next curve.
vnl_double_3 get_next_motion (vnl_double_3 v)
vcl_vector< vgl_point_2d<
double > > 
get_pre_observes ()
vcl_vector< vgl_point_2d<
double > > 
get_cur_observes ()
vcl_vector< vgl_point_2d<
double > > 
get_next_observes ()
vcl_vector< vgl_point_2d<
double > > 
get_joe_pre_observes ()
vcl_vector< vgl_point_2d<
double > > 
get_joe_cur_observes ()
vcl_vector< vgl_point_2d<
double > > 
get_joe_next_observes ()
vcl_vector< vgl_point_3d<
double > > 
get_local_pts ()
bugl_curve_3d get_curve_3d ()
void read_data (const char *fname)
 read all the data including time stamps and tracks.
vcl_vector< vdgl_digital_curve_sptrread_track_file (char *fname)
 read vishual tracker result out of a file.
void init ()
 initialize the kalman filter states.
void init_epipole (double x, double y)
void inc ()
vnl_double_2 projection (const vnl_double_3x4 &P, const vnl_double_3 &X)
 brct_epi_reconstructor ()
 constructors.
 brct_epi_reconstructor (const char *fname)
virtual ~brct_epi_reconstructor ()
void add_track (vcl_vector< vdgl_digital_curve_sptr > const &track)
 direct access.
void print_track (const int track_index, const int frame)
 print track data.
void print_motion_array ()
 print motion grouping histogram.

Protected Member Functions

vcl_vector< double > read_timestamp_file (char *fname)
 read time stamp.
double matched_point_prob (vnl_double_2 &z, vnl_double_2 &z_pred)
 if the zero probability returned, the matched point is a outlier.
vnl_matrix_fixed< double, 6, 6 > get_transit_matrix (int i, int j)
 get time interval from ith frame to j-th frame.
void update_confidence ()
 update the confidence for each 3d point.
void update_observes (const vnl_double_3x4 &P, int iframe)
 update the matched points in the next frame using closest neighbour.
void update_observes_joe (int iframe)
void init_velocity ()
 Use the initial epipole to specify the velocity at the first time step.
vnl_matrix_fixed< double, 2, 6 > get_H_matrix (vnl_double_3x4 &P, vnl_double_3 &Y)
 set linearized observation matrix.
vnl_double_3x4 get_projective_matrix (const vnl_double_3 &v) const
 compute projective matrix from predicted position.
void init_covariant_matrix ()
 Initialize the covariance matrix of the state vector to the identity.
void init_cam_intrinsic ()
void init_state_3d_estimation ()
 Define the set of 3-d points that are to be tracked across frames.
void init_transit_matrix ()
bool match_point (vdgl_digital_curve_sptr const &dc, bugl_gaussian_point_2d< double > &p0, double grad_angle, bugl_gaussian_point_2d< double > &p)
 utility functions.
vcl_vector< bugl_gaussian_point_2d<
double > > 
get_cur_joe_observes (int frame)

Private Attributes

bugl_curve_3d curve_3d_
 position and confidence of feature samples.
vcl_vector< double > prob_
vcl_vector< vcl_vector< bugl_gaussian_point_2d<
double > > > 
observes_
 the set of 2-d points in each frame, used for matching.
vcl_vector< vcl_vector< vcl_vector<
bugl_gaussian_point_2d< double > > > > 
joe_observes_
 the set of 2-d points in each frame grouped by tracked curves.
vcl_vector< vcl_vector< double > > grad_angles_
 the gradient angles corresponding to frame 0 matched tracked curves.
vcl_vector< double > time_tick_
 each element represents image capture time for each frame.
vcl_vector< vcl_vector< vdgl_digital_curve_sptr > > tracks_
 each element of the vector represents a projection of the same 3D curves.
vcl_vector< vnl_double_3 > motions_
 the sequence of translations.
int cur_pos_
 current frame position in history pool.
int queue_size_
int num_points_
int memory_size_
 how much the queue has been used.
vnl_vector_fixed< double, 6 > X_
 state vector.
vnl_matrix_fixed< double, 6, 6 > Q_
 covariant matrix of state vector.
vnl_matrix_fixed< double, 6, 2 > G_
 constraint kalman gain matrix.
vnl_matrix_fixed< double, 2, 2 > R_
 initial covariant matrix of state vector.
vnl_matrix_fixed< double, 6, 6 > Q0_
 covariant matrix of 2D projection.
vnl_double_2 * e_
 initial epipole.
vnl_double_3x3 K_
 camera intrinsic parameters.
bool debug_
 debug flag.

Static Private Attributes

static const double large_num_ = 1e15
 used to denote outlier point in image.


Constructor & Destructor Documentation

brct_epi_reconstructor::brct_epi_reconstructor  ) 
 

constructors.

Definition at line 38 of file brct_epi_reconstructor.cxx.

brct_epi_reconstructor::brct_epi_reconstructor const char *  fname  ) 
 

Definition at line 48 of file brct_epi_reconstructor.cxx.

brct_epi_reconstructor::~brct_epi_reconstructor  )  [virtual]
 

Definition at line 85 of file brct_epi_reconstructor.cxx.


Member Function Documentation

void brct_epi_reconstructor::add_track vcl_vector< vdgl_digital_curve_sptr > const &  track  ) 
 

direct access.

Definition at line 855 of file brct_epi_reconstructor.cxx.

vcl_vector< vnl_matrix< double > > brct_epi_reconstructor::get_back_projection  )  const
 

get backprojection for debugging.

Definition at line 1158 of file brct_epi_reconstructor.cxx.

vgl_point_2d< double > brct_epi_reconstructor::get_cur_epipole  )  const
 

Definition at line 1181 of file brct_epi_reconstructor.cxx.

vcl_vector< bugl_gaussian_point_2d< double > > brct_epi_reconstructor::get_cur_joe_observes int  frame  )  [protected]
 

Definition at line 435 of file brct_epi_reconstructor.cxx.

vcl_vector< vgl_point_2d< double > > brct_epi_reconstructor::get_cur_observes  ) 
 

Definition at line 1047 of file brct_epi_reconstructor.cxx.

bugl_curve_3d brct_epi_reconstructor::get_curve_3d  ) 
 

Definition at line 992 of file brct_epi_reconstructor.cxx.

vnl_matrix_fixed< double, 2, 6 > brct_epi_reconstructor::get_H_matrix vnl_double_3x4 P,
vnl_double_3 &  Y
[protected]
 

set linearized observation matrix.

Definition at line 308 of file brct_epi_reconstructor.cxx.

vcl_vector< vgl_point_2d< double > > brct_epi_reconstructor::get_joe_cur_observes  ) 
 

Definition at line 1068 of file brct_epi_reconstructor.cxx.

vcl_vector< vgl_point_2d< double > > brct_epi_reconstructor::get_joe_next_observes  ) 
 

Definition at line 1094 of file brct_epi_reconstructor.cxx.

vcl_vector< vgl_point_2d< double > > brct_epi_reconstructor::get_joe_pre_observes  ) 
 

Definition at line 1081 of file brct_epi_reconstructor.cxx.

vcl_vector< vgl_point_3d< double > > brct_epi_reconstructor::get_local_pts  ) 
 

Definition at line 997 of file brct_epi_reconstructor.cxx.

vnl_double_3 brct_epi_reconstructor::get_next_motion vnl_double_3  v  ) 
 

Definition at line 1129 of file brct_epi_reconstructor.cxx.

vcl_vector< vgl_point_2d< double > > brct_epi_reconstructor::get_next_observes  ) 
 

Definition at line 1026 of file brct_epi_reconstructor.cxx.

vcl_vector< vgl_point_2d< double > > brct_epi_reconstructor::get_pre_observes  ) 
 

Definition at line 1107 of file brct_epi_reconstructor.cxx.

vnl_matrix< double > brct_epi_reconstructor::get_predicted_curve  ) 
 

predict next curve.

Definition at line 1135 of file brct_epi_reconstructor.cxx.

vnl_double_3x4 brct_epi_reconstructor::get_projective_matrix const vnl_double_3 &  v  )  const [protected]
 

compute projective matrix from predicted position.

Definition at line 290 of file brct_epi_reconstructor.cxx.

vnl_matrix_fixed< double, 6, 6 > brct_epi_reconstructor::get_transit_matrix int  i,
int  j
[protected]
 

get time interval from ith frame to j-th frame.

Definition at line 1229 of file brct_epi_reconstructor.cxx.

void brct_epi_reconstructor::inc  ) 
 

Definition at line 689 of file brct_epi_reconstructor.cxx.

void brct_epi_reconstructor::init  ) 
 

initialize the kalman filter states.

Definition at line 60 of file brct_epi_reconstructor.cxx.

void brct_epi_reconstructor::init_cam_intrinsic  )  [protected]
 

Definition at line 281 of file brct_epi_reconstructor.cxx.

void brct_epi_reconstructor::init_covariant_matrix  )  [protected]
 

Initialize the covariance matrix of the state vector to the identity.

Initialize covariance matrix of the 2-d projection to have larger variance in the motion direction

Definition at line 235 of file brct_epi_reconstructor.cxx.

void brct_epi_reconstructor::init_epipole double  x,
double  y
 

Definition at line 1203 of file brct_epi_reconstructor.cxx.

void brct_epi_reconstructor::init_state_3d_estimation  )  [protected]
 

Define the set of 3-d points that are to be tracked across frames.

Use the observed curves from frame 0 and frame 1 and the initial epipole to define the set of 3-d points that are to be tracked across frames. In this implementation no new 3-d points are created as tracking proceeds, but the initial curve is interpolated to twice its number of samples to define the tracked pointset.

The camera for frame 0 is taken as the identity camera. The camera for frame 1 is defined by the initial epipole. That is, the camera projection of translation vector in 3-d is equivalent to the epipole in frame 1. These two cameras are used to triangulate the 3-d point coordinates are defined in in the coordinate system of camera 0.

Definition at line 104 of file brct_epi_reconstructor.cxx.

void brct_epi_reconstructor::init_transit_matrix  )  [protected]
 

void brct_epi_reconstructor::init_velocity  )  [protected]
 

Use the initial epipole to specify the velocity at the first time step.

The initial projection matrix is assumed to be the identity camera. The camera at the first time step is deterimined from the relation,

             _    _        _          _   _  _
            | w ex |      | 1  0  0  0 | | Tx |
            | w ey | = [K]| 0  1  0  0 | | Ty |
            |  w   |      | 0  0  1  0 | | Tz |
             -    -        -           - | 1  |
                                          -  -
   

Definition at line 954 of file brct_epi_reconstructor.cxx.

bool brct_epi_reconstructor::match_point vdgl_digital_curve_sptr const &  dc,
bugl_gaussian_point_2d< double > &  p0,
double  grad_angle,
bugl_gaussian_point_2d< double > &  p
[protected]
 

utility functions.

Definition at line 380 of file brct_epi_reconstructor.cxx.

double brct_epi_reconstructor::matched_point_prob vnl_double_2 &  z,
vnl_double_2 &  z_pred
[protected]
 

if the zero probability returned, the matched point is a outlier.

Definition at line 1213 of file brct_epi_reconstructor.cxx.

void brct_epi_reconstructor::print_motion_array  ) 
 

print motion grouping histogram.

Definition at line 477 of file brct_epi_reconstructor.cxx.

void brct_epi_reconstructor::print_track const int  track_index,
const int  frame
 

print track data.

Definition at line 1250 of file brct_epi_reconstructor.cxx.

vnl_double_2 brct_epi_reconstructor::projection const vnl_double_3x4 P,
const vnl_double_3 &  X
 

Definition at line 336 of file brct_epi_reconstructor.cxx.

void brct_epi_reconstructor::read_data const char *  fname  ) 
 

read all the data including time stamps and tracks.

Definition at line 811 of file brct_epi_reconstructor.cxx.

vcl_vector< double > brct_epi_reconstructor::read_timestamp_file char *  fname  )  [protected]
 

read time stamp.

Definition at line 834 of file brct_epi_reconstructor.cxx.

vcl_vector< vdgl_digital_curve_sptr > brct_epi_reconstructor::read_track_file char *  fname  ) 
 

read vishual tracker result out of a file.

Each "contour" is the curve in a given image frame. The file format is:

   CURVE
   [BEGIN CONTOUR]
   EDGE_COUNT=150
   [202, 298.257]   -68.673 13.1904 ([edgel position]  angle   gradient mag)
     ...
     ...
     ...
   [END CONTOUR]
   [BEGIN CONTOUR]
   EDGE_COUNT=153
   [218.086, 295.532]   -104.187 50.5706
   ...
   [END CONTOUR]
   END CURVE
   

Definition at line 880 of file brct_epi_reconstructor.cxx.

void brct_epi_reconstructor::update_confidence  )  [protected]
 

update the confidence for each 3d point.

Definition at line 510 of file brct_epi_reconstructor.cxx.

void brct_epi_reconstructor::update_observes const vnl_double_3x4 P,
int  iframe
[protected]
 

update the matched points in the next frame using closest neighbour.

Definition at line 358 of file brct_epi_reconstructor.cxx.

void brct_epi_reconstructor::update_observes_joe int  iframe  )  [protected]
 

Definition at line 397 of file brct_epi_reconstructor.cxx.

void brct_epi_reconstructor::write_results const char *  fname  ) 
 

write result of a frame into a file.

Definition at line 446 of file brct_epi_reconstructor.cxx.


Member Data Documentation

int brct_epi_reconstructor::cur_pos_ [private]
 

current frame position in history pool.

Definition at line 162 of file brct_epi_reconstructor.h.

bugl_curve_3d brct_epi_reconstructor::curve_3d_ [private]
 

position and confidence of feature samples.

Definition at line 139 of file brct_epi_reconstructor.h.

bool brct_epi_reconstructor::debug_ [private]
 

debug flag.

Definition at line 193 of file brct_epi_reconstructor.h.

vnl_double_2* brct_epi_reconstructor::e_ [private]
 

initial epipole.

Definition at line 185 of file brct_epi_reconstructor.h.

vnl_matrix_fixed<double, 6, 2> brct_epi_reconstructor::G_ [private]
 

constraint kalman gain matrix.

Definition at line 176 of file brct_epi_reconstructor.h.

vcl_vector<vcl_vector<double> > brct_epi_reconstructor::grad_angles_ [private]
 

the gradient angles corresponding to frame 0 matched tracked curves.

Definition at line 150 of file brct_epi_reconstructor.h.

vcl_vector<vcl_vector<vcl_vector<bugl_gaussian_point_2d<double> > > > brct_epi_reconstructor::joe_observes_ [private]
 

the set of 2-d points in each frame grouped by tracked curves.

Definition at line 147 of file brct_epi_reconstructor.h.

vnl_double_3x3 brct_epi_reconstructor::K_ [private]
 

camera intrinsic parameters.

Definition at line 188 of file brct_epi_reconstructor.h.

const double brct_epi_reconstructor::large_num_ = 1e15 [static, private]
 

used to denote outlier point in image.

Definition at line 191 of file brct_epi_reconstructor.h.

int brct_epi_reconstructor::memory_size_ [private]
 

how much the queue has been used.

Definition at line 167 of file brct_epi_reconstructor.h.

vcl_vector<vnl_double_3> brct_epi_reconstructor::motions_ [private]
 

the sequence of translations.

Definition at line 159 of file brct_epi_reconstructor.h.

int brct_epi_reconstructor::num_points_ [private]
 

Definition at line 164 of file brct_epi_reconstructor.h.

vcl_vector<vcl_vector<bugl_gaussian_point_2d<double> > > brct_epi_reconstructor::observes_ [private]
 

the set of 2-d points in each frame, used for matching.

Definition at line 144 of file brct_epi_reconstructor.h.

vcl_vector<double> brct_epi_reconstructor::prob_ [private]
 

Definition at line 141 of file brct_epi_reconstructor.h.

vnl_matrix_fixed<double, 6, 6> brct_epi_reconstructor::Q0_ [private]
 

covariant matrix of 2D projection.

Definition at line 182 of file brct_epi_reconstructor.h.

vnl_matrix_fixed<double, 6, 6> brct_epi_reconstructor::Q_ [private]
 

covariant matrix of state vector.

Definition at line 173 of file brct_epi_reconstructor.h.

int brct_epi_reconstructor::queue_size_ [private]
 

Definition at line 163 of file brct_epi_reconstructor.h.

vnl_matrix_fixed<double, 2, 2> brct_epi_reconstructor::R_ [private]
 

initial covariant matrix of state vector.

Definition at line 179 of file brct_epi_reconstructor.h.

vcl_vector<double> brct_epi_reconstructor::time_tick_ [private]
 

each element represents image capture time for each frame.

Definition at line 153 of file brct_epi_reconstructor.h.

vcl_vector<vcl_vector<vdgl_digital_curve_sptr> > brct_epi_reconstructor::tracks_ [private]
 

each element of the vector represents a projection of the same 3D curves.

Definition at line 156 of file brct_epi_reconstructor.h.

vnl_vector_fixed<double, 6> brct_epi_reconstructor::X_ [private]
 

state vector.

Definition at line 170 of file brct_epi_reconstructor.h.


The documentation for this class was generated from the following files:
Generated on Thu Jan 10 14:54:03 2008 for contrib/brl/bmvl/brct by  doxygen 1.4.4