Client Profile - Codehost
Codehost offers turnkey solutions, software development and business development services. Their business model combines a superior technical staff with solid industry expertise in the areas of Linux, Unix, Embedded Software, Printing and Mobile Computing. It is their goal to offer their partners the most complete, robust solution for their products and customers. This often involves introducing OEM's and software partners to one another to collaborate on projects.
Mozdev Group was hired by Codehost to produce a Handwriting Recognition Interface (HRI), otherwise known as a graffiti drawing recognition engine. The main parts of the application are a User Interface to present a canvas for the users to draw on and to choose options, and an XPCOM component to hook into an existing third-party recognition engine. The target platform is Linux only, and this is the platform that the recognition engine was built for. Everything is packaged up into and XPI installer which can be installed on top of any targeted Mozilla distribution.
The <hricanvas> is a custom tag that can be inserted into an HTML document. It displays the canvas for drawing and several buttons underneath. There are four buttons: Convert, for converting the drawn text and placing it into a field, Clear to clear the drawn text, Undo to undo a stroke, and Options to display an options dialog. A stroke is a sequence of coordinates between a mousedown and a mouseup that presumably constitute a letter.
Figure 1 : A Line of Text Converted from the Canvas
The user may write text on the canvas by clicking and dragging the mouse. By default, only one word is handled at a time, but there are options for changing this (see section below Options->Detection). When the user presses the Convert button, the engine will attempt to detect the letters that were written on the canvas. The detected text will be filled into a text field. If the user presses the Clear button, the canvas and the text field are cleared. The user may undo by pressing the Undo button. The Options button will display an options dialog to change handwriting detection options. Here is some example HTML:
Figure 2 : HRI Canvas Options
The options dialog essentially was created to expose the recognition engine settings in the UI. Settings to allow a user to choose what type of detection the engine should use, writing style, text case, text type, and drawing parameters.
The engine is flexible enough to recognize many different types of input. Via the options, you have a choice of detection type, case, writing style, numbers, capitalization, and punctuation. Let's explore these options a little more individually. There are three choices for the type of detection. The first choice is 'By Character' which only detects a single character at a time. This means that the recognizer expects only one character to be entered at a time. The second choice is 'By Word' which detects whole words and is default choice. The third choice is 'By Line' which allows an entire line of text to be detected at once. You can toggle between Lowercase, Uppercase and Mixed case detection. The writing style that the recognizer detects has a choice betwween Print, PseudoPrint and Cursive. The recognition of numeric digits can be turned on or off, as can the acceptance of leading capitalization on words. Finally, a toggle is offered to indicate whether punctuation is recognized or not.
Here is a list of the other options available for writing and the appearance of the canvas.
- Timeout: the value in seconds before written text is converted automatically. The timeout can also be disabled, so the user must use the Convert button to convert text.
- Background Color: the color of the background.
- Drawing Color: the color of the lines to draw.
- Line Thickness: the thickness of the drawn lines. When the user writes a character, the drawn lines will be displayed with the given thickness. This option is a toggle between thin lines and thick lines. The default value is thin.