OpenNI 1.5.4

#include <XnCppWrapper.h>

Inheritance diagram for xn::ImageMetaData:

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 ()
 

Additional Inherited Members

Detailed Description

For saving the frame object (data and configuration) from the DepthGenerator node. This frameobject" is a snapshot of the DepthGenerator's generated depth map and its associated configuration information at a certain point in time. This saved @ref glos_frame_object "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

◆ ImageMetaData()

xn::ImageMetaData::ImageMetaData ( )
inline

Member Function Documentation

◆ AllocateData()

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]nXResRequested number of columns in the map
[in]nYResRequested number of rows in the map
[in]formatRequested pixel format

◆ CopyFrom()

XnStatus xn::ImageMetaData::CopyFrom ( const ImageMetaData other)
inline

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

Parameters
[in]othersource object

◆ GetUnderlying() [1/2]

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

Gets the C object that is wrapped by this object.

◆ GetUnderlying() [2/2]

const XnImageMetaData * xn::ImageMetaData::GetUnderlying ( ) const
inline

Gets the C object that is wrapped by this object.

◆ Grayscale16Data() [1/2]

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.

◆ Grayscale16Data() [2/2]

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.

◆ Grayscale16Map()

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

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

◆ Grayscale8Data() [1/2]

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.

◆ Grayscale8Data() [2/2]

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.

◆ Grayscale8Map()

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

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

◆ ImageMap()

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

Gets a light object wrapping the image map.

◆ InitFrom() [1/2]

void xn::ImageMetaData::InitFrom ( const ImageMetaData other)
inline

Shallow-copies an ImageMetaData object.

Parameters
[in]othersource object.
Remarks
Note that the data buffer is not copied, and that both object will point to the same buffer.

◆ InitFrom() [2/2]

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]otherSource object
[in]nXResRequested number of columns in the map
[in]nYResRequested number of rows in the map
[in]formatRequested pixel format
[in]pExternalBufferOptional. An external buffer matching requested resolution. If NULL, A buffer will be allocated.

◆ PixelFormat() [1/2]

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.

◆ PixelFormat() [2/2]

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.

◆ ReAdjust()

XnStatus xn::ImageMetaData::ReAdjust ( XnUInt32  nXRes,
XnUInt32  nYRes,
XnPixelFormat  format,
const XnUInt8 *  pExternalBuffer = NULL 
)
inline

Parameters
[in]nXResRequested number of columns in the map
[in]nYResRequested number of rows in the map
[in]formatRequested pixel format
[in]pExternalBufferOptional. An external buffer to be used. If NULL is passed, a buffer will be allocated.

◆ RGB24Data() [1/2]

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.

◆ RGB24Data() [2/2]

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.

◆ RGB24Map()

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.

◆ WritableData()

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

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

◆ WritableGrayscale16Data()

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

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

◆ WritableGrayscale16Map()

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

Gets a light object wrapping the writable image-map

◆ WritableGrayscale8Data()

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

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

◆ WritableGrayscale8Map()

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

Gets a light object wrapping the writable image-map

◆ WritableImageMap()

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

Gets a light object wrapping the writable image-map

◆ WritableRGB24Data()

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

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

◆ WritableRGB24Map()

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

Gets a light object wrapping the writable image-map

◆ WritableYUV422Data()

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

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

◆ YUV422Data() [1/2]

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.

◆ YUV422Data() [2/2]

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: