Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

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

#include <CALBP.h>

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

prapi::FeatureExtractor< int, util::Matrix< T > > Object List of all members.

Detailed Description

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

This class contains an implementation of the Cellular Automaton LBP.

Texture features are extracted by calculating a number of cocentric LBP codes for each pixel. The one-dimensional cellular automaton rule that best encodes the binarized neighborhood of a pixel is derived. The distribution of the automaton rules is used as a texture feature.


Public Methods

 CALBP (unsigned int scales, unsigned int samples=8, unsigned int startScale=1)
 Create a new CALBP instance.

virtual ~CALBP ()
void setReductionMode (bool reduce)
 The CALBP operator works in two modes: reduced and full.

bool getReductionMode () const
 Get the reduction mode.

util::List< int > getFeatureVector (const util::Matrix< T > &image) throw (FeatureExtractionException&)
 Fetch a distribution of cellular automaton rules from a gray-scale image.


Constructor & Destructor Documentation

template<class T>
prapi::texture::CALBP< T >::CALBP unsigned int    scales,
unsigned int    samples = 8,
unsigned int    startScale = 1
[inline]
 

Create a new CALBP instance.

Parameters:
scales  the number of successive scales (neighborhood radii) to use in calculating the cocentric LBP codes. In many applications, 10 is a reasonable value. Must be larger than 1.
samples  the number of samples on each scale. For example 8. This value is limited by the number of bits in an integer (usually 32).
startScale  the radius of the innermost neighborhood. This is 1 by default, but 2 may be a good choice if samples is larger than eight.


Member Function Documentation

template<class T>
util::List< int > prapi::texture::CALBP< T >::getFeatureVector const util::Matrix< T > &    image throw (FeatureExtractionException&) [virtual]
 

Fetch a distribution of cellular automaton rules from a gray-scale image.

Returns:
depending on the reduction mode, either a 256- or a 33-dimensional vector is returned

Implements prapi::FeatureExtractor< int, util::Matrix< T > >.

template<class T>
void prapi::texture::CALBP< T >::setReductionMode bool    reduce [inline]
 

The CALBP operator works in two modes: reduced and full.

In reduced mode, only the 32 most common rules are used. The rest are collected into one additional entry, resulting in 33-dimensional feature vectors. In full mode, all 256 ca rules are considered.

Parameters:
reduced  if false (the default), all ca rules are used, and feature vectors have 256 entries. If true, only the most common rules are used, and feature vectors have 33 entries.


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.