Back to Adaptive Vision Library website

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

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.

Syntax

C++
C#
 
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
)

Parameters

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

Examples

Input region.

Result of the filter's usage.

Errors

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.