Class AreaRatio

    • Field Detail

      • OVERLAP_PERCENTAGE_HIGHEST

        public static final String OVERLAP_PERCENTAGE_HIGHEST
        the highest overlap percentage.
        See Also:
        Constant Field Values
      • OVERLAP_LABEL_HIGHEST

        public static final String OVERLAP_LABEL_HIGHEST
        the label of the highest overlap.
        See Also:
        Constant Field Values
      • OVERLAP_LABEL_HIGHEST_MATCH

        public static final String OVERLAP_LABEL_HIGHEST_MATCH
        whether the labels of the highest overlap match.
        See Also:
        Constant Field Values
      • m_MinOverlapRatio

        protected double m_MinOverlapRatio
        the minimum overlap ratio to use.
      • m_LabelKey

        protected String m_LabelKey
        the label meta-data key - ignored if empty.
      • m_UseOtherObject

        protected boolean m_UseOtherObject
        whether to use the other object in the output in case of an overlap.
      • m_AdditionalObject

        protected boolean m_AdditionalObject
        whether to check for additional predicted objects not present in actual.
      • m_AverageRatio

        protected boolean m_AverageRatio
        whether to use average overlap ratio instead of just this->other.
    • Constructor Detail

      • AreaRatio

        public AreaRatio()
    • Method Detail

      • setMinOverlapRatio

        public void setMinOverlapRatio​(double value)
        Sets the minimum overlap ratio to use.
        Parameters:
        value - the minimum ratio
      • getMinOverlapRatio

        public double getMinOverlapRatio()
        Returns the minimum overlap ratio to use.
        Returns:
        the minimum ratio
      • minOverlapRatioTipText

        public String minOverlapRatioTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setLabelKey

        public void setLabelKey​(String value)
        Sets the (optional) key for a string label in the meta-data; if supplied the value of the object with the highest overlap gets stored in the report using OVERLAP_LABEL_HIGHEST, OVERLAP_LABEL_HIGHEST_MATCH stores whether the labels match.
        Parameters:
        value - the key, ignored if empty
      • getLabelKey

        public String getLabelKey()
        Returns the (optional) key for a string label in the meta-data; if supplied the value of the object with the highest overlap gets stored in the report using OVERLAP_LABEL_HIGHEST, OVERLAP_LABEL_HIGHEST_MATCH stores whether the labels match.
        Returns:
        the key, ignored if empty
      • labelKeyTipText

        public String labelKeyTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setUseOtherObject

        public void setUseOtherObject​(boolean value)
        Sets whether to use/forward other object data.
        Parameters:
        value - true if to use other object
      • getUseOtherObject

        public boolean getUseOtherObject()
        Returns whether to use/forward other object data.
        Returns:
        true if to use other object
      • useOtherObjectTipText

        public String useOtherObjectTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setAdditionalObject

        public void setAdditionalObject​(boolean value)
        Sets whether to count additional predicted objects.
        Parameters:
        value - true if to count additional predicted objects
      • getAdditionalObject

        public boolean getAdditionalObject()
        Returns whether to count additional predicted objects.
        Returns:
        true if to count additional predicted objects
      • additionalObjectTipText

        public String additionalObjectTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setAverageRatio

        public void setAverageRatio​(boolean value)
        Sets whether to use average overlap ratio instead.
        Parameters:
        value - true if to use average overlap ratio instead
      • getAverageRatio

        public boolean getAverageRatio()
        Returns whether to use average overlap ratio instead.
        Returns:
        true if to use average overlap ratio instead
      • averageRatioTipText

        public String averageRatioTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • splitOverlaps

        public com.github.fracpete.javautils.struct.Struct2<LocatedObjects,​LocatedObjects> splitOverlaps​(LocatedObjects overlaps)
        Splits the overlapping objects into subsets of matching labels and mismatching ones.
        Specified by:
        splitOverlaps in interface LabelAwareObjectOverlap
        Parameters:
        overlaps - all overlaps, to split
        Returns:
        split into matching/mismatching subsets