Back to Adaptive Vision Library Lite website

You are here: Start » Region Basics » CreateBoxRegion


Header: AVL.h
Namespace: avl

Creates a rectangular region corresponding to a given box.


void avl::CreateBoxRegion
	const avl::Box& inBox,
	int inFrameWidth,
	int inFrameHeight,
	avl::Region& outRegion


Name Type Range Default Description
inBox const Box& A box defining pixels that will be converted to white elements
inFrameWidth int 0 - 65535 Width of the created region's frame (not to be confused with the width of the box!)
inFrameHeight int 0 - 65535 Height of the created region's frame (not to be confused with the height of the box!)
outRegion Region& Output region


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.


  • Remember to set inFrameWidth and inFrameHeight inputs to specify the region frame.


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

See Also