This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
基础
专业(SIM)
UnigineEditor
界面概述
资源工作流程
Version Control
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
统一的Unigine着色器语言 UUSL (Unified UNIGINE Shader Language)
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

使用 LeapMotion 插件跟踪手和手指

Overview
概述#

LeapMotion plugin allows you to track hands and fingers in your UNIGINE-based application.LeapMotion 插件允许您在基于 UNIGINE 的应用程序中跟踪手和手指。

注意
The plugin is available only on Windows.该插件仅在 Windows 上可用。

The Leap Motion system recognizes and tracks hands and fingers. The device operates in an intimate proximity with high precision and tracking frame rate and reports discrete positions and motion.Leap Motion 系统识别并跟踪手和手指。该设备以高精度和跟踪帧速率近距离运行,并报告离散位置和运动。

The Leap Motion controller uses optical sensors and infrared light. The sensors are directed along the Y axis — upward when the controller is in its standard operating position — and have a field of view of about 150 degrees. The effective range of the Leap Motion Controller extends from approximately 25 to 600 millimeters above the device (1 inch to 2 feet).Leap Motion 控制器使用光学传感器和红外光。传感器沿 Y 轴定向——当控制器处于标准操作位置时向上——并且具有大约 150 度的视野。 Leap Motion 控制器的有效范围从设备上方大约 25 毫米到 600 毫米(1 英寸到 2 英尺)。

Leap Motion controller's view of your handsLeap Motion 控制器对您的手的看法

Detection and tracking work best when the controller has a clear, high-contrast view of an object's silhouette. The Leap Motion software combines its sensor data with an internal model of the human hand to help cope with challenging tracking conditions.当控制器具有清晰、高对比度的物体轮廓视图时,检测和跟踪效果最佳。 Leap Motion 软件将其传感器数据与人手的内部模型相结合,以帮助应对具有挑战性的跟踪条件。

Coordinate System
坐标系#

The Leap Motion system uses a right-handed Cartesian coordinate system. The origin is centered at the top of the Leap Motion Controller. The X and Z axes lie in the horizontal plane, with the X axis running parallel to the long edge of the device. The Y axis is vertical, with positive values increasing upwards (in contrast to the downward orientation of most computer graphics coordinate systems). The Z axis has positive values increasing toward the user.Leap Motion 系统使用右手笛卡尔坐标系。原点在 Leap Motion 控制器的顶部居中。 X 轴和 Z 轴位于水平面,X 轴平行于设备的长边。 Y 轴是垂直的,正值向上增加(与大多数计算机图形坐标系的向下方向相反)。 Z 轴具有朝向用户增加的正值。

Leap Motion right-handed coordinate systemLeap Motion 右手坐标系

Hands
#

The hand model provides information about the identity, position, and other characteristics of a detected hand, the arm to which the hand is attached, and lists of the fingers associated with the hand.手部模型提供有关检测到的手的身份、位置和其他特征、手所附着的手臂以及与手相关联的手指列表的信息。

Hands are represented by the Hand class.手由 Hand 类表示。

Hand normal and direction vectors define the orientation of the hand正常方向矢量定义的手的取向
注意
More than two hands can appear in the hand list for a frame if more than one person's hands or other hand-like objects are in view. However, it is recommended to keep at most two hands in the Leap Motion Controller's field of view for optimal motion tracking quality.如果有多个人的手或其他类似手的物体在视图中,则一帧的手部列表中可能会出现两个以上的手部。但是,建议在 Leap Motion 控制器的视野中最多保留两只手,以获得最佳的运动跟踪质量。

Arms
武器#

An arm is a bone-like object that provides the orientation, length, width, and end points of an arm. When the elbow is not in view, the Leap Motion controller estimates its position based on past observations as well as typical human proportion.手臂是一个类似骨骼的对象,它提供了手臂的方向、长度、宽度和端点。当肘部不在视野中时,Leap Motion 控制器会根据过去的观察以及典型的人体比例估计其位置。

Arms are represented by the Arm class.武器由 Arm 类表示。

Fingers
手指#

The Leap Motion controller provides information about each finger on a hand. If all or part of a finger is not visible, the finger characteristics are estimated based on recent observations and the anatomical model of the hand. Fingers are identified by type name, i.e. thumb, index, middle, ring, pinky.Leap Motion 控制器提供有关手上每个手指的信息。如果手指的全部或部分不可见,则基于最近的观察和手的解剖模型来估计手指特征。手指由类型名称标识,即 thumb, index, middle, ring, pinky

Fingers are represented by the Finger class.手指由 Finger 类表示。

Finger tip position and direction provide the position of a finger tip and the general direction in which a finger is pointing指尖位置和方向提供指尖的位置和手指指向的大致方向

Bones
骨头#

Each finger has a set of bones describing the position and orientation of corresponding anatomical finger bones. All fingers contain four bones ordered from base to tip.每个手指都有一组骨骼,描述相应解剖手指骨骼的位置和方向。所有手指都包含从根部到尖端排列的四根骨头。

Bones are represented by the Bone class.骨骼由 Bone 类表示。

Palm and all its finger bones手掌及其所有指骨

The bones are identified as:骨骼被识别为:

  • Metacarpal — the bone inside the hand connecting the finger to the wrist (except the thumb).Metacarpal — 将手指连接到手腕(拇指除外)的手内部骨骼。
  • Proximal Phalanx — the bone at the base of the finger, connected to the palm.Proximal Phalanx — 手指根部的骨骼,与手掌相连。
  • Intermediate Phalanx — the middle bone of the finger, between the tip and the base.Intermediate Phalanx — 手指的中间骨骼,在尖端和基部之间。
  • Distal Phalanx — the terminal bone at the end of the finger.Distal Phalanx — 手指末端的终端骨骼。
注意
Such model for the thumb does not quite match the standard anatomical naming system. A real thumb has one less bone than the other fingers. However, for ease of programming, the Leap Motion thumb model includes a zero-length metacarpal bone so that the thumb has the same number of bones at the same indexes as the other fingers. As a result the thumb's anatomical metacarpal bone is labeled as a proximal phalanx and the anatomical proximal phalanx is labeled as the intermediate phalanx in the Leap Motion finger bone model.这种拇指模型与标准解剖命名系统不太匹配。真正的拇指比其他手指少一根骨头。但是,为了便于编程,Leap Motion 拇指模型包括一个零长度的掌骨,以便拇指与其他手指在相同索引处具有相同数量的骨骼。因此,在 Leap Motion 手指骨模型中,拇指解剖学掌骨被标记为近节指骨,解剖学近节指骨被标记为中间指骨。

Sensor Images
传感器图像#

Along with the computed tracking data, you can get the raw sensor images from the Leap Motion cameras.连同计算出的跟踪数据,您可以从 Leap Motion 相机获取原始传感器图像。

A raw sensor image with superimposed calibration points带有叠加校准点的原始传感器图像

The image data contains the measured IR brightness values and the calibration data required to correct for the complex lens distortion. You can use the sensor images for augmented reality applications, especially when the Leap Motion hardware is mounted to a VR headset.图像数据包含测量的红外亮度值和校正复杂镜头畸变所需的校准数据。您可以将传感器图像用于增强现实应用程序,尤其是当 Leap Motion 硬件安装到 VR 耳机时。

See Also
也可以看看#

LeapMotion API:

  • The LeapMotion interface article for more details on managing LeapMotion via API.有关通过 API 管理 LeapMotion 的更多详细信息,请参阅 LeapMotion 接口文章。
  • The LeapMotion Arm class article for more details on managing arms via API.有关通过 API 管理武器的更多详细信息,请参阅 LeapMotion Arm 类文章。
  • The LeapMotion Bone class article for more details on managing finger bones via API.有关通过 API 管理手指骨骼的更多详细信息,请参阅 LeapMotion Bone 类文章。
  • The LeapMotion Finger class article for more details on managing fingers via API.有关通过 API 管理手指的更多详细信息,请参阅 LeapMotion Finger 类文章。
  • The LeapMotion Hand class article for more details on managing hands via API.有关通过 API 管理手牌的更多详细信息,请参阅 LeapMotion Hand 类文章。

Implementing Unigine Application with LeapMotion Support
使用 LeapMotion 支持实现 Unigine 应用程序#

To use the LeapMotion plugin in your UNIGINE application, perform the following:要在 UNIGINE 应用程序中使用 LeapMotion 插件,请执行以下操作:

  1. Download the Leap Motion SDK and install Leap Motion device drivers.下载 Leap Motion SDK 并安装 Leap Motion 设备驱动程序。
  2. Create a new project with LeapMotion support via UNIGINE SDK Browser: click Plugins, check the LeapMotion support (LeapMotion plugin) option in the form that opens and click OK.通过 UNIGINE SDK 浏览器创建一个支持 LeapMotion 的新项目:单击 Plugins,在打开的表单中选中 LeapMotion support (LeapMotion plugin) 选项,然后单击 OK

    LeapMotion Plugin on Plugins PanelPlugins 面板上的 LeapMotion 插件
    注意
    To add LeapMotion support to the existing project, in UNIGINE SDK Browser, click Other Actions -> Configure Project -> Plugins -> LeapMotion support (LeapMotion plugin) -> OK. 要将 LeapMotion 支持添加到现有项目,请在 UNIGINE SDK Browser 中单击 Other Actions -> Configure Project -> Plugins -> LeapMotion support (LeapMotion plugin) -> OK
  3. Implement your application.实施您的应用程序。
  4. Launch the LeapMotion plugin on the application start-up.发射应用程序启动时的 LeapMotion 插件。

Launching LeapMotion
启动 LeapMotion#

To launch the plugin, specify the extern_plugin command line option on the application start-up as follows:要启动插件,请在应用程序启动时指定 extern_plugin 命令行选项,如下所示:

命令行
main_x64d -extern_plugin UnigineLeapMotion

If you run the application via UNIGINE SDK Browser, specify the command-line options given above in the Customize Run Options form.如果您通过 UNIGINE SDK 浏览器运行应用程序,请在 Customize Run Options 表单中指定上面给出的命令行选项。

最新更新: 2024-08-16
Build: ()