tofi_config.h
Go to the documentation of this file.
1 
4 #ifndef TOFI_CONFIG_H
5 #define TOFI_CONFIG_H
6 
7 #ifdef __cplusplus
8 extern "C" { // only need to export C interface if
9  // used by C++ source code
10 #endif
11 
12 #ifdef _WIN32
13 #ifdef TOFI_CONFIG_EXPORTS
14 #define TOFI_CONFIG_API __declspec(dllexport)
15 #else
16 #define TOFI_CONFIG_API __declspec(dllimport)
17 #endif
18 #else
19 #define TOFI_CONFIG_API
20 #endif
21 #define MAX_PATH_SIZE 512
22 #include <stdint.h>
23 #include <stdlib.h>
24 
25 #include "tofi_camera_intrinsics.h"
26 #include "tofi_error.h"
27 
28 #define MAX_CHAR_SIZE 24
29 typedef struct ConfigFileData {
30  unsigned char *p_data;
31  size_t size;
33 
34 typedef struct XYZTable {
35  const float *p_x_table;
36  const float *p_y_table;
37  const float *p_z_table;
38 } XYZTable;
39 
40 typedef struct TofiConfig {
41  uint32_t n_rows;
42  uint32_t n_cols;
46  const struct CAL_LSDAC_BLOCK_V1
47  *p_lsdac_block;
48  const struct CAL_GAIN_CORRECTION_BLOCK
50  const struct CAL_ADDRVAL_REG_BLOCK_V1
52  const void *p_tofi_cal_config;
53  const char *p_tofi_config_str;
55  uint32_t hdr_size;
56  uint32_t phases;
57  uint32_t freqs;
58 } TofiConfig;
59 
75  ConfigFileData *p_config_file_data,
76  ConfigFileData *p_ini_file_data,
77  uint16_t mode, uint32_t *p_status);
78 
92 InitTofiConfig_isp(ConfigFileData *p_ini_file_data, uint16_t mode,
93  uint32_t *p_status, TofiXYZDealiasData *p_xyz_dealias_data);
94 
96  TofiXYZDealiasData *p_xyz_data);
97 
102 TOFI_CONFIG_API void FreeTofiConfig(TofiConfig *p_tofi_cal_config);
103 
104 TOFI_CONFIG_API uint32_t TofiSetINIParams(void *p_config_params,
105  int params_group,
106  const void *p_tofi_cal_config);
107 TOFI_CONFIG_API uint32_t TofiGetINIParams(void *p_config_params,
108  int params_group,
109  const void *p_tofi_cal_config);
110 
111 extern uint8_t depthComputeOpenSourceEnabled;
112 
113 #ifdef __cplusplus
114 }
115 #endif
116 
117 #endif // TOFI_CONFIG_H
TofiConfig::p_tofi_cal_config
const void * p_tofi_cal_config
Pointer to the calibration config block.
Definition: tofi_config.h:52
ConfigFileData
struct ConfigFileData ConfigFileData
mode
GLenum mode
Definition: glcorearb.h:2764
TofiConfig::p_cal_gain_block
const struct CAL_GAIN_CORRECTION_BLOCK * p_cal_gain_block
Pointer to the Gain Block.
Definition: tofi_config.h:48
InitTofiConfig_isp
TOFI_CONFIG_API TofiConfig * InitTofiConfig_isp(ConfigFileData *p_ini_file_data, uint16_t mode, uint32_t *p_status, TofiXYZDealiasData *p_xyz_dealias_data)
Function to Initialize the configuration for TOFI cal config incase of isp.
Definition: tofiConfig.cpp:52
TofiConfig::p_cal_reg_block
const struct CAL_ADDRVAL_REG_BLOCK_V1 * p_cal_reg_block
Pointer to the register writes block.
Definition: tofi_config.h:50
MAX_CHAR_SIZE
#define MAX_CHAR_SIZE
Definition: tofi_config.h:28
TofiConfig
Definition: tofi_config.h:40
TofiConfig::freqs
uint32_t freqs
Definition: tofi_config.h:57
ConfigFileData::p_data
unsigned char * p_data
Pointer to the data.
Definition: tofi_config.h:30
ConfigFileData::size
size_t size
Size of the data.
Definition: tofi_config.h:31
TofiConfig::p_camera_intrinsics
CameraIntrinsics * p_camera_intrinsics
Pointer to the camera intrinsic parameters.
Definition: tofi_config.h:44
ConfigFileData
Definition: tofi_config.h:29
tofi_error.h
TofiConfig::xyz_table
XYZTable xyz_table
Structure holding pointer to the X,Y,and Z table.
Definition: tofi_config.h:45
InitTofiConfig
TOFI_CONFIG_API TofiConfig * InitTofiConfig(ConfigFileData *p_cal_file_data, ConfigFileData *p_config_file_data, ConfigFileData *p_ini_file_data, uint16_t mode, uint32_t *p_status)
Function to Initialize the configuration for TOFI cal config (p_tofi_cal_config) using calibration/co...
Definition: tofiConfig.cpp:9
TofiConfig::n_rows
uint32_t n_rows
Number of rows.
Definition: tofi_config.h:41
XYZTable
struct XYZTable XYZTable
depthComputeOpenSourceEnabled
uint8_t depthComputeOpenSourceEnabled
Definition: buffer_processor.cpp:57
TofiSetINIParams
TOFI_CONFIG_API uint32_t TofiSetINIParams(void *p_config_params, int params_group, const void *p_tofi_cal_config)
Definition: tofiConfig.cpp:113
FreeTofiConfig
TOFI_CONFIG_API void FreeTofiConfig(TofiConfig *p_tofi_cal_config)
Definition: tofiConfig.cpp:102
TofiConfig::phases
uint32_t phases
Definition: tofi_config.h:56
tofi_camera_intrinsics.h
GetXYZ_DealiasData
TOFI_CONFIG_API uint32_t GetXYZ_DealiasData(ConfigFileData *ccb_data, TofiXYZDealiasData *p_xyz_data)
Definition: tofiConfig.cpp:97
TofiConfig::hdr_size
uint32_t hdr_size
Definition: tofi_config.h:55
XYZTable::p_y_table
const float * p_y_table
Pointer to the radial correction Y Table.
Definition: tofi_config.h:36
XYZTable
Definition: tofi_config.h:34
TofiConfig::n_cols
uint32_t n_cols
Number of Columns.
Definition: tofi_config.h:42
TofiConfig::p_tofi_config_str
const char * p_tofi_config_str
Pointer to a string of ini config data.
Definition: tofi_config.h:53
CameraIntrinsics
Definition: tofi_camera_intrinsics.h:16
TOFI_CONFIG_API
#define TOFI_CONFIG_API
Definition: tofi_config.h:19
TofiConfig::raw_format
char raw_format[MAX_CHAR_SIZE]
Definition: tofi_config.h:54
XYZTable::p_x_table
const float * p_x_table
Pointer to the radial correction X Table.
Definition: tofi_config.h:35
TofiXYZDealiasData
Definition: tofi_camera_intrinsics.h:34
TofiConfig::p_lsdac_block
const struct CAL_LSDAC_BLOCK_V1 * p_lsdac_block
Pointer to the LSDAC Block.
Definition: tofi_config.h:46
TofiConfig
struct TofiConfig TofiConfig
XYZTable::p_z_table
const float * p_z_table
Pointer to the radial correction Z Table.
Definition: tofi_config.h:37
TofiGetINIParams
TOFI_CONFIG_API uint32_t TofiGetINIParams(void *p_config_params, int params_group, const void *p_tofi_cal_config)
Definition: tofiConfig.cpp:117


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:00