Add fov_y parameter to equi2pers for accurate vertical-FOV intrinsic matrix#4
Draft
Copilot wants to merge 2 commits into
Draft
Add fov_y parameter to equi2pers for accurate vertical-FOV intrinsic matrix#4Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
…t; update docs and TODOs Agent-Logs-Url: https://github.com/jacobsn/equilib/sessions/50b01705-6199-4dc8-8cfa-be72d993dcc6 Co-authored-by: jacobsn <984784+jacobsn@users.noreply.github.com>
Agent-Logs-Url: https://github.com/jacobsn/equilib/sessions/50b01705-6199-4dc8-8cfa-be72d993dcc6 Co-authored-by: jacobsn <984784+jacobsn@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
jacobsn
May 2, 2026 01:57
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the TODO from the README:
Also completes the documentation TODO for
equi2pers.What changed
New
fov_yparameterAll
equi2persentry-points (Equi2Pers,equi2pers,get_bounding_fov) and the underlyingcreate_intrinsic_matrixfunctions (numpy & torch) now accept an optionalfov_y: float = Noneparameter.fov_yNone(default)fyis derived fromfov_xand the image aspect ratio — equivalent to the previous square-pixel assumption, fully backward-compatiblefy = height / (2 * tan(fov_y / 2))— lets callers specify vertical FOV directly or model non-square-pixel sensorsThe intrinsic matrix now reads:
where
fx = width / (2 * tan(fov_x / 2))andfyis set independently whenfov_yis given.Files changed
equilib/numpy_utils/intrinsic.py— addfov_ytocreate_intrinsic_matrixequilib/torch_utils/intrinsic.py— same, supportstorch.Tensorfor differentiabilityequilib/equi2pers/numpy.py— threadfov_ythroughcreate_cam2global_matrix,prep_matrices,run,get_bounding_fovequilib/equi2pers/torch.py— same; also includesfov_yin themode='nearest'grad-warning checkequilib/equi2pers/base.py— exposefov_yinEqui2Pers.__init__,equi2pers, andget_bounding_fovtests/test_torch_utils/test_grad.py— addtest_intrinsic_matrix_fov_y_gradcheckandtest_intrinsic_matrix_fov_y_grad_nonzerotests/test_equi2pers/test_base.py— addtest_numpy_fov_yandtest_torch_fov_y.readme/equi2pers.md— full parameter documentation and intrinsic matrix explanationREADME.md— mark both TODOs as done