Skip to content

Modifying reprojection cost function #319

Answered by maurimo
AlleUndKalle asked this question in Q&A
Discussion options

You must be logged in to vote

Quoting:

self.world_point = self.point_pose.transform_from(self.world_point)
point_cam = self.camera_pose.transform_from(self.world_point)

Probably you don't want to modify self.world_point in place (also to avoid messing with optimizer internals), I would define a temporary:

pose_applied_pt = self.point_pose.transform_from(self.world_point)
point_cam = self.camera_pose.transform_from(pose_applied_pt)

To compute the Jacobian, you need to compute the jacobian of camPt wrt both camera_pose and point_pose:

dPosePt_dPtPose_jacs: List[torch.Tensor] = [] # <-- where to use this list of jacobians??
pose_applied_pt = self.point_pose.transform_from(self.world_point, dPosePt_dPtPose_jacs)
dCamPt_…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@AlleUndKalle
Comment options

Answer selected by luisenp
Comment options

You must be logged in to vote
1 reply
@AlleUndKalle
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants