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

shift principle points by .5 in undistortion #3071

Merged
merged 3 commits into from
Apr 12, 2024
Merged

Conversation

kerrj
Copy link
Collaborator

@kerrj kerrj commented Apr 11, 2024

addresses #3048

@kerrj
Copy link
Collaborator Author

kerrj commented Apr 11, 2024

@f-dy @jb-ye If you could look at this that'd be great, I think this implements the convention difference between OpenCV/nerfstudio correctly, but I'm not sure

@jb-ye
Copy link
Collaborator

jb-ye commented Apr 12, 2024

@kerrj Let me test this change a bit and come back to you.

@jb-ye jb-ye force-pushed the justin/opencv_undistort_fix branch from 38b5cc7 to 34f203a Compare April 12, 2024 19:18
Copy link
Collaborator

@jb-ye jb-ye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I spent some time testing the fix, and here is my findings. For images with minor distortions, the change has close to no impacts on the final rendering results.

Why? because effect of missing (K[0, 2] - 0.5) in cv2.undistort actually cancel out the effect of missing (newK[0, 2] + 0.5) in output! The effect of change might only be more visible for very distorted images, this certainly is not the case for perspective cameras.

But I double verified that this logic is mathematically correct by checking the implementation of opencv.

@jb-ye jb-ye merged commit a64026f into main Apr 12, 2024
2 checks passed
@jb-ye jb-ye deleted the justin/opencv_undistort_fix branch April 12, 2024 19:32
Masks-code added a commit to Masks-code/nerfstudio that referenced this pull request Apr 23, 2024
commit d9b022b
Author: J.Y <132313008+jb-ye@users.noreply.github.com>
Date:   Fri Apr 19 14:03:55 2024 -0400

    Allow alpha transparency training for blender datasets input (nerfstudio-project#3088)

    Allow alpha transparency training for rgba input

    Co-authored-by: Justin Kerr <justin.g.kerr@gmail.com>

commit eddf2d2
Author: Congrong Xu <50019703+KevinXu02@users.noreply.github.com>
Date:   Thu Apr 18 17:37:50 2024 -0700

    Changes for trainer.py to support the Gradio webui (nerfstudio-project#3046)

    * changes for trainer to support webui

    * Update trainer to support webui

    * format

    * add a seperated shutdown() function to stop training

    * typo fix

    * get rid of _stop_viewer_server()

    * Update trainer.py

    * organize import

    ---------

    Co-authored-by: Brent Yi <yibrenth@gmail.com>

commit 45d8bb7
Author: Justin Kerr <justin.g.kerr@gmail.com>
Date:   Wed Apr 17 23:54:43 2024 -0700

    updates to apply_pca_colormap (nerfstudio-project#3086)

    * improvements to pca_colormap: allow input pca matrix, optional ignore_zeros arg

    * typo

commit babf577
Author: Patrick Morgan <patrick@patrick-morgan.net>
Date:   Fri Apr 12 14:23:47 2024 -0700

    Fix call to detect ODM reconstruction file (nerfstudio-project#3018)

commit a64026f
Author: Justin Kerr <justin.g.kerr@gmail.com>
Date:   Fri Apr 12 12:32:22 2024 -0700

    shift principle points by .5 in undistortion (nerfstudio-project#3071)

    * shift principle points by .5

    * fix ordering

    * add fisheye offset

commit c302cc5
Author: Gunjan Chhablani <chhablani.gunjan@gmail.com>
Date:   Thu Apr 11 16:41:14 2024 -0400

    Add pointcloud loading for blender parser (nerfstudio-project#2902)

    * Add pointcloud loading for blender parser

    * Fix argument

    * Fix docstring

    * Fix metadata in dataparsers

    * Add changes from review

    * Avoid changing default behavior

    * Apply `scale_factor` to loaded points

    ---------

    Co-authored-by: Brent Yi <yibrenth@gmail.com>

commit 03bdeff
Author: hyperzy <50564821+hyperzy@users.noreply.github.com>
Date:   Thu Apr 11 14:56:37 2024 -0400

    Fixed Unexpectedly huge RAM consumption of parallel datamanager (nerfstudio-project#3060)

    * Reduced the memory usage by caching image after the datamanager process starts

commit 4714ae7
Author: J.Y <132313008+jb-ye@users.noreply.github.com>
Date:   Thu Apr 11 14:37:02 2024 -0400

    write eval combined images for diagnostics (nerfstudio-project#3070)

commit eba72db
Author: Otto Seiskari <otto.seiskari@gmail.com>
Date:   Thu Apr 11 21:23:17 2024 +0300

    Camera pose optimization for Splatfacto (nerfstudio-project#2891)

    * Add pose optimization to Splatfacto

    * Disable Splatfacto pose optimization by default

    * Improve apply_to_camera for Gaussian Splatting pose optimization

    Do not chain modifications to camera_to_worlds to improve
    numerical stability and enable L2 rot/trans penalties.

    * Add separate mean and max rot/trans metrics to camera-opt

    * Tweak pose optimization hyperparameters

    Parameters used in the Gaussian Splatting on the Move paper v1

    * Unit test fix for new cameara_optimizer training metrics

    * Adjust splatfacto-big camera pose optimization parameters

    Same parameters as in normal Splatfacto

    ---------

    Co-authored-by: jh-surh <jh.surh@bucketplace.net>

commit 2d9bbe5
Author: dberga <dberga@users.noreply.github.com>
Date:   Thu Apr 11 04:04:33 2024 +0200

    fix exporter.py for FullImageDataManager and RandomCamerasDataManager (nerfstudio-project#3065)

    * fix exporter.py for FullImageDataManager and RandomCamerasDataManager

    * sort imports

    * ruff

    ---------

    Co-authored-by: Brent Yi <yibrenth@gmail.com>

commit c381fc8
Author: Justin Kerr <justin.g.kerr@gmail.com>
Date:   Wed Apr 10 18:59:20 2024 -0700

    Fix custom elements nested under @Property (nerfstudio-project#3066)

    * patch custom elements bug

    * Skip `cached_property`

    * fomrat

    * comment, type hint

    ---------

    Co-authored-by: Brent Yi <yibrenth@gmail.com>

commit d1fc2ee
Author: Saurav Maheshkar <sauravvmaheshkar@gmail.com>
Date:   Mon Apr 8 23:46:00 2024 +0100

    feat(ci): migrate to `uv` in CI (nerfstudio-project#3038)

    * feat(ci): migrate to `uv` in CI

    * feat(ci): drop upgrade strategy

    * feat(ci): use `uv` in docs workflow

    * fix(ci/doc): update sphinx build cmd

    * fix(ci/doc): specify python path

    * (experimental) simplify

    * remove venv

    * Revert line wrap change for doc.yml

    ---------

    Co-authored-by: Brent Yi <yibrenth@gmail.com>

commit 2b91715
Author: Sahil Jain <sahilja2@andrew.cmu.edu>
Date:   Mon Apr 8 13:04:20 2024 -0400

    Fix config loading for Eyeful Tower dataset (nerfstudio-project#3054)

    Add test_filenames to transforms.json generated by eyeful_tower.py

commit 26804f8
Author: Ling Jing <111032642+Jing1Ling@users.noreply.github.com>
Date:   Tue Apr 9 00:07:21 2024 +0800

    Make colmapDataParser compatible with 360_v2 dataset format (nerfstudio-project#2860)

    * added an option to colmapdataparser to round up the image size when downscaling

    * add round mode and update ffmpeg command

    * [fix] wrong variable order

    * update format

    ---------

    Co-authored-by: Jing <jing1ling@intel.com>

commit 911091c
Author: Jan-Niklas Dihlmann <j.dihlmann@googlemail.com>
Date:   Mon Apr 8 16:17:56 2024 +0200

    Added SIGNeRF to Nerfstudio methods  (nerfstudio-project#3053)

    * feat: signerf as nerfstudio method

    * fix: formating issues and indexing
Michael-Spleenlab pushed a commit to Michael-Spleenlab/nerfstudio that referenced this pull request Apr 26, 2024
* shift principle points by .5

* fix ordering

* add fisheye offset
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.

None yet

2 participants