Class ImageCropStep
- java.lang.Object
-
- ai.konduit.serving.data.image.step.crop.ImageCropStep
-
- All Implemented Interfaces:
ai.konduit.serving.pipeline.api.step.PipelineStep,ai.konduit.serving.pipeline.api.TextConfig,java.io.Serializable
public class ImageCropStep extends java.lang.Object implements ai.konduit.serving.pipeline.api.step.PipelineStepCrop an image to the specified rectangular region. The crop region may be specified in one of two ways:
(a) Via a bounding box, or
(b) Via aList<Point>of length 2, containing the top-left and bottom-right crop locations.
Furthermore, the bounding box and corner point coordinates may be specified in terms of either pixels or "fraction of image". Note that if the crop region falls partly outside the input image region, black padding will be added as necessary to keep the requested output size.
Supports bothImageandList<Image>inputs.- Author:
- Alex Black
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleancoordsArePixelsprotected ai.konduit.serving.pipeline.api.data.BoundingBoxcropBoxprotected java.lang.StringcropNameprotected java.util.List<ai.konduit.serving.pipeline.api.data.Point>cropPointsprotected java.lang.StringimageName
-
Constructor Summary
Constructors Constructor Description ImageCropStep(java.lang.String imageName, java.lang.String cropName, java.util.List<ai.konduit.serving.pipeline.api.data.Point> cropPoints, ai.konduit.serving.pipeline.api.data.BoundingBox cropBox, boolean coordsArePixels)
-
-
-
Field Detail
-
imageName
protected java.lang.String imageName
-
cropName
protected java.lang.String cropName
-
cropPoints
protected java.util.List<ai.konduit.serving.pipeline.api.data.Point> cropPoints
-
cropBox
protected ai.konduit.serving.pipeline.api.data.BoundingBox cropBox
-
coordsArePixels
protected boolean coordsArePixels
-
-