Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new: extract rendering intrinsics (K) and extrinsics (T) set by Open3D #37

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

yxlao
Copy link
Owner

@yxlao yxlao commented Mar 12, 2024

Introducing ct.render.get_render_K_T(), allowing for the extraction of camera intrinsic (K) and extrinsic (T) matrices from Open3D visualizations. This allows obtaining the camera parameters such that it can be applied to render new geometries.

Example Usage:

import open3d as o3d
import numpy as np
import camtools as ct

# Load or create geometries
geometry_a = o3d.geometry.TriangleMesh.create_sphere()
geometry_b = o3d.geometry.TriangleMesh.create_box()

# Extract the default camera parameters from the first visualization
K, T = ct.get_render_K_T([geometry_a])

# Apply the same parameters to render another geometry
ct.render.render_geometries([geometry_b], K=K, T=T)

@yxlao yxlao merged commit 6a8dbba into master Mar 12, 2024
3 checks passed
@yxlao yxlao deleted the get-render-k-t branch March 12, 2024 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant