Question

I was wonder if there is any way to check in Android if I could check if two draws are alike, not specially the same. I want to make a test for little kids . Let's say they draw 'A' letter and I want to check if there is correct. So I think I could check if child's draw is alike as a model. A correct draw for letter 'A'.

So, is there any way for me to implement it?

Was it helpful?

Solution

This is an interesting question. I have never done something like this but here's how I would begin.

Let's say the drawing is done on a Canvas. So, you save the Canvas to a Bitmap. Convert that bitmap to an array of bytes and generate a hash. Then you do the same for the second picture, and compare their hashes. If both hashes do not match, then this means one of the pictures is modified.

I didn't tried this my self, but I believe it's an idea worth investigation.

OTHER TIPS

Interesting question, maybe this other SO question can help you ;)

By the way, i would say that Andy's answer consisting in converting drawing to bitmap and checking the similarities of resulting hashes hasn't much sense, because you would have to put some statistical variance margins to the comparation and allow some logic errors...

good luck!

You can have look in to android gesture and gesture libraries. It helped me. Refer below link http://www.devlper.com/2010/10/gesture-detection-in-android-part-2-of-2/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top