$p点云识别器的python元素

dollarp的Python项目详细描述


dollarpy$P Point-Cloud Recognizer的python实现。

License

Python CompatibilityPyPI VersionFormat

Build StatusCoverage Status

从网站:

The $P Point-Cloud Recognizer is a 2-D gesture recognizer designed for rapid prototyping of gesture-based user interfaces. In machine learning terms, $P is an instance-based nearest-neighbor classifier with a Euclidean scoring function, i.e., a geometric template matcher.

$P is the latest in the dollar family of recognizers that includes $1 for unistrokes and $N for multistrokes. Although about half of $P’s code is from $1, unlike both $1 and $N, $P does not represent gestures as ordered series of points (i.e., strokes), but as unordered point-clouds. By representing gestures as point-clouds, $P can handle both unistrokes and multistrokes equivalently and without the combinatoric overhead of $N. When comparing two point-clouds, $P solves the classic assignment problem between two bipartite graphs using an approximation of the Hungarian algorithm.

Vatavu,R.D.,Anthony,L.,&Wobbrock,J.O.,“Gestures as Point Clouds: A $P Recognizer for User Interface Prototypes”, 在:第14届ACM多式联运国际会议记录 互动(ICMI),圣莫尼卡,洛杉矶,美国,2012年,第273-280页。

安装

dollarpy可以使用pip安装:

pip install dollarpy

用法

dollarpy分三步使用:

fromdollarpyimportRecognizer,Template,Point# Define 'Template' gestures, each consisting of a name and a list of 'Point' elements.# These 'Point' elements have 'x' and 'y' coordinates and optionally the stroke index a point belongs to.tmpl_1=Template('X',[Point(0,0,1),Point(1,1,1),Point(0,1,2),Point(1,0,2)])tmpl_2=Template('line',[Point(0,0),Point(1,0)])# Create a 'Recognizer' object and pass the created 'Template' objects as a list.recognizer=Recognizer([tmpl_1,tmpl_2])# Call 'recognize(...)' to match a list of 'Point' elements to the previously defined templates.result=recognizer.recognize([Point(31,141,1),Point(109,222,1),Point(22,219,2),Point(113,146,2)])print(result)# Output: ('X', 0.733770116545184)

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
安卓 studio安装的java Unity本机广告   java如何将映射转换为对象   java我试图使用rest控制器从h2数据库中检索记录,但它说没有数据集   反思为什么会抛出java。lang.InstanceException?   在opensuse中找不到Java/javac   java为Android上的谷歌地图添加了5900多个标记。如何有效地做   java如何在if语句中使用循环   java如何在JPA(Hibernate)中映射一对多关系和复合主键?   如何在Java中读取和写入外部进程?   Java线程。睡眠时间最短   java使用EclipseGradle插件如何离线托管和使用依赖项(库jar文件)   java为什么虚拟引用在排队时没有被清除?   java无法理解如何创建用于响铃报警的取消按钮   java解析不应通过注入容器错误发生   java Toast或ProgressDialog不显示   java在自定义对象上使用优先级队列的更好方法   java格式的。wmv文件。(或者任何视频文件都很好)   从页面调用另一个侦听器后,不会调用java JSF<f:ajax>侦听器   java注释ConfigApplicationContext不能多次刷新有什么原因吗?