Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

prapi::texture::SgnDiff< T > Class Template Reference

#include <SgnDiff.h>

Inheritance diagram for prapi::texture::SgnDiff< T >:

prapi::texture::CircularLocalSampler< T, T > prapi::ImageTransform< T, T > List of all members.

Detailed Description

template<class T>
class prapi::texture::SgnDiff< T >

A class for calculating signed differences from an matrix.

For each pixel, a local neighborhood is formed, and the difference between the center pixel and one of the neighbors is calculated. The difference is used as a feature value for the center pixel. Assuming 8 bit matrices, the signed differences vary in range [-255,255].


Public Methods

 SgnDiff (unsigned int predicate=1)
 Create a SgnDiff object that calculates the signed difference with the given distance, i.e.

getValue (int center, util::List< T > &surrounding)
void setDifferenceIndex (unsigned int index) throw (util::InvalidArgumentException&)
 Set the difference index.

unsigned int getDifferenceIndex () const
 Get the difference index.


Constructor & Destructor Documentation

template<class T>
prapi::texture::SgnDiff< T >::SgnDiff unsigned int    predicate = 1 [inline]
 

Create a SgnDiff object that calculates the signed difference with the given distance, i.e.

predicate.


Member Function Documentation

template<class T>
void prapi::texture::SgnDiff< T >::setDifferenceIndex unsigned int    index throw (util::InvalidArgumentException&)
 

Set the difference index.

The number of samples in CircularLocalSampler determines the maximum possible difference index. By default, 0 is used, which typically means the difference in positive x axis direction.

Exceptions:
InvalidArgumentException  if index is greater than or equal to the number of neighborhood samples


The documentation for this class was generated from the following file:
Documentation generated on 11.09.2003 with Doxygen.
The documentation is copyrighted material.
Copyright © Topi Mäenpää 2003. All rights reserved.