Skip to content

Conversation

@servantftransperfect
Copy link
Contributor

@servantftransperfect servantftransperfect commented Jun 26, 2025

A new parameter to landmarks is added "referenceViewId".

For a landmark, if this parameter is not UndefinedIndexT, this is considered as the reference view index for this landmark.

In this case, the landmark coordinates will be considered to be relative to the reference view geometric frame.

@fabiencastan
Copy link
Member

This needs a unit test to validate the behavior on simple generated data.

@servantftransperfect servantftransperfect force-pushed the dev/relativeLandmarks branch 2 times, most recently from f5e691a to 886a40c Compare September 3, 2025 07:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for landmarks to be defined relative to a camera's geometric frame instead of the world frame. The new referenceViewIndex parameter enables landmarks to store their coordinates relative to a specific camera view, which requires coordinate transformations during bundle adjustment.

  • New referenceViewIndex field added to landmarks for specifying reference camera frame
  • Updated serialization/deserialization to handle the new reference view parameter
  • Added projection cost function for relative landmarks with coordinate transformation logic

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Landmark.hpp Adds referenceViewIndex field and updates equality operator
jsonIO.cpp Adds JSON serialization support for referenceViewIndex
AlembicImporter.cpp Imports referenceViewIndex from Alembic format
AlembicExporter.cpp Exports referenceViewIndex to Alembic format
projection.hpp New ProjectionRelativeErrorFunctor for relative landmark projections
BundleAdjustmentCeres.cpp Integrates relative projection cost function into bundle adjustment
bundleAdjustment_test.cpp Adds test case for relative landmark bundle adjustment
NViewDataSet.hpp Adds useRelative configuration flag for test datasets

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@fabiencastan fabiencastan marked this pull request as draft October 29, 2025 10:45
@servantftransperfect servantftransperfect marked this pull request as ready for review December 2, 2025 09:21
@servantftransperfect servantftransperfect requested review from CedricThebault and removed request for cbentejac December 2, 2025 09:22
@simogasp
Copy link
Member

simogasp commented Dec 4, 2025

Shouldn't there be a check everywhere we e.g. reproject landmarks into an image to take into account the relative view (or discard it if it is not supported)?

@servantftransperfect
Copy link
Contributor Author

Shouldn't there be a check everywhere we e.g. reproject landmarks into an image to take into account the relative view (or discard it if it is not supported)?

We are adding multiple things in successive PR. I do agree that we should but this will be a future effort which will rely on heavy modifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants