Interface BinaryContourInterface

All Known Subinterfaces:
BinaryContourFinder, BinaryLabelContourFinder
All Known Implementing Classes:
BinaryContourFinderLinearExternal, BinaryLabelContourFinderChang2004

public interface BinaryContourInterface
Common interface for binary contour finders
  • Method Details

    • getContours

      List<ContourPacked> getContours()
      Returns a list of contours/blobs found. WARNING: List is recycled on the next call to process().
      Returns:
      List of contours.
    • loadContour

      void loadContour​(int contourID, DogArray<Point2D_I32> storage)
      Used to load the pixels associated with a contour.
      Parameters:
      contourID - ID of the contour you wish to load
      storage - Storage for the contour points. Must be set to declare new elements.
    • writeContour

      void writeContour​(int contourID, List<Point2D_I32> storage)
      Overwrites the coordinates of the saved contour. Useful when points have been undistorted and you're trying to minimize memory by not saving another copy
      Parameters:
      contourID - ID of the contour you wish to load
      storage - Storage for the contour points. Must be set to declare new elements.
    • setSaveInnerContour

      void setSaveInnerContour​(boolean enabled)
      Used to toggle on and off the saving of inner contours.
      Parameters:
      enabled - true to enable or false to disable
    • isSaveInternalContours

      boolean isSaveInternalContours()
    • setMinContour

      void setMinContour​(int length)
    • getMinContour

      int getMinContour()
    • setMaxContour

      void setMaxContour​(int length)
    • getMaxContour

      int getMaxContour()
    • setConnectRule

      void setConnectRule​(ConnectRule rule)
    • getConnectRule

      ConnectRule getConnectRule()
    • copyContour

      static List<Point2D_I32> copyContour​(BinaryContourInterface finder, int contourID)
      Convenience function which loads a contour and creates copy of all the points and returns a new list
      Returns:
      New copy of contour