本文整理汇总了C++中Pose::InverseTransformPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ Pose::InverseTransformPoint方法的具体用法?C++ Pose::InverseTransformPoint怎么用?C++ Pose::InverseTransformPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pose
的用法示例。
在下文中一共展示了Pose::InverseTransformPoint方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InitializeTracker
void LKTracker::InitializeTracker(cv::Mat ¤t_frame, const Pose &pose){
const cv::Size subPixWinSize(10, 10);
cv::Mat gray;
cv::cvtColor(current_frame, gray, CV_BGR2GRAY);
//std::vector<cv::Point2f> points;
cv::goodFeaturesToTrack(gray, points_test[0], 50, 0.01, 10, CreateMask(), 3, 0, 0.04);
cv::cornerSubPix(gray, points_test[0], subPixWinSize, cv::Size(-1, -1), term_crit_);
tracked_points_.clear();
//for (int i = 0; i < points_test[0].size(); ++i){
// tracked_points_.push_back(TrackedPoint(cv::Vec3f(0, 0, 0), cv::Vec2f(0, 0)));
//}
for (size_t i = 0; i < points_test[0].size(); ++i){
cv::Vec3f &point_on_model = front_intersection_image_.at<cv::Vec3f>(points_test[0][i].y, points_test[0][i].x);
if (point_on_model[0] == GL_FAR || point_on_model[1] == GL_FAR || point_on_model[2] == GL_FAR){
tracked_points_.push_back(TrackedPoint(cv::Vec3f(0,0,0), cv::Vec2f(-1,-1)));
}
else{
tracked_points_.push_back(TrackedPoint(pose.InverseTransformPoint(point_on_model), points_test[0][i]));
}
}
previous_frame_gray_ = gray.clone();
}
示例2: UpdatePointsOnModelBeforeDerivatives
void LKTracker::UpdatePointsOnModelBeforeDerivatives(const Pose &pose){
for (size_t i = 0; i < tracked_points_.size(); ++i){
if (tracked_points_[i].frame_point[1] >= 0 && tracked_points_[i].frame_point[0] >= 0){
if (tracked_points_[i].frame_point[1] > front_intersection_image_.rows || tracked_points_[i].frame_point[0] >= front_intersection_image_.cols){
}
else{
cv::Vec3f pt = front_intersection_image_.at<cv::Vec3f>(tracked_points_[i].frame_point[1], tracked_points_[i].frame_point[0]);
if (pt[0] == GL_FAR && pt[1] == GL_FAR && pt[2] == pt[2]){
tracked_points_[i].frame_point = cv::Vec2i(-1, -1);
}
else{
tracked_points_[i].model_point = pose.InverseTransformPoint(pt);
}
}
}
}
}