openni introduction

上传人:第*** 文档编号:49348821 上传时间:2018-07-27 格式:PPTX 页数:12 大小:158.31KB
返回 下载 相关 举报
openni introduction_第1页
第1页 / 共12页
openni introduction_第2页
第2页 / 共12页
openni introduction_第3页
第3页 / 共12页
openni introduction_第4页
第4页 / 共12页
openni introduction_第5页
第5页 / 共12页
点击查看更多>>
资源描述

《openni introduction》由会员分享,可在线阅读,更多相关《openni introduction(12页珍藏版)》请在金锄头文库上搜索。

1、Open NI introduction 个人学习整理OpenNI Data Structures Supported platforms #define ONI_PLATFORM_WIN32 1 #define ONI_PLATFORM_LINUX_X86 2 #define ONI_PLATFORM_LINUX_ARM 3 #define ONI_PLATFORM_MACOSX 4 #define ONI_PLATFORM_ANDROID_ARM 5 Callback definitions #define ONI_STDCALL _stdcall #define ONI_C_DECL #

2、define ONI_API_EXPORT _attribute_ (visibility(“default“) #ifdef _cplusplus #define ONI_C extern “C“ #define ONI_C_API_EXPORT ONI_C ONI_API_EXPORT #define ONI_C_API_IMPORT ONI_C ONI_API_IMPORT #define ONI_CPP_API_EXPORT ONI_API_EXPORT #define ONI_CPP_API_IMPORT ONI_API_IMPORT #else 就不用添加extern “C”了ty

3、pedef structchar uriONI_MAX_STR;char vendorONI_MAX_STR;char nameONI_MAX_STR;uint16_t usbVendorId;uint16_t usbProductId; OniDeviceInfo;typedef structOniPixelFormat pixelFormat;int resolutionX;int resolutionY;int fps; OniVideoMode;typedef enum/ Depth ONI_PIXEL_FORMAT_DEPTH_1_MM = 100, ONI_PIXEL_FORMAT

4、_DEPTH_100_UM = 101, ONI_PIXEL_FORMAT_SHIFT_9_2 = 102, ONI_PIXEL_FORMAT_SHIFT_9_3 = 103, / Color ONI_PIXEL_FORMAT_RGB888 = 200, ONI_PIXEL_FORMAT_YUV422 = 201, ONI_PIXEL_FORMAT_GRAY8 = 202, ONI_PIXEL_FORMAT_GRAY16 = 203, ONI_PIXEL_FORMAT_JPEG = 204, OniPixelFormat;typedef structOniSensorType sensorTy

5、pe;int numSupportedVideoModes;OniVideoMode *pSupportedVideoModes; OniSensorInfo;typedef enumONI_SENSOR_IR = 1,ONI_SENSOR_COLOR = 2,ONI_SENSOR_DEPTH = 3, OniSensorType;typedef structint dataSize;void* data;OniSensorType sensorType;uint64_t timestamp;int frameIndex;int width;int height;OniVideoMode vi

6、deoMode;OniBool croppingEnabled;int cropOriginX;int cropOriginY;int stride; OniFrame;typedef struct OniDeviceInfoCallback deviceConnected; OniDeviceInfoCallback deviceDisconnected; OniDeviceStateCallback deviceStateChanged; OniDeviceCallbacks;struct _OniDevice; typedef _OniDevice* OniDeviceHandle; s

7、truct _OniStream; typedef _OniStream* OniStreamHandle; struct _OniRecorder; typedef _OniRecorder* OniRecorderHandle;OpenNI C interfaces General APIs OniStatus oniInitialize(int apiVersion); OniStatus oniGetDeviceList(OniDeviceInfo* pDevices, int* pNumDevices); OniStatus oniRegisterDeviceCallbacks(On

8、iDeviceCallbacks* pCallbacks, void* pCookie, OniCallbackHandle* pHandle); OniStatus oniWaitForAnyStream(OniStreamHandle* pStreams, int numStreams, int* pStreamIndex, int timeout); Device APIs OniStatus oniDeviceOpen(const char* uri, OniDeviceHandle* pDevice); const OniSensorInfo* oniDeviceGetSensorI

9、nfo(OniDeviceHandle device, OniSensorType sensorType); OniStatus oniDeviceGetInfo(OniDeviceHandle device, OniDeviceInfo* pInfo); OniStatus oniDeviceCreateStream(OniDeviceHandle device, OniSensorType sensorType, OniStreamHandle* pStream); OniStatus oniDeviceEnableDepthColorSync(OniDeviceHandle device

10、); 两者的采集时间差限 定在一定的范围内 OniStatus oniDeviceSetProperty(OniDeviceHandle device, int propertyId, const void* data, int dataSize); OniBool oniDeviceIsPropertySupported(OniDeviceHandle device, int propertyId); OniStatus oniDeviceInvoke(OniDeviceHandle device, int commandId, const void* data, int dataSize)

11、; /* Invoke an internal functionality of the device. */ OniBool oniDeviceIsCommandSupported(OniDeviceHandle device, int commandId); OniBool oniDeviceIsImageRegistrationModeSupported(OniDeviceHandle device, OniImageRegistrationMode mode); /不同位置的camera图像叠加OpenNI C interfaces2 Stream APIsconst OniSenso

12、rInfo* oniStreamGetSensorInfo(OniStreamHandle stream); OniStatus oniStreamStart(OniStreamHandle stream); OniStatus oniStreamReadFrame(OniStreamHandle stream, OniFrame* pFrame); oniStreamRegisterNewFrameCallback(OniStreamHandle stream, OniNewFrameCallback handler, void* pCookie, OniCallbackHandle* pH

13、andle); OniStatus oniStreamSetProperty(OniStreamHandle stream, int propertyId, const void* data, int dataSize); OniBool oniStreamIsPropertySupported(OniStreamHandle stream, int propertyId); OniStatus oniStreamInvoke(OniStreamHandle stream, int commandId, const void* data, int dataSize); OniBool oniS

14、treamIsCommandSupported(OniStreamHandle stream, int commandId); void oniFrameAddRef(OniFrame* pFrame); /* Mark another user of the frame. */ Record Stream APIS: 录制到文件OniStatus oniCreateRecorder(const char* fileName, OniRecorderHandle* pRecorder); OniStatus oniRecorderAttachStream( OniRecorderHandle

15、recorder, OniStreamHandle stream, OniBool allowLossyCompression); OniStatus oniRecorderStart(OniRecorderHandle recorder); 坐标转换 OniStatus oniCoordinateConverterDepthToWorld(OniStreamHandle depthStream, float depthX, float depthY, float depthZ, float* pWorldX, float* pWorldY, float* pWorldZ); OniStatu

16、s oniCoordinateConverterWorldToDepth(OniStreamHandle depthStream, float worldX, float worldY, float worldZ, float* pDepthX, float* pDepthY, float* pDepthZ); OniStatus oniCoordinateConverterDepthToColor(OniStreamHandle depthStream, OniStreamHandle colorStream, int depthX, int depthY, OniDepthPixel depthZ, int* pColorX, int* pColorY);OpenNI C+ interfaces class VideoMode : pr

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 建筑/环境 > 工程造价

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号