OpenNI 1.5.4: xn::DepthMetaData Class Reference

From OpenNI

#include <XnCppWrapper.h>

Inheritance diagram for xn::DepthMetaData:

List of all members.

Public Member Functions

 DepthMetaData ()
void InitFrom (const DepthMetaData &other)
XnStatus InitFrom (const DepthMetaData &other, XnUInt32 nXRes, XnUInt32 nYRes, const XnDepthPixel *pExternalBuffer)
XnStatus CopyFrom (const DepthMetaData &other)
XnStatus ReAdjust (XnUInt32 nXRes, XnUInt32 nYRes, const XnDepthPixel *pExternalBuffer=NULL)
XnDepthPixel ZRes () const
XnDepthPixel & ZRes ()
const XnDepthPixel * Data () const
const XnDepthPixel *& Data ()
XnDepthPixel * WritableData ()
const xn::DepthMap & DepthMap () const
xn::DepthMap & WritableDepthMap ()
const XnDepthPixel & operator[] (XnUInt32 nIndex) const
const XnDepthPixel & operator() (XnUInt32 x, XnUInt32 y) const
const XnDepthMetaData * GetUnderlying () const
XnDepthMetaData * GetUnderlying ()

Detailed Description

For saving the frame object (data and configuration) from the DepthGenerator node. This frame object" is a snapshot of the DepthGenerator's generated depth map and its associated configuration information at a certain point in time. This saved frame object provides fast and easy access to the DepthGenerator node's data and configuration information.

It is important to get a good understanding of the purpose and design of the OpenNI metadata objects. For a comprehensive overview of OpenNI metadata objects, see Frame Objects and Metadata Objects.

The DepthGenerator node generates depth data of the FOV. This is the Z-coordinate of the X-Y-Z coordinate of each point. The Z-axis is the distance, in millimeters from the sensor plane. A smaller depth value indicates a scene point that is a closer to the sensor, and a larger depth value indicates a scene point that is further away from the sensor. A zero depth value indicates that the DepthGenerator node did not succeed in obtaining a valid depth reading.

DepthMetaData's xn::DepthMetaData::Data() method provides the actual depth data. This method returns the pointer to the first depth pixel in the map.

The pixel format of depth map is XnDepthPixel, i.e. 16-bit values.

DepthMetaData provides the ZRes property to contain the depth resolution. This is the maximum value of a pixel (plus one).

DepthMetaData is similar to ImageMetaData; they are both metadata for a type of map.


Constructor & Destructor Documentation

xn::DepthMetaData::DepthMetaData ( ) [inline]

Ctor.


Member Function Documentation

XnStatus xn::DepthMetaData::CopyFrom ( const DepthMetaData &  other) [inline]

Performs a deep-copy of another metadata object (including duplication of the data buffer).

Parameters:
[in]othersource object
const XnDepthPixel* xn::DepthMetaData::Data ( ) const [inline]

Returns the depth map.

Remarks

This method returns a pointer to the first depth pixel in the map. The depth map is implemented as a row-major order compact layout of pixels in the map.

The pixel format of the map is XnDepthPixel, i.e. 16-bit integer values.

This method is reimplemented from the xn::OutputMetaData class.

Reimplemented from xn::OutputMetaData.

const XnDepthPixel*& xn::DepthMetaData::Data ( ) [inline]

Returns the depth map.

Remarks

This method returns a pointer to the first depth pixel in the map. The depth map is implemented as a row-major order compact layout of pixels in the map.

The pixel format of the map is XnDepthPixel, i.e. 16-bit integer values.

This method is reimplemented from the xn::OutputMetaData class.

Reimplemented from xn::OutputMetaData.

const xn::DepthMap& xn::DepthMetaData::DepthMap ( ) const [inline]

Gets a light object wrapping the depth map

const XnDepthMetaData* xn::DepthMetaData::GetUnderlying ( ) const [inline]

Gets the C object that is wrapped by this object.

Reimplemented from xn::MapMetaData.

XnDepthMetaData* xn::DepthMetaData::GetUnderlying ( ) [inline]

Gets the C object that is wrapped by this object.

Reimplemented from xn::MapMetaData.

void xn::DepthMetaData::InitFrom ( const DepthMetaData &  other) [inline]

Shallow-Copies a DepthMetaData object.

Parameters:
[in]othersource object.
Remarks:
Note that the data buffer is not copied, and that both object will point to the same buffer.
XnStatus xn::DepthMetaData::InitFrom ( const DepthMetaData &  other,
XnUInt32  nXRes,
XnUInt32  nYRes,
const XnDepthPixel *  pExternalBuffer 
) [inline]

Shallow copies another DepthMetaData object, and then readjusts it".

Parameters:
[in]otherSource object
[in]nXResRequested number of columns in the map
[in]nYResRequested number of rows in the map
[in]pExternalBufferOptional. An external buffer matching requested resolution. If NULL, A buffer will be allocated.
const XnDepthPixel& xn::DepthMetaData::operator() ( XnUInt32  x,
XnUInt32  y 
) const [inline]

Gets the value of a single pixel of the frame map by its X and Y coordinates.

Parameters:
[in]xX-coordinate of the pixel in the map
[in]yY-coordinate of the pixel in the map
const XnDepthPixel& xn::DepthMetaData::operator[] ( XnUInt32  nIndex) const [inline]

Gets the value of a single pixel of the frame map by its index in the array.

Parameters:
[in]nIndexThe index of the pixel in the buffer.
XnStatus xn::DepthMetaData::ReAdjust ( XnUInt32  nXRes,
XnUInt32  nYRes,
const XnDepthPixel *  pExternalBuffer = NULL 
) [inline]

Changes dimensions of the pixel-map.

Parameters:
[in]nXResNumber of columns in the map
[in]nYResNumber of rows in the map
[in]pExternalBufferOptional. An external buffer to be used. If NULL is passed, a buffer will be allocated.
XnDepthPixel* xn::DepthMetaData::WritableData ( ) [inline]

Gets a pointer to the writable buffer (see Frame Objects and Metadata Objects).

Reimplemented from xn::OutputMetaData.

xn::DepthMap& xn::DepthMetaData::WritableDepthMap ( ) [inline]

Gets a light object wrapping the writable depth map

XnDepthPixel xn::DepthMetaData::ZRes ( ) const [inline]

Gets the maximum depth (depth resolution) that the DepthGenerator node can produce. This is the same as the resolution of the depth axis (i.e., DepthGenerator::GetDeviceMaxDepth() + 1).

XnDepthPixel& xn::DepthMetaData::ZRes ( ) [inline]

Gets the maximum depth (depth resolution) that the DepthGenerator node can produce. This is the same as the resolution of the depth axis (i.e., DepthGenerator::GetDeviceMaxDepth() + 1).


The documentation for this class was generated from the following file:
Generated on Wed May 16 2012 10:16:06 for OpenNI 1.5.4 by   doxygen 1.7.5.1