graphics - Is there some well-known algorithm which turns user's drawings into smoothed shapes? -


my requirements: user should able draw hand. after takes off pen (or finger) algorithm smooths , transforms basic shapes.

enter image description here

to started want transform drawing rectangle resembles original as possible. (naturally won't work if user intentionally draws else.) right i'm calculating average x , y position, , i'm distinguishing between horizontal , vertical lines. it's not yet rectangle kind of orthogonal lines.

i wondered if there well-known algorithm that, because saw few times @ touchscreen applications. have reading tip?

update: maybe pattern recognition algorithm me. there phones request user draw pattern unlock it's keys.

p.s.: think question not related particular programming language, if you're interested, build web application raphaelgwt.

the douglas-peucker algorithm used in geography (to simplify gps track instance) guess used here well.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -