Skip to content

Visualizing camera trajectory in Open3D #148

Discussion options

You must be logged in to vote

Hi @maheshkkumar,

there is no magic. Figure.plot_camera is all you need to read. If the explanation is not enough, let me know how to improve it.

The specific example that you refer to has been generated from the output of the software meshroom with this code:

import sys
import json
import numpy as np
import pytransform3d.transformations as pt
import pytransform3d.camera as pc
import pytransform3d.visualizer as pv


mesh_filename = sys.argv[-2]
camera_filename = sys.argv[-1]

with open(camera_filename, "r") as f:
    cameras = json.load(f)

camera_poses = cameras["poses"]
camera_intrinsics = cameras["intrinsics"][0]

px_focal_length = float(camera_intrinsics["pxFocalLength"])
px_principal…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@maheshkkumar
Comment options

@nnop
Comment options

@AlexanderFabisch
Comment options

@Mechazo11
Comment options

@AlexanderFabisch
Comment options

Answer selected by AlexanderFabisch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #147 on June 23, 2021 23:58.