A visualisation script that can be used directly on the camera_normalized.json file
This commit is contained in:
parent
cc9eb2cb4e
commit
83588aec0f
1 changed files with 19 additions and 0 deletions
19
camera_visualizer/vizu.py
Normal file
19
camera_visualizer/vizu.py
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
"""Visualise the cameras using the ouptut from run_colmap.py"""
|
||||||
|
from camera_visualizer import visualize_cameras
|
||||||
|
|
||||||
|
import open3d as o3d
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
|
||||||
|
sphere_radius = 1.
|
||||||
|
camera_size = 0.1
|
||||||
|
|
||||||
|
base_dir = "./lupo_output_dir_4/"
|
||||||
|
|
||||||
|
cam_dict_path = os.path.join(base_dir, "posed_images/kai_cameras_normalized.json")
|
||||||
|
with open(cam_dict_path) as fd:
|
||||||
|
cam_dict = json.load(fd)
|
||||||
|
|
||||||
|
colored_camera_dicts = [([0,1,0], cam_dict)]
|
||||||
|
|
||||||
|
visualize_cameras.visualize_cameras(colored_camera_dicts, sphere_radius, camera_size=camera_size)
|
Loading…
Reference in a new issue