I've managed to do recognize characters from image. For this reason:
I save all recognized blobs(images) in List
Bitmap bpt1 = new Bitmap(@"C:\2\torec1.png", true);
Bitmap bpt2 = new Bitmap(@"C:\2\torec2.png", true);
List<Bitmap> toRecognize = new List<Bitmap>();
toRecognize.Add(bpt1);
toRecognize.Add(bpt2);
I keep a library of known letters in Dictionary.
Bitmap le = new Bitmap(@"C:\2\e.png", true);
Bitmap lg = new Bitmap(@"C:\2\g.png", true);
Bitmap ln = new Bitmap(@"C:\2\n.png", true);
Bitmap li = new Bitmap(@"C:\2\i.png", true);
Bitmap ls = new Bitmap(@"C:\2\s.png", true);
Bitmap lt = new Bitmap(@"C:\2\t.png", true);
var dict = new Dictionary<string, Bitmap>();
dict.Add("e", le);
dict.Add("g", lg);
dict.Add("n", ln);
dict.Add("i", li);
dict.Add("s", ls);
dict.Add("t", lt);
Then I create New List with Images - from library:
var target = dict.ToList();
And do the comparison of images: (target[index].Key, target[index].Value)
for (int i = 0; i < x; i++)
{
for (int j = 0; j < y; j++)
{
if (CompareMemCmp(toRecognize[i], target[j].Value) == true)
{
textBox3.AppendText("Found!" + Environment.NewLine);
textBox2.AppendText(target[j].Key); //Letter is found - save it!
}
else {textBox3.AppendText("Don't match!" + Environment.NewLine); }
}
}
1. [removed]
2. Is the method that I used tolerable from the perspective of performance? I'm planning to do the recornition of 10-20 images at the same time (average letter count for each is 8) and the library for letters will consist of English alphabet (26 upper + 26 lower case), special letter(~10) and Numbers (10).
So I have 80+ letters that have to be recognized and pattern library which consists of ~70+ characters. Will the performance be at a good level?
Constructive criticism gladly accepted. ;)