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

Negative 2D points in image with pinhole transform lock 2D view to top-left corner #2490

Closed
roym899 opened this issue Jun 20, 2023 · 1 comment · Fixed by #6089
Closed

Negative 2D points in image with pinhole transform lock 2D view to top-left corner #2490

roym899 opened this issue Jun 20, 2023 · 1 comment · Fixed by #6089
Labels
🪳 bug Something isn't working 📺 re_viewer affects re_viewer itself

Comments

@roym899
Copy link
Collaborator

roym899 commented Jun 20, 2023

Describe the bug
Logging negative 2D points in a 2D image will make it impossible to pan the 2D view of the image (it will be locked to the bottom left corner).

To Reproduce

import numpy as np
import rerun as rr

rr.init("images", spawn=True)

rr.log_image(
    f"world/camera/image/rgb", np.random.rand(500, 500, 3)
)
rr.log_pinhole(
    f"world/camera/image",
    child_from_parent=[[500, 0, 250], [0, 500, 250], [0, 0, 1]],
    width=500,
    height=500,
)
rr.log_points(
    f"world/camera/image/points", [[100,-100], [0, 0], [100, 100]]
)

And zoom into the image.

Remove the first point and things work fine. Remove the pinhole and things work fine as well.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04

Rerun version

rerun_py 0.7.0 [rustc 1.69.0 (84c898d65 2023-04-16), LLVM 15.0.7] x86_64-unknown-linux-gnu prepare-0.7 9cf3033, built 2023-06-16T15:47:32Z
@roym899 roym899 added 👀 needs triage This issue needs to be triaged by the Rerun team 🪳 bug Something isn't working labels Jun 20, 2023
@roym899 roym899 changed the title Negative 2D points in image with pinhole lock 2D view to top-left corner Negative 2D points in image with pinhole transform lock 2D view to top-left corner Jun 20, 2023
@nikolausWest nikolausWest added 📺 re_viewer affects re_viewer itself and removed 👀 needs triage This issue needs to be triaged by the Rerun team labels Jun 21, 2023
@emilk
Copy link
Member

emilk commented Apr 25, 2024

Updated version:

import numpy as np
import rerun as rr

rr.init("images", spawn=True)

rr.log("world/camera/image/rgb", rr.Image(np.random.rand(500, 500, 3)))
rr.log(
    "world/camera/image", rr.Pinhole(image_from_camera=[[500, 0, 250], [0, 500, 250], [0, 0, 1]], width=500, height=500)
)
rr.log("world/camera/image/points", rr.Points2D([[100, -100], [0, 0], [100, 100]]))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working 📺 re_viewer affects re_viewer itself
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants