3D Reconstruction Module¶
In this page will introduce the API and data you can use from 3D reconstruction module.
3D Reconstruction module API¶
-
int
ViveSR::SRWork::RigidReconstruction
::
GetRigidReconstructionData
(RigidReconstructionData *data)¶ Gets the RigidReconstructionData from SRWorks engine.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
[out] DepthData
: ViveSR::SRWork::RigidReconstruction::RigidReconstructionData
-
int
ViveSR::SRWork::RigidReconstruction
::
SetReconstructionParameterBool
(int parameter_name, bool param_value)¶ Sets the rigidReconstruction parameter boolean of module.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
[in] parameter_name
: ViveSR::SRWork::RigidReconstruction::Param[in] param_value
: The parameter input value.
-
int
ViveSR::SRWork::RigidReconstruction
::
SetReconstructionParameterInt
(int parameter_name, int param_value)¶ Sets the rigidReconstruction parameter integer of module.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
[in] parameter_name
: ViveSR::SRWork::RigidReconstruction::Param[in] param_value
: The parameter input value.
-
int
ViveSR::SRWork::RigidReconstruction
::
SetReconstructionParameterFloat
(int parameter_name, float param_value)¶ Sets the rigidReconstruction parameter float of module.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
[in] parameter_name
: ViveSR::SRWork::RigidReconstruction::Param[in] param_value
: The parameter input value.
-
int
ViveSR::SRWork::RigidReconstruction
::
GetReconstructionParameterBool
(int parameter_name, bool *param_value)¶ Get the rigidReconstruction parameter boolean from module.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
[in] parameter_name
: ViveSR::SRWork::RigidReconstruction::Param[out] param_value
: The parameter output value pointer.
-
int
ViveSR::SRWork::RigidReconstruction
::
GetReconstructionParameterInt
(int parameter_name, int *param_value)¶ Get the rigidReconstruction parameter integer from module.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
[in] parameter_name
: ViveSR::SRWork::RigidReconstruction::Param[out] param_value
: The parameter output value pointer.
-
int
ViveSR::SRWork::RigidReconstruction
::
GetReconstructionParameterFloat
(int parameter_name, float *param_value)¶ Get the rigidReconstruction parameter float from module.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
[in] parameter_name
: ViveSR::SRWork::RigidReconstruction::Param[out] param_value
: The parameter output value pointer.
-
int
ViveSR::SRWork::RigidReconstruction
::
GetReconstructionParameterDouble
(int parameter_name, double *param_value)¶ Get the rigidReconstruction parameter double from module.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
[in] parameter_name
: ViveSR::SRWork::RigidReconstruction::Param[out] param_value
: The parameter output value pointer.
-
int
ViveSR::SRWork::RigidReconstruction
::
SetSceneUnderstandingConfig
(SceneUnderstandingConfig value)¶ Set the scene understanding config which set maximum counts in one label object.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
SceneUnderstandingConfig
: ViveSR::SRWork::RigidReconstruction::SceneUnderstandingConfigId
-
int
ViveSR::SRWork::RigidReconstruction
::
GetSceneUnderstandingConfig
(SceneUnderstandingConfig *value)¶ Get the scene understanding config which set maximum counts in one label object.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
SceneUnderstandingConfig
: ViveSR::SRWork::RigidReconstruction::SceneUnderstandingConfigId
-
int
ViveSR::SRWork::RigidReconstruction
::
SetReconstructionOutputFileName
(char *parameter_name, int size)¶ Set the reconstruction output filename and export mesh.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
[in] parameter_name
: The array of file name.[in] size
: The file name length.
-
int
ViveSR::SRWork::RigidReconstruction
::
SetSceneUnderstandingOutputFileName
(char *parameter_name, int size)¶ Set the scene understanding output filename and export scene understanding object.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
[in] parameter_name
: The array of file name.[in] size
: The file name length.
-
int
ViveSR::SRWork::RigidReconstruction
::
GetExportMeshProgress
(int *value)¶ Get the reconstruction mesh export progress.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
[out] value
: The progress between 0 to 100.
-
int
ViveSR::SRWork::RigidReconstruction
::
GetSceneUnderstandingProgress
(int *value)¶ Get the scene understanding export progress.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
[out] value
: The progress between 0 to 100.
-
int
ViveSR::SRWork::RigidReconstruction
::
SetReconstructionMaxFps
(int max_fps)¶ Set the reconstruction maximum update interval of SRWorks engine.
- Return
Indicates the resulting ViveSR::Error status of this method.
- Parameters
[in] max_fps
: The maximum fps want to set.
3D Reconstruction module data type¶
-
struct
RigidReconstructionData
¶ A struct containing rigidReconstruction data listed below.
Public Members
-
unsigned int
frame_seq
¶
-
float *
posemtx44
¶
-
int
num_vertices
¶
-
int
bytepervert
¶
-
float *
vertices
¶
-
int
num_indices
¶
-
int *
indices
¶
-
int
cldtype
¶
-
unsigned int
collidernum
¶
-
unsigned int *
cld_num_verts
¶
-
unsigned int *
cld_numidx
¶
-
float *
cld_vertices
¶
-
int *
cld_indices
¶
-
int
sector_num
¶
-
int *
sector_id_list
¶
-
int *
sector_vert_num
¶
-
int *
sector_idx_num
¶
-
int
model_chunk_num
¶
-
int
model_chunk_idx
¶
-
unsigned int
3D Reconstruction module enums type¶
-
enum
ViveSR::RigidReconstruction
::
Param
¶ An enum type for RigidReconstruction parameters.
Values:
-
GEO_VOXEL_SIZE
= 0¶
-
COLOR_VOXEL_SIZE
= 1¶
-
FOCAL_LENGTH
= 8¶
-
POINTCLOUD_POINTSIZE
= 9¶
-
EXPORT_ADAPTIVE_MODEL
= 10¶
-
ADAPTIVE_MAX_GRID
= 11¶
-
ADAPTIVE_MIN_GRID
= 12¶
-
ADAPTIVE_ERROR_THRES
= 13¶
-
SECTOR_SIZE
= 15¶
-
SECTOR_NUM_PER_SIDE
= 16¶
-
ENABLE_FRUSTUM_CULLING
= 20¶
-
CONFIG_FILEPATH
= 21¶
-
CONFIG_QUALITY
¶
-
LITE_POINT_CLOUD_MODE
= 32¶
-
FULL_POINT_CLOUD_MODE
¶
-
LIVE_ADAPTIVE_MODE
¶
-
MESH_REFRESH_INTERVAL
= 37¶
-
ENABLE_SECTOR_GROUPING
= 38¶
-
SCENE_UNDERSTANDING_ENABLE
= 40¶
-
SCENE_UNDERSTANDING_MACHINE_VISION
= 41¶
-
SCENE_UNDERSTANDING_CONFIG
= 42¶
-
SCENE_UNDERSTANDING_REFINEMENT
= 43¶
-
SEMANTIC_FUSION_ALL_AFTER_SCANNING
= 44¶
-
EXPORT_MODEL_FOR_UNITY_PROGRESS
= 50¶
-
EXPORT_SCENE_UNDERSTANDING_FOR_UNITY_PROGRESS
= 51¶
-
-
enum
ViveSR::RigidReconstruction
::
SceneUnderstandingObjectType
¶ An enum type for scene understanding object type.
Values:
-
FLOOR
= 0¶
-
WALL
= 1¶
-
CEILING
= 2¶
-
CHAIR
= 3¶
-
TABLE
= 4¶
-
BED
= 5¶
-
MONITOR
= 6¶
-
WINDOW
= 7¶
-
FURNITURE
= 8¶
-
DOOR
= 9¶
-
PICTURE
= 10¶
-
PERSON
= 11¶
-
LIGHT
= 12¶
-
PLANT
= 13¶
-
CURTAIN
= 14¶
-
PILLOW
= 15¶
-
TOTAL
= 16¶
-
-
enum
ViveSR::RigidReconstruction
::
InputMask
¶ An enum type for RigidReconstruction input data structure.
Values:
-
_LEFT_FRAME
= 0¶
-
_DEPTH_MAP
= 1¶
-
_FRAME_SEQ
= 2¶
-
_TIME_STP
= 3¶
-
_POSE
= 4¶
-
_LUX_LEFT
= 5¶
-
_COLOR_TEMPERATURE_LEFT
= 6¶
-
_EXPOSURE_TIME_LEFT
= 7¶
-
_ANALOG_GAIN_LEFT
= 8¶
-
_DIGITAL_GAIN_LEFT
= 9¶
-
_CAMERA_PARAMS
= 10¶
-
INPUT_MASK_MAX
¶
-
-
enum
ViveSR::RigidReconstruction
::
OutputMask
¶ An enum type for RigidReconstruction output data structure.
Values:
-
FRAME_SEQ
= 0¶
-
POSEMTX44
= 1¶
-
NUM_VERTICES
= 2¶
-
BYTEPERVERT
= 3¶
-
VERTICES
= 4¶
-
NUM_INDICES
= 5¶
-
INDICES
= 6¶
-
CLDTYPE
= 7¶
-
COLLIDERNUM
= 8¶
-
CLD_NUM_VERTS
= 9¶
-
CLD_NUMIDX
= 10¶
-
CLD_VERTICES
= 11¶
-
CLD_INDICES
= 12¶
-
SECTOR_NUM
= 13¶
-
SECTOR_ID_LIST
= 14¶
-
SECTOR_VERT_NUM
= 15¶
-
SECTOR_IDX_NUM
= 16¶
-
MODEL_CHUNK_NUM
= 17¶
-
MODEL_CHUNK_IDX
= 18¶
-
RECONSTRUCTION_STAGE
= 19¶
-
RECONSTRUCTION_PERCENTAGE
= 20¶
-
SCENE_UNDERSTANDING_STAGE
= 21¶
-
SCENE_UNDERSTANDING_PERCENTAGE
= 22¶
-
OUTPUT_MASK_MAX
¶
-
-
enum
ViveSR::RigidReconstruction
::
Cmd
¶ An enum type for control signal to change RigidReconstruction module’s behavior.
Values:
-
START
= 200¶
-
STOP
= 201¶
-
SHOW_INFO
= 202¶
-
EXTRACT_POINT_CLOUD
= 203¶
-
EXTRACT_VERTEX_NORMAL
= 204¶
-
EXPORT_MODEL_RIGHT_HAND
= 205¶
-
EXPORT_MODEL_FOR_UNITY
= 206¶
-
EXPORT_SCENE_UNDERSTANDING_RIGHT_HAND
= 207¶
-
EXPORT_SCENE_UNDERSTANDING_FOR_UNITY
= 208¶
-
MODEL_PREVIEW_START_RIGHT_HAND
= 209¶
-
MODEL_PREVIEW_START_FOR_UNITY
= 210¶
-
MODEL_PREVIEW_NEXT_CHUNK
= 211¶
-
MODEL_PREVIEW_FINISH
= 212¶
-
EXPORT_ROOT_FOLDER
= 213¶
-
RESET_RECONSTRUCTION_ENGINE
= 214¶
-