This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Tuesday, December 5, 2006 8:37:49 AM(UTC)
Groups: Registered
Posts: 3
i am using the 15 OCR sdk and want to filter out special characters (!, @,#,$,%,^,&,*, etc) from the list of possible matches. I only want upper, lower and digits. I have tried using:
_rasterDocument.LanguageCharacterFilter = RasterDocumentCharacterFilter.Uppercase
_rasterDocument.LanguageCharacterFilter = RasterDocumentCharacterFilter.Lowercase
_rasterDocument.LanguageCharacterFilter = RasterDocumentCharacterFilter.Digit
But there does not seem to be a way to apply multiple filters or to remove a single particular set of characters.
Any help would be great. Thanks!
#2
Posted
:
Wednesday, December 6, 2006 7:22:48 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
You can use the Plus filter, with the RasterOcr.LanguageCharacterPlus
property to add a set of characters to the original characters of the selected
language.
Then use the RasterOcr.LanguageCharacterPlusFilter
property to set a filter over the language environment (it contains a set of
characters that you select from the language environment).
#3
Posted
:
Monday, December 18, 2006 9:31:51 PM(UTC)
Groups: Registered
Posts: 3
Thank you for the reply. I switched to the 14.5 code so i can use it in a .NET 1.1 application.
I tried your suggestion but i still cannot get it to work. I tried many variations of the following code using the LanguageCharacterFilter, LanguageCharacterPlusFilter and the LanguageCharacterPlusFilter properties.
Options.RasterDoc.LanguageCharacterFilter = LTRASTERDOCLib.CHARFILTER.CHAR_FILTER_ALPHA
Options.RasterDoc.LanguageCharacterPlusFilter = LTRASTERDOCLib.CHARFILTER.CHAR_FILTER_DIGIT
Options.RasterDoc.LanguageCharacterPlus = "0,1,2,3,4,5,6,7,8,9"
Then i call this to check the filter.
MsgBox(Options.RasterDoc.IsCharacterEnabled("A") & " " & Options.RasterDoc.IsCharacterEnabled("9") & " " & Options.RasterDoc.IsCharacterEnabled("+"))
I cannot make the system only allow upper case, lower case and digits.
#4
Posted
:
Thursday, December 21, 2006 7:38:43 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Attached is a VB.net project that I have created
with the LanguageCharacterPlusFilter. Can you test this at your end and see if
it does the desired job.
Note: the project was originally converted from
VB6, but that should make no difference.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.