OTB  5.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
otb::SVMClassifier< TSample, TLabel > Class Template Reference

#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 Types inherited from itk::ProcessObject
typedef SmartPointer< const SelfConstPointer
 
typedef
DataObject::DataObjectIdentifierType 
DataObjectIdentifierType
 
typedef DataObject::Pointer DataObjectPointer
 
typedef std::vector
< DataObjectPointer
DataObjectPointerArray
 
typedef
DataObjectPointerArray::size_type 
DataObjectPointerArraySizeType
 
typedef std::vector
< DataObjectIdentifierType
NameArray
 
typedef SmartPointer< SelfPointer
 
typedef ProcessObject Self
 
typedef Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

HyperplanesDistancesListSampleTypeGetHyperplanesDistancesOutput ()
 
 itkGetObjectMacro (Model, SVMModelType)
 
virtual void SetModel (SVMModelType *_arg)
 
void Update ()
 
OutputTypeGetOutput ()
 
void SetOutput (OutputType *output)
 
- 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)
 
- Public Member Functions inherited from itk::ProcessObject
virtual void AbortGenerateDataOff ()
 
virtual void AbortGenerateDataOn ()
 
virtual void EnlargeOutputRequestedRegion (DataObject *)
 
virtual const bool & GetAbortGenerateData () const
 
DataObjectPointerArray GetIndexedInputs ()
 
DataObjectPointerArray GetIndexedOutputs ()
 
NameArray GetInputNames () const
 
DataObjectPointerArray GetInputs ()
 
MultiThreader * GetMultiThreader () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedInputs () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedOutputs () const
 
DataObjectPointerArraySizeType GetNumberOfInputs () const
 
DataObjectPointerArraySizeType GetNumberOfOutputs () const
 
virtual const ThreadIdTypeGetNumberOfThreads () const
 
virtual
DataObjectPointerArraySizeType 
GetNumberOfValidRequiredInputs () const
 
NameArray GetOutputNames () const
 
DataObjectPointerArray GetOutputs ()
 
virtual const float & GetProgress () const
 
virtual const bool & GetReleaseDataBeforeUpdateFlag () const
 
virtual bool GetReleaseDataFlag () const
 
NameArray GetRequiredInputNames () const
 
bool HasInput (const DataObjectIdentifierType &key) const
 
bool HasOutput (const DataObjectIdentifierType &key) const
 
virtual DataObjectPointer MakeOutput (const DataObjectIdentifierType &)
 
virtual void PrepareOutputs ()
 
virtual void PropagateRequestedRegion (DataObject *output)
 
virtual void ReleaseDataBeforeUpdateFlagOff ()
 
virtual void ReleaseDataBeforeUpdateFlagOn ()
 
void ReleaseDataFlagOff ()
 
void ReleaseDataFlagOn ()
 
virtual void ResetPipeline ()
 
virtual void SetAbortGenerateData (bool _arg)
 
virtual void SetNumberOfThreads (ThreadIdType _arg)
 
void SetProgress (float progress)
 
virtual void SetReleaseDataBeforeUpdateFlag (bool _arg)
 
virtual void SetReleaseDataFlag (bool flag)
 
virtual void UpdateLargestPossibleRegion ()
 
virtual void UpdateOutputData (DataObject *output)
 
virtual void UpdateOutputInformation ()
 
void UpdateProgress (float progress)
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
const MetaDataDictionaryGetMetaDataDictionary (void) const
 
MetaDataDictionaryGetMetaDataDictionary (void)
 
virtual ModifiedTimeType GetMTime () const
 
virtual const std::string & GetObjectName () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
virtual void Register () const ITK_OVERRIDE
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual void SetReferenceCount (int) ITK_OVERRIDE
 
virtual void UnRegister () const ITK_OVERRIDE
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Protected Member Functions

void PrintSelf (std::ostream &os, itk::Indent indent) const
 
 SVMClassifier ()
 
virtual ~SVMClassifier ()
 
void GenerateData ()
 
virtual void DoClassification ()
 
- Protected Member Functions inherited from itk::Statistics::SampleClassifierFilter< TSample >
virtual DataObjectPointer MakeOutput (DataObjectPointerArraySizeType idx) ITK_OVERRIDE
 
void operator= (const Self &)
 
 SampleClassifierFilter ()
 
 SampleClassifierFilter (const Self &)
 
virtual ~SampleClassifierFilter ()
 
- Protected Member Functions inherited from itk::ProcessObject
virtual void AddInput (DataObject *input)
 
virtual void AddOutput (DataObject *output)
 
bool AddRequiredInputName (const DataObjectIdentifierType &)
 
bool AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx)
 
virtual void CacheInputReleaseDataFlags ()
 
virtual void GenerateInputRequestedRegion ()
 
virtual void GenerateOutputInformation ()
 
virtual void GenerateOutputRequestedRegion (DataObject *output)
 
DataObjectGetInput (const DataObjectIdentifierType &key)
 
const DataObjectGetInput (const DataObjectIdentifierType &key) const
 
DataObjectGetInput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetInput (DataObjectPointerArraySizeType idx) const
 
virtual const
DataObjectPointerArraySizeType
GetNumberOfRequiredInputs () const
 
virtual const
DataObjectPointerArraySizeType
GetNumberOfRequiredOutputs () const
 
DataObjectGetOutput (const DataObjectIdentifierType &key)
 
const DataObjectGetOutput (const DataObjectIdentifierType &key) const
 
DataObjectGetOutput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetOutput (DataObjectPointerArraySizeType idx) const
 
DataObjectGetPrimaryInput ()
 
const DataObjectGetPrimaryInput () const
 
virtual const char * GetPrimaryInputName (void) const
 
DataObjectGetPrimaryOutput ()
 
const DataObjectGetPrimaryOutput () const
 
virtual const char * GetPrimaryOutputName (void) const
 
bool IsIndexedInputName (const DataObjectIdentifierType &) const
 
bool IsIndexedOutputName (const DataObjectIdentifierType &) const
 
bool IsRequiredInputName (const DataObjectIdentifierType &) const
 
 itkLegacyMacro (virtual void RemoveOutput(DataObject *output))
 
 itkLegacyMacro (void SetNumberOfOutputs(DataObjectPointerArraySizeType num))
 
 itkLegacyMacro (virtual void RemoveInput(DataObject *input))
 
 itkLegacyMacro (void SetNumberOfInputs(DataObjectPointerArraySizeType num))
 
DataObjectPointerArraySizeType MakeIndexFromInputName (const DataObjectIdentifierType &name) const
 
DataObjectPointerArraySizeType MakeIndexFromOutputName (const DataObjectIdentifierType &name) const
 
DataObjectIdentifierType MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const
 
DataObjectIdentifierType MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const
 
virtual void PopBackInput ()
 
virtual void PopFrontInput ()
 
 ProcessObject ()
 
virtual void PropagateResetPipeline ()
 
virtual void PushBackInput (const DataObject *input)
 
virtual void PushFrontInput (const DataObject *input)
 
virtual void ReleaseInputs ()
 
virtual void RemoveInput (const DataObjectIdentifierType &key)
 
virtual void RemoveInput (DataObjectPointerArraySizeType)
 
virtual void RemoveOutput (const DataObjectIdentifierType &key)
 
virtual void RemoveOutput (DataObjectPointerArraySizeType idx)
 
bool RemoveRequiredInputName (const DataObjectIdentifierType &)
 
virtual void RestoreInputReleaseDataFlags ()
 
virtual void SetInput (const DataObjectIdentifierType &key, DataObject *input)
 
virtual void SetNthInput (DataObjectPointerArraySizeType num, DataObject *input)
 
virtual void SetNthOutput (DataObjectPointerArraySizeType num, DataObject *output)
 
void SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num)
 
void SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num)
 
virtual void SetNumberOfRequiredInputs (DataObjectPointerArraySizeType)
 
virtual void SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg)
 
virtual void SetOutput (const DataObjectIdentifierType &key, DataObject *output)
 
virtual void SetPrimaryInput (DataObject *input)
 
virtual void SetPrimaryInputName (const DataObjectIdentifierType &key)
 
virtual void SetPrimaryOutput (DataObject *output)
 
virtual void SetPrimaryOutputName (const DataObjectIdentifierType &key)
 
void SetRequiredInputNames (const NameArray &)
 
virtual void VerifyInputInformation ()
 
virtual void VerifyPreconditions ()
 
 ~ProcessObject ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Attributes

HyperplanesDistancesListSampleType::Pointer m_HyperplanesDistancesOutput
 
SVMModelPointer m_Model
 
OutputType::Pointer m_Output
 
virtual const char * GetNameOfClass () const
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
static Pointer New ()
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::Statistics::SampleClassifierFilter< TSample >
static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
- Protected Types inherited from itk::Statistics::SampleClassifierFilter< TSample >
typedef
ProcessObject::DataObjectPointerArraySizeType 
DataObjectPointerArraySizeType
 
- Protected Types inherited from itk::LightObject
typedef int InternalReferenceCountType
 
- Protected Attributes inherited from itk::ProcessObject
TimeStamp m_OutputInformationMTime
 
bool m_Updating
 
- Protected Attributes inherited from itk::LightObject
InternalReferenceCountType m_ReferenceCount
 
SimpleFastMutexLock m_ReferenceCountLock
 

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 60 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 89 of file otbSVMClassifier.h.

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

Definition at line 68 of file otbSVMClassifier.h.

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

Definition at line 78 of file otbSVMClassifier.h.

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

Definition at line 77 of file otbSVMClassifier.h.

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

typedefs from TSample object

Definition at line 81 of file otbSVMClassifier.h.

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

Definition at line 82 of file otbSVMClassifier.h.

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

typedefs from Superclass

Definition at line 86 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 72 of file otbSVMClassifier.h.

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

Definition at line 67 of file otbSVMClassifier.h.

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

Standard class typedef

Definition at line 65 of file otbSVMClassifier.h.

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

Definition at line 66 of file otbSVMClassifier.h.

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

Definition at line 102 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 101 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 114 of file otbSVMClassifier.h.

Member Function Documentation

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

Standard macros

Reimplemented from itk::Object.

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 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 >
otb::SVMClassifier< TSample, TLabel >::itkGetObjectMacro ( Model  ,
SVMModelType   
)

Get the number of classes.

template<class TSample , class TLabel >
static Pointer otb::SVMClassifier< TSample, TLabel >::New ( )
static

Standard macros

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)

Returns the classification result

Definition at line 89 of file otbSVMClassifier.txx.

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

Reimplemented from itk::ProcessObject.

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 128 of file otbSVMClassifier.h.

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

Definition at line 130 of file otbSVMClassifier.h.

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

Output pointer (MembershipSample)

Definition at line 125 of file otbSVMClassifier.h.


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