25#ifndef __TERRALIB_RP_INTERNAL_CLASSIFIERMAXLIKELIHOODSTRATEGY_H
26#define __TERRALIB_RP_INTERNAL_CLASSIFIERMAXLIKELIHOODSTRATEGY_H
32#include "../classification/MaxLikelihood.h"
33#include "../classification/Adaptors.h"
35#include <boost/shared_ptr.hpp>
44 class AlgorithmParametersSerializer;
97 AbstractParameters*
clone()
const;
136 const unsigned int classifiedMatrixNoDataValue,
137 std::string& errorMessage )
const;
147 const unsigned int matrixNoDataValue,
148 double& betaValue, std::string& errorMessage )
const;
159 double rtbis(
double (*func) (
double x,
double *param),
double *param)
const;
Raster classifier strategy factory base class.
Raster classifier strategy base class.
A maximum likelihood estimation strategy for classification (a.k.a. MaxVer in portuguese).
Maximum a posteriori probability strategy factory.
te::rp::ClassifierStrategy * build()
Concrete factories (derived from this one) must implement this method in order to create objects.
ClassifierMaxLikelihoodStrategyFactory()
~ClassifierMaxLikelihoodStrategyFactory()
void reset()
Clear all internal allocated resources and reset the parameters instance to its initial state.
float m_icmChangesThreshold
Minimum porcentage of number of pixel that changes from one iteration to the other [valid values rang...
unsigned int ClassIDT
Class ID type definition (zero means invalid ID).
const Parameters & operator=(const Parameters ¶ms)
bool serialize(AlgorithmParametersSerializer &serializer) const
Returns a parameter serialization object.
std::vector< double > ClassSampleT
Class sample type definition.
unsigned int m_icmMaxIterations
Maximum number of ICM iterations to perform (default 10).
MClassesSamplesCTPtr m_trainSamplesPtr
A shared pointer to a always-valid structure where trainning samples are stored.
boost::shared_ptr< MClassesSamplesCT > MClassesSamplesCTPtr
A shared pointer to a multi classes samples container type definition.
std::map< ClassIDT, ClassSamplesContainerT > MClassesSamplesCT
Multi-classes samples container type definition.
std::vector< ClassSampleT > ClassSamplesContainerT
Class samples container type definition.
AbstractParameters * clone() const
Create a clone copy of this instance.
bool m_applyICM
Apply a Iterated conditional modes iteractive filtering (default:false);.
A maximum likelihood estimation strategy for classification (a.k.a. MaxVer in portuguese).
static double plikehood_3(double, double *)
static double sigmo(double a)
bool getICMBeta(const te::rp::Matrix< unsigned int > &matrix, const unsigned int matrixNoDataValue, double &betaValue, std::string &errorMessage) const
Iteration Beta value Calule.
Parameters::ClassIDT m_highestTrainClassID
The highest train sample lable.
static double plikehood_4(double, double *)
static int compara_uchar_vesre(const void *x, const void *y)
ClassifierMaxLikelihoodStrategy()
static void Estimacao_geral(double *term, const te::rp::Matrix< unsigned int > &matrix)
Compute the common part in pseudo-likelihood equation.
bool m_isInitialized
Is this instance initialized?
unsigned int getOutputNumberBands(void)
te::cl::MaxLikelihood m_genClassInstance
A generir classifier instance.
double rtbis(double(*func)(double x, double *param), double *param) const
Metodo da biseccao para achar os zeros de uma funcao de dupla precisao com parametros....
bool initialize(ClassifierStrategyParameters const *const strategyParams)
Initialize the classification strategy.
bool applyICM(const te::rst::Raster &inputRaster, std::unique_ptr< te::rp::Matrix< unsigned int > > &matrixPtr, const unsigned int classifiedMatrixNoDataValue, std::string &errorMessage) const
Apply an ICM filter.
bool execute()
Executes the classification strategy.
static double plikehood_2(double, double *)
ClassifierMaxLikelihoodStrategy::Parameters m_initParams
Initialization parameters.
~ClassifierMaxLikelihoodStrategy()
Raster classifier strategy factory base class.
Classifier Strategy Parameters.
Raster classifier strategy base class.
A generic template matrix.
An abstract class for raster data strucutures.
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Proxy configuration file for TerraView (see terraview_config.h).