开发者

C# OCR for chinese characters

I am doing a project in OCR for Chinese characters. But the problem is that开发者_StackOverflow I need to let the users to use their cursor in a square box to choose which part of the image that they want the system to scan and recognize the characters. Do anyone know how to do that? I am required to do something like COCR2.


I assume you have a winforms project. There is an image box with text image. You should add event handlers for MouseDown, MouseUp, MouseMove to your picturebox. When mouse is down you save info what was the point at that second on the image and add some bool to remember that selection started.

When mouse up - you see if selection was started and if it was - take coords of mouse down and mouse up and clone source image with params smth like

Image imgforRecognition = image.Clone(start.X, start.Y, end.X, end.Y);

Then you pass imgforRecognition to your OCR engine.


I once did a project like this. It's about pattern recognition. You'll probably end up using a Neural Network which you will have to teach the Chinese characters.

The Image library can pick a piece out of the image (like LexRema describes). After we did that we resized the image part to, let's say 10x10 pixels, converted the colours to black and white values (0 and 1).

This will create a map of binary data. You will have to teach the Neural Network that the data you pass IS the character you tell. This is pretty default and I'm sure there are a lot of Neural Network examples on the web.

Good luck!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜