X-Boost  2.3.8
Public Member Functions | Public Attributes | List of all members
IntegralImageHandle< T > Struct Template Reference

#include <IntegralImage.h>

Inherited by IntegralImage< T >.

Public Member Functions

 IntegralImageHandle (const IntegralImageHandle< T > &src)
 
void operator= (const IntegralImageHandle< T > &src)
 
void Release ()
 
void Resize (unsigned int width, unsigned int height)
 Resize (destructive) of buffer.
 
T & operator() (int i, int j)
 
const T & operator() (int i, int j) const
 
pixel_at (int x, int y) const
 
double interpolated_value_at (double x, double y) const
 recover using interpolation integral-image value in x,y
 
template<class D >
void Export (D *buf, int x0, int y0, int dst_width, int dst_height) const
 
template<class DataType >
void ResampleAndExport (DataType *buf, double x0, double y0, double x1, double y1, int dst_width, int dst_height) const
 
template<class _S >
void Build (const _S *src, unsigned int width, unsigned int height, long stride, bool extend=false)
 Build integral image from buffer.
 
void Build (const ImageHandle &src, bool extend=false)
 Build the integral image using an ImageHandle object.
 

Public Attributes

T * data
 
unsigned int width
 
unsigned int height
 

Detailed Description

template<class T>
struct IntegralImageHandle< T >

the integral image. The use of handle is required in order to remove an eventual pointer dereferencing during apply and improve performance.

Constructor & Destructor Documentation

template<class T>
IntegralImageHandle< T >::IntegralImageHandle ( const IntegralImageHandle< T > &  src)
inline

copy: only handle integral image can receive copy

Member Function Documentation

template<class T>
template<class D >
void IntegralImageHandle< T >::Export ( D *  buf,
int  x0,
int  y0,
int  dst_width,
int  dst_height 
) const
inline

convert the integral image in a buffer of the same size.

auxIntImage.Export(buf.Buffer(), 1,1, width, height);
Todo:
handle cropping better
template<class T>
T IntegralImageHandle< T >::pixel_at ( int  x,
int  y 
) const
inline

convert the integral image in a buffer. The buffer must be width x height

Returns
pixel(x,y) = I(x,y) + I(x-1,y-1) - I(x,y-1) - I(x-1,y)
template<class T>
void IntegralImageHandle< T >::Release ( )
inline

Force the memory release

template<class T>
template<class DataType >
void IntegralImageHandle< T >::ResampleAndExport ( DataType *  buf,
double  x0,
double  y0,
double  x1,
double  y1,
int  dst_width,
int  dst_height 
) const
inline

Resample and export an integral image

Parameters
bufan output buffer
x0,y0,x1,y1a rectangle
dst_width,dst_heightsize of buf buffer

Member Data Documentation

template<class T>
T* IntegralImageHandle< T >::data

the origin of integral image

template<class T>
unsigned int IntegralImageHandle< T >::width

Integral image geometry


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