• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

Single Character Recognition not working well

V

vasuneet

Flightless Bird
Hi all,
I am facing problem in Single Character Recognition.

Some times it reads 'H' as 'V' and 'B' as 'A' while the strokes are pretty resembles with 'H' and 'B'.

The code snippets are as follows:

Ink mInk = new Ink();
analyzer = new InkAnalyzer(mInk, null);

//the following function inserts the strokes in 'mInk' which need to be recognized
List<Point[]> fetched = FetchStorkesInformation(mInk, userArea, hwrStrokes);

if (mInk.Strokes.Count > 0)
{
string ss = string.Empty;

analysisNode = analyzer.CreateAnalysisHint();
analysisNode.Location.MakeInfinite();
analysisNode.Factoid ="(A|8-|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z)";
analyzer.AddStrokes(mInk.Strokes);

analyzer.SetStrokesType(mInk.Strokes, StrokeType.Writing);
analyzer.SetStrokesLanguageId(mInk.Strokes, 1033);//us english

AnalysisStatus analysisStatus = analyzer.Analyze();

ss = analyzer.GetRecognizedString();
Log.Debug(analysisStatus.Successful);

Log.Debug(ss);
text.Append(ss);
}


Now to solve this issue i have changed the code and used

RecognizerGuide and give the location to the AnalysisHint Node in the following way:

analysisNode = analyzer.CreateAnalysisHint(location);

analysisNode.Guide = new RecognizerGuide(1, 1, (int)(rect.Height) / 2,
new Rectangle(0, 0, rect.Width, rect.Height),
new Rectangle(0, 0, rect.Width, rect.Height));


But due to this factoid property is not working as expected.
'I' is recognized as 1.



Thanks & Regards
Vasuneet Arya
 
Top