Skip to content

Commit

Permalink
Rename file that was to long for msvc17
Browse files Browse the repository at this point in the history
  • Loading branch information
fspindle committed Jan 12, 2024
1 parent d8e831c commit be4a676
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions doc/tutorial/tracking/tutorial-tracking-mb-generic-json.dox
Original file line number Diff line number Diff line change
Expand Up @@ -227,48 +227,48 @@ Let's now look at an example of how to use JSON to track an object.
This example is similar to tutorial-mb-generic-tracker-rgbd-realsense.cpp, where an XML configuration file is used to configure camera per camera.
Instead, here, we will use a JSON file to fully configure the tracker.

The full code can be found in tutorial-mb-generic-tracker-rgbd-realsense-json-settings.cpp
The full code can be found in tutorial-mb-generic-tracker-rgbd-realsense-json.cpp

To run the example:
\code{.sh}
// If no CAD model is defined in the JSON file
$ cd $VISP_WS/visp-build/tutorial/tracking/model-based/generic-rgbd
$ ./tutorial-mb-generic-tracker-rgbd-realsense-json-settings \
$ ./tutorial-mb-generic-tracker-rgbd-realsense-json \
--config model/cube/realsense-color-and-depth.json \
--model model/cube/cube.cao

// If CAD model is defined in JSON
$ ./tutorial-mb-generic-tracker-rgbd-realsense-json-settings \
$ ./tutorial-mb-generic-tracker-rgbd-realsense-json \
--config model/cube/realsense-color-and-depth.json
\endcode

The main difference between tutorial-mb-generic-tracker-rgbd-realsense.cpp and
tutorial-mb-generic-tracker-rgbd-realsense-json-settings.cpp is that in the latter we specify which features
tutorial-mb-generic-tracker-rgbd-realsense-json.cpp is that in the latter we specify which features
to use in the JSON config file.

First, we initialize the camera (here, a vpRealsense2 camera) and query the camera intrinsics,
as well as declare the vpImage we will use to store the data feed and display it:
\snippet tutorial-mb-generic-tracker-rgbd-realsense-json-settings.cpp Init
\snippet tutorial-mb-generic-tracker-rgbd-realsense-json.cpp Init

To load the json configuration, we simply call:
\snippet tutorial-mb-generic-tracker-rgbd-realsense-json-settings.cpp Loading
\snippet tutorial-mb-generic-tracker-rgbd-realsense-json.cpp Loading

We then query what features are used by the tracker and update its input accordingly
\snippet tutorial-mb-generic-tracker-rgbd-realsense-json-settings.cpp Init maps
\snippet tutorial-mb-generic-tracker-rgbd-realsense-json.cpp Init maps

To finish with the configuration, we load the 3D CAD model if none was defined in the JSON file.
If none is given by the user, then an exception is thrown.
\snippet tutorial-mb-generic-tracker-rgbd-realsense-json-settings.cpp Load 3D model
\snippet tutorial-mb-generic-tracker-rgbd-realsense-json.cpp Load 3D model

To ensure the best performance, we might still prefer to use the camera intrinsics and transformation
between color and depth cameras provided by the Realsense SDK.
\snippet tutorial-mb-generic-tracker-rgbd-realsense-json-settings.cpp Update params
\snippet tutorial-mb-generic-tracker-rgbd-realsense-json.cpp Update params

We then initialize tracking by click:
\snippet tutorial-mb-generic-tracker-rgbd-realsense-json-settings.cpp Init tracking
\snippet tutorial-mb-generic-tracker-rgbd-realsense-json.cpp Init tracking

Finally, we can start tracking:
\snippet tutorial-mb-generic-tracker-rgbd-realsense-json-settings.cpp Tracking
\snippet tutorial-mb-generic-tracker-rgbd-realsense-json.cpp Tracking

\section json-settings-next Next tutorial

Expand Down
2 changes: 1 addition & 1 deletion tutorial/tracking/model-based/generic-rgbd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set(tutorial_cpp
tutorial-mb-generic-tracker-rgbd.cpp
tutorial-mb-generic-tracker-rgbd-realsense.cpp
tutorial-mb-generic-tracker-rgbd-structure-core.cpp
tutorial-mb-generic-tracker-rgbd-realsense-json-settings.cpp)
tutorial-mb-generic-tracker-rgbd-realsense-json.cpp)

foreach(cpp ${tutorial_cpp})
visp_add_target(${cpp})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! \example tutorial-mb-generic-tracker-rgbd-realsense-json-settings.cpp
//! \example tutorial-mb-generic-tracker-rgbd-realsense-json.cpp
#include <iostream>

#include <visp3/core/vpConfig.h>
Expand Down

0 comments on commit be4a676

Please sign in to comment.