如何检测用户的徒手绘图到原始几何对象,如正方形,圆形,三角形 [英] How to detect users’ freehand drawing to primitive geometrical objects like square, circle, triangle

查看:250
本文介绍了如何检测用户的徒手绘图到原始几何对象,如正方形,圆形,三角形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在寻找一些指南/示例如何实现OS X Yosemite的标记功能。即,自动检测/猜测徒手绘图以匹配用户是否尝试绘制圆形,正方形或三角形的意图。

I am currently looking for some guide/samples on how to implement the OS X Yosemite’s markup like features. i.e., auto detecting/guess freehand drawing to match users’ intention of whether they are trying to draw circle, square, or triangle.

请参考下面的图片,左侧side代表用户的徒手绘图,右边是自动检测到的形状被OS X标记替换。

Please refer the image below, the left side represents the users freehand drawing and the right is auto-detected shapes replaced by OS X markup.

推荐答案

从手势识别对象是正在进行的研究。有一类算法称为$ recognizers,你可能想看看。原始的算法是$ 1识别器,它值得一读。

Recognizing objects from gestures is a subject of ongoing research. There is a class of algorithms called "$ recognizers" that you might want to look at. The original algorithm is "The $1 Recognizer" which is worth a read.

实现这样的识别器并不困难,只要你被限制到一个特定的类的形状。 $ 1识别器(如果我记得正确)只适用于连续路径(因此X将不工作,因为它需要两个笔画)。然而,后来的工作扩展了非连续情况的$ 1识别器。

It is not that difficult to implement such recognizers, as long as you are limited to a specific class of shapes. The $1 recognizer (if I recall correctly) only works for a continuous path (so "X" would not work because it requires two strokes). However, later work has extended the $1 recognizer for non-continuous cases.

这篇关于如何检测用户的徒手绘图到原始几何对象,如正方形,圆形,三角形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆