Saturday, December 6, 2014

ShortStraw

ShortStraw is a polyline corner finder that finds the minimum set of points such that, if a polyline is split at those points, the resulting primitives would consist only of lines.

Implementation:
1. Resampling: Interspacing between points = Diagonal Distance/Constant. Constant=40
2. Corner finding: It used both bottom up and top-down strategy

Bottom up : Straw for a point pi is calculated as
straw(i) = |pi-W􀀀; pi+W|
As a stroke bends around a corner, the straws of points will begin to shorten, and the local minimum straw at point index k is a likely corner.
Any point k is a corner if its straw(k) is local minimum below threshold t.
Threshold = .95*median of all straws

Top-Down:
a. Check to see if each consecutive pair of corners passes a line test.
r = DISTANCE(points,a,b)/PATH-DISTANCE(points,a,b)
If r is above 0.95, then segment between a and b is considered line

If stroke segment between two consecutive corners do not form a line, then there is a corner between them. The corner is approximately halfway between the points. the threshold is relaxed to find the corner.

b. Collinear check is run on sets of three consecutive corners. If it passes the test, the middle corner is removed.

Two measures to determine accuracy of each corner finder :
1. Correct corners found - does not penalize for false negatives. Accuracy is 1 if every point is returned as a corner.
2. All or nothing : Number of correctly segmented strokes / Total number of strokes.

Advantages: Doesn't use temporal info, Complexity is less.

My thoughts: It is an extremely simple and intuitive method used. We can use few more features along with this and use it for multi-stroke polyline corner finding. 

No comments:

Post a Comment