KMeans strategy for image classification. Step-by-step:  
 More...
#include <ClassifierKMeansStrategy.h>
KMeans strategy for image classification. Step-by-step: 
- Define a random solution, creating K values of mean.
 
- Classify each pixel according to the closest mean.
 
- Calculate new means using the classified pixels.
 
- Go back to step 2, or stop depending on the following checks:
 
- Check if the new means are different from the previous iteration, using the convergence threshold.
 
- Check if maximum number of iterations has achieved. 
 
Definition at line 52 of file ClassifierKMeansStrategy.h.
 
      
        
          | te::rp::ClassifierKMeansStrategy::ClassifierKMeansStrategy  | 
          ( | 
           | ) | 
           | 
        
      
 
 
      
        
          | te::rp::ClassifierKMeansStrategy::~ClassifierKMeansStrategy  | 
          ( | 
           | ) | 
           | 
        
      
 
 
  
  
      
        
          | bool te::rp::ClassifierKMeansStrategy::execute  | 
          ( | 
          const te::rst::Raster &  | 
          inputRaster,  | 
         
        
           | 
           | 
          const std::vector< unsigned int > &  | 
          inputRasterBands,  | 
         
        
           | 
           | 
          const std::vector< te::gm::Polygon * > &  | 
          inputPolygons,  | 
         
        
           | 
           | 
          te::rst::Raster &  | 
          outputRaster,  | 
         
        
           | 
           | 
          const unsigned int  | 
          outputRasterBand,  | 
         
        
           | 
           | 
          const bool  | 
          enableProgressInterface  | 
         
        
           | 
          ) | 
           |  | 
         
        
          | throw  | ( | te::rp::Exception | 
         
        
           | ) |  |  | 
         
       
   | 
  
virtual   | 
  
 
Executes the classification strategy. 
- Parameters
 - 
  
    | inputRaster | Input raster.  | 
    | inputRasterBands | Input raster bands.  | 
    | inputPolygons | The polygons to be classified when using object-based image analysis (OBIA).  | 
    | outputRaster | Output raster.  | 
    | outputRasterBand | Output raster band.  | 
    | enableProgressInterface | Enable the internal strategy to update the progress interface. | 
  
   
- Returns
 - true if OK, false on errors. 
 
Implements te::rp::ClassifierStrategy.
 
 
  
  
      
        
          | std::vector< int > te::rp::ClassifierKMeansStrategy::getOutputDataTypes  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
virtual   | 
  
 
Returns the output raster pixel data type for each output band. 
- Returns
 - Returns the output raster pixel data type for each output band. 
 
Implements te::rp::ClassifierStrategy.
 
 
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.
 
 
  
  
      
        
          | bool te::rp::ClassifierKMeansStrategy::m_isInitialized | 
         
       
   | 
  
protected   | 
  
 
 
The documentation for this class was generated from the following file: