简体   繁体   English

如何检测用户使用GLPain绘制的字母... iPhone

[英]How to detect alphabets drawn Using GLPain by user…IPhone

when the user draws over the stencil of alphabets using GLpaint how to detect the character is drawn completely.. what is the way to do doing this... here is the link for the app doing this...pls check this out and help me soon... http://itunes.apple.com/in/app/toddlers-alphabets-numbers/id408187201?mt=8 当用户使用GLpaint绘制字母模板时,如何检测字符是否已完全绘制..执行此操作的方式是什么...这是执行此操作的应用程序的链接...请检查并帮助我很快... http://itunes.apple.com/in/app/toddlers-alphabets-numbers/id408187201?mt=8

thanks in advance.... 提前致谢....

I think that this application knows beforehand what is the number or letter to guess, and that there is no word-detection. 我认为此应用程序事先知道要猜测的数字或字母是什么,并且没有单词检测功能。
If you notice, there is no need to draw exactly the letter or number, just that the child fills at least part of the image to jump to the next level. 如果您注意到了,则无需精确地绘制字母或数字,只需要孩子填满图像的至少一部分即可跳到下一层。

So, you could (given an image that initially has only one color) calculate what is the amount of pixels drawn by the user with a different color from the initial one, and then you can act according to a certain percentage of pixels that have been drawn. 因此,您可以(给定一幅最初只有一种颜色的图像)计算出用户绘制的颜色与初始颜色不同的像素数量是多少,然后您可以根据一定百分比的像素进行操作画。
See this answer to play with the raw data of an UIImage . 请参阅此答案以处理UIImage的原始数据。
I think you could just use CoreGraphics to do this. 我认为您可以使用CoreGraphics做到这一点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM