-
Notifications
You must be signed in to change notification settings - Fork 334
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
Attaching a depth image to a pinhole camera has unintuitive requirements on their entity paths #2479
Comments
To add to this, I believe the correct way right now to log a posed RGB(-D) image would require a hierarchy like this I think this makes sense, but it feels a bit under-documented as well right now and maybe a bit over-complicated. Maybe it would be possible to allow a rigid transform and a pinhole transform on the same entity? |
#2568 allows to merge |
Updating the code to latest: import numpy as np
import rerun as rr
# Create a depth image with Pillow
image = 65535 * np.ones((200, 300), dtype=np.uint16)
image[50:150, 50:150] = 20000
image[130:180, 100:280] = 45000
rr.init("depth_image", spawn=True)
# We need a camera to register the depth image to
focal_length = 200
rr.log(
"camera",
rr.Pinhole(
image_from_camera=np.array(
(
(focal_length, 0, image.shape[1] / 2),
(0, focal_length, image.shape[0] / 2),
(0, 0, 1),
),
),
width=image.shape[1],
height=image.shape[0],
),
)
# Log the tensor, assigning names to each dimension
rr.log("camera/depth", rr.DepthImage(image, meter=10000.0)) |
Describe the annoyance
Consider this code:
It looks like it should work but it doesn't. Fixing it requires adding a common root node in the pinhole and depth image's entity paths:
This requirement is unintuitive, error prone, and probably under-documented.
The text was updated successfully, but these errors were encountered: