Class OpenCvClient
Client layer for OpenCV interop
Inheritance
Namespace: IronOcr
Assembly: IronOcr.dll
Syntax
public class OpenCvClient : Object
Properties
Instance
OpenCvClient Instance
Declaration
public static OpenCvClient Instance { get; }
Property Value
Type | Description |
---|---|
OpenCvClient |
Methods
Dispose()
Dispose OpenCvClient
Declaration
public virtual void Dispose()
Finalize()
Dispose OpenCvClient
Declaration
protected override void Finalize()
FindTextRegion(Image, Double, Int32, Boolean, Boolean)
Find first region of Text in image using OpenCV
Declaration
public Rectangle FindTextRegion(Image bitmap, double scale, int dilation_amount, bool binarize, bool invert)
Parameters
Type | Name | Description |
---|---|---|
SixLabors.ImageSharp.Image | bitmap | Source image. |
System.Double | scale | Resolution scale factor. Image width and height will be multiplied by this value. |
System.Int32 | dilation_amount | Dilation amount, in pixels. Text areas width and height will be increased by this value. |
System.Boolean | binarize | True to convert the image to black and white, False otherwise |
System.Boolean | invert | True to invert image colors when binarizing, False otherwise |
Returns
Type | Description |
---|---|
IronSoftware.Drawing.Rectangle |
FindTextRegions(Image, Double, Int32, Boolean, Boolean)
Find all regions of Text in image using OpenCV
Declaration
public List<Rectangle> FindTextRegions(Image bitmap, double scale, int dilation_amount, bool binarize, bool invert)
Parameters
Type | Name | Description |
---|---|---|
SixLabors.ImageSharp.Image | bitmap | Source image. |
System.Double | scale | Resolution scale factor. Image width and height will be multiplied by this value. |
System.Int32 | dilation_amount | Dilation amount, in pixels. Text areas width and height will be increased by this value. |
System.Boolean | binarize | True to convert the image to black and white, False otherwise |
System.Boolean | invert | True to invert image colors when binarizing, False otherwise |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<IronSoftware.Drawing.Rectangle> |
OpenCvClientInit()
Initilize OpenCvClient
Declaration
protected virtual void OpenCvClientInit()