Add typedef CAMERA and restore a commented function of 'add' as a templated function.

release/4.3a0
Sungtae An 2014-11-25 00:20:23 -05:00
parent aebe40d19f
commit 05c98ccafb
1 changed files with 9 additions and 7 deletions

View File

@ -76,6 +76,7 @@ public:
typedef boost::shared_ptr<This> shared_ptr; typedef boost::shared_ptr<This> shared_ptr;
/// shorthand for a pinhole camera /// shorthand for a pinhole camera
typedef CAMERA Camera;
typedef std::vector<CAMERA> Cameras; typedef std::vector<CAMERA> Cameras;
/** /**
@ -134,13 +135,14 @@ public:
* The noise is assumed to be the same for all measurements * The noise is assumed to be the same for all measurements
*/ */
// **************************************************************************************************** // ****************************************************************************************************
// void add(const SfM_Track& trackToAdd, const SharedNoiseModel& noise) { template<class SFM_TRACK>
// for (size_t k = 0; k < trackToAdd.number_measurements(); k++) { void add(const SFM_TRACK& trackToAdd, const SharedNoiseModel& noise) {
// this->measured_.push_back(trackToAdd.measurements[k].second); for (size_t k = 0; k < trackToAdd.number_measurements(); k++) {
// this->keys_.push_back(trackToAdd.measurements[k].first); this->measured_.push_back(trackToAdd.measurements[k].second);
// this->noise_.push_back(noise); this->keys_.push_back(trackToAdd.measurements[k].first);
// } this->noise_.push_back(noise);
// } }
}
/** return the measurements */ /** return the measurements */
const std::vector<Z>& measured() const { const std::vector<Z>& measured() const {