Author: Daniel Rubio
Digital ink — as it is also commonly known — is typically stored and represented using proprietary or restrictive formats, which has hampered widespread adoption of digital ink across devices developed by different vendors.
The process by which pen-based actions are captured is through a special device named a transducer which absorbs the actual pen movements as digital ink. The information is later passed to recognition software that converts the pen input into computer actions, or, as our case would have it, into an InkML-based fragment for later exchange.
Digital ink applications fall into two categories: archival and streaming. Archival ink applications capture and store digital ink for later processing; a typical case would be that of a digital signature used for a credit card authorization. Streaming ink applications capture and transmit digital ink in real time, such as in the case of an electronic whiteboard.
An InkML document, like XML, comprises nested tags which define the characteristics of a digital ink input stream. The root element inside this type of document is a tag named
<ink> which encloses another series of elements, with the
<trace> tag the most commonly present. The
<trace> tag contains the series of X and Y coordinates representing a sequence of contiguous ink. For practical purposes, each trace can be considered a single character or letter interpreted by the transducer. The following snippet would represent a simple InkML structure:
<ink> <trace> 227 50 226 64 225 78 227 92 228 106 228 120 229 134 230 148 234 162 235 176 238 190 241 204 </trace> <trace> 282 45 281 59 284 73 285 87 287 101 288 115 290 129 291 143 294 157 294 171 294 185 296 199 300 213 </trace> <trace> 366 130 359 143 354 157 349 171 352 185 359 197 371 204 385 205 398 202 408 191 413 177 413 163 </trace> </ink>
Complementing these core InkML elements are of course more detailed tags which allow for the capture of refined Ink trace characteristics such as color and width, all of which are captured using elements like
InkML also defines elements for capturing more specific behaviour like pen orientation, tilt, and tip force, as well as information about transducer device characteristics and detailed dynamic behavior to support handwriting recognition and authentication applications. The next fragment illustrates a more comprehensive use of InkML syntax:
<ink> <defs> <brush id="yellowPen"/> <brush id="bluePen"/> <traceFormat id="normal"/> <traceFormat id="noForce"/> <context id="context1" brushRef="yellowPen" traceFormatRef="normal"/> <context id="context2" contextRef="context1" brushRef="bluePen"/> </defs> <traceGroup contextRef="context1"> <trace> Trace Coordinates </trace> <trace> Trace Coordinates </trace> </traceGroup> <traceGroup contextRef="context2"> <trace> Trace Coordinates </trace> <trace> Trace Coordinates </trace> </traceGroup> </ink>
Notice how the fragment declares a section enclosed within the
<defs> tags, which in itself contains the
<brush> element used in the definition of a pen color, the
<traceFormat> tag, employed for declaring a specific ink trace, and the
<context> tag, which groups certain characteristics for later use at
<trace> level elements. To associate a
<trace> element with a particular
<context>, the ancillary
<traceGroup> is used for aggregating the distinct trace coordinates.
Although InkML is still in its initial stages of development, a quick look at technology vendors in the realm of digital ink applications, like Palm or CIC, can illustrate that integration among their software suites and devices is not very transparent. It is here where Ink Markup Language can provide a tag-based and platform-neutral format for interchanging digital ink between software applications, making it an important standard for future use in electronic pen-driven applications.
Daniel Rubio is the principal consultant at Osmosis Latina, a firm specializing in enterprise software development, training and consulting based in Mexico.