Public Member Functions

xn::ImageMetaData Class Reference
[Meta-Data Objects (Frame Objects)]

#include <XnCppWrapper.h>

Inheritance diagram for xn::ImageMetaData:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ImageMetaData ()
void InitFrom (const ImageMetaData &other)
XnStatus InitFrom (const ImageMetaData &other, XnUInt32 nXRes, XnUInt32 nYRes, XnPixelFormat format, const XnUInt8 *pExternalBuffer)
XnStatus AllocateData (XnUInt32 nXRes, XnUInt32 nYRes, XnPixelFormat format)
XnStatus CopyFrom (const ImageMetaData &other)
XnStatus ReAdjust (XnUInt32 nXRes, XnUInt32 nYRes, XnPixelFormat format, const XnUInt8 *pExternalBuffer=NULL)
XnPixelFormat PixelFormat () const
XnPixelFormatPixelFormat ()
XnUInt8 * WritableData ()
const XnRGB24PixelRGB24Data () const
const XnRGB24Pixel *& RGB24Data ()
XnRGB24PixelWritableRGB24Data ()
const XnYUV422DoublePixelYUV422Data () const
const XnYUV422DoublePixel *& YUV422Data ()
XnYUV422DoublePixelWritableYUV422Data ()
const XnGrayscale8PixelGrayscale8Data () const
const XnGrayscale8Pixel *& Grayscale8Data ()
XnGrayscale8PixelWritableGrayscale8Data ()
const XnGrayscale16PixelGrayscale16Data () const
const XnGrayscale16Pixel *& Grayscale16Data ()
XnGrayscale16PixelWritableGrayscale16Data ()
const xn::ImageMapImageMap () const
xn::ImageMapWritableImageMap ()
const xn::RGB24MapRGB24Map () const
xn::RGB24MapWritableRGB24Map ()
const xn::Grayscale8MapGrayscale8Map () const
xn::Grayscale8MapWritableGrayscale8Map ()
const xn::Grayscale16MapGrayscale16Map () const
xn::Grayscale16MapWritableGrayscale16Map ()
const XnImageMetaDataGetUnderlying () const
XnImageMetaDataGetUnderlying ()

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 ImageMetaData object provides a number of different methods to get the image as a different format. You must use the 'Get Data' method most appropriate for the data format of the latest available frame. For example, if you requested the ImageGenerator node to generate RGB24 format you must use the RGB24Data() method to get the data.

Each of the 'Get Data' methods gets the image as a pointer to the first pixel in the image map. From the address of that first pixel you can access all the pixels.

Depending on the format, the pixels are different in size. This means that image maps are a different size.


Constructor & Destructor Documentation

xn::ImageMetaData::ImageMetaData (  )  [inline]

Member Function Documentation

XnStatus xn::ImageMetaData::AllocateData ( XnUInt32  nXRes,
XnUInt32  nYRes,
XnPixelFormat  format 
) [inline]

Allocates a writable buffer. If a previous buffer was allocated it will be freed (or reused if possible).

Parameters:
[in] nXRes Requested number of columns in the map
[in] nYRes Requested number of rows in the map
[in] format Requested pixel format
XnStatus xn::ImageMetaData::CopyFrom ( const ImageMetaData other  )  [inline]

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

Parameters:
[in] other source object
const XnImageMetaData* xn::ImageMetaData::GetUnderlying (  )  const [inline]

Gets the C object that is wrapped by this object.

Reimplemented from xn::MapMetaData.

XnImageMetaData* xn::ImageMetaData::GetUnderlying (  )  [inline]

Gets the C object that is wrapped by this object.

Reimplemented from xn::MapMetaData.

const XnGrayscale16Pixel* xn::ImageMetaData::Grayscale16Data (  )  const [inline]

Gets a pointer to the first pixel of the image in Grayscale16 format. Grayscale16 represents each pixel as a 16-bit (2-byte) gray scale.

const XnGrayscale16Pixel*& xn::ImageMetaData::Grayscale16Data (  )  [inline]

Gets a pointer to the first pixel of the image in Grayscale16 format. Grayscale16 represents each pixel as a 16-bit (2-byte) gray scale.

const xn::Grayscale16Map& xn::ImageMetaData::Grayscale16Map (  )  const [inline]

Gets a light wrapper object wrapping the frame's image map as Grayscale16 format.

const XnGrayscale8Pixel*& xn::ImageMetaData::Grayscale8Data (  )  [inline]

Gets a pointer to the first pixel of the image in Grayscale8 format. Grayscale8 represents each pixel as an 8-bit (1-byte) gray scale.

const XnGrayscale8Pixel* xn::ImageMetaData::Grayscale8Data (  )  const [inline]

Gets a pointer to the first pixel of the image in Grayscale8 format. Grayscale8 represents each pixel as an 8-bit (1 byte) gray scale.

const xn::Grayscale8Map& xn::ImageMetaData::Grayscale8Map (  )  const [inline]

Gets a light wrapper object wrapping the image map as Grayscale8 format.

const xn::ImageMap& xn::ImageMetaData::ImageMap (  )  const [inline]

Gets a light object wrapping the image map.

XnStatus xn::ImageMetaData::InitFrom ( const ImageMetaData other,
XnUInt32  nXRes,
XnUInt32  nYRes,
XnPixelFormat  format,
const XnUInt8 *  pExternalBuffer 
) [inline]

Shallow copies another ImageMetaData object, and then readjusts it.

Parameters:
[in] other Source object
[in] nXRes Requested number of columns in the map
[in] nYRes Requested number of rows in the map
[in] format Requested pixel format
[in] pExternalBuffer Optional. An external buffer matching requested resolution. If NULL, A buffer will be allocated.
void xn::ImageMetaData::InitFrom ( const ImageMetaData other  )  [inline]

Shallow-copies an ImageMetaData object.

Parameters:
[in] other source object.
Remarks:
Note that the data buffer is not copied, and that both object will point to the same buffer.
XnPixelFormat& xn::ImageMetaData::PixelFormat (  )  [inline]

Gets the frame's pixel color format used in this image map. This is the format of the frame object saved in this object.

Remarks

Knowing the pixel format of the image map helps you to enumerate over the map and process its data.

XnPixelFormat xn::ImageMetaData::PixelFormat (  )  const [inline]

Gets the frame's pixel color format used in this image map. This is the format of the frame object saved in this object.

Remarks

Knowing the pixel format of the image map helps you to enumerate over the map and process its data.

Reimplemented from xn::MapMetaData.

Reimplemented from xn::MapMetaData.

XnStatus xn::ImageMetaData::ReAdjust ( XnUInt32  nXRes,
XnUInt32  nYRes,
XnPixelFormat  format,
const XnUInt8 *  pExternalBuffer = NULL 
) [inline]
Parameters:
[in] nXRes Requested number of columns in the map
[in] nYRes Requested number of rows in the map
[in] format Requested pixel format
[in] pExternalBuffer Optional. An external buffer to be used. If NULL is passed, a buffer will be allocated.
const XnRGB24Pixel* xn::ImageMetaData::RGB24Data (  )  const [inline]

Gets a pointer to the first pixel of the image in RGB24 format. RGB24 format represents each pixel as one byte for red, one byte for green, and one byte for blue.

const XnRGB24Pixel*& xn::ImageMetaData::RGB24Data (  )  [inline]

Gets a pointer to the first pixel of the image in RGB24 format. RGB24 format represents each pixel as one byte for red, one byte for green, and one byte for blue.

const xn::RGB24Map& xn::ImageMetaData::RGB24Map (  )  const [inline]

Gets a light wrapper object for wrapping the image map as RGB24 format. RGB24 format represents each pixel as one byte for red, one byte for green, and one byte for blue.

XnUInt8* xn::ImageMetaData::WritableData (  )  [inline]

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

Reimplemented from xn::OutputMetaData.

XnGrayscale16Pixel* xn::ImageMetaData::WritableGrayscale16Data (  )  [inline]

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

xn::Grayscale16Map& xn::ImageMetaData::WritableGrayscale16Map (  )  [inline]

Gets a light object wrapping the writable image-map

XnGrayscale8Pixel* xn::ImageMetaData::WritableGrayscale8Data (  )  [inline]

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

xn::Grayscale8Map& xn::ImageMetaData::WritableGrayscale8Map (  )  [inline]

Gets a light object wrapping the writable image-map

xn::ImageMap& xn::ImageMetaData::WritableImageMap (  )  [inline]

Gets a light object wrapping the writable image-map

XnRGB24Pixel* xn::ImageMetaData::WritableRGB24Data (  )  [inline]

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

xn::RGB24Map& xn::ImageMetaData::WritableRGB24Map (  )  [inline]

Gets a light object wrapping the writable image-map

XnYUV422DoublePixel* xn::ImageMetaData::WritableYUV422Data (  )  [inline]

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

const XnYUV422DoublePixel*& xn::ImageMetaData::YUV422Data (  )  [inline]

Gets a pointer to the first pixel of the image in YUV422 format. YUV422 is a type of compression with a single Y byte followed by a U byte, then another Y byte and then a V byte: YUY'V. These four values represent two pixels: YUV and Y'UV.

const XnYUV422DoublePixel* xn::ImageMetaData::YUV422Data (  )  const [inline]

Gets a pointer to the first pixel of the image in YUV422 format. YUV422 is a type of compression with a single Y byte followed by a U byte, then another Y byte and then a V byte: YUY'V. These four values represent two pixels: YUV and Y'UV.


The documentation for this class was generated from the following file: