#include <cstdint>
#include <iostream>
#include <math.h>
#include <string.h>
#include "algorithms.h"
#include "tofi_compute.h"
#include "tofi_error.h"
Go to the source code of this file.
|
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) |
|
TofiComputeContext * | InitTofiCompute (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) |
|
◆ GEN_XYZ_ITERATIONS
#define GEN_XYZ_ITERATIONS 20 |
◆ NUM_BITS
#define NUM_BITS |
( |
|
Input, |
|
|
|
n_pos, |
|
|
|
n_bits |
|
) |
| (((1 << n_bits) - 1) & (Input >> n_pos)) |
◆ 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 |
◆ FreeTofiCompute()
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()
Function to Initialize the configuration for TOFI compute context including memory allocation for parameters like Depth/AB/Confidence memory buffers
- Parameters
-
[in] | const | void *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()
Function to process input frame data and output Depth/AB/Confidence frame data.
- Parameters
-
[in] | const | uint16_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.