Nodes/comfyui_cv/CV Compose Pose (Trajectory)
ComfyUI Node

CV Compose Pose (Trajectory)

Dead-reckons a camera trajectory by chaining one relative pose onto the running absolute pose - the accumulation step of monocular visual odometry. Given the running camera-to-world rotation and the trajectory of camera centres so far, plus the relative rotation + UNIT translation from 'CV Recover Pose' and a step scale, it updates the rotation and appends the new camera centre. Because monocular geometry only fixes the translation DIRECTION, the absolute step length must be supplied as 'scale' (from wheel odometry, a known baseline, or assumed constant). Convention: 'CV Recover Pose' returns [R|t] mapping the earlier camera frame to the later one, so the world rotation updates as R_wc <- R_wc R^T and the centre as centre <- centre - scale * R_wc R^T t. Chain one node per frame pair (each node's rotation + trajectory outputs feed the next), starting from an identity rotation ('CV Camera Matrix' with fx=fy=1, cx=cy=0) and a single origin point ('CV Points'); gate it on 'found' with if/else so a failed pose keeps the previous trajectory. Project the result with 'CV Project To Plane' and draw it with 'CV Draw Polygon'. An empty/None trajectory starts at the origin.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Compose Pose (Trajectory)
  • rotation
  • trajectory
  • relative_rotation
  • relative_translation
  • rotation
  • trajectory
  • position
scale1.00
Categoryimage/CV/features

Inputs (5)

NameTypeDefaultDescription
rotationNPARRAYRunning 3x3 camera-to-world rotation (identity for the first step).
trajectoryNPARRAYCamera centres so far, Nx3 (last row = current centre); start from a single origin point.
relative_rotationNPARRAY3x3 relative rotation R from 'CV Recover Pose'.
relative_translationNPARRAY3x1 UNIT relative translation t from 'CV Recover Pose'.
scaleFLOAT1.000–1000000Absolute length of this step (monocular VO cannot recover it; use a known baseline or assume constant).

Outputs (3)

NameTypeDescription
rotationNPARRAYUpdated 3x3 camera-to-world rotation.
trajectoryNPARRAYCamera centres with the new one appended, (N+1)x3.
positionNPARRAYThe new camera centre, 3x1.