OniCTypes.h
Go to the documentation of this file.
1 /*****************************************************************************
2 * *
3 * OpenNI 2.x Alpha *
4 * Copyright (C) 2012 PrimeSense Ltd. *
5 * *
6 * This file is part of OpenNI. *
7 * *
8 * Licensed under the Apache License, Version 2.0 (the "License"); *
9 * you may not use this file except in compliance with the License. *
10 * You may obtain a copy of the License at *
11 * *
12 * http://www.apache.org/licenses/LICENSE-2.0 *
13 * *
14 * Unless required by applicable law or agreed to in writing, software *
15 * distributed under the License is distributed on an "AS IS" BASIS, *
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
17 * See the License for the specific language governing permissions and *
18 * limitations under the License. *
19 * *
20 *****************************************************************************/
21 #ifndef ONICTYPES_H
22 #define ONICTYPES_H
23 
24 #include "OniPlatform.h"
25 #include "OniCEnums.h"
26 
28 typedef int OniBool;
29 
30 #ifndef TRUE
31 #define TRUE 1
32 #endif //TRUE
33 #ifndef FALSE
34 #define FALSE 0
35 #endif //FALSE
36 
37 #define ONI_MAX_STR 256
38 #define ONI_MAX_SENSORS 10
39 
40 struct OniCallbackHandleImpl;
41 typedef struct OniCallbackHandleImpl* OniCallbackHandle;
42 
44 typedef struct
45 {
47  int major;
49  int minor;
53  int build;
54 } OniVersion;
55 
56 typedef int OniHardwareVersion;
57 
59 typedef struct
60 {
64  int fps;
65 } OniVideoMode;
66 
68 typedef struct
69 {
74 
76 typedef struct
77 {
78  char uri[ONI_MAX_STR];
79  char vendor[ONI_MAX_STR];
80  char name[ONI_MAX_STR];
84 
85 typedef struct OBCameraParams
86 {
87  float l_intr_p[4];//[fx,fy,cx,cy]
88  float r_intr_p[4];//[fx,fy,cx,cy]
89  float r2l_r[9];//[r00,r01,r02;r10,r11,r12;r20,r21,r22]
90  float r2l_t[3];//[t1,t2,t3]
91  float l_k[5];//[k1,k2,p1,p2,k3]
92  float r_k[5];
93  //int is_mirror;
95 
96 struct _OniDevice;
97 typedef struct _OniDevice* OniDeviceHandle;
98 
99 struct _OniStream;
100 typedef struct _OniStream* OniStreamHandle;
101 
102 struct _OniRecorder;
103 typedef struct _OniRecorder* OniRecorderHandle;
104 
106 typedef struct
107 {
108  int dataSize;
109  void* data;
110 
114 
115  int width;
116  int height;
117 
122 
123  int stride;
124 } OniFrame;
125 
130 
131 typedef void* (ONI_CALLBACK_TYPE* OniFrameAllocBufferCallback)(int size, void* pCookie);
133 
134 typedef struct
135 {
140 
141 typedef struct
142 {
143  int enabled;
144  int originX;
145  int originY;
146  int width;
147  int height;
148 } OniCropping;
149 
150 // Pixel types
156 
161 
166 
167 #pragma pack (push, 1)
168 
170 typedef struct
171 {
172  /* Red value of this pixel. */
174  /* Green value of this pixel. */
176  /* Blue value of this pixel. */
179 
185 typedef struct
186 {
196 
202 typedef struct
203 {
213 
214 #pragma pack (pop)
215 
216 typedef struct
217 {
220 } OniSeek;
221 
222 #endif // ONICTYPES_H
struct OniCallbackHandleImpl * OniCallbackHandle
Definition: OniCTypes.h:41
void(ONI_CALLBACK_TYPE * OniDeviceInfoCallback)(const OniDeviceInfo *pInfo, void *pCookie)
Definition: OniCTypes.h:128
int dataSize
Definition: OniCTypes.h:108
float l_k[5]
Definition: OniCTypes.h:91
int numSupportedVideoModes
Definition: OniCTypes.h:71
struct OBCameraParams OBCameraParams
void *(ONI_CALLBACK_TYPE * OniFrameAllocBufferCallback)(int size, void *pCookie)
Definition: OniCTypes.h:131
float r2l_r[9]
Definition: OniCTypes.h:89
uint8_t OniGrayscale8Pixel
Definition: OniCTypes.h:165
uint16_t OniGrayscale16Pixel
Definition: OniCTypes.h:160
struct _OniRecorder * OniRecorderHandle
Definition: OniCTypes.h:103
unsigned short uint16_t
int resolutionY
Definition: OniCTypes.h:63
int stride
Definition: OniCTypes.h:123
uint16_t usbVendorId
Definition: OniCTypes.h:81
int OniBool
Definition: OniCTypes.h:28
float l_intr_p[4]
Definition: OniCTypes.h:87
unsigned __int64 uint64_t
int height
Definition: OniCTypes.h:116
OniDeviceState
Definition: OniCEnums.h:64
uint64_t timestamp
Definition: OniCTypes.h:112
void(ONI_CALLBACK_TYPE * OniFrameFreeBufferCallback)(void *data, void *pCookie)
Definition: OniCTypes.h:132
OniStreamHandle stream
Definition: OniCTypes.h:219
uint16_t OniIRPixel
Definition: OniCTypes.h:155
int cropOriginX
Definition: OniCTypes.h:120
int frameIndex
Definition: OniCTypes.h:218
OniDeviceInfoCallback deviceConnected
Definition: OniCTypes.h:136
unsigned char uint8_t
int frameIndex
Definition: OniCTypes.h:113
uint16_t usbProductId
Definition: OniCTypes.h:82
int minor
Definition: OniCTypes.h:49
OniVideoMode * pSupportedVideoModes
Definition: OniCTypes.h:72
OniSensorType
Definition: OniCEnums.h:38
int maintenance
Definition: OniCTypes.h:51
void(ONI_CALLBACK_TYPE * OniDeviceStateCallback)(const OniDeviceInfo *pInfo, OniDeviceState deviceState, void *pCookie)
Definition: OniCTypes.h:129
OniDeviceStateCallback deviceStateChanged
Definition: OniCTypes.h:138
OniSensorType sensorType
Definition: OniCTypes.h:70
float r_k[5]
Definition: OniCTypes.h:92
OniBool croppingEnabled
Definition: OniCTypes.h:119
int cropOriginY
Definition: OniCTypes.h:121
float r2l_t[3]
Definition: OniCTypes.h:90
OniVideoMode videoMode
Definition: OniCTypes.h:118
float r_intr_p[4]
Definition: OniCTypes.h:88
OniSensorType sensorType
Definition: OniCTypes.h:111
int build
Definition: OniCTypes.h:53
void * data
Definition: OniCTypes.h:109
int resolutionX
Definition: OniCTypes.h:62
OniPixelFormat pixelFormat
Definition: OniCTypes.h:61
void(ONI_CALLBACK_TYPE * OniNewFrameCallback)(OniStreamHandle stream, void *pCookie)
Definition: OniCTypes.h:126
typedef void(ONI_CALLBACK_TYPE *DeviceConnectedCallback)(const OniDeviceInfo *
#define ONI_MAX_STR
Definition: OniCTypes.h:37
int width
Definition: OniCTypes.h:115
int OniHardwareVersion
Definition: OniCTypes.h:56
#define ONI_CALLBACK_TYPE
OniDeviceInfoCallback deviceDisconnected
Definition: OniCTypes.h:137
void(ONI_CALLBACK_TYPE * OniGeneralCallback)(void *pCookie)
Definition: OniCTypes.h:127
uint16_t OniDepthPixel
Definition: OniCTypes.h:154
OniPixelFormat
Definition: OniCEnums.h:47
int major
Definition: OniCTypes.h:47
struct _OniDevice * OniDeviceHandle
Definition: OniCTypes.h:97
void * pCookie
Definition: OniDriverAPI.h:35
struct _OniStream * OniStreamHandle
Definition: OniCTypes.h:100


astra_camera
Author(s): Tim Liu
autogenerated on Wed Dec 16 2020 03:54:34