Macros | Functions | Variables
registration.c File Reference
#include "libfreenect.h"
#include "freenect_internal.h"
#include "registration.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
Include dependency graph for registration.c:

Go to the source code of this file.

Macros

#define DEPTH_MAX_METRIC_VALUE   FREENECT_DEPTH_MM_MAX_VALUE
 
#define DEPTH_MAX_RAW_VALUE   FREENECT_DEPTH_RAW_MAX_VALUE
 
#define DEPTH_MIRROR_X   0
 
#define DEPTH_NO_MM_VALUE   FREENECT_DEPTH_MM_NO_VALUE
 
#define DEPTH_NO_RAW_VALUE   FREENECT_DEPTH_RAW_NO_VALUE
 
#define DEPTH_SENSOR_X_RES   1280
 
#define DEPTH_X_OFFSET   1
 
#define DEPTH_X_RES   640
 
#define DEPTH_Y_OFFSET   1
 
#define DEPTH_Y_RES   480
 
#define REG_X_VAL_SCALE   256
 
#define S2D_CONST_OFFSET   0.375
 
#define S2D_PIXEL_CONST   10
 

Functions

static void complete_tables (freenect_registration *reg)
 Compute registration tables. More...
 
FN_INTERNAL int freenect_apply_depth_to_mm (freenect_device *dev, uint8_t *input_packed, uint16_t *output_mm)
 
FN_INTERNAL int freenect_apply_registration (freenect_device *dev, uint8_t *input_packed, uint16_t *output_mm)
 
void freenect_camera_to_world (freenect_device *dev, int cx, int cy, int wz, double *wx, double *wy)
 camera -> world coordinate helper function More...
 
freenect_registration freenect_copy_registration (freenect_device *dev)
 
static void freenect_create_dxdy_tables (double *reg_x_table, double *reg_y_table, int32_t resolution_x, int32_t resolution_y, freenect_reg_info *regdata)
 
int freenect_destroy_registration (freenect_registration *reg)
 
static void freenect_init_depth_to_rgb (int32_t *depth_to_rgb, freenect_zero_plane_info *zpi)
 fill the table of horizontal shift values for metric depth -> RGB conversion More...
 
FN_INTERNAL int freenect_init_registration (freenect_device *dev)
 
static void freenect_init_registration_table (int32_t(*registration_table)[2], freenect_reg_info *reg_info)
 
static uint16_t freenect_raw_to_mm (uint16_t raw, freenect_registration *reg)
 convert raw shift value to metric depth (in mm) More...
 
static void unpack_8_pixels (uint8_t *raw, uint16_t *frame)
 

Variables

static double parameter_coefficient = 4
 
static double pixel_size_factor = 1
 
static double shift_scale = 10
 

Macro Definition Documentation

#define DEPTH_MAX_METRIC_VALUE   FREENECT_DEPTH_MM_MAX_VALUE

Definition at line 44 of file registration.c.

#define DEPTH_MAX_RAW_VALUE   FREENECT_DEPTH_RAW_MAX_VALUE

Definition at line 46 of file registration.c.

#define DEPTH_MIRROR_X   0

Definition at line 42 of file registration.c.

#define DEPTH_NO_MM_VALUE   FREENECT_DEPTH_MM_NO_VALUE

Definition at line 45 of file registration.c.

#define DEPTH_NO_RAW_VALUE   FREENECT_DEPTH_RAW_NO_VALUE

Definition at line 47 of file registration.c.

#define DEPTH_SENSOR_X_RES   1280

Definition at line 41 of file registration.c.

#define DEPTH_X_OFFSET   1

Definition at line 49 of file registration.c.

#define DEPTH_X_RES   640

Definition at line 51 of file registration.c.

#define DEPTH_Y_OFFSET   1

Definition at line 50 of file registration.c.

#define DEPTH_Y_RES   480

Definition at line 52 of file registration.c.

#define REG_X_VAL_SCALE   256

Definition at line 36 of file registration.c.

#define S2D_CONST_OFFSET   0.375

Definition at line 39 of file registration.c.

#define S2D_PIXEL_CONST   10

Definition at line 38 of file registration.c.

Function Documentation

static void complete_tables ( freenect_registration reg)
static

Compute registration tables.

Definition at line 306 of file registration.c.

FN_INTERNAL int freenect_apply_depth_to_mm ( freenect_device dev,
uint8_t input_packed,
uint16_t output_mm 
)

Definition at line 172 of file registration.c.

FN_INTERNAL int freenect_apply_registration ( freenect_device dev,
uint8_t input_packed,
uint16_t output_mm 
)

Definition at line 104 of file registration.c.

void freenect_camera_to_world ( freenect_device dev,
int  cx,
int  cy,
int  wz,
double *  wx,
double *  wy 
)

camera -> world coordinate helper function

Definition at line 318 of file registration.c.

freenect_registration freenect_copy_registration ( freenect_device dev)

Definition at line 353 of file registration.c.

static void freenect_create_dxdy_tables ( double *  reg_x_table,
double *  reg_y_table,
int32_t  resolution_x,
int32_t  resolution_y,
freenect_reg_info regdata 
)
static

Definition at line 194 of file registration.c.

int freenect_destroy_registration ( freenect_registration reg)

Definition at line 367 of file registration.c.

static void freenect_init_depth_to_rgb ( int32_t depth_to_rgb,
freenect_zero_plane_info zpi 
)
static

fill the table of horizontal shift values for metric depth -> RGB conversion

Definition at line 60 of file registration.c.

FN_INTERNAL int freenect_init_registration ( freenect_device dev)

Allocate and fill registration tables This function should be called every time a new video (not depth!) mode is activated.

Definition at line 335 of file registration.c.

static void freenect_init_registration_table ( int32_t(*)  registration_table[2],
freenect_reg_info reg_info 
)
static

Definition at line 264 of file registration.c.

static uint16_t freenect_raw_to_mm ( uint16_t  raw,
freenect_registration reg 
)
static

convert raw shift value to metric depth (in mm)

Definition at line 297 of file registration.c.

static void unpack_8_pixels ( uint8_t raw,
uint16_t frame 
)
inlinestatic

Definition at line 77 of file registration.c.

Variable Documentation

double parameter_coefficient = 4
static

Definition at line 292 of file registration.c.

double pixel_size_factor = 1
static

Definition at line 294 of file registration.c.

double shift_scale = 10
static

Definition at line 293 of file registration.c.



libfreenect
Author(s): Hector Martin, Josh Blake, Kyle Machulis, OpenKinect community
autogenerated on Thu Jun 6 2019 19:25:39