IntegerMathOps.H File Reference

#include "Image/Image.H"
#include "Image/ImageSet.H"
#include "Image/PyrBuilder.H"
#include "Image/fancynorm.H"
#include "Image/integer_math.h"
#include <deque>
Include dependency graph for IntegerMathOps.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  IntgTrigTable< tabsiz_, nbits_ >
class  IntgGaussianPyrBuilder
 Builds pyramids based on Gaussian filters. More...
class  IntgOrientedPyrBuilder
 Builds pyramid based on oriented Laplacian filters. More...
class  IntgReichardtPyrBuilder
 This class implements Reichardt motion detections. More...

Functions

int intgScaleFromByte (const byte *src, const uint nbits)
 shift left if nbits > 8; shift right if nbits < 8
int intgScaleFromFloat (const float *src, const uint nbits)
 assume input range is [0..255]; shift left if nbits > 8; shift right if nbits < 8
Image< int > intgScaleFromByte (const Image< byte > *src, const uint nbits)
 shift left if nbits > 8; shift right if nbits < 8
Image< int > intgScaleFromFloat (const Image< float > *src, const uint nbits)
 assume input range is [0..255]; shift left if nbits > 8; shift right if nbits < 8
Image< PixRGB< int > > intgScaleFromByte (const Image< PixRGB< byte > > *src, const uint nbits)
 shift left if nbits > 8; shift right if nbits < 8
Image< int > intgScaleLuminanceFromByte (const Image< PixRGB< byte > > *src, const uint nbits)
 get the luminance with nbits of precision of the input image
Image< PixRGB< int > > intgScaleFromFloat (const Image< PixRGB< float > > *src, const uint nbits)
 assume input range is [0..255]; shift left if nbits > 8; shift right if nbits < 8
Image< float > intgScaleToFloat (const Image< int > *src, const uint nbits)
 Convert from out integer representation to floats.
Image< int > intgLowPass5xDecX (const Image< int > &src, const integer_math *imath)
Image< int > intgLowPass5yDecY (const Image< int > &src, const integer_math *imath)
Image< int > intgXFilterClean (const Image< int > &src, const int *hFilt, const int hfs, const int shiftbits, const integer_math *imath)
Image< int > intgYFilterClean (const Image< int > &src, const int *vFilt, const int vfs, const int shiftbits, const integer_math *imath)
Image< int > intgLowPass9x (const Image< int > &src, const integer_math *imath)
Image< int > intgLowPass9y (const Image< int > &src, const integer_math *imath)
Image< int > intgLowPassX (int filterSize, const Image< int > &src, const integer_math *imath)
Image< int > intgLowPassY (int filterSize, const Image< int > &src, const integer_math *imath)
Image< int > intgLowPass (int filterSize, const Image< int > &src, const integer_math *imath)
Image< int > intgQuadEnergy (const Image< int > &img1, const Image< int > &img2)
Image< int > intgOrientedFilter (const Image< int > &src, const float k, const float theta, const integer_math *imath)
void intgInplaceAttenuateBorders (Image< int > &a, int size)
ImageSet< int > intgBuildPyrLaplacian (const Image< int > &image, int firstlevel, int depth, int filterSize, const integer_math *imath)
ImageSet< int > intgBuildPyrOrientedFromLaplacian (const ImageSet< int > &lplc, const int filterSize, const float theta, const integer_math *imath)
ImageSet< int > intgBuildPyrOriented (const Image< int > &image, int firstlevel, int depth, int filterSize, float theta, const integer_math *imath)
ImageSet< int > intgBuildPyrGaussian (const Image< int > &image, int depth, int filterSize, const integer_math *imath)
Image< int > intgDownSize (const Image< int > &src, const Dims &dims, const int filterWidth, const integer_math *imath)
Image< int > intgRescale (const Image< int > &src, const Dims &dims)
void intgInplaceAddBGnoise (Image< int > &src, int max)
Image< int > intgMaxNormalize (const Image< int > &src, int min, int max, MaxNormType typ)
Image< int > intgMaxNormalizeNone (const Image< int > &src, int min, int max)
Image< int > intgMaxNormalizeStd (const Image< int > &src, int min, int max)
Image< int > intgCenterSurround (const ImageSet< int > &pyr, int lev1, int lev2, bool absol, const ImageSet< int > *clipPyr)
void intgDoLowThresh (ImageSet< int > &pyr, int thresh, int newval=0)
void intgDoLowThreshAbs (ImageSet< int > &pyr, int thresh, int newval=0)
void intgDoRectify (ImageSet< int > &pyr)
void intgInplaceNormalize (Image< int > &dst, const int nmin, const int nmax, int *actualmin, int *actualmax)
Image< int > intgCenterSurround (const Image< int > &center, const Image< int > &surround, const bool absol)
void intgGetRGBY (const Image< PixRGB< byte > > &src, Image< int > &rg, Image< int > &by, const int threshfactor, const uint inputbits)
 Pixels with luminance less than MAX/threshfactor will have rg=by=0.
Image< int > intgShiftImage (const Image< int > &srcImg, const int dxnumer, const int dynumer, const uint denombits)

Detailed Description

Fixed-point integer math versions of some of our floating-point Image functions

Definition in file IntegerMathOps.H.


Function Documentation

void intgGetRGBY ( const Image< PixRGB< byte > > &  src,
Image< int > &  rg,
Image< int > &  by,
const int  threshfactor,
const uint  inputbits 
)

Pixels with luminance less than MAX/threshfactor will have rg=by=0.

Note that in the floating-point version getRGBY(), we take a luminance threshold and test

((r+g+b)/3 < thresh)

where thresh is usually set to 25.5, i.e. 255/10. Here, to avoid loss of precision, we want to avoid any divisions, so instead we test

(threshfactor*(r+g+b) < 3*MAX)

which is equivalent to, but more precise than,

((r+g+b)/3 < MAX/threshfactor).

Definition at line 1140 of file IntegerMathOps.C.

References abs(), ASSERT, Image< T >::begin(), Image< T >::beginw(), Image< T >::end(), Image< T >::getDims(), Image< T >::initialized(), lum, and NO_INIT.

Image<PixRGB<int> > intgScaleFromByte ( const Image< PixRGB< byte > > *  src,
const uint  nbits 
)

shift left if nbits > 8; shift right if nbits < 8

src is a pointer (rather than a reference) to prevent unwanted implicit conversions

Definition at line 96 of file IntegerMathOps.C.

References NO_INIT.

Image<int> intgScaleFromByte ( const Image< byte > *  src,
const uint  nbits 
)

shift left if nbits > 8; shift right if nbits < 8

src is a pointer (rather than a reference) to prevent unwanted implicit conversions

Definition at line 74 of file IntegerMathOps.C.

int intgScaleFromByte ( const byte src,
const uint  nbits 
)

shift left if nbits > 8; shift right if nbits < 8

src is a pointer (rather than a reference) to prevent unwanted implicit conversions

Definition at line 52 of file IntegerMathOps.C.

Image<PixRGB<int> > intgScaleFromFloat ( const Image< PixRGB< float > > *  src,
const uint  nbits 
)

assume input range is [0..255]; shift left if nbits > 8; shift right if nbits < 8

src is a pointer (rather than a reference) to prevent unwanted implicit conversions

Definition at line 161 of file IntegerMathOps.C.

Image<int> intgScaleFromFloat ( const Image< float > *  src,
const uint  nbits 
)

assume input range is [0..255]; shift left if nbits > 8; shift right if nbits < 8

src is a pointer (rather than a reference) to prevent unwanted implicit conversions

Definition at line 85 of file IntegerMathOps.C.

int intgScaleFromFloat ( const float *  src,
const uint  nbits 
)

assume input range is [0..255]; shift left if nbits > 8; shift right if nbits < 8

src is a pointer (rather than a reference) to prevent unwanted implicit conversions

Definition at line 63 of file IntegerMathOps.C.

Referenced by IntegerDirectionChannel::IntegerDirectionChannel(), and IntegerDirectionChannel::start1().

Image<int> intgScaleLuminanceFromByte ( const Image< PixRGB< byte > > *  src,
const uint  nbits 
)

get the luminance with nbits of precision of the input image

Definition at line 140 of file IntegerMathOps.C.

References Image< T >::begin(), and NO_INIT.

Image<float> intgScaleToFloat ( const Image< int > *  src,
const uint  nbits 
)

Convert from out integer representation to floats.

src is a pointer (rather than a reference) to prevent unwanted implicit conversions

Definition at line 172 of file IntegerMathOps.C.

Generated on Sun May 8 08:42:41 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3