Skip to content

Crop image

Overview

This node crops an image by removing portions from its edges. You can define the crop region using either percentages of the total image size or fixed pixel values.

Use Crop image when:

  • You need to remove static obstructions like camera housing or mounting brackets.
  • You want to focus processing on a specific central area of the frame.

⚠️ Warning

Opposing side crops (e.g., left and right or top and bottom) must sum to less than 100% or the total image width, otherwise the operation will fail.

Inputs

NameTypeDescription
imageimageThe original image to be cropped.

Outputs

NameTypeDescription
cropped_imageimageThe resulting image after cropping.

Parameters

ParameterDefaultValid valuesUnitTunable
Dimensionless crop from the left00100%
Dimensionless crop from the top00100%
Dimensionless crop from the right00100%
Dimensionless crop from the bottom00100%
Pixel-wise crop from the left0integerpx
Pixel-wise crop from the top0integerpx
Pixel-wise crop from the right0integerpx
Pixel-wise crop from the bottom0integerpx
Fast cropfalseboolean-

Dimensionless crop from the left, top, right, bottom

Percentage of the image width to remove from the left/top/right/bottom edge.

Pixel-wise crop from the left, top, right, bottom

Number of pixels to remove from the left/top/right/bottom edge.

Fast crop

If enabled, uses an optimized cropping method that may be faster for high-throughput flows.

Example

Remove camera housing

A wide-angle lens captures the edges of its own protective housing. This node is configured to trim 50 pixels from every side to clean up the frame.

Configuration:

  • Pixel-wise crop from the left: 50
  • Pixel-wise crop from the top: 50
  • Pixel-wise crop from the right: 50
  • Pixel-wise crop from the bottom: 50
  • Fast crop: false

Result: The output image is clean and shows only the relevant scene.

Reference: