Interface BinaryContourInterface.Padded

  • All Known Implementing Classes:
    BinaryContourFinderLinearExternal
    Enclosing interface:
    BinaryContourInterface

    public static interface BinaryContourInterface.Padded
    Many contour algorithms require that the binary image has an outside border of all zeros. To avoid discarding those pixels a copy of the input image is created with a 1 pixel border added. This interface can be used to toggle that copy on and off. If turned off then the input image is modified in some implementation specific way.
    • Method Detail

      • setCreatePaddedCopy

        void setCreatePaddedCopy​(boolean hasPadding)
        If this is set o true then internally it will create a copy of the input image with a 1-pixel border added. You probably want to also adjust the coordinates using a value of (1,1)
      • isCreatePaddedCopy

        boolean isCreatePaddedCopy()
      • setCoordinateAdjustment

        void setCoordinateAdjustment​(int x,
                                     int y)
        Adjustment applied to pixel coordinate of contour points. Only used if a padded copy is NOT done.