本文整理汇总了C++中FramePtr::w2c方法的典型用法代码示例。如果您正苦于以下问题:C++ FramePtr::w2c方法的具体用法?C++ FramePtr::w2c怎么用?C++ FramePtr::w2c使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FramePtr
的用法示例。
在下文中一共展示了FramePtr::w2c方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: reprojectPoint
bool Reprojector::reprojectPoint(FramePtr frame, Point* point)
{
Vector2d px(frame->w2c(point->pos_));
if(frame->cam_->isInFrame(px.cast<int>(), 8)) // 8px is the patch size in the matcher
{
const int k = static_cast<int>(px[1]/grid_.cell_size)*grid_.grid_n_cols
+ static_cast<int>(px[0]/grid_.cell_size);
grid_.cells.at(k)->push_back(Candidate(point, px));
return true;
}
return false;
}
示例2: reprojectPoint
bool Reprojector::reprojectPoint(FramePtr frame, Point* point, int print)
{
// point->pos_[2] = point->pos_[2] * 600;
Vector2d px(frame->w2c(point->pos_));
if(frame->cam_->isInFrame(px.cast<int>(), 8)) // 8px is the patch size in the matcher
{
// cout << "point pos" << point->pos_ << endl;
// cout << "px" << px << endl;
if(print)
// cout << "repro" << endl;
if(print) {
outfile << round(px[0]) << " " << round(px[1]) << " " << point->pos_[2] << " ";
outfile2 << point->pos_[0] << " " << point->pos_[1] << " " << point->pos_[2] << "\n";
}
const int k = static_cast<int>(px[1]/grid_.cell_size)*grid_.grid_n_cols
+ static_cast<int>(px[0]/grid_.cell_size);
grid_.cells.at(k)->push_back(Candidate(point, px));
return true;
}
return false;
}