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

Pixel center convention not documented #3896

Open
roym899 opened this issue Oct 17, 2023 · 3 comments
Open

Pixel center convention not documented #3896

roym899 opened this issue Oct 17, 2023 · 3 comments
Labels
😤 annoying Something in the UI / SDK is annoying to use 📖 documentation Improvements or additions to documentation 🏎️ Quick Issue Can be fixed in a few hours or less

Comments

@roym899
Copy link
Collaborator

roym899 commented Oct 17, 2023

Describe the annoyance
I believe Rerun assumes the pixel center to be at 0.5, 0.5. OpenCV (mostly?) uses 0.0, 0.0, Matlab uses 1.0, 1.0 (see e.g., https://se.mathworks.com/help/vision/ref/cameraintrinsicstoopencv.html). It would be nice to document this fact in a few places where it could be relevant. Such as when logging any 2D primitive, images, and pinhole projections. Especially in the latter case the pinhole projection comes with some convention based on how the calibration was performed.

@roym899 roym899 added 😤 annoying Something in the UI / SDK is annoying to use 👀 needs triage This issue needs to be triaged by the Rerun team labels Oct 17, 2023
@emilk
Copy link
Member

emilk commented Oct 18, 2023

Yes, we use (0.5, 0.5) convention for our 2D spaces, showing each texel as a 1x1 square, so that a 640 pixel wide image spans the inclusive range [0.0, 640.0]

@Wumpf
Copy link
Member

Wumpf commented Oct 18, 2023

unclear to me though where we document it apart from pinhole where it's relevant. It's a property of the viewer otherwise

@Wumpf Wumpf added 📖 documentation Improvements or additions to documentation and removed 👀 needs triage This issue needs to be triaged by the Rerun team labels Oct 18, 2023
@emilk emilk added the 🏎️ Quick Issue Can be fixed in a few hours or less label Oct 23, 2023
@rgolovanov
Copy link
Contributor

@emilk, @Wumpf it seems (0.5, 0.5) convention may lead to confusion. For example, when one deals with feature detection algorithms (like corner detector) the visualization of detected features on top of the image isn't aligned well. Point #1 points to exact pixel by rerun visualizes it in the corner and we need to mentally move it to (+0.5, +0.5).

Agree with @Wumpf that it seems to be the Viewer's property and it might be good idea to consider other conventions, e.g. (0, 0) - in this case the 2D view of feature points and theimage will be consistent and automatically aligned.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
😤 annoying Something in the UI / SDK is annoying to use 📖 documentation Improvements or additions to documentation 🏎️ Quick Issue Can be fixed in a few hours or less
Projects
None yet
Development

No branches or pull requests

4 participants