Go to the source code of this file.
ONI_C_API OniStatus oniCoordinateConverterDepthToColor | ( | OniStreamHandle | depthStream, |
OniStreamHandle | colorStream, | ||
int | depthX, | ||
int | depthY, | ||
OniDepthPixel | depthZ, | ||
int * | pColorX, | ||
int * | pColorY | ||
) |
ONI_C_API OniStatus oniCoordinateConverterDepthToWorld | ( | OniStreamHandle | depthStream, |
float | depthX, | ||
float | depthY, | ||
float | depthZ, | ||
float * | pWorldX, | ||
float * | pWorldY, | ||
float * | pWorldZ | ||
) |
ONI_C_API OniStatus oniCoordinateConverterWorldToDepth | ( | OniStreamHandle | depthStream, |
float | worldX, | ||
float | worldY, | ||
float | worldZ, | ||
float * | pDepthX, | ||
float * | pDepthY, | ||
float * | pDepthZ | ||
) |
ONI_C_API OniStatus oniCreateRecorder | ( | const char * | fileName, |
OniRecorderHandle * | pRecorder | ||
) |
Creates a recorder that records to a file.
[in] | fileName | The name of the file that will contain the recording. |
[out] | pRecorder | Points to the handle to the newly created recorder. |
ONI_STATUS_OK | Upon successful completion. |
ONI_STATUS_ERROR | Upon any kind of failure. |
ONI_C_API OniStatus oniDeviceClose | ( | OniDeviceHandle | device | ) |
Close a device
ONI_C_API OniStatus oniDeviceCreateStream | ( | OniDeviceHandle | device, |
OniSensorType | sensorType, | ||
OniStreamHandle * | pStream | ||
) |
Create a new stream in the device. The stream will originate from the source.
ONI_C_API void oniDeviceDisableDepthColorSync | ( | OniDeviceHandle | device | ) |
ONI_C_API OniStatus oniDeviceEnableDepthColorSync | ( | OniDeviceHandle | device | ) |
ONI_C_API OniBool oniDeviceGetDepthColorSyncEnabled | ( | OniDeviceHandle | device | ) |
ONI_C_API OniStatus oniDeviceGetInfo | ( | OniDeviceHandle | device, |
OniDeviceInfo * | pInfo | ||
) |
Get the OniDeviceInfo of a certain device.
ONI_C_API OniStatus oniDeviceGetProperty | ( | OniDeviceHandle | device, |
int | propertyId, | ||
void * | data, | ||
int * | pDataSize | ||
) |
Get property in the device. Use the properties listed in OniTypes.h: ONI_DEVICE_PROPERTY_..., or specific ones supplied by the device.
ONI_C_API const OniSensorInfo* oniDeviceGetSensorInfo | ( | OniDeviceHandle | device, |
OniSensorType | sensorType | ||
) |
Get the possible configurations available for a specific source, or NULL if the source does not exist.
ONI_C_API OniStatus oniDeviceInvoke | ( | OniDeviceHandle | device, |
int | commandId, | ||
void * | data, | ||
int | dataSize | ||
) |
Invoke an internal functionality of the device.
ONI_C_API OniBool oniDeviceIsCommandSupported | ( | OniDeviceHandle | device, |
int | commandId | ||
) |
Check if a command is supported, for invoke
ONI_C_API OniBool oniDeviceIsImageRegistrationModeSupported | ( | OniDeviceHandle | device, |
OniImageRegistrationMode | mode | ||
) |
ONI_C_API OniBool oniDeviceIsPropertySupported | ( | OniDeviceHandle | device, |
int | propertyId | ||
) |
Check if the property is supported by the device. Use the properties listed in OniTypes.h: ONI_DEVICE_PROPERTY_..., or specific ones supplied by the device.
ONI_C_API OniStatus oniDeviceOpen | ( | const char * | uri, |
OniDeviceHandle * | pDevice | ||
) |
Open a device. Uri can be taken from the matching OniDeviceInfo.
ONI_C_API OniStatus oniDeviceOpenEx | ( | const char * | uri, |
const char * | mode, | ||
OniDeviceHandle * | pDevice | ||
) |
ONI_C_API OniStatus oniDeviceSetProperty | ( | OniDeviceHandle | device, |
int | propertyId, | ||
const void * | data, | ||
int | dataSize | ||
) |
Set property in the device. Use the properties listed in OniTypes.h: ONI_DEVICE_PROPERTY_..., or specific ones supplied by the device.
ONI_C_API int oniFormatBytesPerPixel | ( | OniPixelFormat | format | ) |
Translate from format to number of bytes per pixel. Will return 0 for formats in which the number of bytes per pixel isn't fixed.
ONI_C_API OniStatus oniGetDeviceList | ( | OniDeviceInfo ** | pDevices, |
int * | pNumDevices | ||
) |
Get the list of currently connected device. Each device is represented by its OniDeviceInfo. pDevices will be allocated inside.
ONI_C_API const char* oniGetExtendedError | ( | ) |
Get internal error
Get the current log file name
char | * strFileName [out] hold the returned file name |
int | nBufferSize [in] size of strFileName |
ONI_STATUS_OK | Upon successful completion. |
ONI_STATUS_ERROR | Upon any kind of failure. |
ONI_C_API OniVersion oniGetVersion | ( | ) |
Get the current version of OpenNI2
Initialize OpenNI2. Use ONI_API_VERSION as the version.
ONI_C_API OniStatus oniRecorderAttachStream | ( | OniRecorderHandle | recorder, |
OniStreamHandle | stream, | ||
OniBool | allowLossyCompression | ||
) |
Attaches a stream to a recorder. The amount of attached streams is virtually infinite. You cannot attach a stream after you have started a recording, if you do: an error will be returned by oniRecorderAttachStream.
[in] | recorder | The handle to the recorder. |
[in] | stream | The handle to the stream. |
[in] | allowLossyCompression | Allows/denies lossy compression |
ONI_STATUS_OK | Upon successful completion. |
ONI_STATUS_ERROR | Upon any kind of failure. |
ONI_C_API OniStatus oniRecorderDestroy | ( | OniRecorderHandle * | pRecorder | ) |
Stops recording if needed, and destroys a recorder.
[in,out] | recorder | The handle to the recorder, the handle will be invalidated (nullified) when the function returns. |
ONI_STATUS_OK | Upon successful completion. |
ONI_STATUS_ERROR | Upon any kind of failure. |
ONI_C_API OniStatus oniRecorderStart | ( | OniRecorderHandle | recorder | ) |
Starts recording. There must be at least one stream attached to the recorder, if not: oniRecorderStart will return an error.
[in] | recorder | The handle to the recorder. |
ONI_STATUS_OK | Upon successful completion. |
ONI_STATUS_ERROR | Upon any kind of failure. |
ONI_C_API void oniRecorderStop | ( | OniRecorderHandle | recorder | ) |
Stops recording. You can resume recording via oniRecorderStart.
[in] | recorder | The handle to the recorder. |
ONI_STATUS_OK | Upon successful completion. |
ONI_STATUS_ERROR | Upon any kind of failure. |
ONI_C_API OniStatus oniRegisterDeviceCallbacks | ( | OniDeviceCallbacks * | pCallbacks, |
void * | pCookie, | ||
OniCallbackHandle * | pHandle | ||
) |
ONI_C_API OniStatus oniReleaseDeviceList | ( | OniDeviceInfo * | pDevices | ) |
Release previously allocated device list
Configures if log entries will be printed to console.
OniBool | bConsoleOutput [in] TRUE to print log entries to console, FALSE otherwise. |
ONI_STATUS_OK | Upon successful completion. |
ONI_STATUS_ERROR | Upon any kind of failure. |
Configures if log entries will be printed to a log file.
OniBool | bFileOutput [in] TRUE to print log entries to the file, FALSE otherwise. |
ONI_STATUS_OK | Upon successful completion. |
ONI_STATUS_ERROR | Upon any kind of failure. |
Set the Minimum severity for log produce
const | char * strMask [in] Name of the logger |
ONI_STATUS_OK | Upon successful completion. |
ONI_STATUS_ERROR | Upon any kind of failure. |
Change the log output folder
const | char * strOutputFolder [in] path to the desirebale folder |
ONI_STATUS_OK | Upon successful completion. |
ONI_STATUS_ERROR | Upon any kind of failure. |
ONI_C_API void oniShutdown | ( | ) |
Shutdown OpenNI2
ONI_C_API void oniStreamDestroy | ( | OniStreamHandle | stream | ) |
Destroy an existing stream
ONI_C_API OniStatus oniStreamGetProperty | ( | OniStreamHandle | stream, |
int | propertyId, | ||
void * | data, | ||
int * | pDataSize | ||
) |
Get property in the stream. Use the properties listed in OniTypes.h: ONI_STREAM_PROPERTY_..., or specific ones supplied by the device for its streams.
ONI_C_API const OniSensorInfo* oniStreamGetSensorInfo | ( | OniStreamHandle | stream | ) |
Get the OniSensorInfo of the certain stream.
ONI_C_API OniStatus oniStreamInvoke | ( | OniStreamHandle | stream, |
int | commandId, | ||
void * | data, | ||
int | dataSize | ||
) |
Invoke an internal functionality of the stream.
ONI_C_API OniBool oniStreamIsCommandSupported | ( | OniStreamHandle | stream, |
int | commandId | ||
) |
Check if a command is supported, for invoke
ONI_C_API OniBool oniStreamIsPropertySupported | ( | OniStreamHandle | stream, |
int | propertyId | ||
) |
Check if the property is supported the stream. Use the properties listed in OniTypes.h: ONI_STREAM_PROPERTY_..., or specific ones supplied by the device for its streams.
ONI_C_API OniStatus oniStreamReadFrame | ( | OniStreamHandle | stream, |
OniFrame ** | pFrame | ||
) |
Get the next frame from the stream. This function is blocking until there is a new frame from the stream. For timeout, use oniWaitForStreams() first
ONI_C_API OniStatus oniStreamRegisterNewFrameCallback | ( | OniStreamHandle | stream, |
OniNewFrameCallback | handler, | ||
void * | pCookie, | ||
OniCallbackHandle * | pHandle | ||
) |
Register a callback to when the stream has a new frame.
ONI_C_API OniStatus oniStreamSetFrameBuffersAllocator | ( | OniStreamHandle | stream, |
OniFrameAllocBufferCallback | alloc, | ||
OniFrameFreeBufferCallback | free, | ||
void * | pCookie | ||
) |
Sets the stream buffer allocation functions. Note that this function may only be called while stream is not started.
ONI_C_API OniStatus oniStreamSetProperty | ( | OniStreamHandle | stream, |
int | propertyId, | ||
const void * | data, | ||
int | dataSize | ||
) |
Set property in the stream. Use the properties listed in OniTypes.h: ONI_STREAM_PROPERTY_..., or specific ones supplied by the device for its streams.
ONI_C_API OniStatus oniStreamStart | ( | OniStreamHandle | stream | ) |
Start generating data from the stream.
ONI_C_API void oniStreamStop | ( | OniStreamHandle | stream | ) |
Stop generating data from the stream.
ONI_C_API void oniStreamUnregisterNewFrameCallback | ( | OniStreamHandle | stream, |
OniCallbackHandle | handle | ||
) |
Unregister a previously registered callback to when the stream has a new frame.
ONI_C_API void oniUnregisterDeviceCallbacks | ( | OniCallbackHandle | handle | ) |
ONI_C_API OniStatus oniWaitForAnyStream | ( | OniStreamHandle * | pStreams, |
int | numStreams, | ||
int * | pStreamIndex, | ||
int | timeout | ||
) |
Wait for any of the streams to have a new frame