You are here: Start » AVLDL.DL_LocateText Method
AVLDL.DL_LocateText Method
Namespace: | AvlNet.DeepLearning |
---|---|
Assembly: | AvlDl.Net.dll |
Syntax
public static void DL_LocateText ( AvlNet.Image inImage, AvlNet.Rectangle2D? inRoi, AvlNet.CoordinateSystem2D? inRoiAlignment, AvlNet.LocateTextModelId inModelId, int inCharHeight, float inWidthScale, int inOpenRadius, int inMinTextArea, int inMargin, AvlNet.Heatmap outHeatmap, IList<AvlNet.Region> outTextRegions, IList<AvlNet.LocateTextResult> outResults )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inImage | AvlNet.Image | ||||
inRoi | AvlNet.Rectangle2D? | ||||
inRoiAlignment | AvlNet.CoordinateSystem2D? | ||||
inModelId | AvlNet.LocateTextModelId | ||||
inCharHeight | int | ||||
inWidthScale | float | ||||
inOpenRadius | int | ||||
inMinTextArea | int | ||||
inMargin | int | ||||
outHeatmap | AvlNet.Heatmap | ||||
outTextRegions | System.Collections.Generic.IList<AvlNet.Region> | ||||
outResults | System.Collections.Generic.IList<AvlNet.LocateTextResult> |
Description
- oriented with angle up to ± 90 degrees,
- if height between 60% and 140% of inCharHeight (in pixels)
- being latin letters (upper- or lower-case), digits or one of: !#$%&()*+,-./:;<=>?@[]^_`{|}~"'\€£¥¢.
This behavior can be configured with parameters described below.
The inRoi and inRoiAlignment inputs may be used to limit the analysed area, which, in most cases, leads to improved performance. Moreover, it may be used to adjust to text which is not horizontally oriented. The inCharHeight should be set to the average height of characters (specifically, capital letters) in the analysed area. E.g. if image contains 2 kind of characters: one being 24 pixels high and the second being 40 pixels high, inCharHeight should be set to 32, irrespective of number of characters of each kind.
In case of fonts with exceptionally wide symbols, inWidthScale may be used to reshape them to a more "typical" aspect ratio. The analysed area will be scaled by inWidthScale in the horizontal axis. It may improve quality of results.
Example:
The inMinTextArea parameter may be used to change minimum area of predicted text. Detected text with area below this limit will be discarded. By default, this parameter is set to 50.
The inOpenRadius helps disjoint merged words, by applying Open Morphological filter on heatmap. By default, it's set to 0. Example:
The inMargin parameter adds extra padding to outResults.Box. By default it's set to 4.
Too big inOpenRadius value on image with small text may cause issues with disappearing or wrong oriented boxes. Try to reduce this value if it happens. Example of too big inOpenRadius value:
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Not supported inImage pixel format in AvsFilter_DL_LocateText. Supported formats: 1xUInt8, 3xUInt8. |
Function Overrides
- DL_LocateText(Image, LocateTextModelId, Int32, Single, Int32, Int32, Int32, Heatmap, IList<Region>, IList<LocateTextResult>)
- DL_LocateText(Image, Nullable<Rectangle2D>, Nullable<CoordinateSystem2D>, LocateTextModelId, Int32, Single, Int32, Int32, Int32, Heatmap, IList<Region>, IList<LocateTextResult>, Rectangle2D)
- DL_LocateText(Image, Nullable<Rectangle2D>, Nullable<CoordinateSystem2D>, LocateTextModelId, Int32, Single, Int32, Int32, Int32, Heatmap, IList<Region>, IList<LocateTextResult>, NullableValue<Rectangle2D>)