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

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

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

这篇 Hacker News 讨论聚焦于 2016 年一篇题为《回归手写识别的未来》的文章。用户们回顾了该技术的发展历程,并将现代人工智能的能力与 Palm OS 的“Graffiti”输入法等早期系统进行了对比。 尽管一些参与者对识别技术的进步感到惊叹——例如人工智能能够辨认如 Sütterlin 等历史手写体,但另一些人则对现代平板电脑上手写识别依然不够可靠表示失望。批评者指出,尽管经过了几十年的发展,该技术往往仍显得迟钝、需要不断纠错,且对英语以外语言的支持力度不足。 此次技术探讨还涉及了一些具体的识别算法,用户们对比了“Q$”系列工具、动态时间规整(DTW)方法与 ParaGraph 等传统引擎的有效性。最终,该讨论串突显了手写识别在愿景构想与实际日常使用体验之间依然存在的差距。
相关文章

原文
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