Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, December 5, 2006 8:42:49 AM(UTC)
nbushnell

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!

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, December 6, 2006 7:27:48 AM(UTC)

Qasem Lubani  
Guest

Groups: Guests
Posts: 3,034

Was thanked: 1 time(s) in 1 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:36:51 PM(UTC)
nbushnell

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:43:43 AM(UTC)

Qasem Lubani  
Guest

Groups: Guests
Posts: 3,034

Was thanked: 1 time(s) in 1 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.

File Attachment(s):
Project1.NET.zip (191kb) downloaded 24 time(s).
 
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.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.209 seconds.