This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
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
Учебные материалы

Отслеживание рук и пальцев с помощью плагина 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 миллиметров над устройством.

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.Подробнее об управлении LeapMotion через API см. В статье об интерфейсе LeapMotion.
  • The LeapMotion Arm class article for more details on managing arms via API.Статья класса LeapMotion Arm для более подробной информации об управлении оружием через API.
  • The LeapMotion Bone class article for more details on managing finger bones via API.Статья класса LeapMotion Bone для более подробной информации об управлении костями пальцев через API.
  • 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Реализация приложения Unigine с поддержкой LeapMotion#

To use the LeapMotion plugin in your UNIGINE application, perform the following:Чтобы использовать плагин LeapMotion в приложении UNIGINE, выполните следующие действия:

  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.Создайте новый проект с поддержкой LeapMotion через UNIGINE SDK Browser: нажмите Plugins, отметьте опцию LeapMotion support (LeapMotion plugin) в открывшейся форме и нажмите OK.

    LeapMotion Plugin on Plugins PanelПлагин LeapMotion на панели Plugins
    Примечание
    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 щелкните 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 при запуске приложения следующим образом:

Shell-команды
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 Browser, укажите параметры командной строки, указанные выше, в форме Customize Run Options.

Последнее обновление: 06.02.2024
Build: ()