| 345 | } |
| 346 | |
| 347 | void keyframe::compute_bow() |
| 348 | { |
| 349 | if (bow_vec_.empty() || bow_feat_vec_.empty()) |
| 350 | { |
| 351 | #ifdef USE_DBOW2 |
| 352 | bow_vocab_->transform(util::converter::to_desc_vec(descriptors_), bow_vec_, bow_feat_vec_, 4); |
| 353 | #else |
| 354 | bow_vocab_->transform(descriptors_, 4, bow_vec_, bow_feat_vec_); |
| 355 | #endif |
| 356 | } |
| 357 | } |
| 358 | |
| 359 | void keyframe::add_landmark(landmark *lm, const unsigned int idx) |
| 360 | { |