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

AVL.CreateBoxRegion Method

Creates a rectangular region corresponding to a given box.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

public static void CreateBoxRegion(
	AvlNet.Box inBox,
	int inFrameWidth,
	int inFrameHeight,
	out AvlNet.Region outRegion
)

Parameters

Name Type Range Default Description
inBoxAvlNet.BoxA box defining pixels that will be converted to white elements.
inFrameWidthint<0, INF>Width of the created region's frame (not to be confused with the width of the box!).
inFrameHeightint<0, INF>Height of the created region's frame (not to be confused with the height of the box!).
outRegionAvlNet.RegionOutput region.

Description

The operation creates a region containing pixels lying inside the inBox.

The inFrameWidth and inFrameHeight parameters most often should be set equal to the dimensions of the image this region will be used with. If the input box exceeds these dimensions, the output region will be cropped.

Examples

CreateBoxRegion run with inBox = Box(50,100,200,100).

Errors

Error type Description
DomainError Output region too big in CreateBoxRegion.

See also