You are here: Start » AVL.NET » AVL.CropImageToRectangle Method

AVL.CropImageToRectangle Method

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

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

public static void CropImageToRectangle(
	AvlNet.Image inImage,
	AvlNet.Rectangle2D inRectangle,
	AvlNet.CoordinateSystem2D? inRectangleAlignment,
	AvlNet.InterpolationMethod inInterpolationMethod,
	float inMargin,
	out AvlNet.Image outImage,
	out AvlNet.Rectangle2D outAlignedRectangle,
	out AvlNet.CoordinateSystem2D outOutputAlignment
)

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, or null.
inInterpolationMethodAvlNet.InterpolationMethodBilinearDefault value: Bilinear.
inMarginfloat<0.0f, INF>Width of an additional black margin for the output image.
outImageAvlNet.ImageOutput image.
outAlignedRectangleAvlNet.Rectangle2DInput rectangle after transformation (in the image coordinates)
outOutputAlignmentAvlNet.CoordinateSystem2DAlignment of the output image

Examples

CropImageToRectangle used to extract an image of an object.

See also