如何使用手势构建语言
我正在开发一个能够识别多种手势的程序。现在需求需要一种使用手势的语言。那么,我该如何构建一个呢?
我目前的想法是使用正则表达式和 Backus Naur Form 来定义语法,但我陷入了设计。
另外:
- 手势只是手指位置,尽管它可以跟踪您何时移动,
- 手势的确切数量是 5,
- 至于手势所指的名词或动词,目前我真的不知道如何分配它们。
- 我不允许发布该手势的图片,否则将被 更清楚
感谢您的任何想法
I am developing a program which is capable of recognizing several hand gestures. Now the requirement needs a language using the hand gestures. So, how can i construct one?
My current idea is using regular expressions and Backus Naur Form to define the syntax, but I get stuck in the design.
PLUS :
- the gestures are merely finger position although it can track when you move
- the exact number of the gesture is 5
- as for the nouns or verbs which the gestures referred to, currently I really have no idea how to assign them.
- I am not permitted to post images of the gesture, otherwise it will be
more clear
Thanks for any ideas
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
根据手势的复杂程度,您可能需要查看美国手语中使用的手势。虽然在某些情况下它可能非常复杂(例如,动作和面部表情可以极大地改变符号的含义),但它在处理复杂的想法和想法方面也非常优雅。虽然这不能直接解决您的问题,但它可能会给您一些想法。有在线资源可以查看各种手势等。
Depending on how complicated the gestures can be, you may want to take a look at the gestures used in American Sign Language. While it can be very elaborate in some cases (for example, motion and facial expression can greatly change the meaning of the sign), it is also very elegant in how it handles complicated ideas and thoughts. While this won't solve your problem directly, it may give you some ideas. There are resources available online to see the various hand gestures, etc.
如果您的手势识别程序可以将手势映射到文本,则可以将 BNF 与 lex 和 yacc 一起使用。
语言的设计将主要受到手势词汇的限制。如果不知道可以识别多少种不同的手势,就很难就语言设计提供建议。我几乎不想这么说,但是看看 Whitespace 来了解一种使用非常多的语言几个符号。一个有效的 FORTH 系统也可以用一小组符号来实现。
If your gesture-recognition program can map hand-gestures to text, you can use BNF along with lex and yacc.
The design of your language is going to be constrained mostly by the vocabulary of hand gestures. Without knowing how many distinct gestures can be recognized, it is very difficult to give advice on language design. I almost hate to say so, but look at Whitespace for a language that uses very few symbols. A working FORTH system can also be implemented with a small set of symbols.
使用手指位置总共有五个手势?好吧,我猜每个手势都是一根手指向上,其余手指向下。一种可能的语言是:
另一种可能性:
另一种可能性:让每对手势(25 种组合)代表字母 A 到 Y(使用 X 代表 Z)并且用英语拼写所有内容。
另一种可能性:让每个手势代表一个以 5 为基数的数字,并根据需要编码任意多个连续数字,映射到任意多个名词/动词。
等等等等
Five gestures total using finger positions? OK, I'll guess each gesture is one finger up and the rest down. A possible language would be:
Another possibility:
Another possibility: let each pair of gestures (25 combinations) represent letters A to Y (use X for Z) and spell everything in English.
Another possibility: let each gesture represent a digit in base 5, and code as many consecutive digits as you wish mapped to as many nouns/verbs you wish.
etc, etc.