Orfeo ToolBox  4.2
Orfeo ToolBox is not a black box
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
otb::SVMClassifier< TSample, TLabel > Class Template Reference

SVM-based classifier. More...

#include <otbSVMClassifier.h>

+ Inheritance diagram for otb::SVMClassifier< TSample, TLabel >:
+ Collaboration diagram for otb::SVMClassifier< TSample, TLabel >:

Public Types

typedef TLabel ClassLabelType
 
typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef
itk::Statistics::ListSample
< HyperplanesDistancesType
HyperplanesDistancesListSampleType
 
typedef
itk::VariableLengthVector
< float > 
HyperplanesDistancesType
 
typedef TSample::MeasurementType MeasurementType
 
typedef
TSample::MeasurementVectorType 
MeasurementVectorType
 
typedef
Superclass::MembershipFunctionVectorObjectPointer 
MembershipFunctionPointerVector
 
typedef
itk::Statistics::MembershipSample
< TSample > 
OutputType
 
typedef itk::SmartPointer< SelfPointer
 
typedef SVMClassifier Self
 
typedef
itk::Statistics::SampleClassifierFilter
< TSample > 
Superclass
 
typedef SVMModelType::Pointer SVMModelPointer
 
typedef SVMModel
< MeasurementType,
ClassLabelType
SVMModelType
 
- Public Types inherited from itk::Statistics::SampleClassifierFilter< TSample >
typedef IdentifierType ClassLabelType
 
typedef
ClassLabelVectorObjectType::Pointer 
ClassLabelVectorObjectPointer
 
typedef
SimpleDataObjectDecorator
< ClassLabelVectorType
ClassLabelVectorObjectType
 
typedef std::vector
< ClassLabelType
ClassLabelVectorType
 
typedef SmartPointer< const SelfConstPointer
 
typedef
DecisionRuleType::ConstPointer 
DecisionRulePointer
 
typedef DecisionRule DecisionRuleType
 
typedef SampleType::MeasurementType MeasurementType
 
typedef
SampleType::MeasurementVectorType 
MeasurementVectorType
 
typedef
MembershipFunctionType::ConstPointer 
MembershipFunctionPointer
 
typedef
SimpleDataObjectDecorator
< MembershipFunctionsWeightsArrayType
MembershipFunctionsWeightsArrayObjectType
 
typedef
MembershipFunctionsWeightsArrayObjectType::Pointer 
MembershipFunctionsWeightsArrayPointer
 
typedef Array< double > MembershipFunctionsWeightsArrayType
 
typedef MembershipFunctionBase
< MeasurementVectorType
MembershipFunctionType
 
typedef
MembershipFunctionVectorObjectType::Pointer 
MembershipFunctionVectorObjectPointer
 
typedef
SimpleDataObjectDecorator
< MembershipFunctionVectorType
MembershipFunctionVectorObjectType
 
typedef std::vector
< MembershipFunctionPointer
MembershipFunctionVectorType
 
typedef
MembershipSampleType::Pointer 
MembershipSampleObjectPointer
 
typedef MembershipSample
< SampleType
MembershipSampleType
 
typedef SmartPointer< SelfPointer
 
typedef TSample SampleType
 
typedef SampleClassifierFilter Self
 
typedef ProcessObject Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
HyperplanesDistancesListSampleTypeGetHyperplanesDistancesOutput ()
 
virtual SVMModelTypeGetModel ()
 
virtual const char * GetNameOfClass () const
 
OutputTypeGetOutput ()
 
virtual void SetModel (SVMModelType *_arg)
 
void SetOutput (OutputType *output)
 
void Update ()
 
- Public Member Functions inherited from itk::Statistics::SampleClassifierFilter< TSample >
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const DecisionRuleTypeGetDecisionRule () const
 
const SampleTypeGetInput () const
 
virtual unsigned int GetNumberOfClasses () const
 
const MembershipSampleTypeGetOutput () const
 
void SetClassLabels (const ClassLabelVectorObjectType *classLabels)
 
virtual void SetDecisionRule (const DecisionRuleType *_arg)
 
void SetInput (const SampleType *sample)
 
void SetMembershipFunctions (const MembershipFunctionVectorObjectType *membershipFunctions)
 
void SetMembershipFunctionsWeightsArray (const MembershipFunctionsWeightsArrayObjectType *weightsArray)
 
virtual void SetNumberOfClasses (unsigned int _arg)
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::Statistics::SampleClassifierFilter< TSample >
static Pointer New ()
 

Protected Member Functions

 SVMClassifier ()
 
virtual ~SVMClassifier ()
 
virtual void DoClassification ()
 
void GenerateData ()
 
void PrintSelf (std::ostream &os, itk::Indent indent) const
 
- Protected Member Functions inherited from itk::Statistics::SampleClassifierFilter< TSample >
 SampleClassifierFilter ()
 
 SampleClassifierFilter (const Self &)
 
virtual ~SampleClassifierFilter ()
 
virtual DataObjectPointer MakeOutput (DataObjectPointerArraySizeType idx) ITK_OVERRIDE
 
void operator= (const Self &)
 

Private Attributes

HyperplanesDistancesListSampleType::Pointer m_HyperplanesDistancesOutput
 
SVMModelPointer m_Model
 
OutputType::Pointer m_Output
 

Additional Inherited Members

- Protected Types inherited from itk::Statistics::SampleClassifierFilter< TSample >
typedef
ProcessObject::DataObjectPointerArraySizeType 
DataObjectPointerArraySizeType
 

Detailed Description

template<class TSample, class TLabel>
class otb::SVMClassifier< TSample, TLabel >

SVM-based classifier.

The first template argument is the type of the target sample data that this classifier will assign a class label for each measurement vector. The second one is the pixel type of the labels to be produced by the classifier.

Before you call the GenerateData method to start the classification process, you should plug in all necessary parts ( a SVM model and a target sample data).

The classification result is stored in a vector of Subsample object. Each class has its own class sample (Subsample object) that has InstanceIdentifiers for all measurement vectors belong to the class. The InstanceIdentifiers come from the target sample data. Therefore, the Subsample objects act as separate class masks.

Deprecated:
See Also
MachineLearningModel
LibSVMMachineLearningModel
ImageClassificationFilter

Definition at line 58 of file otbSVMClassifier.h.

Member Typedef Documentation

template<class TSample , class TLabel >
typedef TLabel otb::SVMClassifier< TSample, TLabel >::ClassLabelType

typedef for label type

Definition at line 86 of file otbSVMClassifier.h.

template<class TSample , class TLabel >
typedef itk::SmartPointer<const Self> otb::SVMClassifier< TSample, TLabel >::ConstPointer

Definition at line 66 of file otbSVMClassifier.h.

template<class TSample , class TLabel >
typedef itk::Statistics::ListSample<HyperplanesDistancesType> otb::SVMClassifier< TSample, TLabel >::HyperplanesDistancesListSampleType

Definition at line 75 of file otbSVMClassifier.h.

template<class TSample , class TLabel >
typedef itk::VariableLengthVector<float> otb::SVMClassifier< TSample, TLabel >::HyperplanesDistancesType

Definition at line 74 of file otbSVMClassifier.h.

template<class TSample , class TLabel >
typedef TSample::MeasurementType otb::SVMClassifier< TSample, TLabel >::MeasurementType

typedefs from TSample object

Definition at line 78 of file otbSVMClassifier.h.

template<class TSample , class TLabel >
typedef TSample::MeasurementVectorType otb::SVMClassifier< TSample, TLabel >::MeasurementVectorType

Definition at line 79 of file otbSVMClassifier.h.

template<class TSample , class TLabel >
typedef Superclass::MembershipFunctionVectorObjectPointer otb::SVMClassifier< TSample, TLabel >::MembershipFunctionPointerVector

typedefs from Superclass

Definition at line 83 of file otbSVMClassifier.h.

template<class TSample , class TLabel >
typedef itk::Statistics::MembershipSample<TSample> otb::SVMClassifier< TSample, TLabel >::OutputType

Output type for GetClassSample method

Definition at line 70 of file otbSVMClassifier.h.

template<class TSample , class TLabel >
typedef itk::SmartPointer<Self> otb::SVMClassifier< TSample, TLabel >::Pointer

Definition at line 65 of file otbSVMClassifier.h.

template<class TSample , class TLabel >
typedef SVMClassifier otb::SVMClassifier< TSample, TLabel >::Self

Standard class typedef

Definition at line 63 of file otbSVMClassifier.h.

template<class TSample , class TLabel >
typedef itk::Statistics::SampleClassifierFilter<TSample> otb::SVMClassifier< TSample, TLabel >::Superclass

Definition at line 64 of file otbSVMClassifier.h.

template<class TSample , class TLabel >
typedef SVMModelType::Pointer otb::SVMClassifier< TSample, TLabel >::SVMModelPointer

Definition at line 97 of file otbSVMClassifier.h.

template<class TSample , class TLabel >
typedef SVMModel<MeasurementType, ClassLabelType> otb::SVMClassifier< TSample, TLabel >::SVMModelType

Type definitions for the SVM Model.

Definition at line 96 of file otbSVMClassifier.h.

Constructor & Destructor Documentation

template<class TSample , class TLabel >
otb::SVMClassifier< TSample, TLabel >::SVMClassifier ( )
protected

Definition at line 29 of file otbSVMClassifier.txx.

template<class TSample , class TLabel >
virtual otb::SVMClassifier< TSample, TLabel >::~SVMClassifier ( )
inlineprotectedvirtual

Definition at line 109 of file otbSVMClassifier.h.

Member Function Documentation

template<class TSample , class TLabel >
virtual::itk::LightObject::Pointer otb::SVMClassifier< TSample, TLabel >::CreateAnother ( void  ) const
template<class TSample , class TLabel >
void otb::SVMClassifier< TSample, TLabel >::DoClassification ( )
protectedvirtual
template<class TSample , class TLabel >
void otb::SVMClassifier< TSample, TLabel >::GenerateData ( void  )
protectedvirtual

Starts the classification process

Reimplemented from itk::Statistics::SampleClassifierFilter< TSample >.

Definition at line 54 of file otbSVMClassifier.txx.

template<class TSample , class TLabel >
SVMClassifier< TSample, TLabel >::HyperplanesDistancesListSampleType * otb::SVMClassifier< TSample, TLabel >::GetHyperplanesDistancesOutput ( )

Returns the hyperplanes distances

Definition at line 97 of file otbSVMClassifier.txx.

template<class TSample , class TLabel >
virtual SVMModelType* otb::SVMClassifier< TSample, TLabel >::GetModel ( )
virtual

Get the number of classes.

template<class TSample , class TLabel >
virtual const char* otb::SVMClassifier< TSample, TLabel >::GetNameOfClass ( ) const
virtual

Standard macros

Reimplemented from itk::Statistics::SampleClassifierFilter< TSample >.

template<class TSample , class TLabel >
SVMClassifier< TSample, TLabel >::OutputType * otb::SVMClassifier< TSample, TLabel >::GetOutput ( void  )

Returns the classification result

Definition at line 81 of file otbSVMClassifier.txx.

template<class TSample , class TLabel >
static Pointer otb::SVMClassifier< TSample, TLabel >::New ( )
static
template<class TSample , class TLabel >
void otb::SVMClassifier< TSample, TLabel >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
protectedvirtual

Reimplemented from itk::Statistics::SampleClassifierFilter< TSample >.

Definition at line 38 of file otbSVMClassifier.txx.

template<class TSample , class TLabel >
virtual void otb::SVMClassifier< TSample, TLabel >::SetModel ( SVMModelType _arg)
virtual

Set the model

template<class TSample , class TLabel >
void otb::SVMClassifier< TSample, TLabel >::SetOutput ( OutputType output)

Definition at line 89 of file otbSVMClassifier.txx.

template<class TSample , class TLabel >
void otb::SVMClassifier< TSample, TLabel >::Update ( void  )

Definition at line 46 of file otbSVMClassifier.txx.

Member Data Documentation

template<class TSample , class TLabel >
HyperplanesDistancesListSampleType::Pointer otb::SVMClassifier< TSample, TLabel >::m_HyperplanesDistancesOutput
private

Hyperplanes distances output

Definition at line 122 of file otbSVMClassifier.h.

template<class TSample , class TLabel >
SVMModelPointer otb::SVMClassifier< TSample, TLabel >::m_Model
private

Definition at line 124 of file otbSVMClassifier.h.

template<class TSample , class TLabel >
OutputType::Pointer otb::SVMClassifier< TSample, TLabel >::m_Output
private

Output pointer (MembershipSample)

Definition at line 119 of file otbSVMClassifier.h.


The documentation for this class was generated from the following files: