Skip to content

Commit

Permalink
rs-pose-apriltag: add comment and alternative to tag pose estimation
Browse files Browse the repository at this point in the history
  • Loading branch information
honpong committed Jul 9, 2019
1 parent 06e091b commit 69e9407
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/pose-apriltag/rs-pose-apriltag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ class apriltag_manager {
{
tags.pose_raw[t] = std::shared_ptr<apriltag_pose_t>(new apriltag_pose_t(), apriltag_pose_destory);

undistort(*(info_.det = tags.get(t)), intr);
estimate_tag_pose(&info_, tags.pose_raw[t].get());
undistort(*(info_.det = tags.get(t)), intr); //recompute tag corners on an undistorted image focal length = 1
//estimate_tag_pose(&info_, tags.pose_raw[t].get()); //(alternative) estimate tag pose in camera coordinate
estimate_pose_for_tag_homography(&info_, tags.pose_raw[t].get()); //estimate tag pose in camera coordinate
for(auto c : {1,2,4,5,7,8}){ tags.pose_raw[t]->R->data[c] *= -1; }

tags.pose_in_camera[t] = to_transform(tags.pose_raw[t]->R->data, tags.pose_raw[t]->t->data);
Expand Down

0 comments on commit 69e9407

Please sign in to comment.