tofi_compute.h
Go to the documentation of this file.
1 // Copyright (c) 2020 Analog Devices, Inc. All Rights Reserved.
2 // This software is proprietary to Analog Devices, Inc. and its licensors.
3 
4 #ifndef TOFI_COMPUTE_H
5 #define TOFI_COMPUTE_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_COMPUTE_EXPORTS
14 #define TOFI_COMPUTE_API __declspec(dllexport)
15 #else
16 #define TOFI_COMPUTE_API __declspec(dllimport)
17 #endif
18 #else
19 #define TOFI_COMPUTE_API
20 #endif
21 
22 #include <stdint.h>
23 
24 #include "tofi_error.h"
25 #include "tofi_util.h"
26 // TODO: Confirm if its fine to hardcode
27 // number of phases as 3, else make it a pointer
28 #define NO_OF_PHASES 3
29 
30 typedef struct {
31  float sensor_temp[NO_OF_PHASES];
32  float laser_temp[NO_OF_PHASES];
34 
35 // char ver_info[] =
36 // "VERSIONINFO:"
37 // "TOF_DepthComputeEngine_ARM64-Added_API_INI";
41 //TOFI_COMPUTE_API uint32_t GetVersion(char *depth_compute_version);
42 
43 typedef struct {
44  uint32_t n_rows;
45  uint32_t n_cols;
46  uint16_t *p_depth_frame;
47  uint16_t *p_ab_frame;
48  float *p_conf_frame;
49  int16_t *p_xyz_frame;
51  void *p_cal_config;
52  uint16_t *p_depth16_frame;
54 
65 InitTofiCompute(const void *p_tofi_cal_config, uint32_t *p_status);
66 
79 TofiCompute(const uint16_t *const input_frame,
80  TofiComputeContext *const p_tofi_compute_context,
81  TemperatureInfo *p_temperature);
82 
89 FreeTofiCompute(TofiComputeContext *p_tofi_compute_context);
90 
95 TofiSetABOnly(TofiComputeContext *const p_tofi_compute_context, int option);
96 
97 #ifdef __cplusplus
98 }
99 #endif
100 
101 #endif // TOFI_COMPUTE_H
TofiComputeContext::p_ab_frame
uint16_t * p_ab_frame
Pointer to the AB Frame.
Definition: tofi_compute.h:47
TofiComputeContext::p_depth_frame
uint16_t * p_depth_frame
Pointer to the Depth Frame.
Definition: tofi_compute.h:46
TofiComputeContext::p_xyz_frame
int16_t * p_xyz_frame
Pointer to the XYZ Frame.
Definition: tofi_compute.h:49
TofiComputeContext::p_depth16_frame
uint16_t * p_depth16_frame
Pointer to the Depth16 Frame.
Definition: tofi_compute.h:52
TofiComputeContext::p_cal_config
void * p_cal_config
Pointer to the Calibration config data.
Definition: tofi_compute.h:51
InitTofiCompute
TOFI_COMPUTE_API TofiComputeContext * InitTofiCompute(const void *p_tofi_cal_config, uint32_t *p_status)
Definition: tofiCompute.cpp:22
TemperatureInfo
Definition: tofi_compute.h:30
tofi_error.h
NO_OF_PHASES
#define NO_OF_PHASES
Definition: tofi_compute.h:28
FreeTofiCompute
TOFI_COMPUTE_API void FreeTofiCompute(TofiComputeContext *p_tofi_compute_context)
Definition: tofiCompute.cpp:147
TofiComputeContext::n_cols
uint32_t n_cols
Number of columns.
Definition: tofi_compute.h:45
TofiSetABOnly
TOFI_COMPUTE_API void TofiSetABOnly(TofiComputeContext *const p_tofi_compute_context, int option)
TofiComputeContext
Function to get the version for TOF Depth Compute Engine Library.
Definition: tofi_compute.h:43
TofiCompute
TOFI_COMPUTE_API int TofiCompute(const uint16_t *const input_frame, TofiComputeContext *const p_tofi_compute_context, TemperatureInfo *p_temperature)
Definition: tofiCompute.cpp:106
TofiComputeContext::n_rows
uint32_t n_rows
Number of rows.
Definition: tofi_compute.h:44
TOFI_COMPUTE_API
#define TOFI_COMPUTE_API
Definition: tofi_compute.h:19
TofiComputeContext::p_tofi_processor_config
void * p_tofi_processor_config
Pointer to the Processor Config.
Definition: tofi_compute.h:50
tofi_util.h
TofiComputeContext::p_conf_frame
float * p_conf_frame
Pointer to the Confidence Frame.
Definition: tofi_compute.h:48


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