CN115798054A - A gesture recognition method and electronic equipment based on AR/MR technology - Google Patents

A gesture recognition method and electronic equipment based on AR/MR technology Download PDF

Info

Publication number
CN115798054A
CN115798054A CN202310091517.5A CN202310091517A CN115798054A CN 115798054 A CN115798054 A CN 115798054A CN 202310091517 A CN202310091517 A CN 202310091517A CN 115798054 A CN115798054 A CN 115798054A
Authority
CN
China
Prior art keywords
gesture recognition
thumb
setting
time
gesture
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.)
Granted
Application number
CN202310091517.5A
Other languages
Chinese (zh)
Other versions
CN115798054B (en
Inventor
张瑞程
邢振华
褚烨
徐淼
王书源
王天翔
孙英洲
王帅
代佳佳
韩平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TaiAn Power Supply Co of State Grid Shandong Electric Power Co Ltd
Original Assignee
TaiAn Power Supply Co of State Grid Shandong Electric Power Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by TaiAn Power Supply Co of State Grid Shandong Electric Power Co Ltd filed Critical TaiAn Power Supply Co of State Grid Shandong Electric Power Co Ltd
Priority to CN202310091517.5A priority Critical patent/CN115798054B/en
Publication of CN115798054A publication Critical patent/CN115798054A/en
Application granted granted Critical
Publication of CN115798054B publication Critical patent/CN115798054B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

本发明提供一种基于AR/MR技术的手势识别方法及电子设备,空间数据分析与识别技术领域,设置并储存手势识别过程中的相关变量;设置作为手势识别判断依据的常量信息,执行手势识别引擎,对每一帧进行识别判断:判断SDK是否追踪到拇指指尖与无名指指尖,如果有任意一个指尖未追踪到,则本帧识别过程结束;如果同时识别到拇指指尖与无名指指尖,则记录当前帧拇指指尖的位置即空间三维坐标;本发明能够对手势识别的相关变量、常量信息以及手势识别引擎进行汇总,方便用户参考使用,并便于系统根据相关变量、常量信息以及手势识别引擎执行相应的手势识别进程。有效的提升手势识别的准确度和精准性。

Figure 202310091517

The invention provides a gesture recognition method based on AR/MR technology and electronic equipment, in the technical field of spatial data analysis and recognition, setting and storing related variables in the gesture recognition process; setting constant information as the basis for gesture recognition judgment, and performing gesture recognition Engine, to identify and judge each frame: judge whether the SDK has tracked the tip of the thumb and the fingertip of the ring finger. If any fingertip is not tracked, the recognition process of this frame ends; if both the fingertip of the thumb and the ring finger are recognized point, then record the position of the thumbtip in the current frame, that is, the three-dimensional coordinates in space; the present invention can summarize the relevant variables, constant information and gesture recognition engine of gesture recognition, which is convenient for users to refer to and use, and is convenient for the system to use according to relevant variables, constant information and The gesture recognition engine executes the corresponding gesture recognition process. Effectively improve the accuracy and precision of gesture recognition.

Figure 202310091517

Description

一种基于AR/MR技术的手势识别方法及电子设备A gesture recognition method and electronic equipment based on AR/MR technology

技术领域technical field

本发明涉及空间数据分析与识别技术领域,尤其涉及一种基于AR/MR技术的手势识别方法及电子设备。The invention relates to the technical field of spatial data analysis and recognition, in particular to a gesture recognition method and electronic equipment based on AR/MR technology.

背景技术Background technique

目前,AR/MR技术的应用前景非常广泛,其中AR(增强现实)是一种实时地计算摄像机影像的位置及角度并加上相应图像、视频、3D模型的技术,MR是混合现实技术。通俗来讲AR是在实际景象上叠加虚拟影像,MR是在实际景象上叠加虚拟影像后,还能够对虚拟影像进行互动。AR/MR最突出的特点是可以不使用键盘、鼠标、手柄或触屏等占用双手的操作方式,而通过手势、语音或眼动凝视的非接触式操作,解放用户的双手,更加方便快捷的获取、操作数据。At present, the application prospect of AR/MR technology is very broad. Among them, AR (augmented reality) is a technology that calculates the position and angle of camera images in real time and adds corresponding images, videos, and 3D models. MR is a mixed reality technology. Generally speaking, AR is to superimpose virtual images on the actual scene, and MR is to interact with virtual images after superimposing virtual images on the actual scene. The most prominent feature of AR/MR is that it does not use keyboard, mouse, handle or touch screen and other hands-occupied operation methods, but uses gestures, voice or eye movement to perform non-contact operations, freeing users' hands and making it more convenient and fast. Get and manipulate data.

与传统交互平台相比,AR/MR最突出的特点是可以不使用键盘、鼠标、手柄或触屏等占用双手的操作方式,而通过手势、语音或眼动凝视的非接触式操作,解放用户的双手,更加方便快捷的获取、操作数据。目前,通过解放双手这一特点,在工业中例如检修设备时,用户可以在手持工具检修的同时查阅资料、寻求远程协助或将图纸放在设备旁边进行实时比对,不必放下手头的工具反复拿起手册或平板查阅。在生活中例如学习厨艺时,查阅菜谱不必担心用粘有佐料或面粉的手滑动屏幕弄脏手机,又反向污染饭菜。Compared with traditional interactive platforms, the most prominent feature of AR/MR is that it can use non-contact operations such as gestures, voice or eye movement to liberate users without using keyboards, mice, handles or touch screens. With both hands, it is more convenient and quick to obtain and operate data. At present, through the feature of freeing hands, in the industry, for example, when overhauling equipment, users can consult information, seek remote assistance, or place drawings next to the equipment for real-time comparison while overhauling the hand-held tool, without having to put down the tool at hand. from the manual or tablet. In life, for example, when learning cooking skills, you don’t have to worry about swiping the screen with your hands with seasonings or flour to dirty your phone and reversely contaminate your meals when you look up recipes.

再比如在生产生活中,可能由于场地限制,手持工具,污渍影响等问题不便触碰屏幕、拿取纸质材料或操作设备,这就需要手势识别方式来调取资源列表。For another example, in production and life, it may be inconvenient to touch the screen, take paper materials or operate equipment due to space restrictions, hand-held tools, and stains. This requires gesture recognition to call the resource list.

而目前的手势识别主要是采用人工智能图像训练的方式,这种方式面临着三个问题一是训练周期长,需要对图像数据集进行训练,匹配出满足要求的训练模型,如果训练模型不匹配或者模型准确度低,则影响手势识别的准确性。二是数据模型量大,需要耗费大量的系统资源,而且还会造成系统运行卡顿,无法满足识别要求。而且仅通过平面图像判断缺乏三位数据对准确度有一定的影响。The current gesture recognition mainly adopts the method of artificial intelligence image training. This method faces three problems. First, the training period is long, and the image data set needs to be trained to match the training model that meets the requirements. If the training model does not match Or the accuracy of the model is low, which affects the accuracy of gesture recognition. Second, the amount of data models is large, which consumes a lot of system resources, and also causes the system to run stuck, which cannot meet the recognition requirements. Moreover, the lack of three-digit data has a certain impact on the accuracy only through the plane image judgment.

发明内容Contents of the invention

本发明提供一种基于AR/MR技术的手势识别方法,方法通过骨骼点的2D及3D数据综合分析手势的准确性。The present invention provides a gesture recognition method based on AR/MR technology, which comprehensively analyzes the accuracy of gestures through 2D and 3D data of skeleton points.

基于AR/MR技术的手势识别方法包括:Gesture recognition methods based on AR/MR technology include:

S101、设置并储存手势识别过程中的相关变量;S101, setting and storing relevant variables in the gesture recognition process;

S102、设置作为手势识别判断依据的常量信息,常量信息是根据AR/MR设备及使用环境定义的值;S102. Set constant information as a basis for gesture recognition judgment, where the constant information is a value defined according to the AR/MR device and the use environment;

S103、执行手势识别引擎,对每一帧进行如下识别判断:S103. Execute the gesture recognition engine, and perform the following recognition judgment on each frame:

判断SDK是否追踪到拇指指尖与无名指指尖,如果有任意一个指尖未追踪到,则将IfTrack设置为false,并把GestureState的值设置为:未进行识别,本帧识别过程结束;Determine whether the SDK has tracked the tip of the thumb and the fingertip of the ring finger. If any fingertip is not tracked, set IfTrack to false, and set the value of GestureState to: no recognition, the recognition process of this frame ends;

如果同时识别到拇指指尖与无名指指尖,则用ThumbTip记录当前帧拇指指尖的位置即空间三维坐标,用RingTip记录当前帧无名指指尖的位置即空间三维坐标;If the fingertip of the thumb and the fingertip of the ring finger are recognized at the same time, then use ThumbTip to record the position of the thumb tip of the current frame, that is, the three-dimensional coordinates in space, and use RingTip to record the position of the fingertip of the ring finger in the current frame, that is, the three-dimensional coordinates in space;

如果GestureState的状态值为已识别成功,则用IntervalTm记录当前帧时间点-EndTm,即从上次判断成功到当前帧所用的时间;If the status value of GestureState has been recognized successfully, use IntervalTm to record the current frame time point-EndTm, which is the time from the last successful judgment to the current frame;

如果IntervalTm大于ReAcvTm则将GestureState的状态值变为未进行识别;把OriTm设置为当前帧的时间点;RingTipOri设置为当前无名指指尖的位置;ThumbTipOri设置为当前拇指指尖的位置,本帧识别过程直接结束。If IntervalTm is greater than ReAcvTm, the state value of GestureState is changed to not recognized; OriTm is set to the time point of the current frame; RingTipOri is set to the current position of the fingertip of the ring finger; ThumbTipOri is set to the current position of the fingertip of the thumb, and the recognition process of this frame Straight to the end.

进一步需要说明的是,步骤S101中设置并储存的相关变量包括:It should be further noted that the relevant variables set and stored in step S101 include:

设置三维浮点数变量RingTip,并实时记录追踪无名指指尖位置信息;Set the three-dimensional floating-point variable RingTip, and record and track the position information of the ring finger fingertip in real time;

设置三维浮点数变量RingTipOri,并记录在某个时间点的无名指指尖的三维空间位置坐标,用于对比无名指指尖的位置变化;Set the three-dimensional floating-point number variable RingTipOri, and record the three-dimensional space position coordinates of the fingertip of the ring finger at a certain point in time, for comparing the position change of the fingertip of the ring finger;

设置三维浮点数变量ThumbTip,并实时记录追踪拇指指尖位置,更新当前帧SDK所获取到的拇指的三维空间位置坐标;Set the 3D floating point variable ThumbTip, record and track the position of the thumb tip in real time, and update the 3D space coordinates of the thumb acquired by the SDK in the current frame;

设置三维浮点数变量ThumbTipOri,记录在某个时间点的拇指指尖三维空间位置坐标,用于对比拇指指尖的位置变化。Set the three-dimensional floating-point variable ThumbTipOri to record the three-dimensional space position coordinates of the thumb tip at a certain time point, which is used to compare the position change of the thumb tip.

进一步需要说明的是,步骤S101中设置并储存的相关变量还包括:It should be further noted that the relevant variables set and stored in step S101 also include:

设置枚举型变量GestureState,识别枚举型变量的状态值,状态值包括:1.未进行识别,2.正在进行识别,3.已识别成功,4.禁用;Set the enumeration variable GestureState to identify the state value of the enumeration variable. The state value includes: 1. Not recognized, 2. Recognized in progress, 3. Recognized successfully, 4. Disabled;

枚举型变量GestureState的默认状态为:未进行识别;The default state of the enumeration variable GestureState is: not recognized;

设置布尔型变量IfTrack,并记录是否为第一次同时识别到拇指指尖与无名指指尖;Set the Boolean variable IfTrack, and record whether it is the first time that the thumb tip and the ring finger tip are recognized at the same time;

设置浮点型变量OriTm,并记录手势识别开始的时间点,所述时间点是从程序开始运行时到记录时所经历的秒数;Set the floating-point variable OriTm, and record the time point when the gesture recognition starts, and the time point is the number of seconds elapsed from the time the program starts running to the recording time;

设置浮点型变量EndTm,并记录手势识别成功时的时间点,所述时间点是从程序开始运行时到记录时所经历的秒数;Set the floating-point variable EndTm, and record the time point when the gesture recognition is successful, the time point is the number of seconds elapsed from the time the program starts running to the time of recording;

设置浮点型变量IntervalTm;Set the floating-point variable IntervalTm;

设置浮点型变量DisThumbTipToRingTip,并记录拇指指尖到无名指指尖的距离信息。Set the floating point variable DisThumbTipToRingTip, and record the distance information from the tip of the thumb to the tip of the ring finger.

进一步需要说明的是,步骤S102还包括:设置浮点型常量StartDis,作为判断是否开始进行手势识别的距离条件;当RingTip和ThumbTip之间的距离小于StartDis时,开始对是否符合手势条件进行判断;It should be further noted that step S102 also includes: setting a floating-point constant StartDis as a distance condition for judging whether to start gesture recognition; when the distance between RingTip and ThumbTip is smaller than StartDis, start judging whether the gesture condition is met;

设置浮点型常量EndDis作为手势需要达到的距离,当ThumbTip和RingTip的距离超过EndDis时,说明手势位置达到完成标准;Set the floating-point constant EndDis as the distance that the gesture needs to reach. When the distance between ThumbTip and RingTip exceeds EndDis, it means that the gesture position has reached the completion standard;

设置浮点型常量GustureMinTm作为手势判断时间下限的限制条件,即当开始进行手势识别后,如手势的位置变化条件时,所经过的识别时间大于GustureMinTm,则确定为有效手势识别的状态;Set the floating-point constant GustureMinTm as the limit condition of the lower limit of the gesture judgment time, that is, when the gesture recognition is started, such as when the position of the gesture changes, the elapsed recognition time is greater than GustureMinTm, then it is determined to be a valid gesture recognition state;

设置浮点型常量手势判断时间上限的限制条件GestureMaxTm;当开始进行手势识后,在GestureMaxTm时间内,即满足手势位置变化条件。Set the limit condition GestureMaxTm of the upper limit of the gesture judgment time of the floating-point constant; when the gesture recognition starts, the gesture position change condition is satisfied within the GestureMaxTm time.

进一步需要说明的是,步骤S102还包括:设置浮点型常量GestureReleaseTm作为要停止手势识别的时间;即当开始手势识别后,如在GestureReleaseTm时间内ThumbTip和RingTip均未发生距离变化,则不再进行手势识别;It should be further noted that step S102 also includes: setting a floating-point constant GestureReleaseTm as the time to stop gesture recognition; that is, after starting gesture recognition, if there is no distance change between ThumbTip and RingTip within the GestureReleaseTm time, then no further Gesture Recognition;

设置浮点型常量GestureReleaseDis判断停止手势识别的距离,即在手势识别时,如在GestureReleaseTm时间内,判断ThumbTip和RingTip的距离变化是否超过预设距离,如未超过预设距离,则停止当前手势识别;Set the floating-point constant GestureReleaseDis to judge the distance to stop gesture recognition, that is, during gesture recognition, if within the GestureReleaseTm time, judge whether the distance between ThumbTip and RingTip exceeds the preset distance, and if it does not exceed the preset distance, stop the current gesture recognition ;

设置浮点数类型常量ReAcvTm,浮点数类型常量ReAcvTm为手势的冷却时间。Set the floating point type constant ReAcvTm, and the floating point type constant ReAcvTm is the cooling time of the gesture.

进一步需要说明的是,步骤S103中本帧识别过程结束条件还包括:It should be further noted that the end conditions of the frame recognition process in step S103 also include:

如果GestureState的状态为未进行识别,则再判断ThumbTip与ThumbTIpOri 是否一致,或RingTip与RingTipOri是否一致,如一致则本帧识别过程结束;If the state of GestureState is not identified, then judge whether the ThumbTip is consistent with the ThumbTIpOri, or whether the RingTip is consistent with the RingTipOri, if they are consistent, the identification process of this frame ends;

如果拇指指尖和无名指指尖的距离大于StartDis,则本帧识别过程结束;If the distance between the tip of the thumb and the tip of the ring finger is greater than StartDis, the recognition process of this frame ends;

结束之后,将GestureState的状态值设置为进行识别状态。After the end, set the state value of GestureState to the recognition state.

进一步需要说明的是,将GestureState的状态值设置为进行识别状态之后,将IntervalTm设置为当前时间点减去OriTm;It should be further explained that after setting the state value of GestureState to the recognition state, set IntervalTm to the current time point minus OriTm;

将DisThumbTipToRingTip设置为当前拇指指尖距离到无名指指尖距离;Set DisThumbTipToRingTip to the distance from the current thumb tip to the ring finger tip;

如果IntervalTm大于ReleaseTm,或DisThumbTipToRingTip大于ReleaseDis,则GestureState状态值设置为未开始识别,OriTm设置为当前时间点,RingTipOri设置为当前无名指指尖的位置,ThumbTipOri设置为当前拇指指尖的位置,本帧识别过程结束;If IntervalTm is greater than ReleaseTm, or DisThumbTipToRingTip is greater than ReleaseDis, the GestureState state value is set to not start recognition, OriTm is set to the current time point, RingTipOri is set to the current position of the fingertip of the ring finger, ThumbTipOri is set to the current position of the fingertip of the thumb, and this frame is recognized end of process;

如果IntervalTm小于GestureMaxTm,且IntervalTm大于GestureMinTm,DisThumbTipToRingTip大于GestureDis,则GestureState状态设置为:已识别成功,EndTm设置为当前的时间点,本帧识别过程结束。If IntervalTm is less than GestureMaxTm, and IntervalTm is greater than GestureMinTm, and DisThumbTipToRingTip is greater than GestureDis, the GestureState state is set to: recognized successfully, EndTm is set to the current time point, and the frame recognition process ends.

进一步需要说明的是,如果IntvalTm大于GestureTm说明识别超时,则把GestureState状态值设置为:未识别,OriTm设置为当前时间点,ThumbTipOri设置为此时拇指指尖的位置,RingTipOri设置为此时无名指指尖的位置。It should be further explained that if IntvalTm is greater than GestureTm, it means that the recognition has timed out, then set the GestureState state value to: Unrecognized, OriTm is set to the current time point, ThumbTipOri is set to the position of the thumb tip at this time, RingTipOri is set to the ring finger at this time pointed position.

进一步需要说明的是,如果IfTrack为false,在本帧之前尚未识别到过拇指指尖与无名指指尖,则获取拇指指尖与无名指指尖骨节位置,分别记录在ThumbTipOri和RingTipOri中,并把当前的时间点记录在OriTm中。It should be further explained that if IfTrack is false and the thumbtip and ring fingertip have not been recognized before this frame, then obtain the joint positions of the thumbtip and ring fingertip, record them in ThumbTipOri and RingTipOri respectively, and put the current The time points were recorded in OriTm.

本发明还提供一种电子设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现所述基于AR/MR技术的手势识别方法的步骤。The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and operable on the processor. When the processor executes the program, the AR/MR-based Steps of the technology gesture recognition method.

从以上技术方案可以看出,本发明具有以下优点:As can be seen from the above technical solutions, the present invention has the following advantages:

本发明能够对手势识别的相关变量、常量信息以及手势识别引擎进行汇总,方便用户参考使用,并便于系统根据相关变量、常量信息以及手势识别引擎执行相应的手势识别进程。有效的提升手势识别的准确度和精准性。还能够对手势识别信息高效率地收集、存储,并进行处理,基于手势识别的状态以及拇指指尖与无名指指尖的状态可以实现过程监控,使用多维空间描述整个手势识别过程。提高手势识别的质量和效能,及时发现在手势识别过程的异常,并进行修正,以提高AR/MR技术的执行准确度,满足使用要求,还实现基于AR/MR技术下,手势识别全过程监督、管理和控制的及时性和科学性。The present invention can summarize relevant variables, constant information and gesture recognition engines of gesture recognition, which is convenient for users to refer to and use, and facilitates the system to execute corresponding gesture recognition processes according to relevant variables, constant information and gesture recognition engines. Effectively improve the accuracy and precision of gesture recognition. It can also efficiently collect, store, and process gesture recognition information. Based on the state of gesture recognition and the state of the thumb and ring fingertips, process monitoring can be realized, and the entire gesture recognition process can be described using multi-dimensional space. Improve the quality and efficiency of gesture recognition, discover abnormalities in the gesture recognition process in time, and make corrections to improve the execution accuracy of AR/MR technology and meet the requirements of use. It also realizes the supervision of the whole process of gesture recognition based on AR/MR technology , Timeliness and scientificity of management and control.

本发明提供基于AR/MR技术的手势识别方法,还通过设置三维浮点数变量RingTip实时记录追踪到的无名指指尖位置,三维浮点数变量RingTipOri记录在某个时间点的无名指指尖的三维空间位置坐标,三维浮点数变量ThumbTip实时记录追踪到的拇指指尖位置,三维浮点数变量ThumbTipOri记录在某个时间点的拇指指尖三维空间位置坐标,枚举型变量GestureState识别状态,浮点型变量OriTm记录手势识别开始的时间点,浮点型变量EndTm记录手势识别成功时的时间点,浮点型变量IntervalTm记录每个状态所经过的时间,浮点型变量DisThumbTipToRingTip,记录拇指指尖到无名指指尖的距离等多个参数信息,可以判断SDK是否追踪到拇指指尖与无名指指尖,还可以结合场景判断并识别手势状态,融合拇指指尖与无名指指尖的识别验证。The present invention provides a gesture recognition method based on AR/MR technology. It also sets the three-dimensional floating-point number variable RingTip to record and track the fingertip position of the ring finger in real time, and the three-dimensional floating-point number variable RingTipOri records the three-dimensional space position of the ring finger fingertip at a certain point in time. Coordinates, the 3D floating-point variable ThumbTip records the tracked thumbtip position in real time, the 3D floating-point variable ThumbTipOri records the coordinates of the 3D space position of the thumbtip at a certain point in time, the enumerated variable GestureState recognizes the state, and the floating-point variable OriTm Record the start time of gesture recognition, the floating point variable EndTm records the time point when the gesture recognition is successful, the floating point variable IntervalTm records the time elapsed in each state, and the floating point variable DisThumbTipToRingTip records the thumb tip to the ring finger tip It can judge whether the SDK has tracked the tip of the thumb and the fingertip of the ring finger. It can also judge and recognize the gesture state in combination with the scene, and integrate the recognition and verification of the tip of the thumb and the fingertip of the ring finger.

通过设置三维数据变量,使其在引擎中的每一帧都进行识别判断,利用三维数据综合分析手势,提高识别展开手势的准确性,克服采用人工智能图像训练带来的仅能够通过平面图像判断,缺乏三维数据,对准确性有一定的影响以及训练周期长,数据模型量大,不利于快速调整手势的判定条件和判断精度的问题。By setting the 3D data variable, it can be recognized and judged in every frame in the engine, and the 3D data is used to comprehensively analyze gestures to improve the accuracy of recognition of unfolding gestures, and to overcome the artificial intelligence image training that can only be judged by plane images , the lack of three-dimensional data has a certain impact on accuracy, and the long training period and large amount of data models are not conducive to quickly adjusting the judgment conditions and judgment accuracy of gestures.

本发明可以动态注册和取消骨骼点的识别。通过骨骼点的2D及3D数据综合分析手势的准确性。可快速调整手势的判定条件及判断精度,确认指尖的位置,使手势识别功能更加稳定,保证用户的使用需求,保证了AR/MR技术中手势识别的可靠性。The invention can dynamically register and cancel the identification of skeleton points. The accuracy of gestures is comprehensively analyzed through 2D and 3D data of skeleton points. It can quickly adjust the judgment conditions and judgment accuracy of gestures, confirm the position of fingertips, make the gesture recognition function more stable, meet the needs of users, and ensure the reliability of gesture recognition in AR/MR technology.

附图说明Description of drawings

为了更清楚地说明本发明的技术方案,下面将对描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solution of the present invention more clearly, the accompanying drawings that need to be used in the description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. As far as people are concerned, other drawings can also be obtained based on these drawings on the premise of not paying creative work.

图1为基于AR/MR技术的手势识别方法流程图。Fig. 1 is a flowchart of a gesture recognition method based on AR/MR technology.

具体实施方式Detailed ways

本发明提供的基于AR/MR技术的手势识别方法可以基于人工智能技术对关联的数据进行获取和处理。其中,基于AR/MR技术的手势识别方法利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用装置。The gesture recognition method based on AR/MR technology provided by the present invention can acquire and process associated data based on artificial intelligence technology. Among them, the gesture recognition method based on AR/MR technology uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, the theory, method, technology and application device of perceiving the environment, acquiring knowledge and using knowledge to obtain the best results .

基于AR/MR技术的手势识别方法中既有硬件层面的技术也有软件层面的技术。手势识别方法基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。手势识别方法的软件技术主要包括计算机视角技术、机器学习/深度学习以及程序设计语言。其中,程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在AR/MR设备上执行,可以作为一个独立的软件包执行、或者部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(示例性的讲利用因特网服务提供商来通过因特网连接)。The gesture recognition method based on AR/MR technology includes both hardware-level technology and software-level technology. The basic technologies of gesture recognition methods generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, and mechatronics. The software technology of the gesture recognition method mainly includes computer perspective technology, machine learning/deep learning and programming language. Wherein, programming languages include but are not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and conventional procedural programming languages—such as “C” language or similar programming languages. The program code can be completely executed on the AR/MR device, can be executed as an independent software package, or partially executed on the user computer and partially executed on the remote computer, or completely executed on the remote computer. In cases involving a remote computer, the remote computer can be connected to the user computer via any kind of network, including a local area network (LAN) or a wide area network (WAN), or, alternatively, can be connected to an external computer (using, for example, an Internet service Provider via Internet connection).

对于本发明来讲,手势识别引擎,也或3D引擎,也或引擎是开发AR/MR软件所用到的3D引擎,例如Unity,UE等。For the present invention, the gesture recognition engine, or 3D engine, or the engine is the 3D engine used to develop AR/MR software, such as Unity, UE, etc.

时间点是本发明中提到的时间点,是指3D引擎中的时间点,具体是指从程序开始运行作为时间起点,到每次获取时间点时所经历的秒数。The time point is the time point mentioned in the present invention, which refers to the time point in the 3D engine, and specifically refers to the number of seconds elapsed from the start of the program as the time starting point to each acquisition of the time point.

SDK:设备厂商所提供的开发工具,具备基础的设备功能调用,例如Hololens厂商微软的SDK是MRTK,可以实时追踪所需的手部骨骼点的空间位置信息。SDK: The development tools provided by device manufacturers have basic device function calls. For example, Hololens manufacturer Microsoft's SDK is MRTK, which can track the required spatial position information of hand bone points in real time.

帧:引擎中计算频率的单位,引擎中的画面每更新一次是一帧,而在每一帧的时间内,是引擎中的一次计算周期。Frame: The unit of calculation frequency in the engine. Every update of the picture in the engine is a frame, and within the time of each frame, it is a calculation cycle in the engine.

本发明涉及的手势识别方法利用AR/MR技术,通过设置手势识别的相关变量,相关常量信息,并执行手势识别引擎,对每一帧进行如下识别判断,实现基于手势动作的非接触式操作,使用户更加方便快捷的获取、操作数据。可以有效地应用到远程遥控设备,或者查阅资料等多领域。进一步有效解决了传统手势识别不准确,无法有效获取到手势信息,导致AR/MR技术无法有效操作,影响用户体验的问题。The gesture recognition method involved in the present invention utilizes AR/MR technology, by setting relevant variables and constant information of gesture recognition, and executing the gesture recognition engine, performing the following recognition and judgment on each frame, so as to realize non-contact operation based on gesture actions, Make it easier for users to obtain and operate data. It can be effectively applied to multiple fields such as remote control equipment, or access to information. It further effectively solves the problem that the traditional gesture recognition is inaccurate and the gesture information cannot be effectively obtained, which leads to the ineffective operation of AR/MR technology and affects the user experience.

手势识别方法可以应用于一个或者多个电子设备中,所述电子设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable GateArray,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。The gesture recognition method can be applied to one or more electronic devices. The electronic device is a device that can automatically perform numerical calculation and/or information processing according to preset or stored instructions. Its hardware includes but is not limited to micro Processor, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), programmable gate array (Field-Programmable GateArray, FPGA), digital processor (Digital Signal Processor, DSP), embedded equipment, etc.

电子设备可以是任何一种可与用户进行人机交互的电子产品,例如,个人计算机、平板电脑、智能手机、个人数字助理(Personal Digital Assistant, PDA)、交互式网络电视(Internet Protocol Television,IPTV)、AR/MR智能式穿戴式设备等。An electronic device can be any electronic product that can interact with a user, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (Personal Digital Assistant, PDA), an interactive network TV (Internet Protocol Television, IPTV), etc. ), AR/MR smart wearable devices, etc.

电子设备所处的网络包括但不限于互联网、广域网、城域网、局域网、虚拟专用网络(Virtual Private Network,VPN)等。The network where the electronic device is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN) and the like.

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

请参阅图1所示是一具体实施例中基于AR/MR技术的手势识别方法的流程图,S101、设置并储存手势识别过程中的相关变量;Please refer to FIG. 1 which is a flowchart of a gesture recognition method based on AR/MR technology in a specific embodiment, S101, setting and storing relevant variables in the gesture recognition process;

具体来讲,1.1设置三维浮点数变量RingTip实时记录追踪到的无名指指尖位置,也就是更新当前帧SDK所获取到的无名指的三维空间位置坐标。Specifically, 1.1 set the three-dimensional floating-point variable RingTip to record the tracked fingertip position of the ring finger in real time, that is, update the three-dimensional space position coordinates of the ring finger acquired by the SDK in the current frame.

设置三维浮点数变量RingTipOri记录在某个时间点的无名指指尖的三维空间位置坐标,用于特定阶段对比无名指指尖的位置变化。Set the three-dimensional floating point variable RingTipOri to record the three-dimensional position coordinates of the fingertip of the ring finger at a certain time point, which is used to compare the position changes of the fingertip of the ring finger at a specific stage.

1.2设置三维浮点数变量ThumbTip实时记录追踪到的拇指指尖位置,也就是更新当前帧SDK所获取到的拇指的三维空间位置坐标。1.2 Set the 3D floating-point variable ThumbTip to record the tracked thumbtip position in real time, that is, to update the 3D space position coordinates of the thumb acquired by the SDK for the current frame.

设置三维浮点数变量ThumbTipOri记录在某个时间点的拇指指尖三维空间位置坐标,用于特定阶段对比拇指指尖的位置变化。Set the three-dimensional floating-point variable ThumbTipOri to record the three-dimensional position coordinates of the thumbtip at a certain time point, which is used to compare the position changes of the thumbtip at a specific stage.

1.3设置枚举型变量GestureState识别状态,其可能的状态值有四种分别是:1.未进行识别,2.正在进行识别,3.已识别成功,4.禁用。GestureState的默认状态为:未进行识别。1.3 Set the enumerated variable GestureState recognition state, and its possible state values are four kinds: 1. Not recognized, 2. Recognized in progress, 3. Recognized successfully, 4. Disabled. The default state of GestureState is: not recognized.

1.4设置布尔型变量IfTrack记录是否第一次同时识别到拇指指尖与无名指指尖。初始值为false。1.4 Set the Boolean variable IfTrack to record whether the fingertip of the thumb and the fingertip of the ring finger are recognized at the same time for the first time. The initial value is false.

1.5设置浮点型变量OriTm记录手势识别开始的时间点,这个时间点是从程序开始运行时到记录时所经历的秒数。1.5 Set the floating-point variable OriTm to record the start time of gesture recognition, which is the number of seconds elapsed from the start of the program to the time of recording.

1.6设置浮点型变量EndTm记录手势识别成功时的时间点,这个时间点是从程序开始运行时到记录时所经历的秒数。1.6 Set the floating-point variable EndTm to record the time point when the gesture recognition is successful. This time point is the number of seconds elapsed from the start of the program to the recording time.

1.7设置浮点型变量IntervalTm记录每个状态所经过的时间,例如识别成功后记录从上次手势识别成功到记录时所经历时间,或记录从开始识别到记录时所经历的时间。1.7 Set the floating-point variable IntervalTm to record the elapsed time of each state, such as recording the time elapsed from the last successful gesture recognition to recording after successful recognition, or recording the elapsed time from the start of recognition to recording.

1.8设置浮点型变量DisThumbTipToRingTip,记录拇指指尖到无名指指尖的距离。1.8 Set the floating-point variable DisThumbTipToRingTip to record the distance from the tip of the thumb to the tip of the ring finger.

S102、设置作为手势识别判断依据的常量信息,常量信息是根据AR/MR设备及使用环境定义的值;S102. Set constant information as a basis for gesture recognition judgment, where the constant information is a value defined according to the AR/MR device and the use environment;

2.1设置浮点型常量StartDis作为判断是否开始进行手势识别的距离条件,即当RingTip和ThumbTip之间的距离小于StartDis时,判断是否符合手势条件,这里设定的StartDis值为0.035。2.1 Set the floating-point constant StartDis as the distance condition for judging whether to start gesture recognition, that is, when the distance between RingTip and ThumbTip is smaller than StartDis, judge whether the gesture condition is met, and the value of StartDis set here is 0.035.

2.2设置浮点型常量EndDis作为手势需要达到的距离,即当ThumbTip和RingTip的距离超过EndDis时说明手势位置达到完成标准,设定EndDis值为0.5。2.2 Set the floating-point constant EndDis as the distance that the gesture needs to reach, that is, when the distance between ThumbTip and RingTip exceeds EndDis, it means that the gesture position has reached the completion standard, and the value of EndDis is set to 0.5.

2.3 设置浮点型常量GustureMinTm作为手势判断时间下限的限制条件,即当开始进行手势识别后,满足手势的位置变化条件时所经过的识别时间大于GustureMinTm,设定其值为0.13。2.3 Set the floating-point constant GustureMinTm as the limit condition of the lower limit of the gesture judgment time, that is, after the gesture recognition starts, the recognition time elapsed when the position change condition of the gesture is satisfied is greater than GustureMinTm, and its value is set to 0.13.

2.4设置浮点型常量手势判断时间上限的限制条件GestureMaxTm,即当开始进行手势识后时,在GestureMaxTm时间内满足手势位置变化的所有条件,设定其值为0.5。2.4 Set the limit condition GestureMaxTm of the upper limit of the floating-point constant gesture judgment time, that is, when the gesture recognition starts, all the conditions for the gesture position change are satisfied within the GestureMaxTm time, and its value is set to 0.5.

2.5 设置浮点型常量GestureReleaseTm作为要停止手势识别的时间,即当开始手势识别后,GestureReleaseTm时间内ThumbTip和RingTip未发生足够的距离变化,则不认为用户是准备进行这个手势,也就不再进行手势识别。2.5 Set the floating-point constant GestureReleaseTm as the time to stop gesture recognition, that is, after starting gesture recognition, if the distance between ThumbTip and RingTip does not change enough within the time of GestureReleaseTm, it is not considered that the user is ready to perform this gesture, so it will not be performed again Gesture Recognition.

2.6 设置浮点型常量GestureReleaseDis判断停止手势识别的距离,即当开始手势识别后,在GestureReleaseTm内,ThumbTip和RingTip是否发生足够距离变化的判断标准,设定其值为0.038。2.6 Set the floating-point constant GestureReleaseDis to judge the distance to stop gesture recognition, that is, the criterion for judging whether there is a sufficient distance change between ThumbTip and RingTip within GestureReleaseTm after gesture recognition starts, and set its value to 0.038.

2.7 设置浮点数类型常量ReAcvTm手势的冷却时间,即当识别到手势完成后,多少秒内不再进行该手势的识别,作用有两个:2.7 Set the cooling time of the floating-point number constant ReAcvTm gesture, that is, after the gesture is recognized, how many seconds will not be recognized for the gesture. There are two functions:

1).因为正常情况下该手势不会在短时间内有被连续触发的需求,如果出现连续符合判断标准的情况,大概率是误操作导致。1). Under normal circumstances, the gesture does not need to be triggered continuously in a short period of time. If there is a continuous meeting of the judgment criteria, it is likely to be caused by misuse.

2).动作激活后作为识别标准的关节大概率依旧满足达成手势的标准,会导致手势成功被高频持续识别导致程序崩溃,设定其值为1.5。2). After the action is activated, the joints used as the recognition standard have a high probability of still meeting the standard of reaching the gesture, which will cause the gesture to be successfully recognized by high frequency and continue to cause the program to crash. Set its value to 1.5.

S103、执行手势识别引擎,对每一帧进行识别判断,具体判断步骤为如下所述:S103. Execute the gesture recognition engine to perform recognition and judgment on each frame, and the specific judgment steps are as follows:

3.1判断SDK是否追踪到拇指指尖与无名指指尖,如果有任意一个指尖未追踪到,则将IfTrack设置为false,并把GestureState的值设置为:未进行识别。本帧识别过程直接结束。3.1 Determine whether the SDK has tracked the tip of the thumb and the fingertip of the ring finger. If any fingertip is not tracked, set IfTrack to false, and set the value of GestureState to: no recognition. The frame recognition process ends directly.

3.2 如果同时识别到了拇指指尖与无名指指尖,则用ThumbTip记录当前帧拇指指尖的位置即空间三维坐标,用RingTip记录当前帧无名指指尖的位置即空间三维坐标。3.2 If the thumbtip and the ring fingertip are recognized at the same time, use ThumbTip to record the position of the thumb tip in the current frame, that is, the three-dimensional space coordinates, and use RingTip to record the position of the ring fingertip in the current frame, that is, the three-dimensional space coordinates.

3.3如果IfTrack为false,则说明程序运行开始后或上次手势识别成功后,在本帧之前尚未同时识别到过拇指指尖与无名指指尖,则获取拇指指尖与无名指指尖骨节位置,分别记录在ThumbTipOri和RingTipOri中。把当前的时间点记录在OriTm中。将IfTrack的值变为true。3.3 If IfTrack is false, it means that the thumbtip and the ring fingertip have not been recognized at the same time before this frame after the start of the program or after the last gesture recognition is successful, then obtain the joint positions of the thumbtip and the ring fingertip, respectively Documented in ThumbTipOri and RingTipOri. Record the current time point in OriTm. Change the value of IfTrack to true.

3.4如果GestureState的状态值为已识别成功,则用IntervalTm记录当前帧时间点-EndTm,即从上次判断成功到当前帧所用的时间。3.4 If the state value of GestureState has been recognized successfully, use IntervalTm to record the current frame time point-EndTm, that is, the time from the last successful judgment to the current frame.

如果IntervalTm大于ReAcvTm则将GestureState的状态值变为未进行识别。把OriTm设置为当前帧的时间点。RingTipOri设置为当前无名指指尖的位置。ThumbTipOri设置为当前拇指指尖的位置。本帧识别过程直接结束。If IntervalTm is greater than ReAcvTm, change the state value of GestureState to not recognized. Set OriTm to the time point of the current frame. RingTipOri is set to the current position of the fingertip of the ring finger. ThumbTipOri is set to the current position of the thumb tip. The frame recognition process ends directly.

3.4 如果GestureState的状态为未进行识别,则:3.4 If the status of GestureState is not identified, then:

3.4.1如果ThumbTip与ThumbTIpOri 一致,或RingTip与RingTipOri一致,则本帧识别过程直接结束。3.4.1 If the ThumbTip is consistent with the ThumbTIpOri, or the RingTip is consistent with the RingTipOri, the frame identification process ends directly.

3.4.2 如果此时拇指指尖和无名指指尖的距离大于StartDis,本帧识别过程直接结束。3.4.2 If the distance between the tip of the thumb and the tip of the ring finger is greater than StartDis, the recognition process of this frame ends directly.

3.4.3 将GestureState的状态值设置为正在进行识别。3.4.3 Set the status value of GestureState to Recognition in progress.

3.5 如果GestureState 的状态值为正在进行识别,则3.5 If the status value of GestureState is identifying, then

3.5.1如果RingTip与RingTipOri一致或ThumbTip与ThumbTipOri一致,则本帧识别过程直接结束。3.5.1 If the RingTip is consistent with the RingTipOri or the ThumbTip is consistent with the ThumbTipOri, the frame identification process ends directly.

3.5.2 将IntervalTm设置为当前时间点减去OriTm。3.5.2 Set IntervalTm to the current time point minus OriTm.

3.5.3 将DisThumbTipToRingTip设置为当前拇指指尖距离到无名指指尖距离。3.5.3 Set DisThumbTipToRingTip to the distance from the current thumb tip to the ring finger tip.

3.5.4 如果IntervalTm大于ReleaseTm或DisThumbTipToRingTip大于ReleaseDis则GestureState状态值设置为未开始识别,OriTm设置为当前时间点,RingTipOri设置为当前无名指指尖的位置,ThumbTipOri设置为当前拇指指尖的位置,本帧识别过程直接结束。3.5.4 If IntervalTm is greater than ReleaseTm or DisThumbTipToRingTip is greater than ReleaseDis, the GestureState state value is set to not start recognition, OriTm is set to the current time point, RingTipOri is set to the current position of the fingertip of the ring finger, ThumbTipOri is set to the current position of the fingertip of the thumb, this frame The recognition process ends directly.

3.5.5如果IntervalTm小于GestureMaxTm,且IntervalTm大于GestureMinTm,且DisThumbTipToRingTip大于GestureDis,则GestureState状态设置为:已识别成功,EndTm设置为当前的时间点。绽放手势通过识别,本帧识别过程直接结束。3.5.5 If IntervalTm is less than GestureMaxTm, and IntervalTm is greater than GestureMinTm, and DisThumbTipToRingTip is greater than GestureDis, the GestureState state is set to: recognized successfully, and EndTm is set to the current time point. The blooming gesture is recognized, and the recognition process of this frame ends directly.

3.6如果IntvalTm大于GestureTm说明识别超时,则把GestureState状态值设置为:未开始识别,OriTm设置为当前时间点,ThumbTipOri设置为此时拇指指尖的位置,RingTipOri设置为此时无名指指尖的位置。3.6 If IntvalTm is greater than GestureTm, it means that the recognition has timed out, then set the GestureState state value to: recognition has not started, OriTm is set to the current time point, ThumbTipOri is set to the position of the thumb tip at this time, and RingTipOri is set to the position of the ring finger tip at this time.

应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。It should be understood that the sequence numbers of the steps in the above embodiments do not mean the order of execution, and the execution order of each process should be determined by its functions and internal logic, and should not constitute any limitation to the implementation process of the embodiment of the present invention.

这样,本发明能够对手势识别的相关变量、常量信息以及手势识别引擎进行汇总,方便用户参考使用,并便于系统根据相关变量、常量信息以及手势识别引擎执行相应的手势识别进程。有效的提升手势识别的准确度和精准性。还能够对手势识别信息高效率地收集、存储,并进行处理,基于手势识别的状态以及拇指指尖与无名指指尖的状态可以实现过程监控,使用多维空间描述整个手势识别过程。提高手势识别的质量和效能,及时发现在手势识别过程的异常,并进行修正,以提高AR/MR技术的执行准确度,满足使用要求,还实现基于AR/MR技术下,手势识别全过程监督、管理和控制的及时性和科学性。In this way, the present invention can summarize related variables, constant information and gesture recognition engines of gesture recognition, which is convenient for users to refer to and use, and facilitates the system to execute corresponding gesture recognition processes according to relevant variables, constant information and gesture recognition engines. Effectively improve the accuracy and precision of gesture recognition. It can also efficiently collect, store, and process gesture recognition information. Based on the state of gesture recognition and the state of the thumb and ring fingertips, process monitoring can be realized, and the entire gesture recognition process can be described using multi-dimensional space. Improve the quality and efficiency of gesture recognition, discover abnormalities in the gesture recognition process in time, and make corrections to improve the execution accuracy of AR/MR technology and meet the requirements of use. It also realizes the supervision of the whole process of gesture recognition based on AR/MR technology , Timeliness and scientificity of management and control.

本发明提供基于AR/MR技术的手势识别方法,还通过设置三维浮点数变量RingTip实时记录追踪到的无名指指尖位置,三维浮点数变量RingTipOri记录在某个时间点的无名指指尖的三维空间位置坐标,三维浮点数变量ThumbTip实时记录追踪到的拇指指尖位置,三维浮点数变量ThumbTipOri记录在某个时间点的拇指指尖三维空间位置坐标,枚举型变量GestureState识别状态,浮点型变量OriTm记录手势识别开始的时间点,浮点型变量EndTm记录手势识别成功时的时间点,浮点型变量IntervalTm记录每个状态所经过的时间,浮点型变量DisThumbTipToRingTip,记录拇指指尖到无名指指尖的距离等多个参数信息,可以判断SDK是否追踪到拇指指尖与无名指指尖,还可以结合场景判断并识别手势状态,融合拇指指尖与无名指指尖的识别验证。本发明可以动态注册和取消骨骼点的识别。通过骨骼点的2D及3D数据综合分析手势的准确性。可快速调整手势的判定条件及判断精度,确认指尖的位置,使手势识别功能更加稳定,保证用户的使用需求,保证了AR/MR技术中手势识别的可靠性。The present invention provides a gesture recognition method based on AR/MR technology. It also sets the three-dimensional floating-point number variable RingTip to record and track the fingertip position of the ring finger in real time, and the three-dimensional floating-point number variable RingTipOri records the three-dimensional space position of the ring finger fingertip at a certain point in time. Coordinates, the 3D floating point variable ThumbTip records the tracked thumbtip position in real time, the 3D floating point variable ThumbTipOri records the coordinates of the 3D space position of the thumbtip at a certain point in time, the enumerated variable GestureState recognizes the state, and the floating point variable OriTm Record the time point when the gesture recognition starts, the floating point variable EndTm records the time point when the gesture recognition is successful, the floating point variable IntervalTm records the time elapsed in each state, and the floating point variable DisThumbTipToRingTip records the thumb tip to the ring finger tip It can judge whether the SDK has tracked the tip of the thumb and the fingertip of the ring finger. It can also judge and recognize the gesture state in combination with the scene, and integrate the identification and verification of the fingertip of the thumb and the ring finger. The invention can dynamically register and cancel the identification of skeleton points. The accuracy of gestures is comprehensively analyzed through 2D and 3D data of skeleton points. It can quickly adjust the judgment conditions and judgment accuracy of gestures, confirm the position of fingertips, make the gesture recognition function more stable, meet the needs of users, and ensure the reliability of gesture recognition in AR/MR technology.

本发明涉及的基于AR/MR技术的手势识别方法中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。The units and algorithm steps of each example described in the embodiments disclosed in the gesture recognition method based on AR/MR technology involved in the present invention can be realized by electronic hardware, computer software or a combination of the two. In order to clearly illustrate the hardware and Interchangeability of software. In the above description, the components and steps of each example have been generally described according to their functions. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.

在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.

对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A gesture recognition method based on AR/MR technology is characterized by comprising the following steps:
s101, setting and storing related variables in a gesture recognition process;
s102, setting constant information used as a gesture recognition judgment basis, wherein the constant information is a value defined according to AR/MR equipment and a use environment;
s103, executing a gesture recognition engine, and performing the following gesture recognition judgment on each frame:
judging whether the SDK tracks the thumb tip and the ring finger tip, if any one of the finger tips is not tracked, setting IfTrack as false, and setting GesturState as the following value: if the frame is not identified, the frame identification process is finished;
if the thumb fingertip and the ring finger fingertip are identified at the same time, recording the position of the current frame thumb fingertip, namely the space three-dimensional coordinate by using thumb Tip, and recording the position of the current frame ring finger fingertip, namely the space three-dimensional coordinate by using RingTip;
if the state value of GesturEST is successfully identified, recording the time point-EndTm of the current frame by using IntervalTm, namely the time from the last successful judgment to the current frame;
if IntervalTm is greater than ReAcvTm, the state value of GesturState is changed to unrecognized; setting OriTm as a time point of a current frame; ringTipOri is set to the position of the current ring finger tip; the thumb TipOri is set as the current position of the thumb tip, and the frame identification process is directly ended.
2. The method for recognizing gestures based on AR/MR technology according to claim 1, wherein the relevant variables set and stored in step S101 include:
setting a three-dimensional floating point number variable RingTip, and recording and tracking the position information of the ring finger tip in real time;
setting a three-dimensional floating point number variable RingTipOri, recording a three-dimensional space position coordinate of the fingertip of the ring finger at a certain time point, and comparing the position change of the fingertip of the ring finger;
setting a three-dimensional floating point number variable ThumbTip, recording and tracking the position of a fingertip of the thumb in real time, and updating the three-dimensional space position coordinate of the thumb obtained by the current frame SDK;
and setting a three-dimensional floating point number variable ThumbTipOri, and recording the three-dimensional space position coordinates of the thumb and the fingertip at a certain time point for comparing the position change of the thumb and the fingertip.
3. The method for recognizing gestures based on AR/MR technology according to claim 1, wherein the related variables set and stored in step S101 further comprise:
setting an enumeration type variable GestureState, and identifying the state value of the enumeration type variable, wherein the state value comprises the following steps: 1. not identifying, 2, identifying, 3, successfully identifying, and 4, forbidding;
the default state of the enumerated variable GestureState is: no identification is performed;
setting a Boolean type variable IfTrack, and recording whether the fingertips of the thumb and the ring finger are recognized for the first time;
setting a floating point type variable oriTm and recording a time point of starting gesture recognition, wherein the time point is the number of seconds from the time when a program starts to run to the time when the program is recorded;
setting a floating point type variable EndTM, and recording a time point when gesture recognition is successful, wherein the time point is the number of seconds from the start of running of a program to the recording;
setting a floating point type variable IntervalTm;
the floating point type variable quantity DisThumbTipToRingTip is set, and the distance information from the thumb tip to the ring finger tip is recorded.
4. The method for gesture recognition based on AR/MR technology according to claim 1, wherein step S102 further comprises: setting a floating point type constant StartDis as a distance condition for judging whether to start gesture recognition; when the distance between the RingTip and the thumb is smaller than StartDis, starting to judge whether the gesture condition is met;
setting a floating point constant EndDis as a distance which needs to be reached by the gesture, and when the distance between thumb tip and Ringtip exceeds EndDis, indicating that the gesture position reaches a completion standard;
setting a floating point constant GusturmeminTm as a limiting condition of a lower limit of gesture judgment time, namely determining the gesture recognition state as an effective gesture recognition state if the elapsed recognition time is more than GusturmeminTm after gesture recognition is started and if the gesture position change condition is met;
setting a limitation condition GesturmemaxTm of a floating point type constant gesture judgment time upper limit; after gesture recognition is started, the gesture position change condition is satisfied within the time of GesturmeMaxTm.
5. The method for gesture recognition based on AR/MR technology according to claim 1, wherein step S102 further comprises: setting a floating point constant GesturreleaseTm as time for stopping gesture recognition; after gesture recognition is started, if the distance between the thumb tip and the Ringtip is not changed within the GesturreleaseTm time, the gesture recognition is not performed any more;
setting a floating point constant GestureleaseDis to judge the distance for stopping gesture recognition, namely judging whether the distance change of thumb tip and Ringtip exceeds a preset distance or not during gesture recognition within GestureleaseTm time, and stopping current gesture recognition if the distance change of thumb tip and Ringtip does not exceed the preset distance;
and setting a constant value of the floating point number, namely, the Retvtm, as the cooling time of the gesture.
6. The method for recognizing gesture based on AR/MR technology according to claim 1, wherein the ending condition of the frame recognition process in step S103 further includes:
if the GestureState is not recognized, judging whether the ThumbTip is consistent with the ThumbTIpOri or whether the RingTip is consistent with the RingTipOri, and if so, finishing the frame recognition process;
if the distance between the finger tip of the thumb and the finger tip of the ring finger is greater than StartDis, the frame identification process is ended;
after the end, the state value of getturestate is set to the recognition execution state.
7. The AR/MR technology-based gesture recognition method according to claim 6, wherein after setting the state value of getcurestate to recognition state, setting IntervalTm to the current time point minus OriTm;
setting DisThumbTipToRingTip to be the distance from the current thumb fingertip to the ring finger fingertip;
if IntervalTm is greater than ReleaseTm, or distumbtiptorngtip is greater than ReleaseDis, the gettrestate state value is set to be recognition-unfitted, oriTm is set to be the current time point, ringTipOri is set to be the current position of the ring finger tip, thumbTipOri is set to be the current position of the thumb tip, and the frame recognition process is ended;
if IntervalTm is less than GesturEMaxTm, and IntervalTm is greater than GesturEMINTm, disthenbTipToRingTip is greater than GestureDis, gestureState status is set to: and if the identification is successful, endTm is set as the current time point, and the frame identification process is ended.
8. The method of claim 7, wherein if IntvalTm is greater than GestureTm indicating a recognition timeout, the GestureState state value is set to: unrecognized, oriTm is set as the current time point, thumbTipOri is set as the position of the thumb tip at that time, and RingTipOri is set as the position of the ring finger tip at that time.
9. The AR/MR technique-based gesture recognition method according to claim 8,
if ifTrack is false, the thumb tip and the ring finger tip are not recognized before the frame, the positions of the bony prominences of the thumb tip and the ring finger tip are obtained and recorded in ThumbTipOri and RingTipOri respectively, and the current time point is recorded in OriTm.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor when executing the program carries out the steps of the method for gesture recognition based on AR/MR technology according to any of claims 1 to 9.
CN202310091517.5A 2023-02-10 2023-02-10 A gesture recognition method and electronic device based on AR/MR technology Active CN115798054B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310091517.5A CN115798054B (en) 2023-02-10 2023-02-10 A gesture recognition method and electronic device based on AR/MR technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310091517.5A CN115798054B (en) 2023-02-10 2023-02-10 A gesture recognition method and electronic device based on AR/MR technology

Publications (2)

Publication Number Publication Date
CN115798054A true CN115798054A (en) 2023-03-14
CN115798054B CN115798054B (en) 2023-11-10

Family

ID=85430701

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310091517.5A Active CN115798054B (en) 2023-02-10 2023-02-10 A gesture recognition method and electronic device based on AR/MR technology

Country Status (1)

Country Link
CN (1) CN115798054B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106909871A (en) * 2015-12-22 2017-06-30 江苏达科智能科技有限公司 Gesture instruction recognition methods
CN106970701A (en) * 2016-01-14 2017-07-21 芋头科技(杭州)有限公司 A kind of gesture changes recognition methods
WO2018076523A1 (en) * 2016-10-25 2018-05-03 科世达(上海)管理有限公司 Gesture recognition method and apparatus, and in-vehicle system
US20190179417A1 (en) * 2017-12-11 2019-06-13 Shenzhen Starfield Information Technologies Co., Ltd. 3D Interaction Method, Device, Computer Equipment and Storage Medium
WO2019178114A1 (en) * 2018-03-13 2019-09-19 Magic Leap, Inc. Gesture recognition system and method of using same
CN111273778A (en) * 2020-02-14 2020-06-12 北京百度网讯科技有限公司 Method and device for controlling electronic equipment based on gestures
US20200225758A1 (en) * 2019-01-11 2020-07-16 Microsoft Technology Licensing, Llc Augmented two-stage hand gesture input
CN112926423A (en) * 2021-02-07 2021-06-08 青岛小鸟看看科技有限公司 Kneading gesture detection and recognition method, device and system
CN113238650A (en) * 2021-04-15 2021-08-10 青岛小鸟看看科技有限公司 Gesture recognition and control method and device and virtual reality equipment
CN114973414A (en) * 2022-06-01 2022-08-30 斑马网络技术有限公司 Dynamic gesture recognition method and intelligent vehicle-mounted equipment
CN115601781A (en) * 2021-06-25 2023-01-13 青岛海尔多媒体有限公司(Cn) Method and device for dynamic gesture recognition and electronic equipment

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106909871A (en) * 2015-12-22 2017-06-30 江苏达科智能科技有限公司 Gesture instruction recognition methods
CN106970701A (en) * 2016-01-14 2017-07-21 芋头科技(杭州)有限公司 A kind of gesture changes recognition methods
WO2018076523A1 (en) * 2016-10-25 2018-05-03 科世达(上海)管理有限公司 Gesture recognition method and apparatus, and in-vehicle system
US20190179417A1 (en) * 2017-12-11 2019-06-13 Shenzhen Starfield Information Technologies Co., Ltd. 3D Interaction Method, Device, Computer Equipment and Storage Medium
WO2019178114A1 (en) * 2018-03-13 2019-09-19 Magic Leap, Inc. Gesture recognition system and method of using same
US20200225758A1 (en) * 2019-01-11 2020-07-16 Microsoft Technology Licensing, Llc Augmented two-stage hand gesture input
CN111273778A (en) * 2020-02-14 2020-06-12 北京百度网讯科技有限公司 Method and device for controlling electronic equipment based on gestures
CN112926423A (en) * 2021-02-07 2021-06-08 青岛小鸟看看科技有限公司 Kneading gesture detection and recognition method, device and system
CN113238650A (en) * 2021-04-15 2021-08-10 青岛小鸟看看科技有限公司 Gesture recognition and control method and device and virtual reality equipment
CN115601781A (en) * 2021-06-25 2023-01-13 青岛海尔多媒体有限公司(Cn) Method and device for dynamic gesture recognition and electronic equipment
CN114973414A (en) * 2022-06-01 2022-08-30 斑马网络技术有限公司 Dynamic gesture recognition method and intelligent vehicle-mounted equipment

Also Published As

Publication number Publication date
CN115798054B (en) 2023-11-10

Similar Documents

Publication Publication Date Title
US11650659B2 (en) User input processing with eye tracking
TWI411935B (en) System and method for generating control instruction by identifying user posture captured by image pickup device
CN108845668B (en) Human-computer interaction system and method
US20130335318A1 (en) Method and apparatus for doing hand and face gesture recognition using 3d sensors and hardware non-linear classifiers
CN101901052B (en) Target control method based on mutual reference of both hands
CN104216642B (en) A kind of terminal control method
JP6618276B2 (en) Information processing apparatus, control method therefor, program, and storage medium
US12067158B2 (en) Object interaction method and system, and computer-readable medium
WO2018000519A1 (en) Projection-based interaction control method and system for user interaction icon
TW201120681A (en) Method and system for operating electric apparatus
IL224026A (en) System and method for human to machine interfacing by hand gestures
CN102270037B (en) Freehand man-machine interface operating system and method thereof
JP6711817B2 (en) Information processing apparatus, control method thereof, program, and storage medium
TWI431538B (en) Image based motion gesture recognition method and system thereof
WO2013051681A1 (en) Finger shape estimation device, finger shape estimation method, and finger shape estimation program
CN110837792A (en) Three-dimensional gesture recognition method and device
KR101559502B1 (en) Method and recording medium for contactless input interface with real-time hand pose recognition
CN112507880A (en) Model training method, hand washing behavior detection method, device, equipment and medium
WO2024078088A1 (en) Interaction processing method and apparatus
CN116311519A (en) Action recognition method, model training method and device
AU2021463303A1 (en) Electronic apparatus and program
JP2020027647A (en) Robust gesture recognizer and system for projector-camera interactive display using depth camera and deep neural network
CN114513694A (en) Scoring determination method and device, electronic equipment and storage medium
CN111901518B (en) Display method and device and electronic equipment
CN115798054B (en) A gesture recognition method and electronic device based on AR/MR technology

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant