Skip to content

Relative Static Crop

Class: RelativeStaticCropBlockV1

Source: inference.core.workflows.core_steps.transformations.relative_static_crop.v1.RelativeStaticCropBlockV1

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.

Type identifier

Use the following identifier in step "type" field: roboflow_core/relative_statoic_crop@v1to add the block as as step in your workflow.

Properties

Name Type Description Refs
name str Enter a unique identifier for 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

Compatible Blocks

Check what blocks you can connect to Relative Static Crop in version v1.

Input and Output Bindings

The available connections depend on its binding kinds. Check what binding kinds Relative Static Crop in version v1 has.

Bindings
  • input

  • output

    • crops (image): Image in workflows.
Example JSON definition of step Relative Static Crop in version v1
{
    "name": "<your_step_name_here>",
    "type": "roboflow_core/relative_statoic_crop@v1",
    "images": "$inputs.image",
    "x_center": 0.3,
    "y_center": 0.3,
    "width": 0.3,
    "height": 0.3
}