OniCAPI.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002 *                                                                            *
00003 *  OpenNI 2.x Alpha                                                          *
00004 *  Copyright (C) 2012 PrimeSense Ltd.                                        *
00005 *                                                                            *
00006 *  This file is part of OpenNI.                                              *
00007 *                                                                            *
00008 *  Licensed under the Apache License, Version 2.0 (the "License");           *
00009 *  you may not use this file except in compliance with the License.          *
00010 *  You may obtain a copy of the License at                                   *
00011 *                                                                            *
00012 *      http://www.apache.org/licenses/LICENSE-2.0                            *
00013 *                                                                            *
00014 *  Unless required by applicable law or agreed to in writing, software       *
00015 *  distributed under the License is distributed on an "AS IS" BASIS,         *
00016 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  *
00017 *  See the License for the specific language governing permissions and       *
00018 *  limitations under the License.                                            *
00019 *                                                                            *
00020 *****************************************************************************/
00021 #ifndef ONICAPI_H
00022 #define ONICAPI_H
00023 
00024 #include "OniPlatform.h"
00025 #include "OniCTypes.h"
00026 #include "OniCProperties.h"
00027 #include "OniVersion.h"
00028 
00029 /******************************************** General APIs */
00030 
00032 ONI_C_API OniStatus oniInitialize(int apiVersion);
00034 ONI_C_API void oniShutdown();
00035 
00041 ONI_C_API OniStatus oniGetDeviceList(OniDeviceInfo** pDevices, int* pNumDevices);
00043 ONI_C_API OniStatus oniReleaseDeviceList(OniDeviceInfo* pDevices);
00044 
00045 ONI_C_API OniStatus oniRegisterDeviceCallbacks(OniDeviceCallbacks* pCallbacks, void* pCookie, OniCallbackHandle* pHandle);
00046 ONI_C_API void oniUnregisterDeviceCallbacks(OniCallbackHandle handle);
00047 
00049 ONI_C_API OniStatus oniWaitForAnyStream(OniStreamHandle* pStreams, int numStreams, int* pStreamIndex, int timeout);
00050 
00052 ONI_C_API OniVersion oniGetVersion();
00053 
00055 ONI_C_API int oniFormatBytesPerPixel(OniPixelFormat format);
00056 
00058 ONI_C_API const char* oniGetExtendedError();
00059 
00060 /******************************************** Device APIs */
00061 
00063 ONI_C_API OniStatus oniDeviceOpen(const char* uri, OniDeviceHandle* pDevice);
00065 ONI_C_API OniStatus oniDeviceClose(OniDeviceHandle device);
00066 
00068 ONI_C_API const OniSensorInfo* oniDeviceGetSensorInfo(OniDeviceHandle device, OniSensorType sensorType);
00069 
00071 ONI_C_API OniStatus oniDeviceGetInfo(OniDeviceHandle device, OniDeviceInfo* pInfo);
00072 
00074 ONI_C_API OniStatus oniDeviceCreateStream(OniDeviceHandle device, OniSensorType sensorType, OniStreamHandle* pStream);
00075 
00076 ONI_C_API OniStatus oniDeviceEnableDepthColorSync(OniDeviceHandle device);
00077 ONI_C_API void oniDeviceDisableDepthColorSync(OniDeviceHandle device);
00078 ONI_C_API OniBool oniDeviceGetDepthColorSyncEnabled(OniDeviceHandle device);
00079 
00081 ONI_C_API OniStatus oniDeviceSetProperty(OniDeviceHandle device, int propertyId, const void* data, int dataSize);
00083 ONI_C_API OniStatus oniDeviceGetProperty(OniDeviceHandle device, int propertyId, void* data, int* pDataSize);
00085 ONI_C_API OniBool oniDeviceIsPropertySupported(OniDeviceHandle device, int propertyId);
00087 ONI_C_API OniStatus oniDeviceInvoke(OniDeviceHandle device, int commandId, void* data, int dataSize);
00089 ONI_C_API OniBool oniDeviceIsCommandSupported(OniDeviceHandle device, int commandId);
00090 
00091 ONI_C_API OniBool oniDeviceIsImageRegistrationModeSupported(OniDeviceHandle device, OniImageRegistrationMode mode);
00092 
00094 ONI_C_API OniStatus oniDeviceOpenEx(const char* uri, const char* mode, OniDeviceHandle* pDevice);
00095 
00096 /******************************************** Stream APIs */
00097 
00099 ONI_C_API void oniStreamDestroy(OniStreamHandle stream);
00100 
00102 ONI_C_API const OniSensorInfo* oniStreamGetSensorInfo(OniStreamHandle stream);
00103 
00105 ONI_C_API OniStatus oniStreamStart(OniStreamHandle stream);
00107 ONI_C_API void oniStreamStop(OniStreamHandle stream);
00108 
00110 ONI_C_API OniStatus oniStreamReadFrame(OniStreamHandle stream, OniFrame** pFrame);
00111 
00113 ONI_C_API OniStatus oniStreamRegisterNewFrameCallback(OniStreamHandle stream, OniNewFrameCallback handler, void* pCookie, OniCallbackHandle* pHandle);
00115 ONI_C_API void oniStreamUnregisterNewFrameCallback(OniStreamHandle stream, OniCallbackHandle handle);
00116 
00118 ONI_C_API OniStatus oniStreamSetProperty(OniStreamHandle stream, int propertyId, const void* data, int dataSize);
00120 ONI_C_API OniStatus oniStreamGetProperty(OniStreamHandle stream, int propertyId, void* data, int* pDataSize);
00122 ONI_C_API OniBool oniStreamIsPropertySupported(OniStreamHandle stream, int propertyId);
00124 ONI_C_API OniStatus oniStreamInvoke(OniStreamHandle stream, int commandId, void* data, int dataSize);
00126 ONI_C_API OniBool oniStreamIsCommandSupported(OniStreamHandle stream, int commandId);
00128 ONI_C_API OniStatus oniStreamSetFrameBuffersAllocator(OniStreamHandle stream, OniFrameAllocBufferCallback alloc, OniFrameFreeBufferCallback free, void* pCookie);
00129 
00131 
00132 ONI_C_API void oniFrameAddRef(OniFrame* pFrame);
00134 ONI_C_API void oniFrameRelease(OniFrame* pFrame);
00135 
00136 /*add by xlj*/
00137 ONI_C_API void oniStreamfilter(OniStreamHandle stream, void* buf, int newVal, int maxSpeckleSize, int maxDiff);
00138 
00139 // ONI_C_API OniStatus oniConvertRealWorldToProjective(OniStreamHandle stream, OniFloatPoint3D* pRealWorldPoint, OniFloatPoint3D* pProjectivePoint);
00140 // ONI_C_API OniStatus oniConvertProjectiveToRealWorld(OniStreamHandle stream, OniFloatPoint3D* pProjectivePoint, OniFloatPoint3D* pRealWorldPoint);
00141 
00149 ONI_C_API OniStatus oniCreateRecorder(const char* fileName, OniRecorderHandle* pRecorder);
00150 
00161 ONI_C_API OniStatus oniRecorderAttachStream(
00162         OniRecorderHandle   recorder, 
00163         OniStreamHandle     stream, 
00164         OniBool             allowLossyCompression);
00165 
00173 ONI_C_API OniStatus oniRecorderStart(OniRecorderHandle recorder);
00174 
00181 ONI_C_API void oniRecorderStop(OniRecorderHandle recorder);
00182 
00190 ONI_C_API OniStatus oniRecorderDestroy(OniRecorderHandle* pRecorder);
00191 
00192 ONI_C_API OniStatus oniCoordinateConverterDepthToWorld(OniStreamHandle depthStream, float depthX, float depthY, float depthZ, float* pWorldX, float* pWorldY, float* pWorldZ);
00193 
00194 ONI_C_API OniStatus oniCoordinateConverterWorldToDepth(OniStreamHandle depthStream, float worldX, float worldY, float worldZ, float* pDepthX, float* pDepthY, float* pDepthZ);
00195 
00196 ONI_C_API OniStatus oniCoordinateConverterDepthToColor(OniStreamHandle depthStream, OniStreamHandle colorStream, int depthX, int depthY, OniDepthPixel depthZ, int* pColorX, int* pColorY);
00197 
00198 ONI_C_API OniStatus oniCoordinateConverterC2D(OniStreamHandle depthStream,  int colorX, int colorY, OniDepthPixel depthZ, int* pDepthX, int* pDepthY);
00199 ONI_C_API OniStatus oniCoordinateConverterD2C(OniStreamHandle depthStream,  int colorX, int colorY, OniDepthPixel depthZ, int* pDepthX, int* pDepthY);
00200 /******************************************** Log APIs */
00201 
00210 ONI_C_API OniStatus oniSetLogOutputFolder(const char* strOutputFolder);
00211 
00221 ONI_C_API OniStatus oniGetLogFileName(char* strFileName, int nBufferSize);
00222 
00231 ONI_C_API OniStatus oniSetLogMinSeverity(int nMinSeverity);
00232 
00241 ONI_C_API OniStatus oniSetLogConsoleOutput(OniBool bConsoleOutput);
00242 
00251 ONI_C_API OniStatus oniSetLogFileOutput(OniBool bFileOutput);
00252 
00253 #if ONI_PLATFORM == ONI_PLATFORM_ANDROID_ARM
00254 
00262 ONI_C_API OniStatus oniSetLogAndroidOutput(OniBool bAndroidOutput);
00263 #endif
00264 #endif // ONICAPI_H


astra_camera
Author(s): Tim Liu
autogenerated on Wed Jul 10 2019 03:18:54