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

Manage image centers different from (w/2,h/2) #42

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ookey
Copy link

@ookey ookey commented Mar 18, 2024

Some data have image centers different from (w/2,h/2). This can be after a correction of distortion, or because some images are cropped.
To manage this case, we pass projmatrix to the rendering classes, which include cx,cy information (on top of fx, fy).

Note that this evolution changes the signature of the module: CudaRasterizer::Rasterizer::forward projmatrix parameter is now the plain projection_matrix (whereas it used to be the full_projection_matrix), and tan_fovx and tan_fovy are not needed anymore.

This merge request has to be synchronized with mge/zoom on gaussian-splatting repo. See that MR for testing procedure.

ookey added 2 commits March 18, 2024 13:37
…nsform

full_projection_transform is the multiplication of view_matrix and
projection_matrix. Thus, passing (view_matrix, projection_matrix) is
equivalent to (view_matrix, full_projection_transform).

Passing projection_matrix as arguments to rasterize_gaussians enables
to get intrinsics informations in the rendering code. Since we'll need
central point (cx, cy), this is the aim of this refacto commit.

Signed-off-by: Matthieu Gendrin <[email protected]>
Some data have image centers different from (w/2,h/2). This can be after
a correction of distortion, or because some images are cropped.
To manage this case, we pass projmatrix to the rendering classes, which
include cx,cy information (on top of fx, fy).

Signed-off-by: Matthieu Gendrin <[email protected]>
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