Class Uchiya_to_FiducialDetector<T extends ImageGray<T>>

java.lang.Object
boofcv.abst.fiducial.FiducialDetectorPnP<T>
boofcv.abst.fiducial.Uchiya_to_FiducialDetector<T>
All Implemented Interfaces:
FiducialDetector<T>, FiducialTracker<T>

public class Uchiya_to_FiducialDetector<T extends ImageGray<T>>
extends FiducialDetectorPnP<T>
implements FiducialTracker<T>
Wrapper around UchiyaMarkerTracker for FiducialDetector. To add documents call addMarker(List)
  • Constructor Details

  • Method Details

    • detect

      public void detect​(T input)
      Description copied from interface: FiducialTracker
      Detects and tracks fiducials inside the image. Since it is a tracker it is assumed that a sequence of images is being processed. Order of images will matter.
      Specified by:
      detect in interface FiducialDetector<T extends ImageGray<T>>
      Specified by:
      detect in interface FiducialTracker<T extends ImageGray<T>>
      Parameters:
      input - Input image. Not modified.
    • reset

      public void reset()
      Description copied from interface: FiducialTracker
      Removes all past history from the tracker and sets it back into its current state.
      Specified by:
      reset in interface FiducialTracker<T extends ImageGray<T>>
    • totalFound

      public int totalFound()
      Description copied from interface: FiducialDetector
      The total number of fiducial found
      Specified by:
      totalFound in interface FiducialDetector<T extends ImageGray<T>>
      Returns:
      number of targets found
    • getCenter

      public void getCenter​(int which, Point2D_F64 location)
      Description copied from interface: FiducialDetector
      Returns where in the image the fiducial is. Typically this will be the fiducial's visual center. Note that the visual center is unlikely to be the projection of the 3D geometric center. To find the former you need to reproject it using the found fiducialToCamera.

      NOTE: The reprojected center might not be the same as the location returned here.

      Specified by:
      getCenter in interface FiducialDetector<T extends ImageGray<T>>
      Parameters:
      which - Fiducial's index
      location - (output) Storage for the transform. modified.
    • getBounds

      public Polygon2D_F64 getBounds​(int which, @Nullable @Nullable Polygon2D_F64 storage)
      Description copied from interface: FiducialDetector
      Used to retrieve the bounds around a marker in the image. How the bounds are defined is left up the implementation. It could be a simple rectangle or it could be corner features.
      Specified by:
      getBounds in interface FiducialDetector<T extends ImageGray<T>>
      Parameters:
      which - Which fiducial.
      storage - (Optional) Storage for fiducials.
      Returns:
      Found marker. Points are owned by the caller and will not be modified in the future.
    • getId

      public long getId​(int which)
      Description copied from interface: FiducialDetector
      If applicable, returns the ID of the fiducial found. Call FiducialDetector.hasID() to see if this function returns a valid value.
      Specified by:
      getId in interface FiducialDetector<T extends ImageGray<T>>
      Parameters:
      which - Detected fiducial's index
      Returns:
      ID of the fiducial
    • getMessage

      public String getMessage​(int which)
      Description copied from interface: FiducialDetector
      If applicable, returns a message associated with the fiducial. Call FiducialDetector.hasMessage() ()} to see if this function returns a valid value.
      Specified by:
      getMessage in interface FiducialDetector<T extends ImageGray<T>>
      Parameters:
      which - Detected fiducial's index
      Returns:
      Encoded message
    • getWidth

      public double getWidth​(int which)
      Description copied from interface: FiducialDetector
      Returns the width of the fiducial in world units. If not square then it returns a reasonable approximation. Intended for use in visualization and not precise calculations.
      Specified by:
      getWidth in interface FiducialDetector<T extends ImageGray<T>>
      Parameters:
      which - Fiducial's index
      Returns:
      Fiducial's width.
    • getSideWidth

      public double getSideWidth​(int which)
      Description copied from class: FiducialDetectorPnP
      Width of the fiducial. used to compute stability
      Specified by:
      getSideWidth in class FiducialDetectorPnP<T extends ImageGray<T>>
      Parameters:
      which - specifies which fiducial
      Returns:
      the width
    • getSideHeight

      public double getSideHeight​(int which)
      Description copied from class: FiducialDetectorPnP
      Height of the fiducial. used to compute stability
      Specified by:
      getSideHeight in class FiducialDetectorPnP<T extends ImageGray<T>>
      Parameters:
      which - specifies which fiducial
      Returns:
      the height
    • getDetectedControl

      public List<PointIndex2D_F64> getDetectedControl​(int which)
      Description copied from class: FiducialDetectorPnP
      Returns a list of detected control points in the image for the specified fiducial. Observations will be in distorted image pixels.
      Specified by:
      getDetectedControl in class FiducialDetectorPnP<T extends ImageGray<T>>
    • getControl3D

      protected List<Point2D3D> getControl3D​(int which)
      Description copied from class: FiducialDetectorPnP
      3D location of control points in the fiducial reference frame
      Specified by:
      getControl3D in class FiducialDetectorPnP<T extends ImageGray<T>>
      Returns:
      3D location of control points
    • hasID

      public boolean hasID()
      Description copied from interface: FiducialDetector
      If true then FiducialDetector.getId(int) returns a valid unique number
      Specified by:
      hasID in interface FiducialDetector<T extends ImageGray<T>>
      Returns:
      boolean
    • hasMessage

      public boolean hasMessage()
      Description copied from interface: FiducialDetector
      If true then FiducialDetector.getMessage(int) returns a valid message
      Specified by:
      hasMessage in interface FiducialDetector<T extends ImageGray<T>>
      Returns:
      boolean
    • getInputType

      public ImageType<T> getInputType()
      Description copied from interface: FiducialDetector
      Type of input image
      Specified by:
      getInputType in interface FiducialDetector<T extends ImageGray<T>>
    • addMarker

      public LlahDocument addMarker​(List<Point2D_F64> locations2D)
      Creates a document from a set of points.
    • getLlahOperations

      public LlahOperations getLlahOperations()
    • getTracks

      public DogArray<UchiyaMarkerTracker.Track> getTracks()