GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureOCR Class / CharacterSet Property
Example





In This Topic
CharacterSet Property (GdPictureOCR)
In This Topic
Defines the restricted recognition characters, so called characters whitelist, that are allowed during subsequent OCR processes. The recognition is limited to the provided characters, that means the engine returns only the specified characters when processing.

For example, if you want to recognize only numeric characters, set this parameter to "0123456789". If you want to recognize only uppercase letters, set it to "ABCDEFGHIJKLMNOPQRSTUVWXYZ". Set this parameter to the empty string to recognize all characters.

Syntax
'Declaration
 
Public Property CharacterSet As String
public string CharacterSet {get; set;}
public read-write property CharacterSet: String; 
public function get,set CharacterSet : String
public: __property string* get_CharacterSet();
public: __property void set_CharacterSet( 
   string* value
);
public:
property String^ CharacterSet {
   String^ get();
   void set (    String^ value);
}

Property Value

The default value is an empty string, means no limit is used.
Example
How to specify the required white list of characters.
Using gdpictureOCR As GdPictureOCR = New GdPictureOCR()
 
    gdpictureOCR.CharacterSet = "0123456789"
 
    'You can do your another stuff with gdpictureOCR here.
End Using
using (GdPictureOCR gdpictureOCR = new GdPictureOCR())
{
    gdpictureOCR.CharacterSet = "0123456789";
 
    //You can do your another stuff with gdpictureOCR here.
}
See Also