A maximum likelihood estimation strategy for classification (a.k.a. MaxVer in portuguese).
More...
#include <ClassifierMaxLikelihoodStrategy.h>
|
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. More...
|
|
bool | createOutputRaster (const std::vector< int > &bandsDataTypes, const std::vector< double > &noDataValues) |
| Create the output raster using the EXPANSIBLE driver. More...
|
|
bool | getICMBeta (const te::rp::Matrix< unsigned int > &matrix, const unsigned int matrixNoDataValue, double &betaValue, std::string &errorMessage) const |
| Iteration Beta value Calule. More...
|
|
virtual void | reset () |
| Reset to an initial state. More...
|
|
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. Numerical Recipes in C cap 9. Versao del 22 de agosto de 1990. INPE. O vetor (double)param contem os seguintes valores: param[0] = o minimo do intervalo de procura param[1] = o maximo do intervalo de procura param[2] = a tolerancia param[3] ... param[n] = parametros da funcao. More...
|
|
void | setErrorMessage (const std::string &newErrorMessage) |
| Set the current error message. More...
|
|
bool | setOutputRasterPalette (const unsigned int size) |
| Create and set the output raster palette folowing the current internal settings. More...
|
|
A maximum likelihood estimation strategy for classification (a.k.a. MaxVer in portuguese).
- See also
- te::cl::MaxLikelihood class docs
Definition at line 55 of file ClassifierMaxLikelihoodStrategy.h.
◆ ClassifierMaxLikelihoodStrategy()
te::rp::ClassifierMaxLikelihoodStrategy::ClassifierMaxLikelihoodStrategy |
( |
| ) |
|
◆ ~ClassifierMaxLikelihoodStrategy()
te::rp::ClassifierMaxLikelihoodStrategy::~ClassifierMaxLikelihoodStrategy |
( |
| ) |
|
◆ applyICM()
bool te::rp::ClassifierMaxLikelihoodStrategy::applyICM |
( |
const te::rst::Raster & |
inputRaster, |
|
|
std::unique_ptr< te::rp::Matrix< unsigned int > > & |
matrixPtr, |
|
|
const unsigned int |
classifiedMatrixNoDataValue, |
|
|
std::string & |
errorMessage |
|
) |
| const |
|
protected |
Apply an ICM filter.
- Parameters
-
inputRaster | Input raster. |
matrixPtr | A pointer to a input/output classified matrix (the pointer may be reassigned if required). |
classifiedMatrixNoDataValue | Matrix no-data value. |
errorMessage | Error message. |
- Returns
- true if OK, false on errors;
◆ compara_uchar_vesre()
static int te::rp::ClassifierMaxLikelihoodStrategy::compara_uchar_vesre |
( |
const void * |
x, |
|
|
const void * |
y |
|
) |
| |
|
staticprotected |
◆ createOutputRaster()
bool te::rp::ClassifierStrategy::createOutputRaster |
( |
const std::vector< int > & |
bandsDataTypes, |
|
|
const std::vector< double > & |
noDataValues |
|
) |
| |
|
protectedinherited |
Create the output raster using the EXPANSIBLE driver.
- Parameters
-
bandsDataTypes | Bands data types. |
noDataValues | A vector of no-data values for each band. |
- Returns
- true if ok,false on errors.
- Note
- A pointer to the created raster will be handled by m_outputRasterPtr.
◆ enableMultiThread()
void te::rp::ClassifierStrategy::enableMultiThread |
( |
const bool & |
enable | ) |
|
|
inherited |
Enable / disable the use of multiple threads.
- Parameters
-
enable | Enable (true) or disable (false) the use of multiple threads. |
◆ enableOutputPalette()
void te::rp::ClassifierStrategy::enableOutputPalette |
( |
const bool |
enabled | ) |
|
|
inherited |
Enable (true) or disable (false) the creation of a paletted output raster.
- Parameters
-
enabled | Enable (true) or disable (false) the creation of a paletted output raster. |
◆ enableProgressInterface()
void te::rp::ClassifierStrategy::enableProgressInterface |
( |
const bool & |
enable | ) |
|
|
inherited |
Enable / disable the progress interface.
- Parameters
-
enable | Enable (true) or disable (false) the progress interface. |
◆ enableRasterCache()
void te::rp::ClassifierStrategy::enableRasterCache |
( |
const bool & |
enable | ) |
|
|
inherited |
Enable / disable the use of raster data cache.
- Parameters
-
enable | Enable (true) or disable (false) the use of raster cache. |
◆ Estimacao_geral()
static void te::rp::ClassifierMaxLikelihoodStrategy::Estimacao_geral |
( |
double * |
term, |
|
|
const te::rp::Matrix< unsigned int > & |
matrix |
|
) |
| |
|
staticprotected |
Compute the common part in pseudo-likelihood equation.
- Parameters
-
img_box | : image to process. |
term | : comom part |
◆ execute()
bool te::rp::ClassifierMaxLikelihoodStrategy::execute |
( |
| ) |
|
|
virtual |
◆ getErrorMessage()
const std::string& te::rp::ClassifierStrategy::getErrorMessage |
( |
| ) |
const |
|
inherited |
Return the current error message if there is any.
- Returns
- Return the current error message if there is any.
◆ getICMBeta()
bool te::rp::ClassifierMaxLikelihoodStrategy::getICMBeta |
( |
const te::rp::Matrix< unsigned int > & |
matrix, |
|
|
const unsigned int |
matrixNoDataValue, |
|
|
double & |
betaValue, |
|
|
std::string & |
errorMessage |
|
) |
| const |
|
protected |
Iteration Beta value Calule.
- Parameters
-
matrix | Current classified matrix. |
matrixNoDataValue | Matrix no-data value. |
errorMessage | Error message. |
- Returns
- true if OK, false on errors;
◆ getMetaData()
void te::rp::ClassifierStrategy::getMetaData |
( |
std::map< std::string, std::string > & |
metadata | ) |
const |
|
inherited |
Returns strategy-dependent metadata.
- Parameters
-
metadata | Strategy-dependent metadata. |
◆ getOutputNumberBands()
unsigned int te::rp::ClassifierMaxLikelihoodStrategy::getOutputNumberBands |
( |
void |
| ) |
|
◆ getOutputParameters()
Returns a pointer to the strategy output execution parameters or a null pointer if there are none.
- Returns
- Returns a pointer to the strategy output execution parameters or a null pointer if there are none.
Reimplemented in te::rp::ClassifierMAPStrategy.
◆ initialize()
Initialize the classification strategy.
- Parameters
-
strategyParams | A pointer to the user given specific classification strategy parameters ou NULL if no parameters are present. |
- Returns
- true if OK, false on errors.
Implements te::rp::ClassifierStrategy.
◆ plikehood_2()
static double te::rp::ClassifierMaxLikelihoodStrategy::plikehood_2 |
( |
double |
, |
|
|
double * |
|
|
) |
| |
|
staticprotected |
◆ plikehood_3()
static double te::rp::ClassifierMaxLikelihoodStrategy::plikehood_3 |
( |
double |
, |
|
|
double * |
|
|
) |
| |
|
staticprotected |
◆ plikehood_4()
static double te::rp::ClassifierMaxLikelihoodStrategy::plikehood_4 |
( |
double |
, |
|
|
double * |
|
|
) |
| |
|
staticprotected |
◆ releaseOutputRaster()
std::unique_ptr< te::rst::Raster > te::rp::ClassifierStrategy::releaseOutputRaster |
( |
| ) |
|
|
inherited |
Returns a pointer to the output raster or a void pointer if there is none.
- Returns
- Returns a pointer to the output raster or a void pointer if there is none.
- Note
- The caller of this method must take the ownership of the returned object.
◆ reset()
virtual void te::rp::ClassifierStrategy::reset |
( |
| ) |
|
|
protectedvirtualinherited |
Reset to an initial state.
◆ rtbis()
double te::rp::ClassifierMaxLikelihoodStrategy::rtbis |
( |
double(*)(double x, double *param) |
func, |
|
|
double * |
param |
|
) |
| const |
|
protected |
Metodo da biseccao para achar os zeros de uma funcao de dupla precisao com parametros. Numerical Recipes in C cap 9. Versao del 22 de agosto de 1990. INPE. O vetor (double)param contem os seguintes valores: param[0] = o minimo do intervalo de procura param[1] = o maximo do intervalo de procura param[2] = a tolerancia param[3] ... param[n] = parametros da funcao.
- Note
- Imported from SPRING
◆ setErrorMessage()
void te::rp::ClassifierStrategy::setErrorMessage |
( |
const std::string & |
newErrorMessage | ) |
|
|
protectedinherited |
Set the current error message.
- Parameters
-
newErrorMessage | New error message; |
◆ setInputPolygons()
void te::rp::ClassifierStrategy::setInputPolygons |
( |
const std::vector< te::gm::Polygon * > & |
polygonsPtrs | ) |
|
|
inherited |
Set the input polygons.
- Parameters
-
polygonsPtrs | Input polygons pointers. |
- Note
- The caller of this method must keep the ownership of the objects.
◆ setInputRaster()
void te::rp::ClassifierStrategy::setInputRaster |
( |
const te::rst::Raster & |
raster | ) |
|
|
inherited |
Set the input raster.
- Parameters
-
◆ setInputRasterBands()
void te::rp::ClassifierStrategy::setInputRasterBands |
( |
const std::vector< unsigned int > & |
rasterBands | ) |
|
|
inherited |
Set the input raste bandsr.
- Parameters
-
rasterBands | Input raster bands. |
◆ setOutputRasterPalette()
bool te::rp::ClassifierStrategy::setOutputRasterPalette |
( |
const unsigned int |
size | ) |
|
|
protectedinherited |
Create and set the output raster palette folowing the current internal settings.
- Parameters
-
- Returns
- true if ok,false on errors.
◆ setUserOutputPalette()
Set the output user palette.
- Parameters
-
userPalette | User output raster palette (it must be large enough to accomodate all classifyier generated classes or an empty vector to automatically generate an random palette. |
◆ sigmo()
static double te::rp::ClassifierMaxLikelihoodStrategy::sigmo |
( |
double |
a | ) |
|
|
staticprotected |
◆ m_createRasterPalette
bool te::rp::ClassifierStrategy::m_createRasterPalette |
|
protectedinherited |
Enable (true) or disable (false) the creation of a paletted output raster.
Definition at line 172 of file ClassifierStrategy.h.
◆ m_enableMultiThread
bool te::rp::ClassifierStrategy::m_enableMultiThread |
|
protectedinherited |
◆ m_enableRasterCache
bool te::rp::ClassifierStrategy::m_enableRasterCache |
|
protectedinherited |
◆ m_errorMessage
std::string te::rp::ClassifierStrategy::m_errorMessage |
|
privateinherited |
◆ m_genClassInstance
◆ m_highestTrainClassID
◆ m_initParams
◆ m_inputPolygonsPtr
std::vector<te::gm::Polygon*> const* te::rp::ClassifierStrategy::m_inputPolygonsPtr |
|
protectedinherited |
◆ m_inputRasterBands
std::vector<unsigned int> te::rp::ClassifierStrategy::m_inputRasterBands |
|
protectedinherited |
◆ m_inputRasterPtr
◆ m_isInitialized
bool te::rp::ClassifierMaxLikelihoodStrategy::m_isInitialized |
|
protected |
◆ m_metaData
std::map< std::string, std::string > te::rp::ClassifierStrategy::m_metaData |
|
protectedinherited |
◆ m_outputRasterPtr
std::unique_ptr< te::rst::Raster > te::rp::ClassifierStrategy::m_outputRasterPtr |
|
protectedinherited |
◆ m_progressInterfaceEnabled
bool te::rp::ClassifierStrategy::m_progressInterfaceEnabled |
|
protectedinherited |
◆ m_userOutputPalette
User output raster palette (it must be large enough to accomodate all classifyier generated classes or an empty vector to automatically generate an random palette.
Definition at line 197 of file ClassifierStrategy.h.
The documentation for this class was generated from the following file: