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

Render-Based Tracking #1467

Draft
wants to merge 50 commits into
base: master
Choose a base branch
from
Draft

Render-Based Tracking #1467

wants to merge 50 commits into from

Conversation

SamFlt
Copy link
Contributor

@SamFlt SamFlt commented Sep 17, 2024

This PR introduces a new ViSP submodule rbt (for Render-Based Tracker) derived from Antoine Petit's work.

The submodule is split into multiple parts:

  • vpRBTracker is the high level class that is used to track an object. It takes care of rendering and leverages other classes to extract features. It takes care of error minimization through a Gauss-Newton / Levenberg-marquardt algorithm.
  • vpRBFeatureTracker and it subclasses are used to track different types of features. This is where the majority of the "important" code resides.
  • vpObjectMask and its children are used to estimate a pixel-wise segmentation of the object. This segmentation can be used to filter out features in vpRBFeatureTracker subclasses.
  • vpRBDriftDetection is a base class for methods that can output score to estimate whether tracking has failed.
    The PR also includes 3D rendering utilities to extract the object silhouette.

Some things that remain to be done:
Features:

  • Covariance computation.
  • Ensure that every JSON configurable property has a getter/setter equivalent
  • Separate initClick from vpMbTracker
    • This is done in vpRBInitializationHelper: A lot of code was taken from vpMbTracker and simplified. This simplification could probably be backported into the MB tracker.
  • Add method to generate click init file
  • Some classes, e.g, vpColorHistogram can probably be migrated into the core module.

Code quality:

  • private vars should be prefixed with m_. To be done in vpRBSilhouetteControlPoint.h and checked everywhere
  • remove when possible old pointer usage like const vpCameraParameters *cam; in vpRBSilhouetteControlPoint.h

Build issues

  • Compiling with namespace
  • Compiling without OpenMP
    • Tried to introduce a macro to simplify conditional OpenMP usage. However, it led to weird indentation in VS code, so I'm not sure that it is worth it. Removed in dd16fdc
  • Compiling without KLT module

Documentation

  • Update Panda3D installation guide to include libassimp-dev package so that Panda can load .obj files.
  • Configuration through JSON
  • Usage tutorial
  • Document classes, link to relevant papers
    • Grouped classes into the RBT module

Tests

  • Introduce CI that can build RBT module
  • Unit tests for base functionalities
  • Test on known sequences: ensure that tracking remains correct and that there are no regressions
  • Reproducibility test: ensure that multiple runs of the tracker give the same results. This is required as there is a heavy use of OpenMP :)
  • Include testing sequences in visp_images

Python interface and example

  • Bindings can successfully be compiled with the new module
  • Trampoline classes
    • Feature
    • Drift
    • Mask
  • Tracking example using realsense camera
  • This PR should also greatly improve build time for the bindings for compiler that support -flto=auto

Tutorials

  • Introduce a short image sequence to be used with dragon.obj in tutorial-rbt-sequence
  • In tutorial-rbt-sequence.cpp set default --color option to the sequence path

Copy link

codecov bot commented Sep 18, 2024

Codecov Report

Attention: Patch coverage is 30.18868% with 37 lines in your changes missing coverage. Please review.

Project coverage is 53.97%. Comparing base (4ffa1ba) to head (60d9a40).
Report is 39 commits behind head on master.

Files with missing lines Patch % Lines
modules/core/src/tools/geometry/vpPlane.cpp 5.12% 37 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1467      +/-   ##
==========================================
+ Coverage   45.25%   53.97%   +8.71%     
==========================================
  Files        1121      442     -679     
  Lines      112149    50833   -61316     
  Branches    19080        0   -19080     
==========================================
- Hits        50754    27436   -23318     
+ Misses      61395    23397   -37998     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

SamFlt and others added 28 commits September 18, 2024 14:06
… to remove warning about classes not being trivially copyable with memcpy
…as virtual functions but non-virtual destructor
…eatureTrackerFactory, vpRBKltTracker, vpRBSilhouetteCCDTracker, vpRBSilhouetteMeTracker' that has virtual functions but non-virtual destructor
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.

2 participants