One Stroke, One Point, One Sampling #

One of the more important things that has to be done for stroke normalization is uniform sampling (the other being scaling independence). This is especially important when handling user queries, since the user's mouse can linger in certain places that would otherwise not deserve as much detail. Generally speaking, resampling should be easy, since it's just a matter of treating each stroke as a parametric curve. It can then be sampled for regularly spaced intervals of t. Unfortunately, this doesn't always preserve appearance for strokes with sharp angles, especially if the number of samples is low in comparison to the complexity of the curve.

Inspired by this project at Waseda University, I decided to first do a pass of the stroke, looking for critical points ("critical" being defined as control points at which the angle formed by vectors to the previous/next ones is below a certain threshold). Then, when doing resampling, I perturb the uniformity a bit, so that those points get included in the final version. This works well enough for the most part, but it seems to occasionally induce some obtuse angles where there were none before, which throws off to some extent the previously mentioned angle distribution histogram similarity measurement.

Post a Comment