Gesture operation method, device and computer equipment

By identifying and calculating the characteristic value of the finger image outline in the gesture video, judging the gesture trajectory and drawing the trajectory, the problem of low recognition accuracy of gesture operation methods in the existing technology is solved, and the accuracy of gesture operation is improved.

CN110532863BActive Publication Date: 2024-09-06PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910655568.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-07-19
Publication Date
2024-09-06
Estimated Expiration
2039-07-19

AI Technical Summary

Technical Problem

Existing gesture operation methods are based on two-dimensional plane recognition and cannot accurately identify gesture trajectories in video images, resulting in low recognition accuracy and accuracy.

Method used

By acquiring frame images in gesture videos, identify and extract finger image outlines, calculate area and shape feature values, determine area and shape change values ​​to identify gesture trajectories, and draw gesture trajectories to call operation instructions.

Benefits of technology

The recognition precision and accuracy of finger images in video images are improved, and the accurate recognition of gesture trajectories and the execution of operation instructions are achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110532863B
    Figure CN110532863B
Patent Text Reader

Abstract

The present invention discloses a gesture operation method, which includes: performing finger image recognition on frame images in a video segment in a gesture video and extracting the finger image contour, then obtaining the area characteristic value and shape characteristic value of the finger image contour to calculate the area change value and shape change value of the finger image contour of the two frames of images, which are then used to determine whether a gesture trajectory is triggered, and when it is determined that the gesture trajectory is triggered, identifying the finger part images in the finger images of the two frames of images and drawing a gesture trajectory, and finally calling and executing the operation instructions corresponding to the gesture trajectory. The present invention also provides a gesture operation device, a computer device, and a computer-readable storage medium. The gesture operation method, device, computer device, and computer-readable storage medium provided by the present invention can achieve more accurate and precise gesture trajectory recognition of finger images in video images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of gesture recognition technology, and in particular to a gesture operation method, device, computer equipment and computer-readable storage medium. Background Art

[0002] In the process of using existing computers or terminal devices, the operation of the computer is generally realized through keyboard input and mouse clicks, drags and other actions. Keyboard input can include inputting instructions or using shortcut keys, and mouse clicks or drags can realize designated operations. However, with the development of computer technology and the diversification of user needs, users increasingly want to break away from direct contact with peripheral devices such as mouse and keyboard. Therefore, there is an urgent need for an operation method that can achieve control of a computer or terminal device without relying on peripheral devices such as mouse and keyboard.

[0003] In view of the above problems, the prior art proposes an operation method of using gesture recognition technology to obtain the user's gesture trajectory, and then calling the corresponding control instructions according to the gesture trajectory to control the computer or terminal device. However, most of the existing gesture operation methods are based on two-dimensional plane recognition, while the video images captured by the existing camera unit are not two-dimensional images, and the motion trajectory does not have only two-dimensional properties. Therefore, the existing gesture operation methods are not very accurate for video image recognition and analysis. Summary of the invention

[0004] In view of this, the present invention proposes a user gesture operation method, device, computer equipment and computer-readable storage medium, which can identify the finger image of the frame image in the video segment of the gesture video and extract the contour, and then obtain the area feature value and shape feature value of the contour to calculate the area change value and shape change value of the finger image contour of the two frames of images to determine whether the gesture trajectory is triggered. When it is determined that the gesture trajectory is triggered, the finger part image in the finger image of the two frames of images is identified and the gesture trajectory is drawn, and finally the operation instruction corresponding to the gesture trajectory is called and executed. Therefore, the precision and accuracy of identifying the finger image in the video image are effectively improved.

[0005] First, to achieve the above-mentioned purpose, the present invention provides a gesture operation method, which is applied to a computer device, and the method comprises:

[0006] Acquire a gesture video, and divide the gesture video into a video segment with a preset number of frames; identify the finger image in each frame image in the video segment according to a preset finger image recognition model; extract the finger image contour in each frame image, and sequentially obtain the area feature value and shape feature value of the finger image contour of each frame image; sequentially take out two frames of images from the video segment as the starting frame and the ending frame, and calculate the area change value and shape change value of the finger image contour of the starting frame and the ending frame according to the area feature value and shape feature value of the finger image contour of the starting frame and the ending frame; when the area change value of the finger image contour of the starting frame and the ending frame exceeds a preset first threshold or the shape change value exceeds a preset second threshold, respectively identify the finger part image in the finger image of the starting frame and the ending frame; according to the position information of the finger part image of the starting frame and the ending frame within the image range, draw the gesture trajectory from the starting frame to the ending frame; call and execute the corresponding operation instruction according to the gesture trajectory.

[0007] Optionally, the area characteristic value of the finger image contour is expressed as the number of pixels occupied by the finger image contour in the gesture video image.

[0008] Optionally, the shape feature value of the finger image contour is expressed as a distribution value of pixel points occupied by the finger image contour in the gesture video image.

[0009] Optionally, the step of "calculating the area change value of the finger image contour of the starting frame and the ending frame based on the area feature values ​​of the finger image contour of the starting frame and the ending frame" includes: respectively obtaining the number of pixels included in the finger image contour of the starting frame and the ending frame; calculating the pixel number difference between the number of pixels included in the finger image contour of the starting frame and the number of pixels included in the finger image contour of the ending frame, and then dividing the pixel number difference by the pixel value with the largest number of pixels included in the finger image contour of the starting frame and the ending frame to obtain the area change value of the finger image contour of the starting frame and the ending frame.

[0010] Optionally, the step of "calculating the shape change value of the finger image contour of the starting frame and the ending frame based on the shape feature values ​​of the finger image contour of the starting frame and the ending frame" includes: dividing the starting frame and the ending frame into M*N blocks according to the same blocking mode; counting the number of block pixels occupied by the finger image contour of the starting frame and the ending frame in each block; calculating the difference between the number of block pixels of each block of the finger image contour of the starting frame and the number of block pixels of the block at the corresponding position of the finger image contour of the ending frame, and then superimposing the difference in the number of pixels of all blocks of the finger image contour of the starting frame and the ending frame to obtain the sum of the differences, and then dividing the sum of the differences by the pixel value of the largest number of pixels included in the finger image contour of the starting frame and the ending frame to obtain the area change value of the finger image contour of the two frames of images.

[0011] Optionally, the step of "identifying the finger part image in the finger image of the starting frame and the ending frame" includes: identifying the finger part image in the finger image of the starting frame according to a preset key point detector model and marking it as a noise label, training the preset key point detector model according to the noise label to form a key point checker; and using the key point detector to identify the finger part image of the corresponding finger image in the ending frame.

[0012] Optionally, the gesture trajectory from the starting frame to the ending frame is drawn mainly by drawing a vector based on the position information occupied by the finger part image in the finger image of the starting frame and the position information occupied by the finger part image in the finger image of the ending frame, and then finding the corresponding gesture trajectory according to a preset vector-gesture trajectory correspondence table.

[0013] In addition, to achieve the above-mentioned purpose, the present invention also provides a gesture operation device, the device comprising:

[0014] The acquisition module is used to acquire the gesture video and divide the gesture video into video segments with a preset number of frames; the recognition module is used to recognize the finger image in each frame image in the video segment according to a preset finger image recognition model; the acquisition module is also used to extract the finger image contour in each frame image, and sequentially obtain the area feature value and shape feature value of the finger image contour of each frame image; the calculation module is used to sequentially take out two frames of images from the video segment as the starting frame and the ending frame, and calculate the starting frame and the ending frame according to the area feature value and shape feature value of the finger image contour of the starting frame and the ending frame. The area change value and shape change value of the finger image contour of the starting frame and the ending frame; the recognition module is also used to respectively identify the finger part images in the finger images of the starting frame and the ending frame when the area change value of the finger image contour of the starting frame and the ending frame exceeds a preset first threshold or the shape change value exceeds a preset second threshold; the drawing module is used to draw the gesture trajectory from the starting frame to the ending frame according to the position information of the finger part images of the starting frame and the ending frame within the image range; the execution module is used to call and execute the corresponding operation instruction according to the gesture trajectory.

[0015] Furthermore, the present invention also proposes a computer device, which includes a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the computer program is executed by the processor, the steps of the gesture operation method as described above are implemented.

[0016] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program can be executed by at least one processor so that the at least one processor performs the steps of the gesture operation method as described above.

[0017] Compared with the prior art, the gesture operation method, device, computer equipment and computer-readable storage medium proposed in the present invention can perform finger image recognition and extract contours on the frame images in the video segment of the gesture video, and then obtain the area feature value and shape feature value of the contour to calculate the area change value and shape change value of the finger image contour of the two frames of images to determine whether the gesture trajectory is triggered. When it is determined that the gesture trajectory is triggered, the finger part image in the finger image of the two frames of images is recognized and the gesture trajectory is drawn, and finally the operation instruction corresponding to the gesture trajectory is called and executed. Therefore, the precision and accuracy of identifying the finger image in the video image are effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 is a schematic diagram of an optional hardware architecture of a computer device of the present invention;

[0019] Figure 2 is a schematic diagram of a program module of an embodiment of a gesture operation device of the present invention;

[0020] Figure 3 It is a flowchart of an embodiment of a gesture operation method of the present invention.

[0021] Reference numerals:

[0022] Computer equipment 1 Memory 11 processor 12 Network Interface 13 Gesture-operated device 200 Get Module 201 Identification module 202 Computing Module 203 Drawing module 204 Execution Module 205

[0023] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical scheme 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. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0025] It should be noted that the descriptions of "first", "second", etc. in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0026] See also Figure 1 , which is a schematic diagram of an optional hardware architecture of the computer device 1 of the present invention.

[0027] In this embodiment, the computer device 1 may include, but is not limited to, a memory 11, a processor 12, and a network interface 13 that can be interconnected and communicated via a system bus.

[0028] The computer device 1 is connected to the network via the network interface 13 ( Figure 1Not marked), connected to other computer devices such as PCs, mobile terminals, etc. through a network. The network can be a wireless or wired network such as an intranet, the Internet, the Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, and a call network.

[0029] It should be pointed out that Figure 1 The computer device 1 is shown only with components 11 - 13 , but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0030] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the computer device 1, such as a hard disk or memory of the computer device 1. In other embodiments, the memory 11 can also be an external storage device of the computer device 1, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card, etc. equipped with the computer device 1. Of course, the memory 11 can also include both the internal storage unit of the computer device 1 and its external storage device. In this embodiment, the memory 11 is generally used to store the operating system and various application software installed on the computer device 1, such as the program code of the gesture operation device 200, etc. In addition, the memory 11 can also be used to temporarily store various types of data that have been output or are to be output.

[0031] In some embodiments, the processor 12 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 12 is generally used to control the overall operation of the computer device 1, such as performing control and processing related to data interaction or communication. In this embodiment, the processor 12 is used to run the program code stored in the memory 11 or process data, such as running the gesture operation device 200.

[0032] The network interface 13 may include a wireless network interface or a wired network interface. The network interface 13 is generally used to establish a communication connection between the computer device 1 and other computer devices such as a PC, a mobile terminal, etc.

[0033] In this embodiment, when the gesture operation device 200 is installed and running in the computer device 1, when the gesture operation device 200 is running, it can identify the finger image of the frame image in the video segment in the gesture video and extract the contour, and then obtain the area feature value and shape feature value of the contour to calculate the area change value and shape change value of the finger image contour of the two frames of images to determine whether the gesture trajectory is triggered. When it is determined that the gesture trajectory is triggered, the finger part image in the finger image of the two frames of images is identified and the gesture trajectory is drawn, and finally the operation instruction corresponding to the gesture trajectory is called and executed. Therefore, the precision and accuracy of identifying the finger image in the video image are effectively improved.

[0034] So far, the application environment of each embodiment of the present invention and the hardware structure and function of the related equipment have been described in detail. Next, based on the above application environment and related equipment, various embodiments of the present invention are proposed.

[0035] First, the present invention provides a gesture operation device 200 .

[0036] See also Figure 2 , which is a program module diagram of an embodiment of a gesture operation device 200 of the present invention.

[0037] In this embodiment, the gesture operation device 200 includes a series of computer program instructions stored in the memory 11. When the computer program instructions are executed by the processor 12, the gesture operation operations of various embodiments of the present invention can be implemented. In some embodiments, based on the specific operations implemented by each part of the computer program instructions, the gesture operation device 200 can be divided into one or more modules. For example, in Figure 2 In the embodiment, the gesture operation device 200 can be divided into an acquisition module 201, a recognition module 202, a calculation module 203, a drawing module 204 and an execution module 205.

[0038] The acquisition module 201 is used to acquire a gesture video and divide the gesture video into video segments with a preset number of frames.

[0039] Specifically, when a user performs a gesture operation on a computer device 1, the computer device 1 calls a camera unit to shoot a gesture video within a preset window range, wherein the computer device 1 includes a PC terminal, a mobile terminal, etc. Therefore, the acquisition module 201 can acquire the gesture video and then perform segmentation processing. For example, the frame rate of the video shot by the camera unit is not less than 24 frames per second, but since the user's gesture operation will not be too fast, the number of gesture image frames included in each video segment is preset to 8 frames.

[0040] The recognition module 202 is used to recognize the finger image in each frame of the video segment according to a preset finger image recognition model.

[0041] Specifically, in the present embodiment, the gesture image is an image taken by the camera unit at a preset window position, and therefore, includes not only the finger part but also the palm or other background. Therefore, after the acquisition module 201 acquires the gesture image and divides it into video segments, the recognition module 202 can sequentially recognize the finger image in each frame image of the divided video segment according to the preset finger image recognition model. In the present embodiment, the finger image recognition model is a deep learning model based on a neural network, and then the finger image recognition model formed by training a large number of finger images can recognize the finger part well, wherein the use of a deep learning model of a neural network for image recognition is an existing commonly used technical means, which will not be elaborated here.

[0042] The acquisition module 201 is further used to extract the finger image contour in each frame of image, and sequentially acquire the area feature value and shape feature value of the finger image contour in each frame of image.

[0043] Specifically, after the recognition model 202 recognizes the finger image in each frame of the video segment, the acquisition module 201 will further extract the finger contour in each frame of the image. In this embodiment, the acquisition module 201 extracts the finger image contour of each frame of the image based on the edge method. Of course, in other embodiments, the contour extraction can also be performed using a region-based or active contour-based method. After extracting the finger image contour in each frame of the image, the acquisition module 201 sequentially obtains the area feature value and shape feature value of the finger image contour of each frame of the image. In this embodiment, the area feature value of the finger image contour is expressed as the number of pixels occupied by the finger image contour in the gesture video image; the shape feature value of the finger image contour is expressed as the distribution value of the pixels occupied by the finger image contour in the gesture video image. For example, the gesture video image is divided into blocks, and then the number of pixels occupied by the gesture image contour in each block can represent the shape feature value.

[0044] The calculation module 203 is used to sequentially extract two frames of images from the video segment as a start frame and an end frame, and calculate the area change value and shape change value of the finger image contour of the start frame and the end frame according to the area feature value and shape feature value of the finger image contour of the start frame and the end frame.

[0045] Specifically, taking out in sequence can be understood as taking out a frame that is ranked first in the video segment, and then taking out a frame that is ranked later, with 1 to 6 frames in between. For example, the starting frame is the 1st frame, and the ending frame is the 2nd frame to the 8th frame respectively; then the subsequent 2nd frame to the 7th frame are sequentially used as the starting frame, and the subsequent frames are the ending frames. In this embodiment, the step of calculating the area change value of the finger image contour of the starting frame and the ending frame according to the area feature value of the finger image contour of the starting frame and the ending frame by the calculation module 203 includes: respectively obtaining the number of pixels included in the finger image contour of the starting frame and the ending frame; calculating the difference in the number of pixels included in the finger image contour of the starting frame and the number of pixels included in the finger image contour of the ending frame, and then dividing the difference in the number of pixels by the pixel value of the largest number of pixels included in the finger image contour of the starting frame and the ending frame to obtain the area change value of the finger image contour of the starting frame and the ending frame. For example: the number of pixels included in the finger image contour of the starting frame is 100, that is, the area characteristic value is 100, and the number of pixels included in the finger image contour of the ending frame is 125, that is, the area characteristic value is 125, then the area change value of the finger image contour between the starting frame and the ending frame is (125-100) / 125=20%.

[0046] The step in which the calculation module 203 calculates the shape change value of the finger image contour of the starting frame and the ending frame according to the shape feature values ​​of the finger image contour of the starting frame and the ending frame includes: dividing the starting frame and the ending frame into M*N blocks according to the same block mode; counting the number of block pixels occupied by the finger image contour of the starting frame and the ending frame in each block; calculating the difference between the number of block pixels of each block of the finger image contour of the starting frame and the number of block pixels of the block at the corresponding position of the finger image contour of the ending frame, and then superimposing the difference in the number of pixels of all blocks of the finger image contour of the starting frame and the ending frame to obtain the sum of the differences, and then dividing the sum of the differences by the pixel value of the largest number of pixels included in the finger image contour of the starting frame and the ending frame to obtain the area change value of the finger image contour of the two frames of image. For example: the calculation module 203 divides each frame image in the video segment into M*N blocks, M*N is 3*2, then the number of pixels occupied by the finger image contour of each frame image in the 6 blocks is obtained respectively. For example, the number of pixels of the finger image contour of the starting frame and the ending frame in blocks 3-6 is the same, and the number of pixels in blocks 3-6 are 5, 6, 4, and 5 respectively, but the starting frame has 5 pixels in block 1 and 4 pixels in block 2, and the ending frame has 1 pixel in block 1 and 9 pixels in block 2, that is, the shape feature value of the starting frame is (5, 4, 5, 6, 4, 5), and the shape feature value of the ending frame is (1, 9, 5, 6, 4, 5). Therefore, the difference in pixel points in the first block between the starting frame and the ending frame is 5-1=4, and the difference in pixel points in the second block is 9-4=5. The number of difference pixels is 4+5=9. The total number of pixels in the starting frame is 20+5+4=29, and the total number of pixels in the ending frame is 20+1+9=30. The difference in pixel distribution is 9 / 30=30%, that is, the shape change value is 30%.

[0047] The recognition module 202 is also used to respectively identify the finger part images in the finger images of the starting frame and the ending frame when the area change value of the finger image contour of the starting frame and the ending frame exceeds a preset first threshold or the shape change value exceeds a preset second threshold.

[0048] Specifically, since the position of the user's fingers will inevitably change to a certain extent when performing gesture control, the gesture operation device 200 determines whether the user has generated a valid gesture operation by judging whether the area change value of the finger image contour between the start frame and the end frame exceeds a preset first threshold or the shape change value exceeds a preset second threshold.

[0049] Therefore, in this embodiment, after the calculation module 203 calculates the area change value and shape change value of the finger image contour of the start frame and the end frame, the recognition module 202 further compares the area change value and shape change value of the finger image contour of the start frame and the end frame with the first threshold and the second threshold respectively. When the area change value of the finger image contour of the start frame and the end frame exceeds the preset first threshold or the shape change value exceeds the preset second threshold, the finger part image in the finger image of the start frame and the end frame is respectively identified. For example, the preset first threshold is 15% and the second threshold is 20%. Then the calculation module 203 calculates that the area change value of the finger image contour of the start frame and the end frame is 20%, which is greater than the first threshold 15%, and the shape change value of the finger image contour of the start frame and the end frame is 30%, which is greater than the second threshold 20%. Therefore, the recognition module 202 continues to identify the finger part image in the finger image of the start frame and the end frame.

[0050] In this embodiment, the recognition module 202 recognizes the finger part image in the finger image of the starting frame according to the preset key point detector modeling and marks it as a noise label, and trains the preset key point detector modeling according to the noise label to form a key point checker; and then uses the key point detector to recognize the finger part image of the corresponding finger image in the ending frame. Among them, the key point detector modeling can be a recognition model of the finger part image with deep learning ability based on neural network, which can train and optimize its own recognition model according to the recognized finger part image data, and then continue to recognize the image according to the optimized recognition model. That is to say, the recognition module 202 can use the key point detector modeling to recognize each frame image in the video segment, and then optimize the key point detector, and then continue to recognize and optimize. Thereby improving the accuracy of the key point detector in recognizing the finger part image in the finger image. The image recognition and model training technology based on neural network are commonly used and well-known technologies in this field, which will not be described here.

[0051] The drawing module 204 is used to draw a gesture trajectory from the start frame to the end frame according to the position information of the finger part images of the start frame and the end frame within the image range.

[0052] Specifically, the drawing module 204 draws the gesture trajectory from the starting frame to the ending frame mainly by drawing a vector based on the position information of the finger part image in the finger image of the starting frame and the position information of the finger part image in the finger image of the ending frame, and then finding the corresponding gesture trajectory according to the preset vector-gesture trajectory correspondence table. In this embodiment, the drawing module 204 points the position information of the abnormal value of the finger part image of the starting frame to the position information of the abnormal value of the finger part image of the ending frame, thereby drawing a vector. For example, the image is preset as a two-dimensional coordinate plane, and then a vector can be drawn according to the coordinate information of the abnormal value of the finger part image in the finger image of the starting frame and the ending frame, and then the corresponding gesture trajectory is found according to the preset vector-gesture trajectory correspondence table. For example, the preset vector direction within 0-45 degrees southeast is the right sliding gesture trajectory, the vector direction within 45-90 degrees southeast is the downward sliding gesture trajectory, and when the vector is 30 degrees southeast, it is judged as the right sliding gesture trajectory.

[0053] The execution module 205 is used to call and execute the corresponding operation instruction according to the gesture trajectory.

[0054] Specifically, after the drawing module 204 draws the gesture trajectory from the start frame to the end frame, the video segment will no longer continue to judge other frames, because the execution time of the user's gesture trajectory is considered when the video segment is preset, and the gesture trajectory drawn by the drawing module 204 represents the user operation of the video segment. Therefore, the execution module 205 will directly call and execute the corresponding operation instruction according to the gesture trajectory and the preset gesture trajectory and operation instruction correspondence table.

[0055] As can be seen from the above, the computer device 1 can perform finger image recognition and extract contours on the frame images in the video segment of the gesture video, and then obtain the area feature value and shape feature value of the contour to calculate the area change value and shape change value of the finger image contour of the two frames to determine whether the gesture trajectory is triggered. When it is determined that the gesture trajectory is triggered, the finger part image in the finger image of the two frames is recognized and the gesture trajectory is drawn, and finally the operation instruction corresponding to the gesture trajectory is called and executed. Therefore, the precision and accuracy of identifying the finger image in the video image is effectively improved.

[0056] In addition, the present invention also provides a gesture operation method, which is applied to a computer device.

[0057] See also Figure 3 FIG. 1 is a flow chart of an embodiment of a gesture operation method of the present invention. In this embodiment, according to different requirements, Figure 3The execution order of the steps in the flowchart shown may be changed, and some steps may be omitted.

[0058] Step S500: Acquire a gesture video, and divide the gesture video into video segments with a preset number of frames.

[0059] Specifically, when a user performs a gesture operation on a computer device 1, the computer device 1 calls a camera unit to shoot a gesture video within a preset window range, wherein the computer device 1 includes a PC terminal, a mobile terminal, etc. Therefore, the computer device 1 can obtain the gesture video, and then perform segmentation processing. For example, the frame rate of the video shot by the camera unit is not less than 24 frames per second, but since the user's gesture operation will not be too fast, the number of gesture image frames included in each video segment is preset to 8 frames.

[0060] Step S502 : identifying the finger image in each frame of the video segment according to a preset finger image recognition model.

[0061] Specifically, in this embodiment, the gesture image is an image taken by the camera unit at a preset window position, and therefore, includes not only the finger part, but also the palm or other background. Therefore, after the computer device 1 acquires the gesture image and divides it into video segments, it can sequentially identify the finger image in each frame of the divided video segment according to a preset finger image recognition model. In this embodiment, the finger image recognition model is a deep learning model based on a neural network, and then the finger image recognition model formed by training a large number of finger images can well recognize the finger part, wherein the use of a deep learning model of a neural network for image recognition is an existing common technical means, which will not be elaborated here.

[0062] Step S504: extract the finger image contour in each frame of image, and sequentially obtain the area feature value and shape feature value of the finger image contour in each frame of image.

[0063] Specifically, after the computer device 1 identifies the finger image in each frame of the video segment, it further extracts the finger contour in each frame of the image. In this embodiment, the computer device 1 extracts the finger image contour of each frame of the image based on the edge method. Of course, in other embodiments, the contour extraction can also be performed using a region-based or active contour-based method. After extracting the finger image contour in each frame of the image, the computer device 1 sequentially obtains the area feature value and shape feature value of the finger image contour of each frame of the image. In this embodiment, the area feature value of the finger image contour is expressed as the number of pixels occupied by the finger image contour in the gesture video image; the shape feature value of the finger image contour is expressed as the distribution value of the pixels occupied by the finger image contour in the gesture video image. For example, the gesture video image is divided into blocks, and then the number of pixels occupied by the gesture image contour in each block can represent the shape feature value.

[0064] Step S506, taking out two frames of images from the video segment as a start frame and an end frame in sequence, and calculating the area change value and shape change value of the finger image contour of the start frame and the end frame according to the area feature value and shape feature value of the finger image contour of the start frame and the end frame.

[0065] Specifically, taking out in sequence can be understood as taking out a frame that is ranked first in the video segment, and then taking out a frame that is ranked later, with 1 to 6 frames in between. For example, the starting frame is the 1st frame, and the ending frame is the 2nd frame to the 8th frame respectively; then the subsequent 2nd frame to the 7th frame are sequentially used as the starting frame, and the subsequent frames are the ending frames. In this embodiment, the step of the computer device 1 calculating the area change value of the finger image contour of the starting frame and the ending frame according to the area feature value of the finger image contour of the starting frame and the ending frame includes: respectively obtaining the number of pixels included in the finger image contour of the starting frame and the ending frame; calculating the difference in the number of pixels included in the finger image contour of the starting frame and the number of pixels included in the finger image contour of the ending frame, and then dividing the difference in the number of pixels by the pixel value of the largest number of pixels included in the finger image contour of the starting frame and the ending frame to obtain the area change value of the finger image contour of the starting frame and the ending frame. For example: the number of pixels included in the finger image contour of the starting frame is 100, that is, the area characteristic value is 100, and the number of pixels included in the finger image contour of the ending frame is 125, that is, the area characteristic value is 125, then the area change value of the finger image contour between the starting frame and the ending frame is (125-100) / 125=20%.

[0066] The steps of the computer device 1 calculating the shape change value of the finger image contour of the starting frame and the ending frame according to the shape feature values ​​of the finger image contour of the starting frame and the ending frame include: dividing the starting frame and the ending frame into M*N blocks according to the same block mode; counting the number of block pixels occupied by the finger image contour of the starting frame and the ending frame in each block respectively; calculating the difference between the number of block pixels of each block of the finger image contour of the starting frame and the number of block pixels of the block at the corresponding position of the finger image contour of the ending frame, and then superimposing the difference in the number of pixels of all blocks of the finger image contour of the starting frame and the ending frame to obtain the sum of the differences, and then dividing the sum of the differences by the pixel value of the largest number of pixels included in the finger image contour of the starting frame and the ending frame to obtain the area change value of the finger image contour of the two frames of image. For example: the computer device 1 divides each frame image in the video segment into M*N blocks, where M*N is 3*2, and then obtains the number of pixels occupied by the finger image contour of each frame image in the 6 blocks respectively. For example, the number of pixels of the finger image contour of the starting frame and the ending frame in blocks 3-6 is the same, and the number of pixels in blocks 3-6 are 5, 6, 4, and 5 respectively. However, the starting frame has 5 pixels in block 1 and 4 pixels in block 2, while the ending frame has 1 pixel in block 1 and 9 pixels in block 2, that is, the shape feature value of the starting frame is (5, 4, 5, 6, 4, 5), and the shape feature value of the ending frame is (1, 9, 5, 6, 4, 5). Therefore, the difference in pixel points in the first block between the starting frame and the ending frame is 5-1=4, and the difference in pixel points in the second block is 9-4=5. The number of difference pixels is 4+5=9. The total number of pixels in the starting frame is 20+5+4=29, and the total number of pixels in the ending frame is 20+1+9=30. The difference in pixel distribution is 9 / 30=30%, that is, the shape change value is 30%.

[0067] Step S508, when the area change value of the finger image contour of the start frame and the end frame exceeds a preset first threshold or the shape change value exceeds a preset second threshold, the finger part image in the finger image of the start frame and the end frame is respectively identified.

[0068] Specifically, since the user's fingers will inevitably produce a certain position change when performing gesture control, the computer device 1 determines whether the user has generated a valid gesture operation by judging whether the area change value of the finger image contour between the start frame and the end frame exceeds a preset first threshold or the shape change value exceeds a preset second threshold.

[0069] Therefore, in this embodiment, after calculating the area change value and shape change value of the finger image contour of the start frame and the end frame, the computer device 1 will further compare the area change value and shape change value of the finger image contour of the start frame and the end frame with the first threshold and the second threshold respectively. When the area change value of the finger image contour of the start frame and the end frame exceeds the preset first threshold or the shape change value exceeds the preset second threshold, the finger part image in the finger image of the start frame and the end frame is respectively identified. For example, the preset first threshold is 15% and the second threshold is 20%. Then the computer device 1 calculates that the area change value of the finger image contour of the start frame and the end frame is 20%, which is greater than the first threshold 15%, and the shape change value of the finger image contour of the start frame and the end frame is 30%, which is greater than the second threshold 20%. Therefore, the computer device 1 continues to identify the finger part image in the finger image of the start frame and the end frame.

[0070] In this embodiment, the computer device 1 recognizes the finger part image in the finger image of the starting frame according to the preset key point detector modeling and marks it as a noise label, and trains the preset key point detector modeling according to the noise label to form a key point checker; and then uses the key point detector to recognize the finger part image of the corresponding finger image in the ending frame. Among them, the key point detector modeling can be a recognition model of the finger part image with deep learning ability based on neural network, which can train and optimize its own recognition model according to the recognized finger part image data, and then continue to recognize the image according to the optimized recognition model. In other words, the computer device 1 can use the key point detector modeling to recognize each frame image in the video segment, and then optimize the key point detector, and then continue to recognize and optimize. Thereby improving the accuracy of the key point detector in recognizing the finger part image in the finger image. The image recognition and model training technology based on neural network are commonly used and well-known technologies in this field, which will not be described here.

[0071] Step S510 , drawing a gesture trajectory from the start frame to the end frame according to the position information of the finger part images of the start frame and the end frame within the image range.

[0072] Specifically, the computer device 1 draws the gesture trajectory from the starting frame to the ending frame mainly by drawing a vector based on the position information of the finger part image in the finger image of the starting frame and the position information of the finger part image in the finger image of the ending frame, and then finds the corresponding gesture trajectory according to the preset vector-gesture trajectory correspondence table. In this embodiment, the computer device 1 points the position information of the abnormal value of the finger part image of the starting frame to the position information of the abnormal value of the finger part image of the ending frame, thereby drawing a vector. For example, the image is preset as a two-dimensional coordinate plane, and then a vector can be drawn according to the coordinate information of the abnormal value of the finger part image in the finger image of the starting frame and the ending frame, and then the corresponding gesture trajectory is found according to the preset vector-gesture trajectory correspondence table. For example, the preset vector direction within 0-45 degrees southeast is the right sliding gesture trajectory, the vector direction within 45-90 degrees southeast is the downward sliding gesture trajectory, and when the vector is 30 degrees southeast, it is judged as the right sliding gesture trajectory.

[0073] Step S512: calling and executing corresponding operation instructions according to the gesture trajectory.

[0074] Specifically, after the computer device 1 draws the gesture trajectory from the start frame to the end frame, the video segment will no longer continue to judge other frames, because the execution time of the user's gesture trajectory is considered when the video segment is preset, and the gesture trajectory drawn by the computer device 1 represents the user operation of the video segment. Therefore, the computer device 1 will directly call and execute the corresponding operation instruction according to the gesture trajectory and the preset gesture trajectory and operation instruction correspondence table.

[0075] The gesture operation method proposed in this embodiment can identify the finger image and extract the contour of the frame image in the video segment of the gesture video, and then obtain the area feature value and shape feature value of the contour to calculate the area change value and shape change value of the finger image contour of the two frames to determine whether the gesture trajectory is triggered. When it is determined that the gesture trajectory is triggered, the finger part image in the finger image of the two frames is identified and the gesture trajectory is drawn, and finally the operation instruction corresponding to the gesture trajectory is called and executed. Therefore, the precision and accuracy of identifying the finger image in the video image are effectively improved.

[0076] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0077] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0078] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A gesture operation method, applied to a computer device, characterized in that: The method comprises the steps of: Acquire a gesture video, and divide the gesture video into video segments with a preset number of frames; Identify the finger image in each frame of the video segment according to a preset finger image recognition model; Extracting the finger image contour in each frame of image, and sequentially obtaining the area characteristic value and shape characteristic value of the finger image contour in each frame of image; Sequentially taking out two frames of images from the video segment as a start frame and an end frame, and calculating an area change value and a shape change value of the finger image contour of the start frame and the end frame according to the area feature value and the shape feature value of the finger image contour of the start frame and the end frame; When the area change value of the finger image contour of the start frame and the end frame exceeds a preset first threshold or the shape change value exceeds a preset second threshold, respectively identifying the finger part images in the finger images of the start frame and the end frame; Drawing a gesture trajectory from the start frame to the end frame according to position information of the finger part images of the start frame and the end frame within the image range; Calling and executing corresponding operation instructions according to the gesture trajectory; The area characteristic value of the finger image contour is represented by the number of pixels occupied by the finger image contour in the gesture video image; Wherein, the step of "calculating the area change value and shape change value of the finger image contour of the starting frame and the ending frame according to the area feature value and shape feature value of the finger image contour of the starting frame and the ending frame" includes: Respectively obtaining the number of pixels included in the finger image contour of the starting frame and the ending frame; Calculate the difference in the number of pixels included in the finger image contour of the starting frame and the number of pixels included in the finger image contour of the ending frame, and then divide the difference in the number of pixels by the pixel value of the largest number of pixels included in the finger image contours of the starting frame and the ending frame to obtain the area change value of the finger image contour of the starting frame and the ending frame; Divide the start frame and the end frame into M*N blocks respectively according to the same block mode; Counting the number of pixel points in each block occupied by the finger image contour of the starting frame and the ending frame respectively; The difference between the number of block pixels of each block of the finger image contour of the starting frame and the number of block pixels of the block at the corresponding position of the finger image contour of the ending frame is calculated, and then the difference in the number of pixel points of all blocks of the finger image contour of the starting frame and the ending frame are superimposed to obtain the total difference, and then the total difference is divided by the value of the pixel point with the largest number of pixels included in the finger image contour of the starting frame and the ending frame to obtain the area change value of the finger image contour of the two frames of images.

2. The gesture operation method according to claim 1, characterized in that: The shape feature value of the finger image contour is expressed as a distribution value of the pixel points occupied by the finger image contour in the gesture video image.

3. The gesture operation method according to claim 1, characterized in that: The step of "identifying the finger image in each frame of the video segment according to a preset finger image recognition model" includes: According to the preset key point detector modeling, the finger part image in the finger image of the starting frame is identified and marked as a noise label, and the preset key point detector modeling is trained according to the noise label to form a key point detector; The key point detector is used to identify the finger part image of the corresponding finger image in the end frame.

4. The gesture operation method according to claim 1, characterized in that: The gesture trajectory from the starting frame to the ending frame is drawn by drawing a vector based on the position information occupied by the finger part image in the finger image of the starting frame and the position information occupied by the finger part image in the finger image of the ending frame, and then finding the corresponding gesture trajectory according to a preset vector-gesture trajectory correspondence table.

5. A gesture operation device, characterized in that: The device comprises: An acquisition module, used for acquiring a gesture video and dividing the gesture video into video segments with a preset number of frames; A recognition module, used to recognize the finger image in each frame of the video segment according to a preset finger image recognition model; The acquisition module is further used to extract the finger image contour in each frame of the image, and sequentially acquire the area characteristic value and the shape characteristic value of the finger image contour in each frame of the image; A calculation module, used for sequentially taking out two frames of images from the video segment as a start frame and an end frame, and calculating an area change value and a shape change value of the finger image contour of the start frame and the end frame according to the area feature value and the shape feature value of the finger image contour of the start frame and the end frame; The recognition module is further configured to respectively recognize the finger part images in the finger images of the starting frame and the ending frame when the area change value of the finger image contour of the starting frame and the ending frame exceeds a preset first threshold value or the shape change value exceeds a preset second threshold value; A drawing module, used for drawing a gesture trajectory from the starting frame to the ending frame according to the position information of the finger part images of the starting frame and the ending frame within the image range; An execution module, used to call and execute corresponding operation instructions according to the gesture trajectory; The area characteristic value of the finger image contour is represented by the number of pixels occupied by the finger image contour in the gesture video image; Wherein, the “calculating the area change value and shape change value of the finger image contour of the starting frame and the ending frame according to the area feature value and shape feature value of the finger image contour of the starting frame and the ending frame” includes: Respectively obtaining the number of pixels included in the finger image contour of the starting frame and the ending frame; Calculate the difference in the number of pixels included in the finger image contour of the starting frame and the number of pixels included in the finger image contour of the ending frame, and then divide the difference in the number of pixels by the pixel value of the largest number of pixels included in the finger image contours of the starting frame and the ending frame to obtain the area change value of the finger image contour of the starting frame and the ending frame; Divide the start frame and the end frame into M*N blocks respectively according to the same block mode; Counting the number of pixel points in each block occupied by the finger image contour of the starting frame and the ending frame respectively; The difference between the number of block pixels of each block of the finger image contour of the starting frame and the number of block pixels of the block at the corresponding position of the finger image contour of the ending frame is calculated, and then the difference in the number of pixel points of all blocks of the finger image contour of the starting frame and the ending frame are superimposed to obtain the total difference, and then the total difference is divided by the value of the pixel point with the largest number of pixels included in the finger image contour of the starting frame and the ending frame to obtain the area change value of the finger image contour of the two frames of images.

6. A computer device, characterized in that: The computer device includes a memory and a processor. The memory stores a computer program that can be run on the processor. When the computer program is executed by the processor, the steps of the gesture operation method according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program can be executed by at least one processor to enable the at least one processor to perform the steps of the gesture operation method according to any one of claims 1 to 4.