Tuesday, June 17, 2008

Windows Beats Linux/OSX at Handwriting

Lately I’ve been trying to code an application which requires some form of natural handwriting recognition. Natural Handwriting is basically the way you write on your Tablet/Pocket PC/Palm/Mobile, either using a stylus on your touch-screen or on the desktop using mouse. And after looking at different options available for handwriting recognition, Windows beats every other operating system including Linux and Mac OSX hands down!!

For the last month or so I’ve tried every possible handwriting recognition software and API out there. Paid, free and open-source API or Programs for Windows, Linux and OSX. Out of all the ones I tried, only one seemed to be perfectly working and easy to develop upon and its from Microsoft. Microsoft has this ultra-amazing API called InkAnalysis, but obviously and sadly for me, works only on Windows. And sad because the application for which I’m developing this handwriting recognition module is a popular open-source kids software and mainly targeted towards Linux distros.

InkAnalysis is a powerful API that performs 2 complementary activities of handwriting recognition and layout classification. InkAnalysis API has very good Interfaces for detecting the layout of any  given document and based on the understanding of the layout it performs handwriting recognition. Even without training it amazingly detects a wide variety of handwriting that even I had a hard time reading as a professor when checking my students’ answer sheets. The API was earlier only available as part of the Windows Vista SDK, but Microsoft has also released the API through the Tablet PC Platform SDK. This means applications that use InkAnalysis API can be run on not only Windows Vista but also Windows XP SP2, SP3 and the future... And the best showcase of the accuracy and strength of the API is through the built-in Windows Vista app called Tablet PC Input (check below screenshot)


During the trials of all the different APIs and programs, I had high expectations of finding something from Apple that “just works”. With the iPhone they seemed to me like the “touch” geniuses and handwriting would definitely be in touch category. But alas! OSX InkWell isn’t good enough. It makes too many mistakes and correcting them doesn’t work very well. Training or no training it had hard time recognizing natural cursive handwriting. Even the API was pretty complex to use and the didn’t have enough explanation.


Finally I came back to where I started... Looking for a API that would work with Linux, preferably was open-source licensed. I tried a few and none were close to useable. HRE from Sun was archiac and complex, Tomoe is for Japanese and Chinese script only, LipiTK from HP Labs doesn’t work like advertised and support won’t reply back to emails. Google’s revived Tesseract is only a OCR-engine, good for typed text and not handwriting. OCRopus is also work-in-progress and not working at the moment. With all my hopes down on the project, I finally reached CellWriter. CellWriter seems to be a good working handwriting recognition, but doesn’t work as modestly as InkWell or perfectly as InkAnalysis. CellWriter uses a cell-based, single-character recognizer. It requires training without which it can’t understand much, but once trained is pretty accurate at character recognition. But I tried applying it to multiple cells and it doesn’t quite work. May be a good character recognizer, but not handwriting recognition.

I thus concluded Microsoft is way ahead of the competition on handwriting recognition. Handwritten input system is useful for a lot of people and developers from the open-source community have yet to realize this fact. After all the Vista rant is popular on the web, someone should have seen its good side!!


Anonymous said...

I'm hoping that those images you've posted are input using a mouse, and not via a stylus. If that's the case, then the solution may be to
switch to a stylus based input. Otherwise, try and take a course in penmanship...

Anonymous said...

"I'm hoping that those images you've posted are input using a mouse, and not via a stylus. If that's the case, then the solution may be to
switch to a stylus based input. Otherwise, try and take a course in penmanship..."

software is supposed to perform for you, not the other way around.

and he's most likely not going to be the exclusive user of his software.

stop trolling.

interesting article.

Saptarshi Purkayastha said...

I've used a mouse to write that down and the software is going to be used by very small kids... Thus they wouldn't have as good a handwriting as you have!! So probably, it was a good test with the mouse!!

andreas said...

I'm writing this comment with cellwriter on my thinkpad x6Ot, and you're correct: good character recognition, not good as handwriting recognition. Microsoft has done a great job on that.