libfreenect
0.1.2
Main Page
Classes
Files
File List
File Members
include
libfreenect-registration.h
Go to the documentation of this file.
1
/*
2
* This file is part of the OpenKinect Project. http://www.openkinect.org
3
*
4
* Copyright (c) 2011 individual OpenKinect contributors. See the CONTRIB file
5
* for details.
6
*
7
* This code is licensed to you under the terms of the Apache License, version
8
* 2.0, or, at your option, the terms of the GNU General Public License,
9
* version 2.0. See the APACHE20 and GPL2 files for the text of the licenses,
10
* or the following URLs:
11
* http://www.apache.org/licenses/LICENSE-2.0
12
* http://www.gnu.org/licenses/gpl-2.0.txt
13
*
14
* If you redistribute this file in source form, modified or unmodified, you
15
* may:
16
* 1) Leave this header intact and distribute it under the same terms,
17
* accompanying it with the APACHE20 and GPL20 files, or
18
* 2) Delete the Apache 2.0 clause and accompany it with the GPL2 file, or
19
* 3) Delete the GPL v2 clause and accompany it with the APACHE20 file
20
* In all cases you must keep the copyright notice intact and include a copy
21
* of the CONTRIB file.
22
*
23
* Binary distributions must follow the binary distribution requirements of
24
* either License.
25
*/
26
27
#pragma once
28
29
#include <
libfreenect.h
>
30
#include <stdint.h>
31
32
#ifdef __cplusplus
33
extern
"C"
{
34
#endif
35
39
typedef
struct
{
40
int32_t
dx_center
;
// not used by mapping algorithm
41
42
int32_t
ax
;
43
int32_t
bx
;
44
int32_t
cx
;
45
int32_t
dx
;
46
47
int32_t
dx_start
;
48
49
int32_t
ay
;
50
int32_t
by
;
51
int32_t
cy
;
52
int32_t
dy
;
53
54
int32_t
dy_start
;
55
56
int32_t
dx_beta_start
;
57
int32_t
dy_beta_start
;
58
59
int32_t
rollout_blank
;
// not used by mapping algorithm
60
int32_t
rollout_size
;
// not used by mapping algorithm
61
62
int32_t
dx_beta_inc
;
63
int32_t
dy_beta_inc
;
64
65
int32_t
dxdx_start
;
66
int32_t
dxdy_start
;
67
int32_t
dydx_start
;
68
int32_t
dydy_start
;
69
70
int32_t
dxdxdx_start
;
71
int32_t
dydxdx_start
;
72
int32_t
dxdxdy_start
;
73
int32_t
dydxdy_start
;
74
75
int32_t
back_comp1
;
// not used by mapping algorithm
76
77
int32_t
dydydx_start
;
78
79
int32_t
back_comp2
;
// not used by mapping algorithm
80
81
int32_t
dydydy_start
;
82
}
freenect_reg_info
;
83
85
typedef
struct
{
86
uint16_t
start_lines
;
87
uint16_t
end_lines
;
88
uint16_t
cropping_lines
;
89
}
freenect_reg_pad_info
;
90
92
typedef
struct
{
93
float
dcmos_emitter_dist
;
// Distance between IR camera and IR emitter, in cm.
94
float
dcmos_rcmos_dist
;
// Distance between IR camera and RGB camera, in cm.
95
float
reference_distance
;
// The focal length of the IR camera, in mm.
96
float
reference_pixel_size
;
// The size of a single pixel on the zero plane, in mm.
97
}
freenect_zero_plane_info
;
98
100
typedef
struct
{
101
freenect_reg_info
reg_info
;
102
freenect_reg_pad_info
reg_pad_info
;
103
freenect_zero_plane_info
zero_plane_info
;
104
105
double
const_shift
;
106
107
uint16_t*
raw_to_mm_shift
;
108
int32_t*
depth_to_rgb_shift
;
109
int32_t (*registration_table)[2];
// A table of 640*480 pairs of x,y values.
110
// Index first by pixel, then x:0 and y:1.
111
}
freenect_registration
;
112
113
114
// These allow clients to export registration parameters; proper docs will
115
// come later
116
FREENECTAPI
freenect_registration
freenect_copy_registration
(
freenect_device
* dev);
117
FREENECTAPI
int
freenect_destroy_registration
(
freenect_registration
* reg);
118
119
// convenience function to convert a single x-y coordinate pair from camera
120
// to world coordinates
121
FREENECTAPI
void
freenect_camera_to_world
(
freenect_device
* dev,
122
int
cx,
int
cy,
int
wz,
double
* wx,
double
* wy);
123
124
#ifdef __cplusplus
125
}
126
#endif
Generated on Fri Nov 1 2013 19:57:08 for libfreenect by
1.8.4