Back to Aurora Vision Studio website

You are here: Start » Filter Reference » Image » Image Spatial Transforms » CropImageToRectangle

CropImageToRectangle


Module: FoundationLite

Creates an image from a rectangular fragment of another image (with black margins if requested).

Applications

Usually used for creating images of individual objects, e.g. after Template Matching.
Name Type Range Description
Input value inImage Image Input image
Input value inRectangle Rectangle2D Rectangle defining a rotated subimage
Input value inRectangleAlignment CoordinateSystem2D* Adjusts the rectangle to the position of the inspected object
Input value inScaleMode CropScaleMode InputScale keeps the input scale unchanged, AlignedScale rescales according to the input alignment scale
Input value inInterpolationMethod InterpolationMethod
Input value inMargin Real 0.0 - Width of an additional margin for the output image
Input value inBorderColor Pixel Color used for locations outside the rectangle
Output value outImage Image Output image
Output value outAlignedRectangle Rectangle2D Input rectangle after transformation (in the image coordinates)
Output value outOutputAlignment CoordinateSystem2D Alignment of the output image

Hints

  • It is usually recommended to use Local Coordinate Systems rather than image cropping.
  • To obtain output images with constant dimensions regardless of inRectangleAlignment set inScaleMode to AlignedScale. The output image size will be equal to inRectangle size optionally modified by inMargin.

Examples

CropImageToRectangle used to extract an image of an object.

Complexity Level

This filter is available on Basic Complexity Level.

Filter Group

This filter is member of CropImage filter group.