Back to Adaptive Vision Library website

You are here: Start » Function Reference » Computer Vision » Optical Character Recognition » SplitRegionIntoExactlyNCharacters


Header: AVL.h
Namespace: avl
Module: OCR

Splits the input region into a fixed-size array of regions corresponding to individual characters.

Applications: Text segmentation when the number of characters is known, usually followed by a RecognizeCharacters filter.


void avl::SplitRegionIntoExactlyNCharacters
	const avl::Region& inRegion,
	const int inCharacterCount,
	const int inCharacterSpacing,
	const float inProjectionSmooth,
	atl::Conditional<atl::Array<avl::Region> >& outRegions,
	atl::Array<avl::Region>& diagClasses,
	avl::Profile& diagProjection


Name Type Range Default Description
Input value
inRegion const Region& Region which contains characters
Input value
inCharacterCount const int 1 - Character count in provided region
Input value
inCharacterSpacing const int 0 - Spacing size between characters
Input value
inProjectionSmooth const float 0.0 - 1.0f Projection smoothing value used to remove noises from character region
Output value
outRegions Conditional<Array<Region> >& Output array of regions containing separated characters
Diagnostic input
diagClasses Array<Region>& Regions that contain location of split characters
Diagnostic input
diagProjection Profile& Profile of region projection used to distinguish characters


Input region.

Result of the filter's usage.


List of possible exceptions:

Error type Description
DomainError Value of inCharacterCount is greater than inRegion frame width.
DomainError Value of inCharactersSpacing is greater than single character width.