重返手写识别的未来
Back to the Future of Handwriting Recognition (2016)

原始链接: https://jackschaedler.github.io/handwriting-recognition/

数字化笔迹往往会产生“锯齿”或像素化现象,因为平板电脑硬件会将输入强制对齐到离散的网格上。这种离散化处理会在本应平滑、连续的曲线中引入不必要的噪点和角度伪影。 为解决这一问题,Groner 开发了一种平滑算法,通过将每个新的原始数据点与先前平滑后的坐标取平均值来减轻这些影响。从几何角度看,这意味着将新点沿矢量向先前位置移动;滑动距离越远,平滑效果就越明显。 虽然这一过程能有效消除视觉噪点并保留笔画的整体形态,但它本质上具有破坏性。过度平滑可能会抹去有意的笔触细节或精细的纹理。因此,选择合适的平滑因子对于平衡消除离散化伪影与保留用户原始意图至关重要。

这条 Hacker News 讨论帖探讨了手写识别技术的演变及其现状。评论者回顾了该技术的历史,指出像 Palm OS 的“Graffiti”那样早期且困难的迭代,如今已被现代技术进步所取代。 讨论强调了早期愿景概念(如 Alan Kay 所倡导的)与实现这些概念所需的软硬件工程之间的差距。参与者提到了当前的技术方案,有人推荐将“Q$”(一种手势识别算法)或动态时间规整(DTW)方法应用于设备端。另一些人则提到了 ParaGraph 等引擎的有效性,该引擎曾被美国邮政署和 Evernote 采用。 讨论最后观察到,当前人工智能的能力已达到极高水平,甚至能转写诸如 Sütterlin 等过时的手写体,使传统的“隐秘”手写风格变得易于辨识。总的来说,这段对话回顾了手写识别技术是如何从一个复杂且处于实验性的领域,转变为一项功能强大且无处不在的技术。
相关文章

原文
You might have noticed that the marks you make on the tablet will appear with ugly little perturbations and jaggies when they are displayed on the screen. This occurs because the tablet can only report pen positions which lie on a discrete grid. This means that even smoothly drawn curves will inevitably include little bumps and corners after being captured by the tablet. These jaggies look ugly, but more importantly, they add unwanted noise to the list of pen positions. In order to remove this noise, Groner decided to smooth the tablet’s output.

"The scheme smoothes the data by averaging a newly arrived data-point with the previously smoothed data-point, thus reducing the noise due to the discreteness of the pen location as measured by the tablet."

What Groner describes as noise due to discreteness, you would probably describe as pixelation. The figure below allows you to get a feel for the effects of pixelation or discretization on a smoothly drawn stroke. Press the Draw button to see the “real” path taken by the pen when drawing a smooth curve. Once the curve is drawn, press the Snap button to see the effect of forcing each point to lie on a discrete grid. Notice how the discretization introduces lots of little bumps, corners, and flat segments in what was previously a smooth curve.



Fortunately, we can smooth the tablet’s output to liberate these points from the impositions of a fixed grid. The smoothing operation is performed by averaging the position of each new quantized datapoint with the position of the last smoothed datapoint. We can geometrically perform this averaging by drawing a straight line between each quantized datapoint and the most recently smoothed datapoint. We then slide the quantized point along this line towards the previously smoothed point. The further we slide the point, the more we accentuate the effect of the smoothing. You can develop an intuition for this smoothing algorithm using the visualization below. The quantized datapoints are drawn in blue, and the smoothed points will be drawn in black. The three buttons allow you to specify how far each point should slide along the guideline. Higher percentages will lead to a smoother curve.
This simple smoothing scheme allows us to rid the data of unwanted bumps and jaggies while still maintaining the overall gesture of the stroke. Note however, that smoothing is a destructive process. Small flourishes of the pen will be obliterated by smoothing. For this reason, it’s crucially important to choose an appropriate smoothing factor.

Draw on the tablet below to see how this smoothing scheme will affect more interesting inputs. You can change the degree to which each stroke is smoothed by dragging the slider to the right of the visualization. Spend some time drawing letters, numbers, and simple shapes onto the tablet. I suggest that you begin by drawing a straight line from the bottom left to the top right of the tablet. Once this is done, slowly drag the slider to see how the stroke is transformed as the amount of smoothing is varied.

Smoothing is based on the equations,

XSi = XSi-1 + XRi
YSi = YSi-1 + YRi

XRi,YRi = coordinates of ith raw point
XSi,YSi = coordinates of ith smoothed point

Smoothing Factor:

联系我们 contact @ memedata.com