tencent cloud

Tencent Effect SDK

Release Notes and Announcements
Release Notes
Tencent Effect SDK V3.5 Version Released
Tencent Effects SDK V3.0 Version Related API and Material Changes
Product Introduction
Overview
Features
Basic Concepts
Strengths
Use Cases
Purchase Guide
Pricing Overview
Purchase Guide
Payment Overdue and Refund
Tutorial
Demos
Free Trial License
Licenses
Adding and Renewing a License (Mobile)
Adding and Renewing a License (Desktop)
Adding and Renewing a License (Web)
FAQs
SDK Download
Features
SDK Download
Version History
SDK Integration Guide(No UI)
General Integration of Tencent Effect
Integrating Capabilities
SDK Integration Guide(Including UI)
General Integration of Tencent Effect
Integrating Tencent Effect into MLVB SDK
Integrating Tencent Effect into TRTC SDK
Integrating Tencent Effect into UGSV SDK
Virtual Avatars
API Documentation
iOS
Android
Flutter
Web
Feature Guide
Reducing SDK Size
SDK Integration Issue Troubleshooting
Performance Fine-Tuning
Effect Fine-Tuning
Material Usage
Effect Parameters
Recommended Parameters in Beautification Scenarios
UGSV Enterprise Edition Migration Guide
Integrating Tencent Effect for Third-Party Publishers (Flutter)
Integrating Beauty AR Web into Mini Programs
Tencent Effect Studio Usage
Beauty AR Web
Overview
Quick Start
SDK Integration
Parameters and APIs
Console Guide
Demos
Preset Effect List
Practical Tutorial
FAQs
FAQs
General
Technical
License
Legacy Documentation
Recommended Parameters in Beautification Scenarios
Beauty Parameters Table
One-Minute Integration of TRTC
One-Minute Integration of Live Streaming
TE SDK Policy
Privacy Policy
Data Processing And Security Agreement
Contact Us

Gesture Detection

PDF
Focus Mode
Font Size
Last updated: 2023-08-03 14:27:27

Overview

Input the camera's OpenGL texture and output real-time gesture detection data. You can use this data for further development.

Android Interface Description

Android Integration Guide

Integrate Tencent Effect SDK on Android, for details please refer to: Integrate Tencent Effect SDK Independently.

Android Interface Invocation

1.Turn on the gesture detection feature switch (in XmagicApi.java)
public void setFeatureEnableDisable(String featureName, boolean enable);
Fill in featureName with XmagicConstant.FeatureName.HAND_DETECT, and set enable to true.
2.Set data callback (in XmagicApi.java)
void setAIDataListener(XmagicApi.OnAIDataListener aiDataListener)

public interface OnAIDataListener {
void onFaceDataUpdated(List<TEFaceData> faceDataList);
void onHandDataUpdated(List<TEHandData> handDataList);
void onBodyDataUpdated(List<TEBodyData> bodyDataList);
void onAIDataUpdated(String data);
}
onAIDataUpdated returns a JSON structured string data.

iOS Interface Description

iOS Integration Guide

Integrate Tencent Effect SDK on iOS, for details please refer to: Integrate Tencent Effect SDK Independently.

iOS Interface Invocation

1.Turn on the gesture detection feature switch (in Xmagic.h)
- (void)setFeatureEnableDisable:(NSString *_Nonnull)featureName enable:(BOOL)enable;
Fill in featureName with HAND_DETECT (can be imported from TEDefine.h), and set enable to true.
2.Set data callback (in Xmagic.h)
- (void)registerSDKEventListener:(id<YTSDKEventListener> _Nullable)listener;

- (void)onAIEvent:(id)event
{
NSDictionary *eventDict = (NSDictionary *)event;
if (eventDict[@"ai_info"] != nil) {
NSLog(@"ai_info %@",eventDict[@"ai_info"]);
}
}
eventDict[@"ai_info"] is the returned JSON structured string data.


Callback JSON Data Description

In the callback JSON data, the gesture-related data is in "hand_info", and the format is as follows:
"hand_info": {
"gesture": "PAPER",
"hand_point_2d": [180.71888732910156, 569.2958984375, ... , 353.8714294433594, 836.246826171875]
}
The explanations of each field in hand_info are as follows:
Field
Explanation
gesture
Gesture Type Name
hand_point_2d
Captured gesture data information
The following gestures are currently supported:
Order
Gesture
Type Name
Example Image
1
Heart
HEART

img


2
Gestrue with number 5(open)
PAPER

img


3
Gesture with number 2
SCISSOR

img


4
Fist
FIST

img


5
Gesture with number 1
ONE

img


6
I love you
LOVE

img


7
Thumb up
LIKE

img


8
OK
OK

img


9
Rock
ROCK

img


10
Gesture with number 6
SIX

img


11
Gesture with number 8
EIGHT

img


12
Lift
LIFT

img


13
Gesture with number 3
THREE

img


14
Gesture with number 4
FOUR

img


If it is an undetected gesture, the gesture type name is OTHER.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback