Class AvailableDetectors

java.lang.Object
edu.tufts.hrilab.vision.detector.AvailableDetectors

public class AvailableDetectors extends Object
Object Detector Factory. This contains the detector types available to the system, instantiates and dispenses Detectors to the system, and manages the instantiated Detectors. Detectors are made available to the system through a getInstances call, and all Detector clients must notify the factory when a Detector is no longer needed by calling release.
  • Constructor Details

    • AvailableDetectors

      public AvailableDetectors(int imgWidth, int imgHeight, String configFile)
  • Method Details

    • getAll

      public NonEDTListModel<Detector> getAll()
      Should only be used by the GUI!
      Returns:
      container of all instantiated Trackers
    • getOptions

      public List<Predicate> getOptions()
      Get set of available predicates advertised to the rest of the system. Should only be used by CameraControl GUI.
      Returns:
    • hasCapableDetector

      public boolean hasCapableDetector(Term term)
      Find out if there is a Detector that is capable of detecting objects that meet the specified description.
      Parameters:
      term - - Predicate description
      Returns:
      - boolean
    • getInstances

      public List<Detector> getInstances(SearchManager client, Term term)
      Get all available Detectors that match predicate.
      Parameters:
      client - - SearchManager making request
      term -
      Returns:
      list of available detectors matching term
    • release

      public void release(Object client, Detector detector)
      Client needs to let managing factory know when it's done using a Detector instance, so that Detectors can be properly managed and garbage collected.