DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

src/dw/imageprocessing/sfm/docs/usecase1.md
Go to the documentation of this file.
1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
2 
3 @page sfm_usecase1 Structure from Motion (SFM) Workflow
4 
5 ## Putting It All Together
6 
7 The following code snippet shows the general structure of a program that uses the SFM module.
8 
9 ```{.cpp}
10 dwReconstructor_initialize(...);
11 while(true)
12 {
13  // CODE: Get frame
14  // CODE: Estimate camera rig pose through odometry
15  dwReconstructor_predictFeaturePosition(...);
16 
17  for each camera
18  {
19  // CODE: Build pyramid
20  // CODE: Track features
21  }
22 
23  dwReconstructor_estimatePoseAsync(...);
24  dwReconstructor_updateHistory(...);
25 
26  for each camera
27  {
28  dwReconstructor_triangulateFeatures(...);
29  }
30 
31  // CODE: Select features to discard
32  dwReconstructor_compactFeatureHistory(...);
33  dwReconstructor_compactWorldPoints(...);
34 }
35 dwReconstructor_release(...);
36 ```
37 
38 For the full implementation refer to @ref dwx_struct_from_motion_sample