SLAMflex SE  0.1.0
SLAMflex provides detection and tracking of dominant planes for smartphone devices. This plane can then be used to show AR content relative to the plane orientation. The detection of plane is performed in the field of view of the smartphone camera. In subsequent frames it is tracked. The interface returns the plane position and orientation.
Public Types | Public Member Functions | Protected Member Functions | List of all members
CVD::BasicImage< T > Class Template Reference

#include <image.h>

Inheritance diagram for CVD::BasicImage< T >:
CVD::SubImage< T > CVD::Image< T >

Public Types

typedef T * iterator
 
typedef const T * const_iterator
 
- Public Types inherited from CVD::SubImage< T >
typedef SubImageIterator< T > iterator
 
typedef ConstSubImageIterator< T > const_iterator
 

Public Member Functions

 BasicImage (T *data, const ImageRef &size)
 
 BasicImage (const BasicImage &copyof)
 
void operator= (const BasicImage &copyof)
 
 ~BasicImage ()
 The image data is not destroyed when a BasicImage is destroyed. More...
 
const_iterator begin () const
 
iterator begin ()
 
const_iterator end () const
 
iterator end ()
 
- Public Member Functions inherited from CVD::SubImage< T >
 SubImage (T *data, const ImageRef &size, int stride)
 
bool in_image (const ImageRef &ir) const
 
bool in_image_with_border (const ImageRef &ir, int border) const
 
 ~SubImage ()
 The image data is not destroyed when a BasicImage is destroyed. More...
 
T & operator[] (const ImageRef &pos)
 
const T & operator[] (const ImageRef &pos) const
 
T * operator[] (int row)
 
const T * operator[] (int row) const
 
ImageRef pos (const T *ptr) const
 Given a pointer, this returns the image position as an ImageRef. More...
 
const T * data () const
 Returns the raw image data. More...
 
T * data ()
 Returns the raw image data. More...
 
iterator begin ()
 Returns an iterator referencing the first (top-left) pixel in the image. More...
 
const_iterator begin () const
 Returns a const iterator referencing the first (top-left) pixel in the image. More...
 
iterator end ()
 Returns an iterator pointing to one past the end of the image. More...
 
const_iterator end () const
 Returns a const iterator pointing to one past the end of the image. More...
 
void copy_from (const SubImage< T > &other)
 
ImageRef size () const
 What is the size of this image? More...
 
int row_stride () const
 What is the row stride of the image? More...
 
int totalsize () const
 What is the total number of elements in the image (i.e. size().x * size().y), including padding. More...
 
void zero ()
 Set all the pixels in the image to zero. This is a relatively fast operation, using memset. More...
 
void fill (const T d)
 
 SubImage (const SubImage &copyof)
 
SubImage sub_image (const ImageRef &start, const ImageRef &size)
 
const SubImage sub_image (const ImageRef &start, const ImageRef &size) const
 
SubImageref ()
 Return a reference to a SubImage. Useful for passing anonymous SubImages to functions. More...
 

Protected Member Functions

 BasicImage ()
 The default constructor does nothing. More...
 
- Protected Member Functions inherited from CVD::SubImage< T >
T * end_ptr ()
 Return an off-the-end pointer without ever throwing AccessOutsideImage. More...
 
const T * end_ptr () const
 Return an off-the-end pointer without ever throwing AccessOutsideImage. More...
 
 SubImage ()
 

Additional Inherited Members

- Protected Attributes inherited from CVD::SubImage< T >
T * my_data
 The raw image data. More...
 
ImageRef my_size
 The size of the image. More...
 
int my_stride
 The row stride. More...
 

Detailed Description

template<class T>
class CVD::BasicImage< T >

A generic image class to manage a block of data as an image. Provides basic image access such as accessing a particular pixel co-ordinate.

Parameters
TThe pixel type for this image. Typically either CVD::byte or CVD::Rgb<CVD::byte> > are used, but images could be constructed of any available type.

A BasicImage does not manage its own data, but provides access to an arbitrary externally-managed block of data as though it were an image. Use the derived Image class if you want an image which also has its own data.

Loading and saving, format conversion and some copying functionality is provided by external functions rather than as part of this class. See the Image loading and saving, and format conversion module for documentation of these functions.

Definition at line 471 of file image.h.

Member Typedef Documentation

template<class T>
typedef const T* CVD::BasicImage< T >::const_iterator

A random-access iterator to read pixel values from the image. This can be incremented, decremented and dereferenced. Incrementing this iterator steps through pixels in the usual scanline order.

Definition at line 507 of file image.h.

template<class T>
typedef T* CVD::BasicImage< T >::iterator

A random-access iterator to read or write pixel values from the image. This can be incremented, decremented and dereferenced. Incrementing this iterator steps through pixels in the usual scanline order.

Definition at line 503 of file image.h.

Constructor & Destructor Documentation

template<class T>
CVD::BasicImage< T >::BasicImage ( T *  data,
const ImageRef size 
)
inline

Construct an image from a block of data.

Parameters
dataThe image data in horizontal scanline order
sizeThe size of the image

Definition at line 477 of file image.h.

template<class T>
CVD::BasicImage< T >::BasicImage ( const BasicImage< T > &  copyof)
inline

Copy constructor

Parameters
copyofThe image to copy

Definition at line 484 of file image.h.

template<class T>
CVD::BasicImage< T >::~BasicImage ( )
inline

The image data is not destroyed when a BasicImage is destroyed.

Definition at line 497 of file image.h.

template<class T>
CVD::BasicImage< T >::BasicImage ( )
inlineprotected

The default constructor does nothing.

Definition at line 527 of file image.h.

Member Function Documentation

template<class T>
const_iterator CVD::BasicImage< T >::begin ( ) const
inline

Returns a const iterator referencing the first (top-left) pixel in the image.

Definition at line 511 of file image.h.

template<class T>
iterator CVD::BasicImage< T >::begin ( )
inline

Returns an iterator referencing the first (top-left) pixel in the image.

Definition at line 514 of file image.h.

template<class T>
const_iterator CVD::BasicImage< T >::end ( ) const
inline

Returns a const iterator referencing the pixel immediately after the last (bottom-right) pixel in the image.

Definition at line 518 of file image.h.

template<class T>
iterator CVD::BasicImage< T >::end ( )
inline

Returns an iterator referencing the pixel immediately after the last (bottom-right) pixel in the image.

Definition at line 521 of file image.h.

template<class T>
void CVD::BasicImage< T >::operator= ( const BasicImage< T > &  copyof)
inline

Definition at line 489 of file image.h.


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