Tuesday, September 18, 2007

Yu

Yu - A Domain-Independent System for Sketch Recognition

Yu's sketch system is very similar to Sezgin's. In both a sketch is segmented into lines and curves by finding perceived corners. Ideally, these corners match those that a human would perceive in an idealized version of the sketch, namely those corners that the human drawer intended are maintained and extraneous corners or jitter in the drawing are smoothed out. Like Sezgin, direction and curvature graphs are constructed; however, Yu does not use speed. Additionally, rather than choosing corners based on certainty metrics, Yu iteratively subdivides line segments a the highest point on the curvature graph to achieve a tighter fit. Yu begins by approximating the sketch as a single, horizontal line segment on either the direction graph (or actual sketch). If this approximation is close enough in a least-squares sense (under a threshold), the segment is accepted, while if not, the segment is subdivided at the maximal curvature point and each segment is fitted. Circles are fitted to a line on the direction graph whose slope is 2*PI/n (n=num of points on the segment). Overtraced circles are broken into multiple segments, and if they appear similarly shaped are replaced by a single "average" circle. Arc are represented by portions of circles. Yu also introduces a set of clean up rules that should help to fit the calculated shape to the intended one. This cleanup consists of deleting very small segments and merging segment that are similarly oriented and connect or overlap. As shown in Yu's examples, this can greatly reduce the number of corner and help achieve shapes that are much closer to the intended shape.

Yu's idea of adding corners that best improve the least squares accuracy of the sketch seems a much better idea than the metrics used by Sezgin. From the programming of Sezgin's algorithm on the class data, I'd frequently see that the best curvature point and the best speed point to add were often very close to each other. Due to this, initially one of the sets of points is largely ignored as the "best" point to add from it has been taken care of by a very close point in the other set, and other points that may improve the sketch neglected because they are good enough according to the metric. Usually this meant nearly all of the curvature and speed point needed to be added to the final fit to achieve a decent fit, severely overestimating the number of points. As clean-up method like Yu's could help alleviate this somewhat, but it seems that being able to skip those points and not add them at all would be more optimal

2 comments:

Grandmaster Mash said...

Sezgin's algorithm relies on the "best" corners being the first ones to find, yet if the corners aren't drawn with sharp angles the algorithm fails for the exact reason you said. The algorithm doesn't try to find the least amount of corners for the highest fit (lowest error). Instead, if the error still isn't low enough, the algorithm just pummels the stroke with more corners.

- D said...

I don't think Yu's idea is "much better." I think both have their pros and cons, especially when Sezgin showed a strong case for the utility of speed data. Perhaps curvature is all we need in our particular data set, but what if we had polylines with intentional corners (speed-based) that were nearly colinear? Sezgin would find the vertex, in this case, while Yu may not. At least, it would be harder for Yu to find the vertex because Sezgin's speed metric would put it right on top.