Interface GridbasedPositionEvaluator<I,​P>

  • Type Parameters:
    I - Type of Image wrapped by ImageWrapper
    P - Type of Point wrapped by Point2Wrapper
    All Superinterfaces:
    PositionEvaluator<I,​P>
    All Known Implementing Classes:
    OpenCVGridbasedPositionEvaluator

    public interface GridbasedPositionEvaluator<I,​P>
    extends PositionEvaluator<I,​P>

    Interface which provides functionality to evaluate e.g. the position of an object in the image based on a given grid for calibration

    Since:
    1.0
    Author:
    Christoph Praschl
    • Method Detail

      • getHorizontalTiles

        int getHorizontalTiles()
        Returns:
        Gets the number of tiles along the x-axis
      • setHorizontalTiles

        void setHorizontalTiles​(int horizontalTiles)
        Parameters:
        horizontalTiles - The number of tiles along the x-axis
      • getVerticalTiles

        int getVerticalTiles()
        Returns:
        Gets the number of tiles along the y-axis
      • setVerticalTiles

        void setVerticalTiles​(int verticalTiles)
        Parameters:
        verticalTiles - The number of tiles along the y-axis
      • getTileWidth

        double getTileWidth()
        Returns:
        Gets the width of one tile in millimeters
      • setTileWidth

        void setTileWidth​(double tileWidth)
        Parameters:
        tileWidth - The width of one tile in millimeters
      • getTileHeight

        double getTileHeight()
        Returns:
        Gets the height of one tile in millimeters
      • setTileHeight

        void setTileHeight​(double tileHeight)
        Parameters:
        tileHeight - The height of one tile in millimeters
      • getTiles

        List<JavaPolygon2D> getTiles()
        Returns:
        Gets the tiles used for position evaluation
      • setTiles

        void setTiles​(List<JavaPolygon2D> tiles)
        Parameters:
        tiles - Tiles used for position evaluation
      • setReferenceImage

        void setReferenceImage​(ImageWrapper<I> referenceImage)
        Parameters:
        referenceImage - Reference image which is used to determine the position of an object
      • getAffectedTile

        JavaPolygon2D getAffectedTile​(Point2Wrapper<P> position)
        Gets the tile which contains the given position.
        Parameters:
        position - The position for which the tile should be returned
        Returns:
        The tile containing the position; Or null if position is not on a tile.
      • getTileIndex

        Point2Wrapper<P> getTileIndex​(JavaPolygon2D tile)
        Gets the x and y index of the given tile
        Parameters:
        tile - Tile for which index should be returned
        Returns:
        The index of the tile or an index -1/-1 if tile was not found