Jump to content

  • Log In with Google      Sign In   
  • Create Account

Recognize drawing made by user


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 reverso13   Members   -  Reputation: 106

Like
0Likes
Like

Posted 24 July 2012 - 05:39 PM

Hi everyone,
I'm working on a personal project for android. I'm programming with actionscript 3 using adobe air.
I'm trying to make a game in which I show an image to the user, for example a triangle, and the user has to paint with his fingers on top of that image and trying not to leave the path. After he finishes drawing I want to check how good the drawing was compared to the original.
As a begginer I don't know where to start or how to implement such a thing.
What would you guys do??

Thanks

Sponsor:

#2 jefferytitan   Crossbones+   -  Reputation: 2243

Like
0Likes
Like

Posted 24 July 2012 - 06:08 PM

As a beginner I'd suggest start with a simple approach, for example:
- For each drawing also store a version where each line has been expanded x pixels in every direction, so effectively a thick line
- Add points for the percentage of the thick line which is filled
- Subtract points for the percentage of what they drew which is outside the thick line

The beauty of the approach is that for scoring all you need to do is ask for each pixel "is it in or out of my ideal answer picture". If you don't care about the thickness of the line you would need to only take the length into account, e.g. if there is a filled pixel anywhere within the width of a segment, consider the segment filled.

It's so hard without diagrams!

#3 bwhiting   Members   -  Reputation: 815

Like
0Likes
Like

Posted 25 July 2012 - 04:25 AM

http://www.lextalkington.com/blog/2011/01/dynamic-mask-and-image-comparison-part-2/

might be of use to you

:)

#4 reverso13   Members   -  Reputation: 106

Like
0Likes
Like

Posted 25 July 2012 - 08:38 AM

Thanks a lot for the help guys! I'll try to implement it and I'll tell you if it works Posted Image




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS