Classes | Macros | Functions
tofiCompute.cpp File Reference
#include <cstdint>
#include <iostream>
#include <math.h>
#include <string.h>
#include "algorithms.h"
#include "tofi_compute.h"
#include "tofi_error.h"
Include dependency graph for tofiCompute.cpp:

Go to the source code of this file.

Classes

struct  PrivateData
 

Macros

#define GEN_XYZ_ITERATIONS   20
 
#define NUM_BITS(Input, n_pos, n_bits)   (((1 << n_bits) - 1) & (Input >> n_pos))
 

Functions

static uint32_t DeInterleaveDepth (uint8_t *p_frame_data, uint32_t n_bits_in_depth, uint32_t n_bits_in_conf, uint32_t n_bits_in_ab, uint32_t n_bytes, uint32_t width, uint32_t height, uint16_t *p_depth, uint16_t *p_conf, uint16_t *p_ab)
 
void FreeTofiCompute (TofiComputeContext *p_tofi_compute_context)
 
TofiComputeContextInitTofiCompute (const void *p_tofi_cal_config, uint32_t *p_status)
 
int TofiCompute (const uint16_t *const input_frame, TofiComputeContext *const p_tofi_compute_context, TemperatureInfo *p_temperature)
 

Macro Definition Documentation

◆ GEN_XYZ_ITERATIONS

#define GEN_XYZ_ITERATIONS   20

Definition at line 13 of file tofiCompute.cpp.

◆ NUM_BITS

#define NUM_BITS (   Input,
  n_pos,
  n_bits 
)    (((1 << n_bits) - 1) & (Input >> n_pos))

Definition at line 63 of file tofiCompute.cpp.

Function Documentation

◆ DeInterleaveDepth()

static uint32_t DeInterleaveDepth ( uint8_t *  p_frame_data,
uint32_t  n_bits_in_depth,
uint32_t  n_bits_in_conf,
uint32_t  n_bits_in_ab,
uint32_t  n_bytes,
uint32_t  width,
uint32_t  height,
uint16_t *  p_depth,
uint16_t *  p_conf,
uint16_t *  p_ab 
)
static

Definition at line 66 of file tofiCompute.cpp.

◆ FreeTofiCompute()

void FreeTofiCompute ( TofiComputeContext p_tofi_compute_context)

Function to release memory for TOFI compute context structure including its parameters like Depth/AB/Confidence memory buffers

Parameters
[in,out]TofiComputeContext*p_tofi_compute_context: pointer to the TOFI compute context structure to be freed

Definition at line 147 of file tofiCompute.cpp.

◆ InitTofiCompute()

TofiComputeContext* InitTofiCompute ( const void p_tofi_cal_config,
uint32_t *  p_status 
)

Function to Initialize the configuration for TOFI compute context including memory allocation for parameters like Depth/AB/Confidence memory buffers

Parameters
[in]constvoid *p_tofi_cal_config: pointer to calibration configuration
[out]uint32_t*p_status: pointer to status, assigned as ADI_TOFI_SUCCESS on success, assigned as error code incase of failure
Returns
TofiComputeContext *: returns pointer to TofiComputeContext on success, returns NULL on failure

Definition at line 22 of file tofiCompute.cpp.

◆ TofiCompute()

int TofiCompute ( const uint16_t *const  input_frame,
TofiComputeContext *const  p_tofi_compute_context,
TemperatureInfo p_temperature 
)

Function to process input frame data and output Depth/AB/Confidence frame data.

Parameters
[in]constuint16_t *const input_frame: Input frame data(unsigned short format) buffer
[in]TofiComputeContext*const p_tofi_compute_context: pointer to the TOFI compute context structure
[in]TemperatureInfo*p_temperature: pointer to the temperature data, temperature correction applied based on the value, no temperature correction is applied if this pointer is NULL
Returns
int: returns ADI_TOFI_SUCCESS(0) on success, returns error code (>1) on failure

Definition at line 106 of file tofiCompute.cpp.



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