EM strategy for pixel-based classification. This is an unsupervised and pixel-based classification algorithm. Expectation-Maximization (EM) works iteratively by applying two steps: the E-step (Expectation) and the M-step (Maximization). The method aims to approximate the parameter estimates to real data distribution, along the iterations:
More...
#include <ClassifierEMStrategy.h>
|
bool | createOutputRaster (const std::vector< int > &bandsDataTypes, const std::vector< double > &noDataValues) |
| Create the output raster using the EXPANSIBLE driver. More...
|
|
bool | setOutputRasterPalette (const unsigned int size) |
| Create and set the output raster palette folowing the current internal settings. More...
|
|
EM strategy for pixel-based classification. This is an unsupervised and pixel-based classification algorithm. Expectation-Maximization (EM) works iteratively by applying two steps: the E-step (Expectation) and the M-step (Maximization). The method aims to approximate the parameter estimates to real data distribution, along the iterations:
- The E-step calculates the conditional expectation of the complete a posteriori probability function.
- The M-step updates the parameter estimation.
Definition at line 58 of file ClassifierEMStrategy.h.
te::rp::ClassifierEMStrategy::ClassifierEMStrategy |
( |
| ) |
|
te::rp::ClassifierEMStrategy::~ClassifierEMStrategy |
( |
| ) |
|
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.
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. |
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. |
void te::rp::ClassifierStrategy::enableProgressInterface |
( |
const bool & |
enable | ) |
|
|
inherited |
Enable / disable the progress interface.
- Parameters
-
enable | Enable (true) or disable (false) the progress interface. |
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. |
bool te::rp::ClassifierEMStrategy::execute |
( |
| ) |
|
throw | ( | te::rp::Exception |
| ) | | |
|
virtual |
void te::rp::ClassifierStrategy::getMetaData |
( |
std::map< std::string, std::string > & |
metadata | ) |
const |
|
inherited |
Returns strategy-dependent metadata.
- Parameters
-
metadata | Strategy-dependent metadata. |
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.
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.
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.
void te::rp::ClassifierStrategy::setInputRaster |
( |
const te::rst::Raster & |
raster | ) |
|
|
inherited |
Set the input raster.
- Parameters
-
void te::rp::ClassifierStrategy::setInputRasterBands |
( |
const std::vector< unsigned int > & |
rasterBands | ) |
|
|
inherited |
Set the input raste bandsr.
- Parameters
-
rasterBands | Input raster bands. |
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.
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. |
bool te::rp::ClassifierStrategy::m_createRasterPalette |
|
protectedinherited |
Enable (true) or disable (false) the creation of a paletted output raster.
Definition at line 157 of file ClassifierStrategy.h.
bool te::rp::ClassifierStrategy::m_enableMultiThread |
|
protectedinherited |
bool te::rp::ClassifierStrategy::m_enableRasterCache |
|
protectedinherited |
std::vector<te::gm::Polygon*> const* te::rp::ClassifierStrategy::m_inputPolygonsPtr |
|
protectedinherited |
std::vector<unsigned int> te::rp::ClassifierStrategy::m_inputRasterBands |
|
protectedinherited |
bool te::rp::ClassifierEMStrategy::m_isInitialized |
|
protected |
std::map< std::string, std::string > te::rp::ClassifierStrategy::m_metaData |
|
protectedinherited |
std::unique_ptr< te::rst::Raster > te::rp::ClassifierStrategy::m_outputRasterPtr |
|
protectedinherited |
bool te::rp::ClassifierStrategy::m_progressInterfaceEnabled |
|
protectedinherited |
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 182 of file ClassifierStrategy.h.
The documentation for this class was generated from the following file: