I am working on a project in which I have to develop OCR Algorithm ( I have to read the text from Image and then convert it to different language ).So my first task is to get text from image.
Steps to complete first task.
Results
Detecting image features like resolution and inversion. So that we can finally convert it to a straightened image for further processing. (completed the code of rotation of Image but not able to detect Image angle about which we have to rotate the Image,So still working on angle detection part)
Lines detection and removing. This step is required to improve page layout analysis, to achieve better recognition quality for underlined text, to detect tables, etc.(Decided To Complete that part in End)
Page layout analysis. In this step I am trying to identify the text zones present in the image. So that only that portion is used for recognition and rest of the region is left out.
Detection of text lines and words. Here we also need to take care of different font sizes and small spaces between words.
Recognition of characters. This is the main algorithm of OCR; an image of every character must be converted to appropriate character code. Sometimes this algorithm produces several character codes for uncertain images. For instance, recognition of the image of "I" character can produce "I", "|" "1", "l" codes and the final character code will be selected later.
Saving results to selected output format, for instance, searchable PDF, DOC, RTF, TXT. It is important to save original page layout: columns, fonts, colors, pictures, background and so on.
So I need help in part6.I have completed line detection part (get n Images from a paragraph containing n lines) but stuck in next part getting words and character recognisation.If you know good links related to OCR and character recognisation part then please post Here.
For character recognisation I am thinking to use asprise(Java library) http://asprise.com/product/ocr/index.php?lang=java
To detect the rotation angle, use the Hough transformation.
For noise reduction, replace any pixel, that does not have a neighbour (north, east, south or west) with the same color (a similar color, using a tolerance threshold), with the average of the neighbours.
Search for vertical white gaps for layout detection. Slice along the vertical gap. For each slice, now search horizontal gaps, and slice. If the slices have the same (a similar) height, you are at line level. Otherwise repeat vertical/horizontal slicing, until you only have lines left. The last step then is again a vertical slicing, giving you the single characters (or ligatures in some cases). Long and narrow or short and wide slices are lines.
Compare the character slices with a character library. If performance is not the main concern, try to find the characters within different font libraries, until you can identify the font used. Then stick with that font for character recognition.
In the original image, replace each character with the background color, which is determined by interpolating pixels that not are part of the character for each pixel of the character. This gives you the background image, if any.