OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | List of all members
otb::HooverInstanceFilter< TLabelMap > Class Template Reference

#include <otbHooverInstanceFilter.h>

+ Inheritance diagram for otb::HooverInstanceFilter< TLabelMap >:
+ Collaboration diagram for otb::HooverInstanceFilter< TLabelMap >:

Public Types

typedef LabelObjectType::AttributesValueType AttributesValueType
 
typedef LabelObjectType::AttributeType AttributeType
 
typedef itk::VariableLengthVector< CoefficientTypeCardinalVector
 
typedef unsigned long CoefficientType
 
typedef LabelMapType::ConstIterator ConstIteratorType
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef LabelMapType::RegionType ImageRegionType
 
typedef LabelObjectType::IndexType IndexType
 
typedef LabelMapType::Iterator IteratorType
 
typedef LabelMapType::Pointer LabelMapPointer
 
typedef TLabelMap LabelMapType
 
typedef LabelMapType::LabelObjectType LabelObjectType
 
typedef LabelObjectType::LabelType LabelType
 
typedef LabelMapType::LabelVectorType LabelVectorType
 
typedef itk::VariableSizeMatrix< CoefficientTypeMatrixType
 
typedef std::vector< LabelObjectType * > ObjectVectorType
 
typedef itk::SmartPointer< SelfPointer
 
typedef std::set< CoefficientTypeRegionSetType
 
typedef HooverInstanceFilter Self
 
typedef itk::InPlaceLabelMapFilter< TLabelMap > Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual MatrixType GetHooverMatrix ()
 
virtual const char * GetNameOfClass () const
 
virtual double GetThreshold ()
 
virtual bool GetUseExtendedAttributes ()
 
virtual void SetHooverMatrix (MatrixType _arg)
 
virtual void SetThreshold (double _arg)
 
virtual void SetUseExtendedAttributes (bool _arg)
 
void SetGroundTruthLabelMap (const LabelMapType *gt)
 
void SetMachineSegmentationLabelMap (const LabelMapType *ms)
 
const LabelMapTypeGetGroundTruthLabelMap ()
 
LabelMapTypeGetMachineSegmentationLabelMap ()
 
LabelMapTypeGetOutputGroundTruthLabelMap ()
 
LabelMapTypeGetOutputMachineSegmentationLabelMap ()
 

Static Public Member Functions

static Pointer New ()
 
enum  AttributeTypes {
  ATTRIBUTE_CD = 100,
  ATTRIBUTE_OS,
  ATTRIBUTE_US,
  ATTRIBUTE_M,
  ATTRIBUTE_N,
  ATTRIBUTE_RC,
  ATTRIBUTE_RF,
  ATTRIBUTE_RA,
  ATTRIBUTE_RM,
  ATTRIBUTE_RN
}
 
unsigned long m_NumberOfRegionsGT
 
unsigned long m_NumberOfRegionsMS
 
LabelVectorType m_LabelsGT
 
MatrixType m_HooverMatrix
 
CardinalVector m_CardRegGT
 
CardinalVector m_CardRegMS
 
double m_Threshold
 
bool m_UseExtendedAttributes
 
AttributesValueType m_MeanRC
 
AttributesValueType m_MeanRF
 
AttributesValueType m_MeanRA
 
AttributesValueType m_MeanRM
 
AttributesValueType m_MeanRN
 
static std::string GetNameFromAttribute (const AttributeType &a)
 
static AttributeType GetAttributeFromName (const std::string &name)
 
virtual AttributesValueType GetMeanRC ()
 
virtual AttributesValueType GetMeanRF ()
 
virtual AttributesValueType GetMeanRA ()
 
virtual AttributesValueType GetMeanRM ()
 
virtual AttributesValueType GetMeanRN ()
 
 HooverInstanceFilter ()
 
 ~HooverInstanceFilter () override
 
void AllocateOutputs () override
 
void ReleaseInputs () override
 
void ThreadedProcessLabelObject (LabelObjectType *labelObject) override
 
void BeforeThreadedGenerateData () override
 
void AfterThreadedGenerateData () override
 

Detailed Description

template<class TLabelMap>
class otb::HooverInstanceFilter< TLabelMap >

This class computes the Hoover instances.

The Hoover instances are computed from two segmentations : ground truth (GT) and machine segmentation (MS); and a Hoover confusion matrix. It is intended to work with AttributesMapLabelObject, where the Hoover scores will be stored. The different instances are :

The corresponding scores are :

These Hoover scores that are stored in the label maps are computed between 0 (if the region doesn't belong to this kind of instance) and 1.

If the user wants to which region labels have been paired, he can set the flag UseExtendedAttributes. The extended attributes contain the labels that have been paired in Hoover instances:

These attributes are handled in a different way than the Hoover scores. The simple presence of an extended attribute in a given region has a meaning, regardless of its value. It is assumed that its value always corresponds to an existing region label. This is why these extended attributes are not reset but removed before computing Hoover instances. (see Hoover et al., "An experimental comparison of range image segmentation algorithms", IEEE PAMI vol. 18, no. 7, July 1996)

See also
HooverMatrixFilter

Definition at line 74 of file otbHooverInstanceFilter.h.

Member Typedef Documentation

◆ AttributesValueType

template<class TLabelMap >
typedef LabelObjectType::AttributesValueType otb::HooverInstanceFilter< TLabelMap >::AttributesValueType

Definition at line 96 of file otbHooverInstanceFilter.h.

◆ AttributeType

template<class TLabelMap >
typedef LabelObjectType::AttributeType otb::HooverInstanceFilter< TLabelMap >::AttributeType

Definition at line 95 of file otbHooverInstanceFilter.h.

◆ CardinalVector

template<class TLabelMap >
typedef itk::VariableLengthVector<CoefficientType> otb::HooverInstanceFilter< TLabelMap >::CardinalVector

Definition at line 107 of file otbHooverInstanceFilter.h.

◆ CoefficientType

template<class TLabelMap >
typedef unsigned long otb::HooverInstanceFilter< TLabelMap >::CoefficientType

Definition at line 104 of file otbHooverInstanceFilter.h.

◆ ConstIteratorType

template<class TLabelMap >
typedef LabelMapType::ConstIterator otb::HooverInstanceFilter< TLabelMap >::ConstIteratorType

Definition at line 92 of file otbHooverInstanceFilter.h.

◆ ConstPointer

template<class TLabelMap >
typedef itk::SmartPointer<const Self> otb::HooverInstanceFilter< TLabelMap >::ConstPointer

Definition at line 81 of file otbHooverInstanceFilter.h.

◆ ImageRegionType

template<class TLabelMap >
typedef LabelMapType::RegionType otb::HooverInstanceFilter< TLabelMap >::ImageRegionType

Definition at line 98 of file otbHooverInstanceFilter.h.

◆ IndexType

template<class TLabelMap >
typedef LabelObjectType::IndexType otb::HooverInstanceFilter< TLabelMap >::IndexType

Definition at line 101 of file otbHooverInstanceFilter.h.

◆ IteratorType

template<class TLabelMap >
typedef LabelMapType::Iterator otb::HooverInstanceFilter< TLabelMap >::IteratorType

Definition at line 93 of file otbHooverInstanceFilter.h.

◆ LabelMapPointer

template<class TLabelMap >
typedef LabelMapType::Pointer otb::HooverInstanceFilter< TLabelMap >::LabelMapPointer

Definition at line 91 of file otbHooverInstanceFilter.h.

◆ LabelMapType

template<class TLabelMap >
typedef TLabelMap otb::HooverInstanceFilter< TLabelMap >::LabelMapType

Some convenient typedefs.

Definition at line 87 of file otbHooverInstanceFilter.h.

◆ LabelObjectType

template<class TLabelMap >
typedef LabelMapType::LabelObjectType otb::HooverInstanceFilter< TLabelMap >::LabelObjectType

Definition at line 94 of file otbHooverInstanceFilter.h.

◆ LabelType

template<class TLabelMap >
typedef LabelObjectType::LabelType otb::HooverInstanceFilter< TLabelMap >::LabelType

Definition at line 102 of file otbHooverInstanceFilter.h.

◆ LabelVectorType

template<class TLabelMap >
typedef LabelMapType::LabelVectorType otb::HooverInstanceFilter< TLabelMap >::LabelVectorType

Definition at line 97 of file otbHooverInstanceFilter.h.

◆ MatrixType

template<class TLabelMap >
typedef itk::VariableSizeMatrix<CoefficientType> otb::HooverInstanceFilter< TLabelMap >::MatrixType

Definition at line 105 of file otbHooverInstanceFilter.h.

◆ ObjectVectorType

template<class TLabelMap >
typedef std::vector<LabelObjectType*> otb::HooverInstanceFilter< TLabelMap >::ObjectVectorType

Definition at line 109 of file otbHooverInstanceFilter.h.

◆ Pointer

template<class TLabelMap >
typedef itk::SmartPointer<Self> otb::HooverInstanceFilter< TLabelMap >::Pointer

Definition at line 80 of file otbHooverInstanceFilter.h.

◆ RegionSetType

template<class TLabelMap >
typedef std::set<CoefficientType> otb::HooverInstanceFilter< TLabelMap >::RegionSetType

Definition at line 108 of file otbHooverInstanceFilter.h.

◆ Self

template<class TLabelMap >
typedef HooverInstanceFilter otb::HooverInstanceFilter< TLabelMap >::Self

Standard class typedefs.

Definition at line 78 of file otbHooverInstanceFilter.h.

◆ Superclass

template<class TLabelMap >
typedef itk::InPlaceLabelMapFilter<TLabelMap> otb::HooverInstanceFilter< TLabelMap >::Superclass

Definition at line 79 of file otbHooverInstanceFilter.h.

Member Enumeration Documentation

◆ AttributeTypes

template<class TLabelMap >
enum otb::HooverInstanceFilter::AttributeTypes

number of regions (label objects) found in ground truth (GT)

Enumerator
ATTRIBUTE_CD 
ATTRIBUTE_OS 
ATTRIBUTE_US 
ATTRIBUTE_M 
ATTRIBUTE_N 
ATTRIBUTE_RC 
ATTRIBUTE_RF 
ATTRIBUTE_RA 
ATTRIBUTE_RM 
ATTRIBUTE_RN 

Definition at line 137 of file otbHooverInstanceFilter.h.

Constructor & Destructor Documentation

◆ HooverInstanceFilter()

template<class TLabelMap >
otb::HooverInstanceFilter< TLabelMap >::HooverInstanceFilter
protected

◆ ~HooverInstanceFilter()

template<class TLabelMap >
otb::HooverInstanceFilter< TLabelMap >::~HooverInstanceFilter ( )
inlineoverrideprotected

number of regions (label objects) found in ground truth (GT)

Definition at line 236 of file otbHooverInstanceFilter.h.

Member Function Documentation

◆ AfterThreadedGenerateData()

template<class TLabelMap >
void otb::HooverInstanceFilter< TLabelMap >::AfterThreadedGenerateData
overrideprotected

Actions :

  • Compute Hoover instances

Definition at line 278 of file otbHooverInstanceFilter.hxx.

References otbDebugMacro.

◆ AllocateOutputs()

template<class TLabelMap >
void otb::HooverInstanceFilter< TLabelMap >::AllocateOutputs
overrideprotected

Re implement the allocate output method to handle the second output correctly

Definition at line 95 of file otbHooverInstanceFilter.hxx.

◆ BeforeThreadedGenerateData()

template<class TLabelMap >
void otb::HooverInstanceFilter< TLabelMap >::BeforeThreadedGenerateData
overrideprotected

Actions:

  • Check matrix size
  • Init cardinalities lists
  • Fill cardinalities list for MS (GT is done by ThreadedProcessLabelObject)

Definition at line 155 of file otbHooverInstanceFilter.hxx.

References otb::find(), and otbWarningMacro.

◆ CreateAnother()

template<class TLabelMap >
virtual::itk::LightObject::Pointer otb::HooverInstanceFilter< TLabelMap >::CreateAnother ( void  ) const

◆ GetAttributeFromName()

template<class TLabelMap >
static AttributeType otb::HooverInstanceFilter< TLabelMap >::GetAttributeFromName ( const std::string &  name)
inlinestatic

number of regions (label objects) found in ground truth (GT)

Definition at line 190 of file otbHooverInstanceFilter.h.

◆ GetGroundTruthLabelMap()

template<class TLabelMap >
const TLabelMap * otb::HooverInstanceFilter< TLabelMap >::GetGroundTruthLabelMap

Get the input ground truth label map

Definition at line 68 of file otbHooverInstanceFilter.hxx.

◆ GetHooverMatrix()

template<class TLabelMap >
virtual MatrixType otb::HooverInstanceFilter< TLabelMap >::GetHooverMatrix ( )
virtual

◆ GetMachineSegmentationLabelMap()

template<class TLabelMap >
TLabelMap * otb::HooverInstanceFilter< TLabelMap >::GetMachineSegmentationLabelMap

Get the input machine segmentation label map

Definition at line 75 of file otbHooverInstanceFilter.hxx.

◆ GetMeanRA()

template<class TLabelMap >
virtual AttributesValueType otb::HooverInstanceFilter< TLabelMap >::GetMeanRA ( )
virtual

number of regions (label objects) found in ground truth (GT)

◆ GetMeanRC()

template<class TLabelMap >
virtual AttributesValueType otb::HooverInstanceFilter< TLabelMap >::GetMeanRC ( )
virtual

Get the average scores (after filter update)

◆ GetMeanRF()

template<class TLabelMap >
virtual AttributesValueType otb::HooverInstanceFilter< TLabelMap >::GetMeanRF ( )
virtual

number of regions (label objects) found in ground truth (GT)

◆ GetMeanRM()

template<class TLabelMap >
virtual AttributesValueType otb::HooverInstanceFilter< TLabelMap >::GetMeanRM ( )
virtual

number of regions (label objects) found in ground truth (GT)

◆ GetMeanRN()

template<class TLabelMap >
virtual AttributesValueType otb::HooverInstanceFilter< TLabelMap >::GetMeanRN ( )
virtual

number of regions (label objects) found in ground truth (GT)

◆ GetNameFromAttribute()

template<class TLabelMap >
static std::string otb::HooverInstanceFilter< TLabelMap >::GetNameFromAttribute ( const AttributeType a)
inlinestatic

number of regions (label objects) found in ground truth (GT)

Definition at line 151 of file otbHooverInstanceFilter.h.

◆ GetNameOfClass()

template<class TLabelMap >
virtual const char* otb::HooverInstanceFilter< TLabelMap >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

◆ GetOutputGroundTruthLabelMap()

template<class TLabelMap >
TLabelMap * otb::HooverInstanceFilter< TLabelMap >::GetOutputGroundTruthLabelMap

Get the output ground truth label map

Definition at line 82 of file otbHooverInstanceFilter.hxx.

◆ GetOutputMachineSegmentationLabelMap()

template<class TLabelMap >
TLabelMap * otb::HooverInstanceFilter< TLabelMap >::GetOutputMachineSegmentationLabelMap

Get the output machine segmentation label map

Definition at line 89 of file otbHooverInstanceFilter.hxx.

◆ GetThreshold()

template<class TLabelMap >
virtual double otb::HooverInstanceFilter< TLabelMap >::GetThreshold ( )
virtual

◆ GetUseExtendedAttributes()

template<class TLabelMap >
virtual bool otb::HooverInstanceFilter< TLabelMap >::GetUseExtendedAttributes ( )
virtual

◆ New()

template<class TLabelMap >
static Pointer otb::HooverInstanceFilter< TLabelMap >::New ( )
static

Standard New method.

◆ ReleaseInputs()

template<class TLabelMap >
void otb::HooverInstanceFilter< TLabelMap >::ReleaseInputs
overrideprotected

Re implement the release input method to handle the second input correctly

Definition at line 139 of file otbHooverInstanceFilter.hxx.

◆ SetGroundTruthLabelMap()

template<class TLabelMap >
void otb::HooverInstanceFilter< TLabelMap >::SetGroundTruthLabelMap ( const LabelMapType gt)

Set the ground truth label map

Definition at line 54 of file otbHooverInstanceFilter.hxx.

◆ SetHooverMatrix()

template<class TLabelMap >
virtual void otb::HooverInstanceFilter< TLabelMap >::SetHooverMatrix ( MatrixType  _arg)
virtual

◆ SetMachineSegmentationLabelMap()

template<class TLabelMap >
void otb::HooverInstanceFilter< TLabelMap >::SetMachineSegmentationLabelMap ( const LabelMapType ms)

Set the machine segmentation label map

Definition at line 61 of file otbHooverInstanceFilter.hxx.

◆ SetThreshold()

template<class TLabelMap >
virtual void otb::HooverInstanceFilter< TLabelMap >::SetThreshold ( double  _arg)
virtual

◆ SetUseExtendedAttributes()

template<class TLabelMap >
virtual void otb::HooverInstanceFilter< TLabelMap >::SetUseExtendedAttributes ( bool  _arg)
virtual

◆ ThreadedProcessLabelObject()

template<class TLabelMap >
void otb::HooverInstanceFilter< TLabelMap >::ThreadedProcessLabelObject ( LabelObjectType labelObject)
overrideprotected

Actions :

  • Fill cardinalities of GT regions

Definition at line 230 of file otbHooverInstanceFilter.hxx.

References otb::find(), and otbWarningMacro.

Member Data Documentation

◆ m_CardRegGT

template<class TLabelMap >
CardinalVector otb::HooverInstanceFilter< TLabelMap >::m_CardRegGT
private

List of region sizes in GT

Definition at line 275 of file otbHooverInstanceFilter.h.

Referenced by otb::HooverInstanceFilter< TLabelMap >::HooverInstanceFilter().

◆ m_CardRegMS

template<class TLabelMap >
CardinalVector otb::HooverInstanceFilter< TLabelMap >::m_CardRegMS
private

List of region sizes in MS

Definition at line 278 of file otbHooverInstanceFilter.h.

Referenced by otb::HooverInstanceFilter< TLabelMap >::HooverInstanceFilter().

◆ m_HooverMatrix

template<class TLabelMap >
MatrixType otb::HooverInstanceFilter< TLabelMap >::m_HooverMatrix
private

Hoover confusion matrix computed between GT and MS

Definition at line 272 of file otbHooverInstanceFilter.h.

Referenced by otb::HooverInstanceFilter< TLabelMap >::HooverInstanceFilter().

◆ m_LabelsGT

template<class TLabelMap >
LabelVectorType otb::HooverInstanceFilter< TLabelMap >::m_LabelsGT
private

List of labels in GT segmentation

Definition at line 269 of file otbHooverInstanceFilter.h.

Referenced by otb::HooverInstanceFilter< TLabelMap >::HooverInstanceFilter().

◆ m_MeanRA

template<class TLabelMap >
AttributesValueType otb::HooverInstanceFilter< TLabelMap >::m_MeanRA
private

Average score for under segmentation on the whole segmentation

Definition at line 293 of file otbHooverInstanceFilter.h.

Referenced by otb::HooverInstanceFilter< TLabelMap >::HooverInstanceFilter().

◆ m_MeanRC

template<class TLabelMap >
AttributesValueType otb::HooverInstanceFilter< TLabelMap >::m_MeanRC
private

Average score for correct detection on the whole segmentation

Definition at line 287 of file otbHooverInstanceFilter.h.

Referenced by otb::HooverInstanceFilter< TLabelMap >::HooverInstanceFilter().

◆ m_MeanRF

template<class TLabelMap >
AttributesValueType otb::HooverInstanceFilter< TLabelMap >::m_MeanRF
private

Average score for over segmentation on the whole segmentation

Definition at line 290 of file otbHooverInstanceFilter.h.

Referenced by otb::HooverInstanceFilter< TLabelMap >::HooverInstanceFilter().

◆ m_MeanRM

template<class TLabelMap >
AttributesValueType otb::HooverInstanceFilter< TLabelMap >::m_MeanRM
private

Average score for missed detection on the whole segmentation

Definition at line 296 of file otbHooverInstanceFilter.h.

Referenced by otb::HooverInstanceFilter< TLabelMap >::HooverInstanceFilter().

◆ m_MeanRN

template<class TLabelMap >
AttributesValueType otb::HooverInstanceFilter< TLabelMap >::m_MeanRN
private

Average score for noise on the whole segmentation

Definition at line 299 of file otbHooverInstanceFilter.h.

Referenced by otb::HooverInstanceFilter< TLabelMap >::HooverInstanceFilter().

◆ m_NumberOfRegionsGT

template<class TLabelMap >
unsigned long otb::HooverInstanceFilter< TLabelMap >::m_NumberOfRegionsGT
private

number of regions (label objects) found in ground truth (GT)

Definition at line 263 of file otbHooverInstanceFilter.h.

◆ m_NumberOfRegionsMS

template<class TLabelMap >
unsigned long otb::HooverInstanceFilter< TLabelMap >::m_NumberOfRegionsMS
private

number of regions (label objects) found in machine segmentation (MS)

Definition at line 266 of file otbHooverInstanceFilter.h.

◆ m_Threshold

template<class TLabelMap >
double otb::HooverInstanceFilter< TLabelMap >::m_Threshold
private

Threshold used to compute Hoover instances

Definition at line 281 of file otbHooverInstanceFilter.h.

◆ m_UseExtendedAttributes

template<class TLabelMap >
bool otb::HooverInstanceFilter< TLabelMap >::m_UseExtendedAttributes
private

Flag to output additional information in label maps

Definition at line 284 of file otbHooverInstanceFilter.h.


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