Class CropGridStep

  • All Implemented Interfaces:
    ai.konduit.serving.pipeline.api.step.PipelineStep, ai.konduit.serving.pipeline.api.TextConfig, java.io.Serializable

    public class CropGridStep
    extends java.lang.Object
    implements ai.konduit.serving.pipeline.api.step.PipelineStep
    Crop sub images out of a larger image, based on a grid. The grid location is defined in terms of the x/y coordinates of the corners (which comes from the input Data instance), and the number of segments within the grid in both directions.
    The 4 corner X coordinates come from Data.getListDouble(xName) and the 4 corner Y coordinates come from Data.getListDouble(yName).
    Note that the output depends on the configuration. Always returned: List<Image> - the cropped images from the grid, in order: (row,col) = (0,0), (0, 1), ..., (0, C-1), ..., (R-1, C-1).
    Returned if outputCoordinates=true: two List<Long>s - the box coordinates (0,0), ..., (gridX-1, gridY-1)
    Returned if boundingBoxName != null: one List<BoundingBox> - the crop bounding boxes, (0,0), (0,1), ..., (gridX-1, gridY-1)
    See also CropFixedGridStep
    If aspectRatio is set, the smaller dimension will be increased to keep the aspect ratio correct. Note this may crop outside the image border
    Author:
    Alex Black
    See Also:
    CropFixedGridStep, Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAULT_OUTPUT_NAME  
    • Constructor Summary

      Constructors 
      Constructor Description
      CropGridStep()  
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface ai.konduit.serving.pipeline.api.step.PipelineStep

        name
      • Methods inherited from interface ai.konduit.serving.pipeline.api.TextConfig

        toJson, toYaml
    • Field Detail

      • DEFAULT_OUTPUT_NAME

        public static final java.lang.String DEFAULT_OUTPUT_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • CropGridStep

        public CropGridStep()