You are here: Start » AVL.NET » Function Reference » Image » Image Spatial Transforms » AVL.CropImageToRectangle

AVL.CropImageToRectangle

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

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void CropImageToRectangle
(
	AvlNet.Image inImage,
	AvlNet.Rectangle2D inRectangle,
	AvlNet.CoordinateSystem2D? inRectangleAlignment,
	AvlNet.CropScaleMode inScaleMode,
	AvlNet.InterpolationMethod inInterpolationMethod,
	float inMargin,
	AvlNet.Pixel inBorderColor,
	AvlNet.Image outImage
)

Parameters

Name Type Range Default Description
inImageAvlNet.ImageInput image.
inRectangleAvlNet.Rectangle2DRectangle defining a rotated subimage.
inRectangleAlignmentAvlNet.CoordinateSystem2D?Adjusts the rectangle to the position of the inspected object. Default value: atl::NIL.
inScaleModeAvlNet.CropScaleModeInputScaleInputScale keeps the input scale unchanged, AlignedScale rescales according to the input alignment scale. Default value: InputScale.
inInterpolationMethodAvlNet.InterpolationMethodBilinearDefault value: Bilinear.
inMarginfloat<0.0f, INF>Width of an additional margin for the output image.
inBorderColorAvlNet.PixelColor used for locations outside the rectangle.
outImageAvlNet.ImageOutput image.

Examples

CropImageToRectangle used to extract an image of an object.

Function Overrides

See also