![]() |
TerraLib 4.1
|
Haralick texture features over raster regions. More...
#include <TePDIHaralick.hpp>
Classes | |
| class | GLCMMatrixCacheNodeT |
Public Types | |
| enum | DirectionT { NoDirection = 0, North = 1, NorthEast = 2, East = 4, SouthEast = 8, South = 16, SouthWest = 32, West = 64, NorthWest = 128 } |
Public Member Functions | |
| TePDIHaralick () | |
| ~TePDIHaralick () | |
| Default Destructor. | |
| bool | CheckParameters (const TePDIParameters ¶meters) const |
| Checks if the supplied parameters fits the requirements of each PDI algorithm implementation. | |
| bool | getGLCMEntropy (unsigned int band, unsigned int pol_index, double &entropyValue) |
| GLCM Entropy of one polygon inside one band (Reference 1). | |
| bool | getGLCMEnergy (unsigned int band, unsigned int pol_index, double &energyValue) |
| GLCM Energy (a.k.a GLCM angular second moment) (Reference 2). The energy measures textural uniformity, that is, repetition of pairs of pixel in the image. High values of energy indicate that the distribution of gray level in region in the image has a constant distribution or a periodic form. | |
| bool | getGLCMContrast (unsigned int band, unsigned int pol_index, double &contrastValue) |
| GLCM Contrast of one polygon inside one band (Reference 4). The contrast is a estimate of the local variations. Average of the squares of the differences between pixels. | |
| bool | getGLCMHomogeneity (unsigned int band, unsigned int pol_index, double &homogeneityValue) |
| GLCM Homogeneity (a.k.a. Inverse Difference Moment) of one polygon inside one band (Reference 1). This measure of texture results in great values for regions with similar gray level. The contrast and the homogeneity are inversely correlacionad. | |
| bool | getGLCMQuiSquare (unsigned int band, unsigned int pol_index, double &QuiSquareValue) |
| GLCM QuiSquare of one polygon inside one band. This measure can be understood as a normalization of the energy for the linear dependence of the gray level tones in a region in the image. | |
| bool | getGLCMMean (unsigned int band, unsigned int pol_index, double &meanValue) |
| GLCM Mean of one polygon inside one band (Reference 3). The GLCM mean is the average expressed in terms of the GLCM. | |
| bool | getGLCMDissimilarity (unsigned int band, unsigned int pol_index, double &dissimilarityValue) |
| GLCM Dissimilarity of one polygon inside one band (Reference 3). Similar to contrast, but increases linearly. High if the local region has a high contrast. | |
| bool | getGLCMStdDev (unsigned int band, unsigned int pol_index, double &stdDevValue) |
| GLCM standard deviation (Reference 3). GLCM standard deviation uses the GLCM, therefore it deals specifically with the combinations of reference and neighbor pixels. Thus, it is not the same as the simple standard deviation of gray levels in the original image. | |
| bool | getGLCMCorrelation (unsigned int band, unsigned int pol_index, double &correlationValue) |
| GLCM correlation (Reference 2). | |
Protected Types | |
| typedef std::pair< double, double > | GLCMMatrixKeyT |
| typedef std::map < GLCMMatrixKeyT, double > | GLCMMatrixT |
| typedef std::pair< unsigned int, unsigned int > | GLCMMatrixCacheKeyT |
| typedef std::map < GLCMMatrixCacheKeyT, GLCMMatrixCacheNodeT > | GLCMMatrixCacheT |
Protected Member Functions | |
| bool | RunImplementation () |
| Runs the current algorithm implementation. | |
| void | ResetState (const TePDIParameters ¶ms) |
| Reset the internal state to the initial state. | |
| GLCMMatrixCacheNodeT const * | getGLCMMatrixNodePtr (unsigned int band, unsigned int pol_index) |
| Build a co-ocurrence matrix node using a supplied polygon. | |
| void | clear () |
Protected Attributes | |
| DirectionT | direction_ |
| Direction mask. | |
| GLCMMatrixCacheT | conc_matrix_cache_ |
| Concurrent matrix cache. | |
| TePDITypes::TePDIRasterPtrType | input_raster_ |
| Input raster pointer. | |
| TePDITypes::TePDIPolygonSetPtrType | polygonset_ |
| Polygon set pointer. | |
Haralick texture features over raster regions.
| input_raster | (TePDITypes::TePDIRasterPtrType) Input image - no floating point images allowed. |
| direction | ( TePDIHaralick::DirectionT ) - The direction (or direction combination bit-field mask) to be used. |
| polygonset | ( TePDITypes::TePDIPolygonSetPtrType ) - Restriction polygon set - The area where to do calcules over all rasters. |
typedef std::pair< unsigned int, unsigned int > TePDIHaralick::GLCMMatrixCacheKeyT [protected] |
Concurrence matrix cache key type.
typedef std::map< GLCMMatrixCacheKeyT, GLCMMatrixCacheNodeT > TePDIHaralick::GLCMMatrixCacheT [protected] |
Concurrence matrix cache type.
typedef std::pair< double, double > TePDIHaralick::GLCMMatrixKeyT [protected] |
Concurrence matrix key type( A coord pair where x=first pixel value and y=second pixel value).
typedef std::map< GLCMMatrixKeyT, double > TePDIHaralick::GLCMMatrixT [protected] |
Concurrence matrix type.
| GLCMMatrixKeyT | A coord pair where x=first pixel value and y=second pixel value. |
| double | The pair frequency ( The frequency field must be double type due the matrix normalizing ). |
| TePDIHaralick::TePDIHaralick | ( | ) |
| TePDIHaralick::~TePDIHaralick | ( | ) |
Default Destructor.
| bool TePDIHaralick::CheckParameters | ( | const TePDIParameters & | parameters | ) | const [virtual] |
Checks if the supplied parameters fits the requirements of each PDI algorithm implementation.
| parameters | The parameters to be checked. |
Implements TePDIAlgorithm.
| void TePDIHaralick::clear | ( | ) | [protected] |
Clear all internal allocated resources.
| bool TePDIHaralick::getGLCMContrast | ( | unsigned int | band, |
| unsigned int | pol_index, | ||
| double & | contrastValue | ||
| ) |
GLCM Contrast of one polygon inside one band (Reference 4). The contrast is a estimate of the local variations. Average of the squares of the differences between pixels.
| band | Raster band. |
| pol_index | The polygon index inside the polygon set ( if no polygon set is present, use de default zero value ). |
| contrastValue | The generated value. |
| bool TePDIHaralick::getGLCMCorrelation | ( | unsigned int | band, |
| unsigned int | pol_index, | ||
| double & | correlationValue | ||
| ) |
GLCM correlation (Reference 2).
| band | Raster band. |
| pol_index | The polygon index inside the polygon set ( if no polygon set is present, use de default zero value ). |
| correlationValue | The generated value. |
| bool TePDIHaralick::getGLCMDissimilarity | ( | unsigned int | band, |
| unsigned int | pol_index, | ||
| double & | dissimilarityValue | ||
| ) |
GLCM Dissimilarity of one polygon inside one band (Reference 3). Similar to contrast, but increases linearly. High if the local region has a high contrast.
| band | Raster band. |
| pol_index | The polygon index inside the polygon set ( if no polygon set is present, use de default zero value ). |
| dissimilarityValue | The generated value. |
| bool TePDIHaralick::getGLCMEnergy | ( | unsigned int | band, |
| unsigned int | pol_index, | ||
| double & | energyValue | ||
| ) |
GLCM Energy (a.k.a GLCM angular second moment) (Reference 2). The energy measures textural uniformity, that is, repetition of pairs of pixel in the image. High values of energy indicate that the distribution of gray level in region in the image has a constant distribution or a periodic form.
| band | Raster band. |
| pol_index | The polygon index inside the polygon set ( if no polygon set is present, use de default zero value ). |
| energyValue | The generated value. |
| bool TePDIHaralick::getGLCMEntropy | ( | unsigned int | band, |
| unsigned int | pol_index, | ||
| double & | entropyValue | ||
| ) |
GLCM Entropy of one polygon inside one band (Reference 1).
| band | Raster band. |
| pol_index | The polygon index inside the polygon set ( if no polygon set is present, use de default zero value ). |
| entropyValue | The generated value. |
| bool TePDIHaralick::getGLCMHomogeneity | ( | unsigned int | band, |
| unsigned int | pol_index, | ||
| double & | homogeneityValue | ||
| ) |
GLCM Homogeneity (a.k.a. Inverse Difference Moment) of one polygon inside one band (Reference 1). This measure of texture results in great values for regions with similar gray level. The contrast and the homogeneity are inversely correlacionad.
| band | Raster band. |
| pol_index | The polygon index inside the polygon set ( if no polygon set is present, use de default zero value ). |
| homogeneityValue | The generated value. |
| TePDIHaralick::GLCMMatrixCacheNodeT const * TePDIHaralick::getGLCMMatrixNodePtr | ( | unsigned int | band, |
| unsigned int | pol_index | ||
| ) | [protected] |
Build a co-ocurrence matrix node using a supplied polygon.
| band | Raster band. |
| pol_index | The polygon index inside the polygon set ( if no polygon set is present, use de default zero value ). |
| bool TePDIHaralick::getGLCMMean | ( | unsigned int | band, |
| unsigned int | pol_index, | ||
| double & | meanValue | ||
| ) |
GLCM Mean of one polygon inside one band (Reference 3). The GLCM mean is the average expressed in terms of the GLCM.
| band | Raster band. |
| pol_index | The polygon index inside the polygon set ( if no polygon set is present, use de default zero value ). |
| meanValue | The generated value. |
| bool TePDIHaralick::getGLCMQuiSquare | ( | unsigned int | band, |
| unsigned int | pol_index, | ||
| double & | QuiSquareValue | ||
| ) |
GLCM QuiSquare of one polygon inside one band. This measure can be understood as a normalization of the energy for the linear dependence of the gray level tones in a region in the image.
| band | Raster band. |
| pol_index | The polygon index inside the polygon set ( if no polygon set is present, use de default zero value ). |
| QuiSquareValue | The generated value. |
| bool TePDIHaralick::getGLCMStdDev | ( | unsigned int | band, |
| unsigned int | pol_index, | ||
| double & | stdDevValue | ||
| ) |
GLCM standard deviation (Reference 3). GLCM standard deviation uses the GLCM, therefore it deals specifically with the combinations of reference and neighbor pixels. Thus, it is not the same as the simple standard deviation of gray levels in the original image.
| band | Raster band. |
| pol_index | The polygon index inside the polygon set ( if no polygon set is present, use de default zero value ). |
| ang2ndMomentValue | The generated value. |
| void TePDIHaralick::ResetState | ( | const TePDIParameters & | params | ) | [protected, virtual] |
Reset the internal state to the initial state.
| params | The new parameters referente at initial state. |
Implements TePDIAlgorithm.
| bool TePDIHaralick::RunImplementation | ( | ) | [protected, virtual] |
Runs the current algorithm implementation.
Implements TePDIAlgorithm.
GLCMMatrixCacheT TePDIHaralick::conc_matrix_cache_ [protected] |
Concurrent matrix cache.
DirectionT TePDIHaralick::direction_ [protected] |
Direction mask.
Input raster pointer.
Polygon set pointer.