Back to Aurora Vision Library website

You are here: Start » Function Reference » Region » Region Spatial Transforms » CropRegionToRectangle

CropRegionToRectangle


Header: AVL.h
Namespace: avl
Module: FoundationLite

Creates a region from a rectangular fragment of another one.

Applications: Can be used to obtain a part of a bigger region, but also to enforce specific region frame.

Syntax

C++
C#
 
void avl::CropRegionToRectangle
(
	const avl::Region& inRegion,
	const avl::Rectangle2D& inRectangle,
	atl::Optional<const avl::CoordinateSystem2D&> inRectangleAlignment,
	avl::Region& outRegion,
	atl::Optional<avl::Rectangle2D&> outAlignedRectangle = atl::NIL,
	atl::Optional<avl::CoordinateSystem2D&> outOutputAlignment = atl::NIL
)

Parameters

Name Type Default Description
Input value inRegion const Region& Input region
Input value inRectangle const Rectangle2D& Rectangle defining a rotated subregion
Input value inRectangleAlignment Optional<const CoordinateSystem2D&> NIL Adjusts the rectangle to the position of the inspected object
Output value outRegion Region& Output region
Output value outAlignedRectangle Optional<Rectangle2D&> NIL Input rectangle after transformation (in the region coordinates)
Output value outOutputAlignment Optional<CoordinateSystem2D&> NIL Alignment of the output region

In-place Processing

This function supports in-place data processing - you can pass the same reference to inRegion and outRegion

Read more about In-place Computation.

Optional Outputs

The computation of following outputs can be switched off by passing value atl::NIL to these parameters: outAlignedRectangle, outOutputAlignment.

Read more about Optional Outputs.