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

[Features Viewer] Track reconstruction states #25

Merged
merged 17 commits into from
Feb 14, 2023

Conversation

mugulmd
Copy link
Contributor

@mugulmd mugulmd commented Oct 20, 2022

Description

This PR introduces new concepts in tracks visualization for conveying global information on them (i.e not limited to the current time window):

  • reconstruction states
  • start/end points

Reconstruction states

This PR introduces 3 reconstruction states for tracks:

  • 0: no feature on the track has been reconstructed
  • 1: at least one feature on the track has been reconstructed
  • 2: all features on the track have been reconstructed.

Note: by reconstructed we mean that the feature has a corresponding 3D landmark

These states are visualized with the following visual code:

  • 0: thin lines with uniform discreet color
  • 1: thin lines with non-uniform colors: landmark color (red) when both endpoints are reconstructed, otherwise match color (orange)
  • 2: thick lines with uniform landmark color (red)

Start/end point

The start/end points of a track (i.e the track features on the view with minimal/maximal frameId) are visualized with oriented triangles.
This visualization can be toggled on/off using a new QML property called displayTrackEndpoints.

Implementation remarks

Since these concepts need global information on the tracks, it is necessary to load all the features from all the views in the scene, which makes the first loading of the FeaturesViewer longer.

Important

This PR should be merged before alicevision/Meshroom#1838

@mugulmd mugulmd requested a review from gregoire-dl October 20, 2022 10:39
@mugulmd mugulmd self-assigned this Oct 20, 2022
@mugulmd mugulmd marked this pull request as draft October 20, 2022 11:05
@mugulmd mugulmd marked this pull request as ready for review November 3, 2022 15:15
@mugulmd mugulmd requested a review from fabiencastan November 3, 2022 15:25
src/MFeatures.hpp Outdated Show resolved Hide resolved
src/MFeatures.cpp Outdated Show resolved Hide resolved
src/FeaturesViewer.cpp Show resolved Hide resolved
src/FeaturesViewer.cpp Outdated Show resolved Hide resolved
src/FeaturesViewer.hpp Show resolved Hide resolved
@mugulmd mugulmd force-pushed the dev/lv/trackReconstructionStages branch from 88ac20b to 7db89a9 Compare January 17, 2023 16:39
@mugulmd mugulmd marked this pull request as draft January 17, 2023 17:01
@mugulmd mugulmd marked this pull request as ready for review January 18, 2023 09:25
@mugulmd
Copy link
Contributor Author

mugulmd commented Jan 18, 2023

Retested after rebase on develop with several datasets and camera tracking pipelines, seems to work fine

src/MFeatures.cpp Show resolved Hide resolved
src/FeaturesViewer.cpp Show resolved Hide resolved
src/FeaturesViewer.cpp Show resolved Hide resolved
src/FeaturesViewer.cpp Show resolved Hide resolved
src/FeaturesViewer.cpp Show resolved Hide resolved
src/FeaturesViewer.cpp Show resolved Hide resolved
src/FeaturesViewer.cpp Show resolved Hide resolved
src/FeaturesViewer.cpp Outdated Show resolved Hide resolved
src/FeaturesViewer.cpp Show resolved Hide resolved
QThreadPool::globalInstance()->start(ioRunnable);
}

void MFeatures::updateGlobalTrackInfo(MViewFeaturesPerViewPerDesc* viewFeaturesPerViewPerDesc)
Copy link
Member

Choose a reason for hiding this comment

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

Note:

Global track information needs a lot of I/O, memory and computation (all features, all tracks, ...).
Currently it's the only way to do it, I think.
Maybe, later on, we can compute & export this global information as an output JSON file of the SfM.

@gregoire-dl gregoire-dl self-requested a review February 1, 2023 14:05
@@ -328,6 +404,16 @@ const MFeatures::MTrackFeaturesPerTrack* MFeatures::getTrackFeaturesPerTrack(con
return &(itrDesc->second);
}

void MFeatures::getAllViewIds(std::vector<aliceVision::IndexT>& viewIdsToLoad)
{
const aliceVision::sfmData::SfMData& sfmData = _msfmData->rawData();
Copy link
Member

Choose a reason for hiding this comment

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

viewIdsToLoad.reserve(viewIdsToLoad.size() + sfmData.getViews().size())

@fabiencastan fabiencastan merged commit 6765c46 into develop Feb 14, 2023
@fabiencastan fabiencastan deleted the dev/lv/trackReconstructionStages branch February 14, 2023 18:38
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.

3 participants