Orfeo ToolBox  4.2
Orfeo ToolBox is not a black box
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage > Class Template Reference

This class compute 8 local Haralick textures features. The 8 output image channels are: Energy, Entropy, Correlation, Inverse Difference Moment, Inertia, Cluster Shade, Cluster Prominence and Haralick Correlation. They are provided in this exact order in the output image. Thus, this application computes the following Haralick textures over a neighborhood with user defined radius. More...

#include <otbScalarImageToTexturesFilter.h>

+ Inheritance diagram for otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >:
+ Collaboration diagram for otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >:

Public Types

typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef
CooccurrenceIndexedListType::ConstPointer 
CooccurrenceIndexedListConstPointerType
 
typedef
CooccurrenceIndexedListType::Pointer 
CooccurrenceIndexedListPointerType
 
typedef
GreyLevelCooccurrenceIndexedList
< InputPixelType
CooccurrenceIndexedListType
 
typedef
CooccurrenceIndexedListType::IndexType 
CooccurrenceIndexType
 
typedef InputImageType::Pointer InputImagePointerType
 
typedef TInpuImage InputImageType
 
typedef InputImageType::PixelType InputPixelType
 
typedef InputImageType::RegionType InputRegionType
 
typedef InputImageType::OffsetType OffsetType
 
typedef OutputImageType::Pointer OutputImagePointerType
 
typedef TOutputImage OutputImageType
 
typedef OutputImageType::RegionType OutputRegionType
 
typedef
CooccurrenceIndexedListType::PixelValueType 
PixelValueType
 
typedef itk::SmartPointer< SelfPointer
 
typedef
CooccurrenceIndexedListType::RelativeFrequencyType 
RelativeFrequencyType
 
typedef ScalarImageToTexturesFilter Self
 
typedef InputRegionType::SizeType SizeType
 
typedef
itk::ImageToImageFilter
< TInpuImage, TOutputImage > 
Superclass
 
typedef VectorType::const_iterator VectorConstIteratorType
 
typedef VectorType::iterator VectorIteratorType
 
typedef
CooccurrenceIndexedListType::VectorType 
VectorType
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
OutputImageTypeGetClusterProminenceOutput ()
 
OutputImageTypeGetClusterShadeOutput ()
 
OutputImageTypeGetCorrelationOutput ()
 
OutputImageTypeGetEnergyOutput ()
 
OutputImageTypeGetEntropyOutput ()
 
OutputImageTypeGetHaralickCorrelationOutput ()
 
OutputImageTypeGetInertiaOutput ()
 
virtual InputPixelType GetInputImageMaximum ()
 
virtual InputPixelType GetInputImageMinimum ()
 
OutputImageTypeGetInverseDifferenceMomentOutput ()
 
virtual const char * GetNameOfClass () const
 
virtual unsigned int GetNumberOfBinsPerAxis ()
 
virtual OffsetType GetOffset ()
 
virtual SizeType GetRadius ()
 
virtual void SetInputImageMaximum (InputPixelType _arg)
 
virtual void SetInputImageMinimum (InputPixelType _arg)
 
virtual void SetNumberOfBinsPerAxis (unsigned int _arg)
 
virtual void SetOffset (OffsetType _arg)
 
virtual void SetRadius (SizeType _arg)
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::ImageSource< TOutputImage >
static const
ImageRegionSplitterBase
GetGlobalDefaultSplitter (void)
 

Protected Member Functions

 ScalarImageToTexturesFilter ()
 
 ~ScalarImageToTexturesFilter ()
 
virtual void BeforeThreadedGenerateData ()
 
virtual void GenerateInputRequestedRegion ()
 
virtual void ThreadedGenerateData (const OutputRegionType &outputRegion, itk::ThreadIdType threadId)
 

Private Member Functions

 ScalarImageToTexturesFilter (const Self &)
 
double GetPixelValueTolerance () const
 
void operator= (const Self &)
 

Static Private Member Functions

static OutputRegionType RegionUnion (const OutputRegionType &region1, const OutputRegionType &region2)
 

Private Attributes

InputPixelType m_InputImageMaximum
 
InputPixelType m_InputImageMinimum
 
SizeType m_NeighborhoodRadius
 
unsigned int m_NumberOfBinsPerAxis
 
OffsetType m_Offset
 
SizeType m_Radius
 

Detailed Description

template<class TInpuImage, class TOutputImage>
class otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >

This class compute 8 local Haralick textures features. The 8 output image channels are: Energy, Entropy, Correlation, Inverse Difference Moment, Inertia, Cluster Shade, Cluster Prominence and Haralick Correlation. They are provided in this exact order in the output image. Thus, this application computes the following Haralick textures over a neighborhood with user defined radius.

To improve the speed of computation, a variant of Grey Level Co-occurrence Matrix(GLCM) called Grey Level Co-occurrence Indexed List (GLCIL) is used. Given below is the mathematical explanation on the computation of each textures. Here $ g(i, j) $ is the frequency of element in the GLCIL whose index is i, j. GLCIL stores a pair of frequency of two pixels from the given offset and the cell index (i, j) of the pixel in the neighborhood window. :(where each element in GLCIL is a pair of pixel index and it's frequency, $ g(i, j) $ is the frequency value of the pair having index is i, j).

"Energy" \( = f_1 = \sum_{i, j}g(i, j)^2 \)

"Entropy" \( = f_2 = -\sum_{i, j}g(i, j) \log_2 g(i, j)\), or 0 if \(g(i, j) = 0\)

"Correlation" \( = f_3 = \sum_{i, j}\frac{(i - \mu)(j - \mu)g(i, j)}{\sigma^2} \)

"Difference Moment" \(= f_4 = \sum_{i, j}\frac{1}{1 + (i - j)^2}g(i, j) \)

"Inertia" \( = f_5 = \sum_{i, j}(i - j)^2g(i, j) \) (sometimes called "contrast")

"Cluster Shade" \( = f_6 = \sum_{i, j}((i - \mu) + (j - \mu))^3 g(i, j) \)

"Cluster Prominence" \( = f_7 = \sum_{i, j}((i - \mu) + (j - \mu))^4 g(i, j) \)

"Haralick's Correlation" \( = f_8 = \frac{\sum_{i, j}(i, j) g(i, j) -\mu_t^2}{\sigma_t^2} \) where \(\mu_t\) and \(\sigma_t\) are the mean and standard deviation of the row (or column, due to symmetry) sums.

Above, \( \mu = \) (weighted pixel average) \( = \sum_{i, j}i \cdot g(i, j) = \sum_{i, j}j \cdot g(i, j) \) (due to matrix summetry), and

\( \sigma = \) (weighted pixel variance) \( = \sum_{i, j}(i - \mu)^2 \cdot g(i, j) = \sum_{i, j}(j - \mu)^2 \cdot g(i, j) \) (due to matrix summetry)

Print references:

Haralick, R.M., K. Shanmugam and I. Dinstein. 1973. Textural Features for Image Classification. IEEE Transactions on Systems, Man and Cybernetics. SMC-3(6):610-620.

David A. Clausi and Yongping Zhao. 2002. Rapid extraction of image texture by co-occurrence using a hybrid data structure. Comput. Geosci. 28, 6 (July 2002), 763-774. DOI=10.1016/S0098-3004(01)00108-X http://dx.doi.org/10.1016/S0098-3004(01)00108-X

de O.Bastos, L.; Liatsis, P.; Conci, A., Automatic texture segmentation based on k-means clustering and efficient calculation of co-occurrence features. Systems, Signals and Image Processing, 2008. IWSSIP 2008. 15th International Conference on , vol., no., pp.141,144, 25-28 June 2008 doi: 10.1109/IWSSIP.2008.4604387

Neighborhood size can be set using the SetRadius() method. Offset for co-occurence estimation is set using the SetOffset() method.

See Also
otb::GreyLevelCooccurrenceIndexedList
otb::ScalarImageToAdvancedTexturesFiler
otb::ScalarImageToHigherOrderTexturesFilter

Definition at line 99 of file otbScalarImageToTexturesFilter.h.

Member Typedef Documentation

template<class TInpuImage , class TOutputImage >
typedef itk::SmartPointer<const Self> otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::ConstPointer

Definition at line 107 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
typedef CooccurrenceIndexedListType::ConstPointer otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::CooccurrenceIndexedListConstPointerType

Definition at line 129 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
typedef CooccurrenceIndexedListType::Pointer otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::CooccurrenceIndexedListPointerType

Definition at line 128 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
typedef GreyLevelCooccurrenceIndexedList< InputPixelType > otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::CooccurrenceIndexedListType

Definition at line 127 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
typedef CooccurrenceIndexedListType::IndexType otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::CooccurrenceIndexType

Definition at line 130 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
typedef InputImageType::Pointer otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::InputImagePointerType

Definition at line 117 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
typedef TInpuImage otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::InputImageType

Template class typedefs

Definition at line 113 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
typedef InputImageType::PixelType otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::InputPixelType

Definition at line 118 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
typedef InputImageType::RegionType otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::InputRegionType

Definition at line 119 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
typedef InputImageType::OffsetType otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::OffsetType

Definition at line 121 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
typedef OutputImageType::Pointer otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::OutputImagePointerType

Definition at line 124 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
typedef TOutputImage otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::OutputImageType

Definition at line 123 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
typedef OutputImageType::RegionType otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::OutputRegionType

Definition at line 125 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
typedef CooccurrenceIndexedListType::PixelValueType otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::PixelValueType

Definition at line 131 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
typedef itk::SmartPointer<Self> otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::Pointer

Definition at line 106 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
typedef CooccurrenceIndexedListType::RelativeFrequencyType otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::RelativeFrequencyType

Definition at line 132 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
typedef ScalarImageToTexturesFilter otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::Self

Standard class typedefs

Definition at line 104 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
typedef InputRegionType::SizeType otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::SizeType

Definition at line 120 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
typedef itk::ImageToImageFilter<TInpuImage, TOutputImage> otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::Superclass

Definition at line 105 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
typedef VectorType::const_iterator otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::VectorConstIteratorType

Definition at line 136 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
typedef VectorType::iterator otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::VectorIteratorType

Definition at line 135 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
typedef CooccurrenceIndexedListType::VectorType otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::VectorType

Definition at line 133 of file otbScalarImageToTexturesFilter.h.

Constructor & Destructor Documentation

template<class TInputImage , class TOutputImage >
otb::ScalarImageToTexturesFilter< TInputImage, TOutputImage >::ScalarImageToTexturesFilter ( )
protected

Constructor

Definition at line 35 of file otbScalarImageToTexturesFilter.txx.

template<class TInputImage , class TOutputImage >
otb::ScalarImageToTexturesFilter< TInputImage, TOutputImage >::~ScalarImageToTexturesFilter ( )
protected

Destructor

Definition at line 59 of file otbScalarImageToTexturesFilter.txx.

template<class TInpuImage , class TOutputImage >
otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::ScalarImageToTexturesFilter ( const Self )
private

Member Function Documentation

template<class TInputImage , class TOutputImage >
void otb::ScalarImageToTexturesFilter< TInputImage, TOutputImage >::BeforeThreadedGenerateData ( void  )
protectedvirtual

Before Parallel textures extraction

Definition at line 229 of file otbScalarImageToTexturesFilter.txx.

template<class TInpuImage , class TOutputImage >
virtual::itk::LightObject::Pointer otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::CreateAnother ( void  ) const
template<class TInputImage , class TOutputImage >
void otb::ScalarImageToTexturesFilter< TInputImage, TOutputImage >::GenerateInputRequestedRegion ( void  )
protectedvirtual
template<class TInputImage , class TOutputImage >
ScalarImageToTexturesFilter< TInputImage, TOutputImage >::OutputImageType * otb::ScalarImageToTexturesFilter< TInputImage, TOutputImage >::GetClusterProminenceOutput ( )

Get the cluster prominence image

Definition at line 144 of file otbScalarImageToTexturesFilter.txx.

template<class TInputImage , class TOutputImage >
ScalarImageToTexturesFilter< TInputImage, TOutputImage >::OutputImageType * otb::ScalarImageToTexturesFilter< TInputImage, TOutputImage >::GetClusterShadeOutput ( )

Get the cluster shade output image

Definition at line 131 of file otbScalarImageToTexturesFilter.txx.

template<class TInputImage , class TOutputImage >
ScalarImageToTexturesFilter< TInputImage, TOutputImage >::OutputImageType * otb::ScalarImageToTexturesFilter< TInputImage, TOutputImage >::GetCorrelationOutput ( )

Get the correlation output image

Definition at line 92 of file otbScalarImageToTexturesFilter.txx.

template<class TInputImage , class TOutputImage >
ScalarImageToTexturesFilter< TInputImage, TOutputImage >::OutputImageType * otb::ScalarImageToTexturesFilter< TInputImage, TOutputImage >::GetEnergyOutput ( )

Get the energy output image

Definition at line 66 of file otbScalarImageToTexturesFilter.txx.

template<class TInputImage , class TOutputImage >
ScalarImageToTexturesFilter< TInputImage, TOutputImage >::OutputImageType * otb::ScalarImageToTexturesFilter< TInputImage, TOutputImage >::GetEntropyOutput ( )

Get the entropy output image

Definition at line 79 of file otbScalarImageToTexturesFilter.txx.

template<class TInputImage , class TOutputImage >
ScalarImageToTexturesFilter< TInputImage, TOutputImage >::OutputImageType * otb::ScalarImageToTexturesFilter< TInputImage, TOutputImage >::GetHaralickCorrelationOutput ( )

Get the Haralick correlation output image

Definition at line 157 of file otbScalarImageToTexturesFilter.txx.

template<class TInputImage , class TOutputImage >
ScalarImageToTexturesFilter< TInputImage, TOutputImage >::OutputImageType * otb::ScalarImageToTexturesFilter< TInputImage, TOutputImage >::GetInertiaOutput ( )

Get the inertia output image

Definition at line 118 of file otbScalarImageToTexturesFilter.txx.

template<class TInpuImage , class TOutputImage >
virtual InputPixelType otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::GetInputImageMaximum ( )
virtual

Get the input image maximum

template<class TInpuImage , class TOutputImage >
virtual InputPixelType otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::GetInputImageMinimum ( )
virtual

Get the input image minimum

template<class TInputImage , class TOutputImage >
ScalarImageToTexturesFilter< TInputImage, TOutputImage >::OutputImageType * otb::ScalarImageToTexturesFilter< TInputImage, TOutputImage >::GetInverseDifferenceMomentOutput ( )

Get the inverse difference moment output image

Definition at line 105 of file otbScalarImageToTexturesFilter.txx.

template<class TInpuImage , class TOutputImage >
virtual const char* otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::GetNameOfClass ( ) const
virtual

RTTI

Reimplemented from itk::ImageSource< TOutputImage >.

template<class TInpuImage , class TOutputImage >
virtual unsigned int otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::GetNumberOfBinsPerAxis ( )
virtual

Get the number of bin per axis

template<class TInpuImage , class TOutputImage >
virtual OffsetType otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::GetOffset ( )
virtual

Get the offset for co-occurence computation

template<class TInpuImage , class TOutputImage >
double otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::GetPixelValueTolerance ( ) const
inlineprivate

Definition at line 229 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
virtual SizeType otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::GetRadius ( )
virtual

Get the radius of the window on which textures will be computed

template<class TInpuImage , class TOutputImage >
static Pointer otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::New ( )
static

Creation through the object factory

template<class TInpuImage , class TOutputImage >
void otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::operator= ( const Self )
private
template<class TInpuImage , class TOutputImage >
static OutputRegionType otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::RegionUnion ( const OutputRegionType region1,
const OutputRegionType region2 
)
staticprivate

Convenient method to compute union of 2 regions

template<class TInpuImage , class TOutputImage >
virtual void otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::SetInputImageMaximum ( InputPixelType  _arg)
virtual

Set the input image maximum

template<class TInpuImage , class TOutputImage >
virtual void otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::SetInputImageMinimum ( InputPixelType  _arg)
virtual

Set the input image minimum

template<class TInpuImage , class TOutputImage >
virtual void otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::SetNumberOfBinsPerAxis ( unsigned int  _arg)
virtual

Set the number of bin per axis

template<class TInpuImage , class TOutputImage >
virtual void otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::SetOffset ( OffsetType  _arg)
virtual

Set the offset for co-occurence computation

template<class TInpuImage , class TOutputImage >
virtual void otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::SetRadius ( SizeType  _arg)
virtual

Set the radius of the window on which textures will be computed

template<class TInputImage , class TOutputImage >
void otb::ScalarImageToTexturesFilter< TInputImage, TOutputImage >::ThreadedGenerateData ( const OutputRegionType outputRegion,
itk::ThreadIdType  threadId 
)
protectedvirtual

Member Data Documentation

template<class TInpuImage , class TOutputImage >
InputPixelType otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::m_InputImageMaximum
private

Input image maximum

Definition at line 226 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
InputPixelType otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::m_InputImageMinimum
private

Input image minimum

Definition at line 223 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
SizeType otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::m_NeighborhoodRadius
private

Radius of the neighborhood iterator which is minumum of m_Radius

Definition at line 217 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
unsigned int otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::m_NumberOfBinsPerAxis
private

Number of bins per axis

Definition at line 220 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
OffsetType otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::m_Offset
private

Offset for co-occurence

Definition at line 214 of file otbScalarImageToTexturesFilter.h.

template<class TInpuImage , class TOutputImage >
SizeType otb::ScalarImageToTexturesFilter< TInpuImage, TOutputImage >::m_Radius
private

Radius of the window on which to compute textures

Definition at line 211 of file otbScalarImageToTexturesFilter.h.


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