diff --git a/Code/OBIA/otbHooverInstanceFilter.h b/Code/OBIA/otbHooverInstanceFilter.h index 7bdf525c6dd40f94e5669d55b8fca87d77ad07f6..b8c549a22abb550ce83e458e53c6cb997a72abcb 100644 --- a/Code/OBIA/otbHooverInstanceFilter.h +++ b/Code/OBIA/otbHooverInstanceFilter.h @@ -38,12 +38,14 @@ namespace otb * - over segmentation (a GT region paired with a set of MS regions) * - missed (a GT region that doesn't belong to any of the previous instances) * - noise (a MS region that doesn't belong to any of the previous instances) + * * The corresponding scores are : * - RC : for correct detection * - RF : for over segmentation * - RA : for under segmentation * - RM : for missed regions (only for GT) * - RN : for noise regions (only for MS) + * * 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 @@ -53,10 +55,12 @@ namespace otb * - ATTRIBUTE_US[_x] (under segmentation) : labels of the corresponding regions of GT / label of the under segmentated region of MS * - ATTRIBUTE_M (missed) : missed region own label (in GT) * - ATTRIBUTE_N (noise) : noise region own label (in MS) + * * 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 reseted 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) + * * \sa HooverMatrixFilter */ @@ -162,19 +166,19 @@ protected: /** Re implement the release input method to handle the second input correctly */ virtual void ReleaseInputs(); - /** ThreadedProcessLabelObject : + /** Actions : * - Fill cardinalities of GT regions */ virtual void ThreadedProcessLabelObject( LabelObjectType * labelObject ); - /** BeforeThreadedGenerateData: + /** Actions: * - Check matrix size * - Init cardinalities lists * - Fill cardinalities list for MS (GT is done by ThreadedProcessLabelObject) */ virtual void BeforeThreadedGenerateData(); - /** AfterThreadedGenerateData : + /** Actions : * - Compute Hoover instances */ virtual void AfterThreadedGenerateData(); @@ -205,11 +209,19 @@ private: /** Flag to output additional information in label maps */ bool m_UseExtendedAttributes; - /** Average scores for the whole segmentation */ + /** Average score for correct detection on the whole segmentation */ AttributesValueType m_MeanRC; + + /** Average score for over segmentation on the whole segmentation */ AttributesValueType m_MeanRF; + + /** Average score for under segmentation on the whole segmentation */ AttributesValueType m_MeanRA; + + /** Average score for missed detection on the whole segmentation */ AttributesValueType m_MeanRM; + + /** Average score for noise on the whole segmentation */ AttributesValueType m_MeanRN; }; diff --git a/Code/OBIA/otbHooverMatrixFilter.h b/Code/OBIA/otbHooverMatrixFilter.h index 4ceb3beb36f1e10406bd3bba54b0178a1ff5733e..41ad0f3f465345d89a307ed76210a93eaf1fb566 100644 --- a/Code/OBIA/otbHooverMatrixFilter.h +++ b/Code/OBIA/otbHooverMatrixFilter.h @@ -86,22 +86,21 @@ protected: ~HooverMatrixFilter() {}; - /** BeforeThreadedGenerateData - * Resize the matrix + /** Action : Resize the matrix */ virtual void BeforeThreadedGenerateData(); - /** Real action of the filter : fill the line of the confusion matrix corresponding to + /** Action : fill the line of the confusion matrix corresponding to * the given label object */ virtual void ThreadedProcessLabelObject( LabelObjectType * labelObject ); private: - /** number of label objects found in the ground truth (GT) label maps */ + /** Number of label objects found in the ground truth (GT) label maps */ unsigned long m_NumberOfRegionsGT; - /** number of label objects found in the machine segmentation (MS) label maps */ + /** Number of label objects found in the machine segmentation (MS) label maps */ unsigned long m_NumberOfRegionsMS; /** List of labels in GT label map */ diff --git a/Code/OBIA/otbLabelMapToAttributeImageFilter.h b/Code/OBIA/otbLabelMapToAttributeImageFilter.h index ca311739f7e486b8fbe7d21c62ce56d780605694..c18de64922858bd2634a5f079ca322a3ba6089ff 100644 --- a/Code/OBIA/otbLabelMapToAttributeImageFilter.h +++ b/Code/OBIA/otbLabelMapToAttributeImageFilter.h @@ -30,7 +30,7 @@ namespace otb * \brief This class produces an image from attributes in a label map * * This filter is intended to work on AttributesMapLabelObject. The user chooses - * the attribute to display for each channel. The output image is expected to be + * the attributes to display for each channel. The output image is expected to be * a vector image. */ @@ -71,8 +71,10 @@ public: typedef TAttributeAccessor AttributeAccessorType; typedef typename AttributeAccessorType::AttributeValueType AttributeValueType; - /** Get/Set Macro for background value */ + /** Get macro for background value */ itkGetConstMacro(BackgroundValue, OutputInternalPixelType); + + /** Set macro for background value */ itkSetMacro(BackgroundValue, OutputInternalPixelType); /** Get the current chosen attributes */