contrib/brl/bmvl/brct/brct_corr.cxx

Go to the documentation of this file.
00001 #include "brct_corr.h"
00002 //:
00003 // \file
00004 #include <vcl_iostream.h>
00005 
00006 brct_corr::brct_corr()
00007 {
00008   n_cams_ = 0;
00009 }
00010 
00011 brct_corr::brct_corr(const int n_cams)
00012 {
00013   n_cams_ = n_cams;
00014   matches_.resize(n_cams_);
00015   valid_.resize(n_cams_);
00016   for (int i = 0; i<n_cams_; i++)
00017   {
00018     matches_[i]=vgl_homg_point_2d<double>(-1, -1);
00019     valid_[i]=false;
00020   }
00021 }
00022 
00023 brct_corr::~brct_corr()
00024 {
00025 }
00026 
00027 void brct_corr::set_match(const int cam, const double x, const double y)
00028 {
00029   matches_[cam] = vgl_homg_point_2d<double>(x, y);
00030   valid_[cam]=true;
00031 }
00032 
00033 
00034 //external functions
00035 vcl_ostream& operator<<(vcl_ostream& s, brct_corr const& c)
00036 {
00037   s << "NCAMS: " << c.n_cams_ << '\n';
00038   for (int i = 0; i<c.n_cams_ ; i++)
00039     if (c.valid_[i])
00040       s <<  "CAM[" << i << "] X: " << c.matches_[i].x() << " Y: " << c.matches_[i].y() << '\n';
00041     else
00042       s << "CAM[" << i << "] INVALID\n";
00043   return s;
00044 }

Generated on Fri Nov 21 05:24:04 2008 for contrib/brl/bmvl/brct by  doxygen 1.5.1