Crop
Overview
Crop node extracts a region of interest from the input frame using either a rectangular crop or a perspective-corrected crop.
Use this node to focus downstream processing on a specific area of the frame and reduce unnecessary computation, or to de-skew a region (for example a tilted document or angled label) into a flat rectangular output.
Input
Input Image
image requiredThe image frame to crop. Connect this to a camera or upstream processing output.
Crop Type
stringDetermines which crop mode and input fields are used.
Values:
cropBox(default) — rectangular crop defined byCrop Box.cropPerspective— perspective-corrected crop defined byCrop Perspective.
Crop Box
objectUsed when Crop Type is cropBox. Defines the rectangular region to extract.
Fields (all in image pixel coordinates):
x— left edge of the crop region.y— top edge of the crop region.width— width of the crop region.height— height of the crop region.
Crop Perspective
arrayUsed when Crop Type is cropPerspective. Defines the four corners of a quadrilateral in the source image that will be warped into a flat rectangle in the output.
Four points in image pixel coordinates, in order: top-left, top-right, bottom-right, bottom-left. Each point is [x, y].
Output
Frame Out
imageCropped (and optionally de-skewed) image.