ISOData strategy for an unsupervised pixel-based classification algorithm. More...
#include <ISOData.h>
Classes | |
class | ClusterData |
Cluster data. More... | |
class | Parameters |
Classifier Parameters. More... | |
Public Member Functions | |
bool | classify (const InputAdaptor< double > &input, const std::vector< unsigned int > &attributesIndices, const std::vector< double > &inputNoDataValues, InputOutputAdaptor< ClusterData::ClusterLabelT > &output, const unsigned int outputIndex, const ClusterData::ClusterLabelT outputNoDataValue, const bool enableProgressInterface, std::vector< ClusterData > *clustersDataPtr) |
Classify an input iterated data and save the result on the output iterated data. | |
bool | initialize (const Parameters ¶ms) |
Initialize this classifier instance with new parameters. | |
ISOData () | |
~ISOData () | |
Protected Types | |
typedef std::map< ClusterData::ClusterLabelT, ISOData::ClusterData > | ClustersContainerT |
Protected Member Functions | |
bool | classifyElements (const InputAdaptor< double > &input, const std::vector< unsigned int > &attributesIndices, const std::vector< double > &inputNoDataValues, ClustersContainerT &clustersMap, InputOutputAdaptor< unsigned int > &output, const unsigned int outputIndex, const unsigned int outputNoDataValue, const std::vector< std::pair< double, double > > &inputElementsOffsetsAndGains) const |
Classify each element following clusers centers. | |
bool | initializeClusters (const InputAdaptor< double > &input, const std::vector< unsigned int > &attributesIndices, ClustersContainerT &clustersMap, ClusterData::ClusterLabelT &nextAvaliableClusterLabel, const std::vector< double > &inputNoDataValues, std::vector< std::pair< double, double > > &inputElementsOffsetsAndGains) const |
Initialize clusters. | |
bool | removeSmallClusters (const unsigned int inputElelementsCount, ClustersContainerT &clustersMap) const |
Remove too mall clusters following the current parameters. | |
void | reset () |
Reset this instance to its initial state. | |
bool | splitClusters (const unsigned int inputElementsCount, const unsigned int maxNumberOfSplits, ClusterData::ClusterLabelT &nextAvaliableClusterLabel, ClustersContainerT &clustersMap) const |
Split clusters. | |
bool | updateClustersStats (const InputAdaptor< double > &input, const std::vector< unsigned int > &attributesIndices, const std::vector< double > &inputNoDataValues, ClustersContainerT &clustersMap, const InputOutputAdaptor< unsigned int > &output, const unsigned int outputIndex, const std::vector< std::pair< double, double > > &inputElementsOffsetsAndGains) const |
Update clusters statistical data. | |
Static Protected Member Functions | |
static bool | mergeClusters (const double mergeDistThreshold, const unsigned int maxNumberOfMerges, ClustersContainerT &clustersMap) |
Merge clusters. | |
static void | printClusters (const ClustersContainerT &clustersMap) |
static void | recodeClustersLabels (ClustersContainerT &clustersMap) |
Recode clusters labels to be in range zero up to the number of clusters - 1. | |
Protected Attributes | |
bool | m_isInitialized |
True if this instance is initialized. | |
Parameters | m_parameters |
Internal execution parameters. | |
ISOData strategy for an unsupervised pixel-based classification algorithm.
|
protected |
te::cl::ISOData::ISOData | ( | ) |
te::cl::ISOData::~ISOData | ( | ) |
bool te::cl::ISOData::classify | ( | const InputAdaptor< double > & | input, |
const std::vector< unsigned int > & | attributesIndices, | ||
const std::vector< double > & | inputNoDataValues, | ||
InputOutputAdaptor< ClusterData::ClusterLabelT > & | output, | ||
const unsigned int | outputIndex, | ||
const ClusterData::ClusterLabelT | outputNoDataValue, | ||
const bool | enableProgressInterface, | ||
std::vector< ClusterData > * | clustersDataPtr | ||
) |
Classify an input iterated data and save the result on the output iterated data.
input | Input data to be classified. |
attributesIndices | The attributes indexes to process from the iterated train data. |
inputNoDataValues | A vector of no-data values for each attribute dimension or an empty vector if no-data values are not used. |
output | Output classified data. |
outputIndex | The output attribute index. |
outputNoDataValue | A output label value to use when dealing with input no-data. |
enableProgressInterface | Enable/disable the use of a progress interface. |
clustersDataPtr | A pointer to a vector where the current clusters data will be storer or a null pointer. |
|
protected |
Classify each element following clusers centers.
input | Input data to be classified. |
attributesIndices | The attributes indexes to process from the iterated train data. |
inputNoDataValues | A vector of no-data values for each attribute dimension or an empty vector if no-data values are not used. |
output | Output classified data. |
outputIndex | The output attribute index. |
clustersMap | Clusters map. |
outputNoDataValue | Output no-data value. |
inputElementsOffsetsAndGains | Elements offsets (first) and gains (second). |
bool te::cl::ISOData::initialize | ( | const Parameters & | params | ) |
Initialize this classifier instance with new parameters.
params | New initialization parameters. |
|
protected |
Initialize clusters.
input | Input data to be classified. |
attributesIndices | The attributes indexes to process from the iterated train data. |
inputNoDataValues | A vector of no-data values for each attribute dimension or an empty vector if no-data values are not used. |
clustersMap | Clusters map. |
nextAvaliableClusterLabel | Reference to the global clusters labels counter. |
inputElementsOffsetsAndGains | Elements offsets (first) and gains (second). |
|
staticprotected |
Merge clusters.
clustersMap | Clusters map. |
mergeDistThreshold | A distance treshold to control the merge process (higher values will allow the merge more clusters. Valid values: zero or positive values ). |
maxNumberOfMerges | Maximum number of merges. |
|
staticprotected |
|
staticprotected |
Recode clusters labels to be in range zero up to the number of clusters - 1.
clustersMap | Clusters map. |
|
protected |
Remove too mall clusters following the current parameters.
inputElelementsCount | Input data elements counte. |
clustersMap | Clusters map. |
|
protected |
Reset this instance to its initial state.
|
protected |
Split clusters.
clustersMap | Clusters map. |
inputElementsCount | Input data total elements number. |
maxNumberOfSplits | Maximum number of splits. |
nextAvaliableClusterLabel | Reference to the global clusters labels counter. |
|
protected |
Update clusters statistical data.
input | Input data to be classified. |
attributesIndices | The attributes indexes to process from the iterated train data. |
inputNoDataValues | A vector of no-data values for each attribute dimension or an empty vector if no-data values are not used. |
output | Output classified data. |
outputIndex | The output attribute index. |
clustersMap | Clusters map. |
inputElementsOffsetsAndGains | Elements offsets (first) and gains (second). |
|
protected |
|
protected |