Skip to content

Morphological Transformation

Class: MorphologicalTransformationBlockV1

Source: inference.core.workflows.core_steps.classical_cv.morphological_transformation.v1.MorphologicalTransformationBlockV1

Apply morphological transformation to an image

See https://docs.opencv.org/4.x/d9/d61/tutorial_py_morphological_ops.html

Note: This block currently only supports single-channel (grayscale) images. Color images will be converted to grayscale before processing.

Type identifier

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

Properties

Name Type Description Refs
name str Enter a unique identifier for this step..
kernel_size int Size of the kernel to use for morphological transformation..
operation str Type of morphological operation to use..

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 Morphological Transformation in version v1.

Input and Output Bindings

The available connections depend on its binding kinds. Check what binding kinds Morphological Transformation in version v1 has.

Bindings
  • input

    • image (image): The input image for this step..
    • kernel_size (integer): Size of the kernel to use for morphological transformation..
    • operation (string): Type of morphological operation to use..
  • output

    • image (image): Image in workflows.
Example JSON definition of step Morphological Transformation in version v1
{
    "name": "<your_step_name_here>",
    "type": "roboflow_core/morphological_transformation@v1",
    "image": "$inputs.image",
    "kernel_size": "5",
    "operation": "Closing"
}