Point Cloud Library (PCL)  1.14.1-dev
List of all members | Public Types | Public Member Functions | Protected Attributes
openni_wrapper::Image Class Referenceabstract

Image class containing just a reference to image meta data. More...

#include <pcl/io/openni_camera/openni_image.h>

+ Inheritance diagram for openni_wrapper::Image:

Public Types

enum  Encoding { BAYER_GRBG , YUV422 , RGB }
 
using Ptr = pcl::shared_ptr< Image >
 
using ConstPtr = pcl::shared_ptr< const Image >
 

Public Member Functions

 Image (pcl::shared_ptr< xn::ImageMetaData > image_meta_data) noexcept
 Constructor. More...
 
virtual ~Image () noexcept
 virtual Destructor that never throws an exception. More...
 
virtual bool isResizingSupported (unsigned input_width, unsigned input_height, unsigned output_width, unsigned output_height) const =0
 
virtual void fillRGB (unsigned width, unsigned height, unsigned char *rgb_buffer, unsigned rgb_line_step=0) const =0
 fills a user given buffer with the RGB values, with an optional nearest-neighbor down sampling and an optional subregion More...
 
virtual Encoding getEncoding () const =0
 returns the encoding of the native data. More...
 
void fillRaw (unsigned char *rgb_buffer) const noexcept
 fills a user given buffer with the raw values. More...
 
virtual void fillGrayscale (unsigned width, unsigned height, unsigned char *gray_buffer, unsigned gray_line_step=0) const =0
 fills a user given buffer with the gray values, with an optional nearest-neighbor down sampling and an optional subregion More...
 
unsigned getWidth () const noexcept
 
unsigned getHeight () const noexcept
 
unsigned getFrameID () const noexcept
 
unsigned long getTimeStamp () const noexcept
 
const xn::ImageMetaData & getMetaData () const noexcept
 

Protected Attributes

pcl::shared_ptr< xn::ImageMetaData > image_md_
 

Detailed Description

Image class containing just a reference to image meta data.

Thus this class just provides an interface to fill a RGB or Grayscale image buffer.

Author
Suat Gedikli
Date
02.january 2011
Parameters
[in]image_meta_data

Definition at line 58 of file openni_image.h.

Member Typedef Documentation

◆ ConstPtr

using openni_wrapper::Image::ConstPtr = pcl::shared_ptr<const Image>

Definition at line 62 of file openni_image.h.

◆ Ptr

using openni_wrapper::Image::Ptr = pcl::shared_ptr<Image>

Definition at line 61 of file openni_image.h.

Member Enumeration Documentation

◆ Encoding

Enumerator
BAYER_GRBG 
YUV422 
RGB 

Definition at line 64 of file openni_image.h.

Constructor & Destructor Documentation

◆ Image()

openni_wrapper::Image::Image ( pcl::shared_ptr< xn::ImageMetaData >  image_meta_data)
inlinenoexcept

Constructor.

Author
Suat Gedikli
Parameters
[in]image_meta_datathe actual image data from the OpenNI driver

Definition at line 171 of file openni_image.h.

◆ ~Image()

openni_wrapper::Image::~Image ( )
inlinevirtualdefaultnoexcept

virtual Destructor that never throws an exception.

Author
Suat Gedikli

Member Function Documentation

◆ fillGrayscale()

virtual void openni_wrapper::Image::fillGrayscale ( unsigned  width,
unsigned  height,
unsigned char *  gray_buffer,
unsigned  gray_line_step = 0 
) const
pure virtual

fills a user given buffer with the gray values, with an optional nearest-neighbor down sampling and an optional subregion

Author
Suat Gedikli
Parameters
[in]widthdesired width of output image.
[in]heightdesired height of output image.
[in,out]gray_bufferthe output gray buffer.
[in]gray_line_stepoptional line step in bytes to allow the output in a rectangular subregion of the output buffer.

Implemented in openni_wrapper::ImageYUV422, openni_wrapper::ImageRGB24, and openni_wrapper::ImageBayerGRBG.

◆ fillRaw()

void openni_wrapper::Image::fillRaw ( unsigned char *  rgb_buffer) const
inlinenoexcept

fills a user given buffer with the raw values.

Author
Suat Gedikli
Parameters
[in,out]rgb_buffer

Definition at line 119 of file openni_image.h.

◆ fillRGB()

virtual void openni_wrapper::Image::fillRGB ( unsigned  width,
unsigned  height,
unsigned char *  rgb_buffer,
unsigned  rgb_line_step = 0 
) const
pure virtual

fills a user given buffer with the RGB values, with an optional nearest-neighbor down sampling and an optional subregion

Author
Suat Gedikli
Parameters
[in]widthdesired width of output image.
[in]heightdesired height of output image.
[in,out]rgb_bufferthe output RGB buffer.
[in]rgb_line_stepoptional line step in bytes to allow the output in a rectangular subregion of the output buffer.

Implemented in openni_wrapper::ImageYUV422, openni_wrapper::ImageRGB24, and openni_wrapper::ImageBayerGRBG.

◆ getEncoding()

virtual Encoding openni_wrapper::Image::getEncoding ( ) const
pure virtual

returns the encoding of the native data.

Author
Suat Gedikli
Returns
encoding

Implemented in openni_wrapper::ImageYUV422, openni_wrapper::ImageRGB24, and openni_wrapper::ImageBayerGRBG.

◆ getFrameID()

unsigned openni_wrapper::Image::getFrameID ( ) const
inlinenoexcept
Author
Suat Gedikli
Returns
frame id of the image.
Note
frame ids are ascending, but not necessarily synch'ed with other streams

Definition at line 191 of file openni_image.h.

◆ getHeight()

unsigned openni_wrapper::Image::getHeight ( ) const
inlinenoexcept
Author
Suat Gedikli
Returns
height of the image

Definition at line 185 of file openni_image.h.

◆ getMetaData()

const xn::ImageMetaData & openni_wrapper::Image::getMetaData ( ) const
inlinenoexcept
Author
Suat Gedikli
Returns
the actual data in native OpenNI format.

Definition at line 203 of file openni_image.h.

◆ getTimeStamp()

unsigned long openni_wrapper::Image::getTimeStamp ( ) const
inlinenoexcept
Author
Suat Gedikli
Returns
the time stamp of the image
Note
the time value is not synche'ed with the system time

Definition at line 197 of file openni_image.h.

◆ getWidth()

unsigned openni_wrapper::Image::getWidth ( ) const
inlinenoexcept
Author
Suat Gedikli
Returns
width of the image

Definition at line 179 of file openni_image.h.

◆ isResizingSupported()

virtual bool openni_wrapper::Image::isResizingSupported ( unsigned  input_width,
unsigned  input_height,
unsigned  output_width,
unsigned  output_height 
) const
pure virtual
Author
Suat Gedikli
Parameters
[in]input_widthwidth of input image
[in]input_heightheight of input image
[in]output_widthwidth of desired output image
[in]output_heightheight of desired output image
Returns
whether the resizing is supported or not.

Implemented in openni_wrapper::ImageYUV422, openni_wrapper::ImageRGB24, and openni_wrapper::ImageBayerGRBG.

Member Data Documentation

◆ image_md_

pcl::shared_ptr<xn::ImageMetaData> openni_wrapper::Image::image_md_
protected

Definition at line 168 of file openni_image.h.


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