CN106227332B - 一种基于特征图像旋转来响应事件的交互方法 - Google Patents
一种基于特征图像旋转来响应事件的交互方法 Download PDFInfo
- Publication number
- CN106227332B CN106227332B CN201610545411.8A CN201610545411A CN106227332B CN 106227332 B CN106227332 B CN 106227332B CN 201610545411 A CN201610545411 A CN 201610545411A CN 106227332 B CN106227332 B CN 106227332B
- Authority
- CN
- China
- Prior art keywords
- virtual
- bar
- characteristic image
- point
- exchange method
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 19
- 238000000926 separation method Methods 0.000 claims abstract description 6
- 230000001360 synchronised effect Effects 0.000 claims abstract description 3
- 239000011800 void material Substances 0.000 claims description 6
- 238000009877 rendering Methods 0.000 claims description 3
- 230000002452 interceptive effect Effects 0.000 abstract description 9
- 241000287181 Sturnus vulgaris Species 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- PEDCQBHIVMGVHV-UHFFFAOYSA-N Glycerine Chemical compound OCC(O)CO PEDCQBHIVMGVHV-UHFFFAOYSA-N 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000009429 distress Effects 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/011—Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/033—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
- G06F3/0354—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
- G06F3/03541—Mouse/trackball convertible devices, in which the same ball is used to track the 2D relative movement
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
- Processing Or Creating Images (AREA)
Abstract
本发明公开了一种基于特征图像旋转来响应事件的交互方法,包括:为特征图像绑定虚拟点和虚拟杆,其中虚拟点与特征图像同步旋转,虚拟杆保持朝向不变,且与虚拟点的旋转路径相交,旋转特征图像至虚拟点和虚拟杆相交或分离时,触发事件。本发明提供的基于特征图像旋转来响应事件的交互方法,通过罗盘指针实现鼠标的左键功能,相比于虚拟按钮有更好的交互体验。
Description
技术领域
本发明涉及计算机科学的虚拟现实领域,具体涉及一种基于特征图像旋转来响应事件的交互方法。
背景技术
虚拟现实,简称VR(virtual reality),是由美国VPL公司创建人拉尼尔(JaronLanier)在20世纪80年代初提出的,在90年代经历了彻底的失败之后再次闪耀地出现在大众的视野中。其具体内涵是:综合利用计算机图形系统和各种现实及控制等接口设备,在计算机上生成的、可交互的三维环境中提供沉浸感觉的技术。VR(虚拟现实)技术可广泛地应用于城市规划、室内设计、工业仿真、古迹复原、桥梁道路设计、房地产销售、旅游教学、水利电力、地质灾害、教育培训等众多领域,为其提供切实可行的解决方案。
如今使用最多的VR设备是Google Cardboard,因为其价格较低、能搭配手机直接使用,所以大部分用户愿意通过它来尝试这一新兴领域,然而使用手机作为VR设备也有一个缺点,那就是没有合适的输入设备,用户不能再通过触摸屏幕来操作软件。如果我们通过应用市场搜索VR,搜出来的软件基本分为以下3类:视频播放器类,漫游体验类,游戏类。其中视频播放器和漫游体验类几乎没有用到任何交互方式,用户所需要做的仅仅是戴上Cardboard和耳机,安静地坐着欣赏就行。除此之外,其他应用用到的交互方式无非是以下几种。
1.使用Cardboard盒子上的物理按钮
Cardboard 2.0相较于之前的版本,在纸盒上多了一个物理按钮。这个按钮连接的是一个末端装有导电垫板的三角形折翼,按下按钮,折翼就会接触触屏。在用户不能接触到触摸屏的情况下起到点击触屏的效果。但是,该按钮的触发位置是固定的,始终位于屏幕的正上方。这个按钮一般作为返回或者退出键使用,没有特别大的交互意义。
2.视觉中心凝视触发
这是目前市面上VR应用中最常见的交互方式,在屏幕中心会有一个用于瞄准的原点,由于用户无法触摸到屏幕,用户可以通过旋转头部,使得该小圆点对准某些触发器,通过短时间的凝视该物体来达到触发事件的效果。大部分漫游体验类和游戏类软件用到的交互方式都是这种,例如月球体验,将中心对准不同的数字可以看到不同的信息,再例如打僵尸游戏,会一直朝屏幕中心开枪,玩家只需要转动头部使得中心对准僵尸即可。
3.虚拟按钮
虚拟按钮是由Vuforia套件提供的一种增强现实交互方式,通过摄像头识别出现实空间中的特征图像,在屏幕上对应位置创建一个虚拟的按钮,如果用户用手指触摸这个按钮,则会触发相应事件。但是这种交互方式响应准确率不高,速度也不佳。
平常用户在使用电脑时,用到最多的往往是鼠标。鼠标的移动和单击满足了日常使用电脑的绝大部分需求,然而手机并没有这样的外设,只能通过摄像头来捕捉物体,用于实现鼠标的移动比较简单,但为了响应单击左键和一直按住左键这样的输入操作仍有难度。
发明内容
本发明提供了一种基于特征图像旋转来响应事件的交互方法,通过罗盘指针实现鼠标的左键功能,相比于虚拟按钮有更好的交互体验。
一种基于特征图像旋转来响应事件的交互方法,包括:为特征图像绑定虚拟点和虚拟杆,其中虚拟点与特征图像同步旋转,虚拟杆保持朝向不变,且与虚拟点的旋转路径相交,旋转特征图像至虚拟点和虚拟杆相交或分离时,触发事件。
本发明通过虚拟点和虚拟杆的配合实现鼠标左键的功能,虚拟点和虚拟杆共同构成罗盘指针,优选地,记录虚拟点和虚拟杆的相交以及分离的时刻,利用虚拟点和虚拟杆的位置变化与时间的关系,触发相应的事件。
具体地,当虚拟点与虚拟杆相交时,相当于点击鼠标左键,如果一直保持相交的状态,则相当于一直按下鼠标左键,如果再次旋转至虚拟点和虚拟杆分离,则相当于松开鼠标左键,如果虚拟点和虚拟杆的接触时间较短,则相当于一次鼠标左键单击。
作为优选,特征图像由Vuforia提供识别,虚拟点和虚拟杆的渲染由Unity3D引擎实现。
所述的虚拟点并非严格为点状,而是可以根据需要设置为各种形状,作为优选,所述虚拟点为球状,虚拟杆为圆柱状。
作为优选,采用Unity的LookAt函数,使虚拟杆的朝向保持不变。
作为优选,所述虚拟点的旋转路径为圆形,旋转路径与虚拟杆具有两个交点。进一步优选,旋转路径的圆心为虚拟杆上的一点。再优选,旋转路径的圆心为虚拟杆的中点。
本发明提供的基于特征图像旋转来响应事件的交互方法,通过罗盘指针实现鼠标的左键功能,相比于虚拟按钮有更好的交互体验。
附图说明
图1为本发明基于特征图像旋转来响应事件的交互方法中采用的罗盘指针的示意图。
具体实施方式
下面结合附图,对本发明基于特征图像旋转来响应事件的交互方法做详细描述。
如图1所示,本发明提供的基于特征图像旋转来响应事件的交互方法基于如图1所示的罗盘指针实现,为特征图像绑定一个罗盘指针,罗盘指针包括一个虚拟点(即图1中的圆球2)和一个虚拟杆(即图1中的圆柱1),用户在现实中旋转物体,该物体在虚拟现实中的特征图像也相应旋转,虚拟点随特征图像旋转,旋转轨迹如图1中虚线所示为圆形,虚拟杆并不随用户的操作而旋转,而是始终朝向屏幕的上方,类似于指南针,虚拟点的旋转轨迹的圆心为虚拟杆的中心重合,虚拟点的旋转轨迹与虚拟杆有两个交点。
当虚拟点随特征图像旋转到某个角度时,虚拟点和虚拟杆相碰,相当于点击鼠标左键,如果一直保持相碰的状态,则相当于一直按下鼠标左键,如果再次旋转至虚拟点和虚拟杆分离,则相当于松开鼠标左键,如果虚拟点和虚拟杆的接触时间较短,则相当于一次鼠标左键单击。
在Unity3D引擎中,使用Vuforia作为特征图像识别工具,使用ImageTarget绑定虚拟物体(例如虚拟点和虚拟杆)时,该虚拟物体始终会和特征图像保持初始的相对位置关系,也就是随着图像旋转而旋转。因此,只需要考虑使虚拟杆保持垂直方向即可。调用Unity的LookAt函数,使得虚拟杆一直朝向某个点。观察到相机屏幕的渲染层在Unity中是会随时运动的,那么只需要实时的获取它的位置即可,也就是ARCamera.StereoCameraLeft.BackgroundPlane这个部件,通过获取它的坐标,再在y轴正方向偏移一定常数,就是需要朝向的目标点了,使虚拟杆一直朝向目标点,即可实现虚拟杆朝向的不变。
虚拟点与虚拟杆的碰撞检测由Unity提供的接口实现。为虚拟点绑定Collider脚本,为虚拟杆绑定Collider脚本,勾选is Trigger,绑定Rigidbody脚本,反选use Gravity,这样虚拟杆会被当成一个刚体,虚拟点会被当成一个碰撞接收器,每当刚体碰撞到触发器的时候,会调用如表1所示的3个函数。
表1
函数名 | 功能 |
void OnTriggerEnter() | 当初次碰撞时调用 |
void OnTriggerStay() | 当碰撞持续时调用 |
void OnTriggerExit() | 当碰撞结束时调用 |
通过编写调用函数,记录碰撞时间便可以实现类似鼠标单击,长按的功能。
Claims (7)
1.一种基于特征图像旋转来响应事件的交互方法,其特征在于,包括:为特征图像绑定虚拟点和虚拟杆,其中虚拟点与特征图像同步旋转,虚拟杆保持朝向不变,且与虚拟点的旋转路径相交,旋转特征图像至虚拟点和虚拟杆相交或分离,记录虚拟点和虚拟杆的相交以及分离的时刻,利用虚拟点和虚拟杆的位置变化与时间的关系,触发相应的事件:
当虚拟点与虚拟杆相交时,相当于点击鼠标左键;
若虚拟点与虚拟杆长时间保持相交的状态,则相当于一直按下鼠标左键;
若旋转虚拟点,使虚拟点与虚拟杆从相交变为分离,则相当于松开鼠标左键;
若虚拟点和虚拟杆相交时的接触时间较短,则相当于一次鼠标左键单击。
2.如权利要求1所述的基于特征图像旋转来响应事件的交互方法,其特征在于,所述虚拟点的旋转路径为圆形,旋转路径与虚拟杆具有两个交点。
3.如权利要求2所述的基于特征图像旋转来响应事件的交互方法,其特征在于,旋转路径的圆心为虚拟杆上的一点。
4.如权利要求3所述的基于特征图像旋转来响应事件的交互方法,其特征在于,旋转路径的圆心为虚拟杆的中点。
5.如权利要求1所述的基于特征图像旋转来响应事件的交互方法,其特征在于,特征图像由Vuforia提供识别,虚拟点和虚拟杆的渲染由Unity3D引擎实现。
6.如权利要求5所述的基于特征图像旋转来响应事件的交互方法,其特征在于,所述虚拟点为球状,虚拟杆为圆柱状。
7.如权利要求6所述的基于特征图像旋转来响应事件的交互方法,其特征在于,采用Unity的LookAt函数,使虚拟杆的朝向保持不变。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610545411.8A CN106227332B (zh) | 2016-07-06 | 2016-07-06 | 一种基于特征图像旋转来响应事件的交互方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610545411.8A CN106227332B (zh) | 2016-07-06 | 2016-07-06 | 一种基于特征图像旋转来响应事件的交互方法 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106227332A CN106227332A (zh) | 2016-12-14 |
CN106227332B true CN106227332B (zh) | 2018-12-28 |
Family
ID=57520475
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610545411.8A Active CN106227332B (zh) | 2016-07-06 | 2016-07-06 | 一种基于特征图像旋转来响应事件的交互方法 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106227332B (zh) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107145222B (zh) * | 2017-04-06 | 2019-03-05 | 北京讯腾智慧科技股份有限公司 | 基于Unity三维引擎和VR设备的工具自动绑定系统和方法 |
CN108983954B (zh) * | 2017-05-31 | 2022-11-18 | 腾讯科技(深圳)有限公司 | 基于虚拟现实的数据处理方法、装置以及系统 |
CN111739352A (zh) * | 2020-06-03 | 2020-10-02 | 长沙理工大学 | 一种中央空调虚拟维修训练系统的仿真方法 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103118201B (zh) * | 2013-02-28 | 2017-11-03 | 上海斐讯数据通信技术有限公司 | 一种触摸屏解锁系统及方法 |
CN104020949A (zh) * | 2013-03-01 | 2014-09-03 | 鸿富锦精密工业(深圳)有限公司 | 鼠标指针控制方法 |
CN104636158A (zh) * | 2013-11-14 | 2015-05-20 | 博雅网络游戏开发(深圳)有限公司 | 基于Android操作系统的鼠标指针控制方法和装置 |
CN205281417U (zh) * | 2015-12-25 | 2016-06-01 | 安徽师范大学 | 一种适用于全息成像的3d鼠标及其系统 |
-
2016
- 2016-07-06 CN CN201610545411.8A patent/CN106227332B/zh active Active
Also Published As
Publication number | Publication date |
---|---|
CN106227332A (zh) | 2016-12-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Hespanhol et al. | Investigating intuitiveness and effectiveness of gestures for free spatial interaction with large displays | |
Billinghurst et al. | Advanced interaction techniques for augmented reality applications | |
Boring et al. | Scroll, tilt or move it: using mobile phones to continuously control pointers on large public displays | |
Aliprantis et al. | Natural Interaction in Augmented Reality Context. | |
Stuerzlinger et al. | The value of constraints for 3D user interfaces | |
US20130082922A1 (en) | Tactile glove for human-computer interaction | |
US20170242495A1 (en) | Method and device of controlling virtual mouse and head-mounted displaying device | |
CN106227332B (zh) | 一种基于特征图像旋转来响应事件的交互方法 | |
Medeiros et al. | Proposal and evaluation of a tablet-based tool for 3D virtual environments | |
CN102214039A (zh) | 辅助实现多状态触摸屏检测的多模式义肢设备 | |
US11656687B2 (en) | Method for controlling interaction interface and device for supporting the same | |
Lee et al. | Design and empirical evaluation of a novel near-field interaction metaphor on distant object manipulation in vr | |
Christou et al. | Pseudo‐Hologram with Aerohaptic Feedback for Interactive Volumetric Displays | |
CN109716267A (zh) | 用于虚拟控制器的功能分配 | |
Santos-Torres et al. | Exploring interaction mechanisms for map interfaces in virtual reality environments | |
Liarokapis et al. | Multimodal augmented reality tangible gaming | |
Spanogianopoulos et al. | Human computer interaction using gestures for mobile devices and serious games: A review | |
Chen et al. | An integrated framework for universal motion control | |
Khan | A survey of interaction techniques and devices for large high resolution displays | |
Henrysson et al. | Mobile phone based augmented reality | |
Paelke et al. | Vision-based interaction-a first glance at playing MR games in the real-world around us | |
US9727138B2 (en) | Nanotechnology clothing for human-computer interaction | |
Rodrigues et al. | Mid-air manipulation of 3D models in (semi-) immersive virtual environments | |
Du Preez et al. | Comparing Hand-Gesture and Finger-Touch Interfacing to Navigate Bulk Image-Sequence Data | |
Dam et al. | Hands-free interaction techniques for virtual environments |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |