libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
crn::SummedAreaTable< T > Class Template Reference

A summed area table. More...

#include <CRNSummedAreaTable.h>

Public Member Functions

 SummedAreaTable (size_t w, size_t h)
 Constructor. More...
 
 SummedAreaTable (const SummedAreaTable &)=default
 
 SummedAreaTable (SummedAreaTable &&)=default
 
SummedAreaTableoperator= (const SummedAreaTable &)=default
 
SummedAreaTableoperator= (SummedAreaTable &&)=default
 
GetValue (size_t x, size_t y) const
 Gets the value of a bin. More...
 
void SetValue (size_t x, size_t y, T val)
 Alters the value of a bin. More...
 
GetSum (const crn::Rect &r) const
 Gets the sum of the original pixels in a rectangle. More...
 
GetSum (size_t x1, size_t y1, size_t x2, size_t y2) const
 Gets the sum of the original pixels in a rectangle. More...
 

Detailed Description

template<typename T>
class crn::SummedAreaTable< T >

A summed area table.

A summed area table. Used to compute fast square sums in an image

Author
Yann LEYDIER
Date
Jul. 2013
Version
0.1

Definition at line 41 of file CRNSummedAreaTable.h.

Constructor & Destructor Documentation

template<typename T >
crn::SummedAreaTable< T >::SummedAreaTable ( size_t  w,
size_t  h 
)
inline

Constructor.

Definition at line 45 of file CRNSummedAreaTable.h.

template<typename T >
crn::SummedAreaTable< T >::SummedAreaTable ( const SummedAreaTable< T > &  )
default
template<typename T >
crn::SummedAreaTable< T >::SummedAreaTable ( SummedAreaTable< T > &&  )
default

Member Function Documentation

template<typename T >
T crn::SummedAreaTable< T >::GetSum ( const crn::Rect r) const
inline

Gets the sum of the original pixels in a rectangle.

Exceptions
ExceptionDimensionthe rectangle exceeds the image's dimensions
Parameters
[in]rthe rectangle to sum
Returns
the sum of the original pixels in the rectangle

Definition at line 62 of file CRNSummedAreaTable.h.

template<typename T >
T crn::SummedAreaTable< T >::GetSum ( size_t  x1,
size_t  y1,
size_t  x2,
size_t  y2 
) const
inline

Gets the sum of the original pixels in a rectangle.

Warning
No bound check is performed
Parameters
[in]x1left border
[in]y1top border
[in]x2right border
[in]y2bottom border
Returns
the sum of the original pixels in the rectangle

Definition at line 77 of file CRNSummedAreaTable.h.

template<typename T >
T crn::SummedAreaTable< T >::GetValue ( size_t  x,
size_t  y 
) const
inline

Gets the value of a bin.

Definition at line 53 of file CRNSummedAreaTable.h.

template<typename T >
SummedAreaTable& crn::SummedAreaTable< T >::operator= ( const SummedAreaTable< T > &  )
default
template<typename T >
SummedAreaTable& crn::SummedAreaTable< T >::operator= ( SummedAreaTable< T > &&  )
default
template<typename T >
void crn::SummedAreaTable< T >::SetValue ( size_t  x,
size_t  y,
val 
)
inline

Alters the value of a bin.

Definition at line 55 of file CRNSummedAreaTable.h.


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