A method, system and medium for identifying gesture events
By combining gesture shapes and movement directions to define gesture events, the problems of limited types of gesture events and low accuracy in the existing technology are solved, achieving higher recognition accuracy and the ability to adapt to real-time interaction needs.
Patent Information
- Application Number
- CN202010605436.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-29
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-06-29
AI Technical Summary
Existing gesture recognition technology recognizes limited types of gesture events, has low precision, poor accuracy, and poor real-time performance, making it unsuitable for real-time interaction needs.
By combining the gesture shape and movement direction, the gesture event is defined, the gesture movement threshold is set, the gesture outline image is extracted, the change in the center position of the circle is calibrated, the gesture movement direction is determined, and the gesture event is determined based on the gesture shape and movement direction.
The types of gesture events are increased, the accuracy of judgment is improved, and it is suitable for real-time interaction needs.
Smart Images

Figure CN111753771B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of gesture image recognition, and in particular to a gesture event recognition method, system and medium. Background Art
[0002] With the advent of the intelligent era, more and more scenarios will use gestures for human-computer interaction, such as controlling characters in games, controlling robots or mechanical equipment in industrial production. They often use different gesture shapes to generate gesture events for corresponding control. Gesture events generated by gesture shapes alone are easy to confirm, but the types of gesture events are relatively limited, because there are about ten kinds of gesture shapes that can be generated by one hand.
[0003] Therefore, the types of gesture events that can be recognized in the recognition process of existing gesture recognition technology are relatively limited, and the precision and accuracy of gesture recognition are low. In addition, the real-time performance of existing gesture recognition technology based on pattern recognition is poor and is not suitable for occasions requiring instant interaction. Summary of the invention
[0004] In view of this, the present invention provides a method, system and medium for identifying gesture events. In particular, the present invention introduces the dimension of gesture movement direction while detecting the gesture shape and combines it with the gesture shape to generate gesture events, so that the types of gesture events are richer and there is more comparison information in event judgment, which is less prone to errors.
[0005] To achieve the above object, according to a first aspect of the present invention, a method for identifying a gesture event is provided, the method comprising:
[0006] Define gesture events and set gesture movement thresholds;
[0007] Extracting a gesture contour image from N frames of gesture images collected continuously, and determining a gesture shape according to a concave-convex shape of the gesture contour;
[0008] In the N frames of the gesture contour image, calibrate the center position of the largest circle that is tangent to / connected to the inside of the gesture contour;
[0009] Locating the circle center position change information in the N frames of the gesture contour image, and determining the gesture movement direction in combination with the gesture movement threshold;
[0010] Determine a gesture event according to the gesture shape and the gesture movement direction;
[0011] Wherein, N is a positive integer greater than or equal to 10.
[0012] Furthermore, the definition of gesture events includes:
[0013] According to the recognizable gesture shapes, M gesture shape types are defined, and then according to the gesture shape types, M*(M-1) gesture shape change types are defined, where M is a positive integer greater than or equal to 10; according to the recognizable moving directions, 8 gesture moving direction types are defined, where the moving directions include up, down, left, right, upper left, upper right, lower left, and lower right;
[0014] Define the event of gesture shape change and no movement, and the identifiable types are M*(M-1);
[0015] Define gesture shape unchanged and moving events, 8*M types of identifiable types;
[0016] Define gesture shape change and movement events, and the identifiable types are 8*M*(M-1).
[0017] Furthermore, the setting of the gesture movement threshold comprises:
[0018] Create an image coordinate system and set the x-axis and y-axis movement thresholds Tx and Ty respectively.
[0019] Furthermore, the locating the circle center position change information in the gesture contour image of N frames and determining the gesture movement direction in combination with the gesture movement threshold comprises:
[0020] Storing the corresponding circle center coordinates in the N frames of gesture contour images into a set;
[0021] Calculate the x-axis and y-axis differences Δx and Δy of the coordinates of two adjacent points respectively;
[0022] Adding (N-1) of the Δx values and adding (N-1) of the Δy values to obtain a cumulative coordinate difference (∑Δx, ∑Δy);
[0023] The ΣΔx and ΣΔy are compared with Tx and Ty respectively to determine whether the gesture moves in the x-axis and y-axis directions, thereby determining the movement direction of the gesture.
[0024] Furthermore, extracting the gesture contour image from the continuously collected N frames of gesture images includes:
[0025] The background noise of the gesture image is eliminated, ROI is extracted from the N frames of gesture images collected continuously according to the gesture features, and the ROI is binarized to obtain a gesture contour image.
[0026] Furthermore, extracting ROI from the N frames of gesture images collected continuously according to the gesture features, and performing binarization processing on the ROI to obtain the gesture contour image includes:
[0027] The threshold range is set with the RGB value of human skin color, corresponding pixel points are extracted from the continuously collected N frames of gesture images to generate ROI, and the ROI is binarized, and the obtained maximum area contour is determined as the gesture contour image.
[0028] According to a second aspect of the present invention, a method for controlling gestures in a game scene is provided, comprising:
[0029] A gesture event input in the game scene and an interface operation matching the gesture event;
[0030] Using the method described above to identify gesture events;
[0031] The corresponding interface operation is triggered after the gesture event is successfully recognized.
[0032] According to a third aspect of the present invention, there is provided a gesture event recognition system, the system comprising:
[0033] Gesture acquisition module, used for continuously acquiring N frames of gesture images;
[0034] Gesture definition module, used to define gesture events and set gesture movement thresholds;
[0035] A first processing module, configured to extract a gesture contour image from N frames of gesture images, and determine a gesture shape according to a concave-convex shape of the gesture contour;
[0036] The second processing module is used to calibrate the center position of the largest circle tangent to / connected to the inside of the gesture contour in the N frames of the gesture contour image; locate the change information of the center position in the N frames of the gesture contour image, and determine the gesture movement direction in combination with the gesture movement threshold;
[0037] A gesture recognition module, used for determining a gesture event according to the gesture shape and gesture movement direction;
[0038] Wherein, N is a positive integer greater than or equal to 10.
[0039] Furthermore, the gesture definition module is used to:
[0040] M gesture shape types are defined according to the recognizable gesture shapes, and M*(M-1) gesture shape change types are defined according to the gesture shape types, where M is a positive integer greater than or equal to 10.
[0041] 8 gesture movement direction types are defined according to the recognizable movement directions, including up, down, left, right, upper left, upper right, lower left, and lower right;
[0042] Define the event of gesture shape change and no movement, and the identifiable types are M*(M-1);
[0043] Define gesture shape unchanged and moving events, 8*M types of identifiable types;
[0044] Define gesture shape change and movement events, and the identifiable types are 8*M*(M-1).
[0045] According to a fourth aspect of the present invention, there is provided a computer-readable medium storing a computer program executed by an electronic device, wherein when the computer program is executed on the electronic device, the electronic device executes the method as described above.
[0046] Compared with the prior art, the gesture event recognition method, system and medium provided by the present invention have the following beneficial technical effects:
[0047] The gesture event recognition method, system and medium provided by the present invention can detect the gesture movement direction and gesture shape, and form the gesture movement direction and gesture shape into two-dimensional information to obtain gesture events. This method makes the types of gesture events richer and the judgment of gesture events less prone to errors.
[0048] Specifically, the gesture event recognition method provided by the present invention includes defining gesture events and setting gesture movement thresholds. The hand position in the video / image frame is located and the contour is detected to determine the gesture shape, and multiple consecutive frames of gestures are collected to obtain the movement direction according to the change of the hand position and determine the gesture event by combining the change of the gesture shape. This method simultaneously utilizes the changes of gesture position and gesture shape to enrich the types of gesture events and make the judgment of gesture events less prone to errors. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 The figure is a flow chart of a method for identifying a gesture event implemented according to the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0051] It should be noted that the terms "first\second" used in the present invention are only used to distinguish similar objects, and do not represent a specific order for the objects. It is understandable that "first\second" can be interchanged with a specific order or sequence where permitted. It should be understood that the objects distinguished by "first\second" can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those described or illustrated herein.
[0052] It should be noted that the operation symbol "*" involved in the present invention is an operation symbol representing the multiplication of two constants or vectors, and "-" is an operation symbol representing the subtraction of two constants or vectors. All function equations in the present invention follow the mathematical rules of addition, subtraction, multiplication and division.
[0053] According to an embodiment of the present invention, a method for identifying a gesture event is provided, the method comprising:
[0054] S01: Define gesture events and set gesture movement thresholds;
[0055] S02: extracting a gesture contour image from the N frames of gesture images collected continuously, and determining a gesture shape according to a concave-convex shape of the gesture contour;
[0056] S03: in the N frames of gesture contour images, calibrate the center position of the largest circle that is tangent to / connected to the inside of the gesture contour;
[0057] S04: Locate the change information of the center position of the circle in the N frames of gesture contour images, and determine the gesture movement direction in combination with the gesture movement threshold;
[0058] S05: determining a gesture event according to the gesture shape and the gesture movement direction;
[0059] Furthermore, N is a positive integer greater than or equal to 10.
[0060] In this embodiment, in step S01, defining a gesture event includes:
[0061] Further, M gesture shape types are defined according to the recognizable gesture shapes, and M*(M-1) gesture shape change types are defined according to the gesture shape types, where M is a positive integer greater than or equal to 10;
[0062] Furthermore, 8 gesture movement direction types are defined according to the recognizable movement directions, including up, down, left, right, upper left, upper right, lower left, and lower right;
[0063] Furthermore, we define the event of gesture shape change and no movement, and the recognizable types are M*(M-1); because M gesture shape types can be recognized, the recognizable types of gesture shape change from one gesture shape to another are M*(M-1), among which the types of gesture shape change from one gesture shape to the same gesture shape are eliminated, so the number is M*(M-1). We define the event of gesture shape no change and movement, and the recognizable types are 8*M; because 8 gesture movement direction types and M gesture shape types can be recognized, the recognizable types of gesture shape no change and movement are 8*M. We define the event of gesture shape change and movement, and the recognizable types are 8*M*(M-1); because 8 gesture movement direction types can be recognized, the recognizable types of gesture shape change from one gesture shape to another are M*(M-1), and the recognizable types of gesture shape change and movement are 8*M*(M-1).
[0064] Furthermore, the definition of gesture events such as gesture shape can be set to M types of gesture shapes such as "1", "2"... "M", and the moving direction can be set to 8 gesture movement direction types such as "up", "down", "left", "right", "upper left", "upper right", "lower left", and "lower right", but of course it is not limited to this.
[0065] Furthermore, the event of gesture shape change and no movement is defined, which can be set to M*(M-1) types such as "1" to "2" no movement event, "1" to "3" no movement event, "1" to "M" no movement event, etc.; the event of gesture shape no change and movement is defined, which can be set to 8*M types such as left movement event, right movement event, up movement event, down movement event, etc.; the event of gesture shape change and movement is defined, which can be set to 8*M*(M-1) types such as "1" to "2" left movement event, "1" to "2" right movement event, "1" to "2" up movement event, "1" to "2" down movement event, etc.
[0066] In this embodiment, in step S01, setting the gesture movement threshold includes: creating an image coordinate system, and setting the x-axis and y-axis movement thresholds Tx and Ty respectively. The smaller the threshold, the more sensitive the gesture movement recognition detection. Preferably, in this embodiment, the x-axis and y-axis movement thresholds Tx and Ty can be set to 30 to 50 pixels, more preferably 40 pixels.
[0067] In this embodiment, in step S01, the gesture image comes from the real-time video stream of the camera or a video file, and the number N of gesture images collected needs to be set in advance. The latest N frames are detected and identified each time, and the N value is set to be greater than or equal to 10.
[0068] In this embodiment, in step S02, extracting a gesture contour image from N frames of gesture images collected continuously includes: removing background noise from the gesture image, extracting ROI from the N frames of gesture images collected continuously according to gesture features, and binarizing the ROI to obtain a gesture contour image.
[0069] Furthermore, the collected gesture images are detected and recognized to determine the position of the hand, and the contour information of the hand is extracted, and the gesture shape is determined based on the contour information. Specifically, the background noise of each frame of the gesture image is removed, the image is binarized with the human skin color range as the threshold, the contour of the largest area obtained by detecting the image contour is the gesture contour, and the concave and convex points of the contour are detected to determine the gesture shape.
[0070] Furthermore, removing the background noise of each frame of the gesture image includes using the BackgroundSubtractorMOG2 algorithm, which is a foreground / background segmentation algorithm based on a mixed Gaussian model. First, the createBackgroundSubtractorMOG() method is used to obtain the background object, and then backgroundsubtractor.apply() is used in the entire video to obtain the foreground mask, that is, the image after removing the background noise. Furthermore, according to the gesture feature, ROI is extracted from the N frames of gesture images collected continuously, and the ROI is binarized to obtain the gesture contour image, including: setting a threshold range with the RGB value of human skin color, extracting corresponding pixels from the N frames of gesture images collected continuously to generate ROI, binarizing the ROI, and determining the obtained maximum area contour as the gesture contour image. For each frame of the gesture image, background noise is removed, and the RGB value range of human skin color is used as the threshold. Because human skin color has a range on RGB, each pixel in the gesture image is detected, and the corresponding RGB range is considered to be a skin color pixel, and the others are black dots. Then perform binary processing on the image of the extracted feature area, detect the image contour to obtain the contour of the largest area, which is the gesture contour, and detect the concave and convex points of the contour to determine the shape of the gesture. Among them, ROI stands for region of interest; in machine vision and image processing, the area to be processed is outlined in the form of a box, circle, ellipse, irregular polygon, etc. from the processed image, which is called the region of interest.
[0071] In this embodiment, in steps S03 and S04, locating the change information of the center position of the circle in the N frames of gesture contour images, and determining the gesture movement direction in combination with the gesture movement threshold comprises:
[0072] Store the corresponding circle center coordinates in N frames of gesture contour images into a set;
[0073] Calculate the x-axis and y-axis differences Δx and Δy of the coordinates of two adjacent points respectively;
[0074] Add (N-1) Δx and add (N-1) Δy to obtain the cumulative coordinate difference (∑Δx, ∑Δy);
[0075] Compare ∑Δx and ∑Δy with Tx and Ty respectively to determine whether the gesture moves in the x-axis and y-axis directions, thereby determining the direction of gesture movement.
[0076] Furthermore, the gesture contour is inscribed in a large circle for each frame of gesture image extracted, the center of the circle is determined, and the center of the circle of the collected N consecutive frames of gesture images is stored. The difference Δx in the x-axis direction and the difference Δy in the y-axis direction of two adjacent points are accumulated in sequence to obtain the cumulative value (∑Δx, ∑Δy). ∑Δx and ∑Δy are compared with the set x-axis and y-axis movement thresholds Tx and Ty respectively:
[0077] (1) When ∑Δx is a positive integer, ∑Δy is a positive integer
[0078] ∑Δx<Tx, ∑Δy>Ty determines that the moving direction is upward;
[0079] ∑Δx>Tx, ∑Δy>Ty determine the moving direction is upper right;
[0080] ∑Δx>Tx, ∑Δy<Ty determines that the moving direction is right;
[0081] ∑Δx<Tx, ∑Δy<Ty is determined as no movement;
[0082] (2) When ∑Δx is a negative integer, ∑Δy is a positive integer
[0083] ∑Δx<-Tx, ∑Δy>Ty determines the moving direction is the upper left;
[0084] ∑Δx>-Tx, ∑Δy>Ty determine the moving direction is upward;
[0085] ∑Δx>-Tx, ∑Δy<Ty is determined as no movement;
[0086] ∑Δx<-Tx, ∑Δy<Ty determines that the moving direction is left;
[0087] (3) When ∑Δx is a positive integer and ∑Δy is a negative integer
[0088] ∑Δx<Tx, ∑Δy>-Ty is determined as no movement;
[0089] ∑Δx>Tx, ∑Δy>-Ty determine the moving direction is the lower right;
[0090] ∑Δx>Tx, ∑Δy<-Ty determines that the moving direction is right;
[0091] ∑Δx<Tx, ∑Δy<-Ty determines that the moving direction is downward;
[0092] (4) When ∑Δx is a negative integer, ∑Δy is a negative integer
[0093] ∑Δx<-Tx, ∑Δy>-Ty determines that the moving direction is left;
[0094] ∑Δx>-Tx, ∑Δy>-Ty is determined as no movement;
[0095] ∑Δx>-Tx, ∑Δy<-Ty determines that the moving direction is downward;
[0096] ∑Δx<-Tx, ∑Δy<-Ty determines the moving direction to be the lower left;
[0097] Furthermore, the center of the circle is defined as the center position of the hand using the largest circle inscribed in the contour of the gesture. Collect multiple consecutive frames to record the center point of the circle, and determine the direction of gesture movement according to the change in the position of the center point of the circle. The specific steps include: determining the center of the circle by the largest inscribed circle according to the maximum contour obtained. Here, the inscribed circle is used instead of the circumscribed circle to reduce the offset of the center position caused by gesture changes, and the center of the circle is defined as the gesture center. Collect N frames, store the corresponding N center points into a set, and successively accumulate the x-axis direction difference Δx and the y-axis direction difference Δy of two adjacent points to obtain the cumulative value (∑Δx, ∑Δy). According to the x-axis and y-axis movement thresholds Tx and Ty set by yourself, compare the ∑Δx and Tx values to determine the x-axis movement direction, and the ∑Δy and Ty values to determine the y-axis movement direction, and combine the two to determine the gesture movement direction.
[0098] In this embodiment, in step S05, the change of the gesture shape is determined according to the gesture shapes in the N-frame gesture graph, and the gesture event is determined in combination with the gesture moving direction.
[0099] According to another embodiment of the present invention, a method for controlling gestures in a game scene is provided, which includes:
[0100] S06: gesture events input in the game scene and interface operations matching the gesture events;
[0101] S07: Using steps S01 to S05 to identify gesture events;
[0102] S08: After the gesture event is successfully recognized, the corresponding interface operation is triggered.
[0103] According to a specific embodiment of the present invention, a gesture event recognition system is provided, the system comprising:
[0104] Gesture acquisition module, used for continuously acquiring N frames of gesture images;
[0105] Gesture definition module, used to define gesture events and set gesture movement thresholds;
[0106] A first processing module is used to extract a gesture contour image from N frames of gesture images, and determine a gesture shape according to a concave-convex shape of the gesture contour;
[0107] The second processing module is used to calibrate the center position of the largest circle that is tangent to / connected to the inside of the gesture contour in the N-frame gesture contour image; locate the change information of the center position in the N-frame gesture contour image, and determine the gesture movement direction in combination with the gesture movement threshold;
[0108] A gesture recognition module, used to determine gesture events based on gesture shape and gesture movement direction;
[0109] Wherein, N is a positive integer greater than or equal to 10.
[0110] According to a specific embodiment of the present invention, a computer-readable medium is provided, which stores a computer program executed by an electronic device. When the computer program runs on the electronic device, the electronic device executes the method as described above.
[0111] It should be understood that any process or method description in the method, flow chart or otherwise described herein of the present invention may be understood to represent a module, fragment or portion of code including one or more executable instructions for implementing the steps of a specific logical function or process, and that the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.
[0112] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0113] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0114] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0115] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0116] Although the embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. Those skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention without departing from the principles and purpose of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for identifying a gesture event, characterized in that: The method comprises: Defining gesture events includes: setting a gesture movement threshold; defining M gesture shape types according to recognizable gesture shapes, and then defining M*(M-1) gesture shape change types according to the gesture shape types, where M is a positive integer greater than or equal to 10; defining 8 gesture movement direction types according to recognizable movement directions, where the movement directions include up, down, left, right, upper left, upper right, lower left, and lower right; defining a gesture shape change and no movement event, with M*(M-1) recognizable types; defining a gesture shape no change and movement event, with 8*M recognizable types; defining a gesture shape change and movement event, with 8*M recognizable types; Extracting a gesture contour image from N frames of gesture images collected continuously, determining a gesture shape according to a concave-convex shape of the gesture contour, and determining a gesture shape change according to the gesture shape in the N frames of gesture images; wherein N is a positive integer greater than or equal to 10; In the N frames of the gesture contour image, calibrate the center position of the largest circle that is tangent to / connected to the inside of the gesture contour; Locating the center position change information in the gesture contour image of N frames, and determining the gesture movement direction in combination with the gesture movement threshold, including: storing the corresponding center coordinates in the gesture contour image of the N frames into a set; calculating the x-axis and y-axis direction differences Δx and Δy of two adjacent circle point coordinates respectively; adding (N-1) Δx and (N-1) Δy to obtain the cumulative coordinate difference (∑Δx, ∑Δy); comparing the ∑Δx and ∑Δy with Tx and Ty respectively to determine whether the gesture moves in the x-axis and y-axis directions, thereby determining the gesture movement direction, where Tx is the set x-axis movement threshold and Ty is the set y-axis movement threshold; A gesture event is determined according to the gesture shape change and the gesture moving direction.
2. The method for identifying gesture events according to claim 1, characterized in that: The step of extracting a gesture contour image from N frames of gesture images collected continuously comprises: The background noise of the gesture image is eliminated, ROI is extracted from the N frames of gesture images collected continuously according to the gesture features, and the ROI is binarized to obtain a gesture contour image.
3. The method for identifying gesture events according to claim 2, characterized in that: The step of extracting ROI from N frames of gesture images collected continuously according to gesture features, and performing binarization processing on the ROI to obtain a gesture contour image includes: The threshold range is set with the RGB value of human skin color, corresponding pixel points are extracted from the continuously collected N frames of gesture images to generate ROI, and the ROI is binarized, and the obtained maximum area contour is determined as the gesture contour image.
4. A method for controlling gestures in a game scene, characterized in that: The method comprises: A gesture event input in the game scene and an interface operation matching the gesture event; Recognize gesture events using the method described in any one of claims 1 to 3; The corresponding interface operation is triggered after the gesture event is successfully recognized.
5. A gesture event recognition system, characterized in that: The system comprises: Gesture acquisition module, used for continuously acquiring N frames of gesture images; A gesture definition module is used to define gesture events, including: setting a gesture movement threshold; defining M gesture shape types according to recognizable gesture shapes, and then defining M*(M-1) gesture shape change types according to the gesture shape types, where M is a positive integer greater than or equal to 10; defining 8 gesture movement direction types according to recognizable movement directions, where the movement directions include up, down, left, right, upper left, upper right, lower left, and lower right; defining a gesture shape change and no movement event, with M*(M-1) recognizable types; defining a gesture shape no change and movement event, with 8*M recognizable types; defining a gesture shape change and movement event, with 8*M*(M-1) recognizable types A first processing module is used to extract a gesture contour image from N frames of the gesture image, determine a gesture shape according to a concave-convex shape of the gesture contour, and determine a gesture shape change according to the gesture shape in the N frames of the gesture image; N is a positive integer greater than or equal to 10; The second processing module is used to calibrate the center position of the largest circle tangent to / connected to the inside of the gesture contour in the N frames of the gesture contour image; locate the change information of the center position in the N frames of the gesture contour image, and determine the direction of gesture movement in combination with the gesture movement threshold, including: storing the corresponding center coordinates in the N frames of the gesture contour image into a set; respectively calculating the x-axis and y-axis coordinate differences Δx and Δy of two adjacent circle points; adding (N-1) Δx and (N-1) Δy to obtain the cumulative coordinate difference (∑Δx, ∑Δy); comparing the ∑Δx and ∑Δy with Tx and Ty respectively to determine whether the gesture moves in the x-axis and y-axis directions, thereby determining the direction of gesture movement, where Tx is the set x-axis movement threshold and Ty is the set y-axis movement threshold; The gesture recognition module is used to determine the gesture event according to the gesture shape change and gesture movement direction.
6. A computer-readable medium, characterized in that It stores a computer program executed by an electronic device, and when the computer program runs on the electronic device, the electronic device executes the method according to any one of claims 1 to 3.
