Skip to content

RelativeStaticCrop

Crop a Region of Interest (RoI) from an image, using relative coordinates.

This is useful when placed after an ObjectDetection block as part of a multi-stage workflow. For example, you could use an ObjectDetection block to detect objects, then the RelativeStaticCrop block to crop objects, then an OCR block to run character recognition on each of the individual cropped regions.

Properties

Name Type Description Refs
name str The unique name of this step..
x_center float Center X of static crop (relative coordinate 0.0-1.0).
y_center float Center Y of static crop (relative coordinate 0.0-1.0).
width float Width of static crop (relative value 0.0-1.0).
height float Height of static crop (relative value 0.0-1.0).

The Refs column marks possibility to parametrise the property with dynamic values available in workflow runtime. See Bindings for more info.

Available Connections

Check what blocks you can connect to RelativeStaticCrop.

The available connections depend on its binding kinds. Check what binding kinds RelativeStaticCrop has.

Bindings
Example JSON definition of RelativeStaticCrop step
{
    "name": "<your_step_name_here>",
    "type": "RelativeStaticCrop",
    "images": "$inputs.image",
    "x_center": 0.3,
    "y_center": 0.3,
    "width": 0.3,
    "height": 0.3
}