XRPrimer (C++ API)  0.6.0
Image Class Reference

#include <image.h>

Classes

class  Impl
 

Public Member Functions

 Image ()
 
 ~Image ()
 
 Image (int width, int height, PixelFormat format)
 Construct a new Image object. More...
 
 Image (int width, int height, int widthStep, PixelFormat format)
 Construct a new Image object. More...
 
 Image (int width, int height, int widthStep, PixelFormat format, void *data)
 Construct a new Image object. More...
 
 Image (const Image &other)
 
 Image (Image &&other)
 
Imageoperator= (const Image &other)
 
Imageoperator= (Image &&other)
 
int64_t timestamp () const
 Image timestamp. More...
 
void set_timestamp (int64_t timestamp)
 Set the timestamp object. More...
 
int64_t stream_id () const
 Image stream index. More...
 
void set_stream_id (int64_t stream_id)
 Set the stream id object. More...
 
int width () const
 Image width in pixels. More...
 
int height () const
 Image height in pixels. More...
 
PixelFormat format () const
 Image format. More...
 
int elemSize () const
 the size of each pixel in bytes More...
 
int channels () const
 Image channels, supporet 1,2,3 or 4. More...
 
int depth () const
 Image per channel bytes. More...
 
int step () const
 Size of aligned image row in bytes. More...
 
const void * data () const
 Pointer to aligned image data. More...
 
void * mutable_data ()
 Pointer to aligned image data. More...
 
Image clone () const
 
bool copyTo (Image *image)
 
bool empty ()
 

Constructor & Destructor Documentation

◆ Image() [1/6]

Image::Image ( )

Class Image

◆ ~Image()

Image::~Image ( )

◆ Image() [2/6]

Image::Image ( int  width,
int  height,
PixelFormat  format 
)

Construct a new Image object.

Parameters
width
height
format

◆ Image() [3/6]

Image::Image ( int  width,
int  height,
int  widthStep,
PixelFormat  format 
)

Construct a new Image object.

Parameters
width
height
widthStep
format

◆ Image() [4/6]

Image::Image ( int  width,
int  height,
int  widthStep,
PixelFormat  format,
void *  data 
)

Construct a new Image object.

Parameters
width
height
widthStep
format
dataPointer to the user data. constructors that take data and step parameters do not allocate data. Instead, they just initialize the header that points to the specified data, which means that no data is copied. This operation is very efficient and can be used to process external data using Image class. The external data is not automatically deallocated, so you should take care of it.

◆ Image() [5/6]

Image::Image ( const Image other)

◆ Image() [6/6]

Image::Image ( Image &&  other)

Member Function Documentation

◆ channels()

int Image::channels ( ) const

Image channels, supporet 1,2,3 or 4.

Returns
int

◆ clone()

Image Image::clone ( ) const
Returns
Image

◆ copyTo()

bool Image::copyTo ( Image image)
Parameters
image
Returns
true
false

◆ data()

const void * Image::data ( ) const

Pointer to aligned image data.

Returns
void*

◆ depth()

int Image::depth ( ) const

Image per channel bytes.

Returns
int, supported 1,2,3,4

◆ elemSize()

int Image::elemSize ( ) const

the size of each pixel in bytes

Returns
int same as channels() * depth()

◆ empty()

bool Image::empty ( )
Returns
true
false

◆ format()

PixelFormat Image::format ( ) const

Image format.

See also
PixelFormat
Returns
PixelFormat

◆ height()

int Image::height ( ) const

Image height in pixels.

Returns
int

◆ mutable_data()

void * Image::mutable_data ( )

Pointer to aligned image data.

Returns
void*

◆ operator=() [1/2]

Image & Image::operator= ( const Image other)

◆ operator=() [2/2]

Image & Image::operator= ( Image &&  other)

◆ set_stream_id()

void Image::set_stream_id ( int64_t  stream_id)

Set the stream id object.

Parameters
stream_id

◆ set_timestamp()

void Image::set_timestamp ( int64_t  timestamp)

Set the timestamp object.

Parameters
timestamp

◆ step()

int Image::step ( ) const

Size of aligned image row in bytes.

Returns
int

◆ stream_id()

int64_t Image::stream_id ( ) const

Image stream index.

Returns
int64_t

◆ timestamp()

int64_t Image::timestamp ( ) const

Image timestamp.

Returns
int64_t

◆ width()

int Image::width ( ) const

Image width in pixels.

Returns
int

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