I have an area where the user can draw using a finger. This area contains an object that I want the user to be able to rotate it clockwise or anti-clockwise. My idea is to offer the user the whole screen to control the object. I mean, if the user starts to describe clock wise finger movements in a circle pattern, the object will rotate on that direction. If the movements are anti-clockwise the object will rotate the other direction.
So, the idea is to detect if the finger is describing circle movements, clockwise or anti-clockwise and the amount of angle. This has to be real-time, I mean, as far as the user is rotating the finger object is rotating.
I have seen apps doing something like that, where the user draws a shape and boom, the app replaces the clunky shape drawn with a pretty one. In essence the app detected that a circle, a triangle, etc., was drawn and replace that gesture with a real pretty shape.
How do I do this kind of stuff? I am just interested in circle movements.
Can you guys point me the direction?
thanks.
Check out the “hough transform for circle detection”. Here is a good blog post to start with: