Skip to content

Absolute Static Crop

Class: AbsoluteStaticCropBlockV1

Source: inference.core.workflows.core_steps.transformations.absolute_static_crop.v1.AbsoluteStaticCropBlockV1

Crop a Region of Interest (RoI) from an image, using absolute 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 AbsoluteStaticCrop 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/absolute_static_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 int Center X of static crop (absolute coordinate).
y_center int Center Y of static crop (absolute coordinate).
width int Width of static crop (absolute value).
height int Height of static crop (absolute value).

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 Absolute Static Crop in version v1.

Input and Output Bindings

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

Bindings
  • input

    • images (image): The image to infer on.
    • x_center (integer): Center X of static crop (absolute coordinate).
    • y_center (integer): Center Y of static crop (absolute coordinate).
    • width (integer): Width of static crop (absolute value).
    • height (integer): Height of static crop (absolute value).
  • output

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