Class Grid

  • All Implemented Interfaces:
    Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, SizeOfHandler, ObjectPrefixHandler, Serializable

    public class Grid
    extends AbstractSubImagesGenerator
    Splits the image using a grid of specified number of columns and rows.
    Additional report values:
    - Row for the row
    - Column for the column
    - Coordinates for the 1-based coordinates (x,y,w,h)
    It is possible to generate overlapping images (all but last row and last column) by defining overlaps. In case of overlaps, the following report values are then available:
    - OverlapX on the x axis
    - OverlapY on the y axis

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
        min-user-mode: Expert
     
    -prefix <java.lang.String> (property: prefix)
        The report field prefix used in the report.
        default: Object.
     
    -partial <boolean> (property: partial)
        If enabled, partial hits are included as well.
        default: false
     
    -fix-invalid <boolean> (property: fixInvalid)
        If enabled, objects that fall partially outside the image boundaries get
        fixed (eg when allowing partial hits).
        default: false
     
    -num-cols <int> (property: numCols)
        The number of columns.
        default: 1
        minimum: 1
     
    -num-rows <int> (property: numRows)
        The number of rows.
        default: 1
        minimum: 1
     
    -overlap-x <int> (property: overlapX)
        The overlap on the x axis.
        default: 0
        minimum: 0
     
    -overlap-y <int> (property: overlapY)
        The overlap on the y axis.
        default: 0
        minimum: 0
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_NumCols

        protected int m_NumCols
        the number of columns to use.
      • m_NumRows

        protected int m_NumRows
        the number of rows to use.
      • m_OverlapX

        protected int m_OverlapX
        the overlap on the x axis.
      • m_OverlapY

        protected int m_OverlapY
        the overlap on the y axis.
    • Constructor Detail

      • Grid

        public Grid()
    • Method Detail

      • setNumCols

        public void setNumCols​(int value)
        Sets the number of columns in the grid.
        Parameters:
        value - the number of columns
      • getNumCols

        public int getNumCols()
        Returns the number of columns in the grid.
        Returns:
        the number of columns
      • numColsTipText

        public String numColsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setNumRows

        public void setNumRows​(int value)
        Sets the number of rows in the grid.
        Parameters:
        value - the number of rows
      • getNumRows

        public int getNumRows()
        Returns the number of rows in the grid.
        Returns:
        the number of rows
      • numRowsTipText

        public String numRowsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setOverlapX

        public void setOverlapX​(int value)
        Sets the overlap on the x axis.
        Parameters:
        value - the overlap
      • getOverlapX

        public int getOverlapX()
        Returns the overlap on the x axis.
        Returns:
        the overlap
      • overlapXTipText

        public String overlapXTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setOverlapY

        public void setOverlapY​(int value)
        Sets the overlap on the y axis.
        Parameters:
        value - the overlap
      • getOverlapY

        public int getOverlapY()
        Returns the overlap on the y axis.
        Returns:
        the overlap
      • overlapYTipText

        public String overlapYTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui