Class AbstractSimpleReportBasedObjectTracker

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.QuickInfoSupporter, adams.core.SizeOfHandler, ObjectTracker, Serializable
    Direct Known Subclasses:
    AbstractBoofCVObjectTracker

    public abstract class AbstractSimpleReportBasedObjectTracker
    extends AbstractObjectTracker
    Ancestor for trackers that use fields from the image report to initialize with an initial position and store the current, tracked position.
    Version:
    $Revision$
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected adams.data.report.Field m_Current
      the report field to store the tracked location in.
      protected adams.data.report.Field m_Init
      the report field with the location to initialize the tracker with.
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String currentTipText()
      Returns the tip text for this property.
      void defineOptions()
      Adds options to the internal list of options.
      adams.data.report.Field getCurrent()
      Returns the field to store the current location of the object in.
      adams.data.report.Field getInit()
      Returns the field with the location for initializing the tracker.
      protected List<adams.core.base.QuadrilateralLocation> getInitialLocations​(adams.data.image.AbstractImageContainer cont)
      Returns the initial object locations.
      String getQuickInfo()
      Returns a quick info about the actor, which will be displayed in the GUI.
      String initTipText()
      Returns the tip text for this property.
      protected List<adams.core.base.QuadrilateralLocation> postProcessTrackedObjects​(adams.data.image.AbstractImageContainer cont, List<adams.core.base.QuadrilateralLocation> locations)
      Hook method for post-processing the tracked objects.
      void setCurrent​(adams.data.report.Field value)
      Sets the field to store the current location of the object in.
      void setInit​(adams.data.report.Field value)
      Sets the field with the location for initializing the tracker.
      • Methods inherited from class adams.core.option.AbstractOptionHandler

        cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
      • Methods inherited from class adams.core.logging.LoggingObject

        configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel
    • Field Detail

      • m_Init

        protected adams.data.report.Field m_Init
        the report field with the location to initialize the tracker with.
      • m_Current

        protected adams.data.report.Field m_Current
        the report field to store the tracked location in.
    • Constructor Detail

      • AbstractSimpleReportBasedObjectTracker

        public AbstractSimpleReportBasedObjectTracker()
    • Method Detail

      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class adams.core.option.AbstractOptionHandler
      • setInit

        public void setInit​(adams.data.report.Field value)
        Sets the field with the location for initializing the tracker.
        Parameters:
        value - the field
      • getInit

        public adams.data.report.Field getInit()
        Returns the field with the location for initializing the tracker.
        Returns:
        the field
      • initTipText

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

        public void setCurrent​(adams.data.report.Field value)
        Sets the field to store the current location of the object in.
        Parameters:
        value - the field
      • getCurrent

        public adams.data.report.Field getCurrent()
        Returns the field to store the current location of the object in.
        Returns:
        the field
      • currentTipText

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

        public String getQuickInfo()
        Returns a quick info about the actor, which will be displayed in the GUI.
        Specified by:
        getQuickInfo in interface adams.core.QuickInfoSupporter
        Overrides:
        getQuickInfo in class AbstractObjectTracker
        Returns:
        null if no info available, otherwise short string
      • getInitialLocations

        protected List<adams.core.base.QuadrilateralLocation> getInitialLocations​(adams.data.image.AbstractImageContainer cont)
        Returns the initial object locations.
        Specified by:
        getInitialLocations in class AbstractObjectTracker
        Parameters:
        cont - the current image container
        Returns:
        the locations, null if failed to determine
      • postProcessTrackedObjects

        protected List<adams.core.base.QuadrilateralLocation> postProcessTrackedObjects​(adams.data.image.AbstractImageContainer cont,
                                                                                        List<adams.core.base.QuadrilateralLocation> locations)
        Hook method for post-processing the tracked objects.
        Overrides:
        postProcessTrackedObjects in class AbstractObjectTracker
        Parameters:
        cont - the current image
        locations - the location(s) of the tracked object(s)
        Returns:
        the (potentially) updated location(s) of the tracked object(s)