Gesture recognition method and device, equipment and storage medium
By acquiring and analyzing the key point positions and distances in hand images in a near-eye display device, the problem of increased device weight and complexity is solved, and the convenience and accuracy of gesture recognition are improved.
Patent Information
- Application Number
- CN202410466379.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-17
- Publication Date
- 2024-08-23
AI Technical Summary
Since the near-eye display device needs to obtain the depth information of the user's hand, the weight of the device increases and the complexity of the shooting device increases, which affects the convenience of gesture recognition.
By obtaining the target hand image captured by the near-eye display device, the preset key point position information of the user's hand is determined, including 2D and 2.5D coordinates, and the target key point distance that does not change with the gesture is obtained, which is used to identify the user's gesture.
There is no need to add a multi-camera or depth camera, which improves the convenience and accuracy of gesture recognition and simplifies the device structure.
Smart Images

Figure CN118537889A
Abstract
Description
Technical Field
[0001] The present application relates to the field of gesture recognition, and in particular to a gesture recognition method, device, equipment and storage medium. Background Art
[0002] At present, the near-eye display device needs to obtain the depth information of the user's hand in the process of recognizing the user's gesture. In the related art, it is generally necessary to use a multi-eye camera, or combine at least one of an RGB camera and a gray-white fisheye camera on the basis of a depth camera to obtain the depth information of the user's hand. Setting a multi-eye camera, or a depth camera and at least one of an RGB camera and a gray-white fisheye camera on the near-eye display device is likely to increase the weight of the near-eye display device and increase the complexity of the shooting device of the near-eye display device. When the user uses the near-eye display device, the near-eye display device needs to be worn on the head. Due to the increase in the weight of the near-eye display device and the increase in the complexity of the shooting device of the near-eye display device, the convenience of gesture recognition of the near-eye display device will be adversely affected. Summary of the invention
[0003] The main purpose of the present application is to provide a gesture recognition method, apparatus, device and storage medium, aiming to solve the technical problem of poor convenience of gesture recognition of near-eye display devices due to the increase in weight of near-eye display devices and the increase in complexity of the shooting device of the near-eye display devices.
[0004] In a first aspect, the present application provides a gesture recognition method, which is applied to a near-eye display device, and the gesture recognition method includes:
[0005] Acquire a target hand image obtained by photographing a user's hand by the near-eye display device;
[0006] Determine, according to the target hand image, first position information of a preset key point of the user's hand and second position information of the preset key point, wherein the first position information includes a 2D coordinate and the second position information includes a 2.5D coordinate;
[0007] Acquire a target distance between at least two target key points of the user's hand; the target key points are selected from the preset key points;
[0008] The user's gesture is recognized according to the first position information of the preset key point, the second position information of the preset key point, and the target distance between the at least two target key points.
[0009] In a second aspect, the present application provides a gesture recognition device, the gesture recognition device comprising:
[0010] An image acquisition module, used to acquire a target hand image obtained by photographing a user's hand by a near-eye display device;
[0011] A position determination module, used to determine first position information of a preset key point of the user's hand and second position information of the preset key point according to the target hand image, wherein the first position information includes a 2D coordinate and the second position information includes a 2.5D coordinate;
[0012] A distance acquisition module, used to acquire a target distance between at least two target key points of the user's hand; the target key points are selected from the preset key points;
[0013] The gesture recognition module is used to recognize the user's gesture according to the first position information of the preset key point, the second position information of the preset key point and the target distance between the at least two target key points.
[0014] In a third aspect, the present application provides a near-eye display device, the near-eye display device comprising a memory and a processor;
[0015] The memory is used to store computer programs;
[0016] The processor is used to execute the computer program and implement the steps of the gesture recognition method as described above when executing the computer program.
[0017] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the gesture recognition method as described above are implemented.
[0018] The present application provides a gesture recognition method, apparatus, device and storage medium, the gesture recognition method comprising: obtaining a target hand image obtained by photographing a user's hand with a near-eye display device; determining, according to the target hand image, first position information of a preset key point of the user's hand and second position information of the preset key point, the first position information comprising a 2D coordinate, and the second position information comprising a 2.5D coordinate; obtaining a target distance between at least two target key points of the user's hand; the target key point is selected from the preset key points; and recognizing the user's gesture according to the first position information of the preset key point, the second position information of the preset key point and the target distance between at least two target key points.
[0019] When the target hand image is acquired, the near-eye display device can determine the first position information and the second position information of the preset key points of the user's hand based on the target hand image. In addition, the near-eye display device can acquire the target distance between at least two target key points of the user's hand. Since the target distance between at least two target key points will not change with the change of the device posture of the near-eye display device or the change of the gesture made by the user's hand, the user's gesture can be recognized in combination with the first position information, the second position information and the target distance of the preset key points of the user's hand. In this way, the near-eye display device does not need to add more or heavier shooting devices to acquire the depth information of the user's hand, and can recognize the user's gesture through the acquired target hand image and the target distance between at least two target key points of the user's hand, which is conducive to improving the convenience and accuracy of the near-eye display device in recognizing the user's gesture. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1 is a flowchart of a gesture recognition method provided in an embodiment of the present application;
[0022] Figure 2 is a schematic diagram of preset key points of a user's hand involved in an embodiment of the present application;
[0023] Figure 3 is a schematic diagram of first position information of a preset key point of a user's hand involved in an embodiment of the present application;
[0024] Figure 4 is a schematic diagram of second position information of a preset key point of a user's hand involved in an embodiment of the present application;
[0025] Figure 5 is a schematic block diagram of a gesture recognition device provided in an embodiment of the present application;
[0026] Figure 6 It is a schematic block diagram of a near-eye display device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0028] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0029] The embodiments of the present application provide a gesture recognition method, apparatus, device, and storage medium. The gesture recognition method can be applied to a near-eye display device. The near-eye display device may include augmented reality (AR) glasses, virtual reality (VR) glasses, AR helmets, VR helmets, etc., without limitation.
[0030] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0031] See also Figure 1 , Figure 1 It is a flow chart of a gesture recognition method provided in an embodiment of the present application. It should be noted that the gesture recognition method provided in an embodiment of the present application can be used in a near-eye display device.
[0032] like Figure 1 As shown, the gesture recognition method includes steps S101 to S104.
[0033] S101: Acquire a target hand image obtained by photographing a user's hand with a near-eye display device.
[0034] For example, the near-eye display device has a shooting function. Based on the shooting function of the near-eye display device, when the user can shoot the user's hand through the near-eye display device, it is not limited here. In some embodiments, a shooting device is provided on the near-eye display device. The shooting device may include an RGB camera, a gray-white fisheye camera, etc., which is not limited here. The near-eye display device can shoot the user's hand through the shooting device to obtain a corresponding hand image.
[0035] Exemplarily, the number of the shooting devices of the near-eye display device may include one or more, which is not limited here. Among them, when multiple shooting devices are provided on the near-eye display device, the near-eye display device can use a single shooting device among the multiple shooting devices to shoot the corresponding hand image of the user's hand to identify the user's gesture. For example, the near-eye display device can use a hand image of the current user's hand shot by a single shooting device as a target hand image to identify the user's gesture through the target hand image.
[0036] In this way, when the target hand image obtained by the near-eye display device photographing the user's hand is acquired, the target hand image can be used for the subsequent near-eye display device to recognize the user's gesture.
[0037] S102. Determine first position information of preset key points of the user's hand and second position information of preset key points according to the target hand image, where the first position information includes 2D coordinates and the second position information includes 2.5D coordinates.
[0038] like Figure 2 As shown, the user's hand may include a plurality of preset key points. For example, the preset key points may include key point 0 to key point 20, a total of 21 preset key points, which are not limited here.
[0039] For example, when the near-eye display device obtains the target hand image, the near-eye display device can perform key point recognition on the target hand image. For example, the near-eye display device can perform key point recognition on the target hand image using a preset key point recognition algorithm or a preset key point recognition model, which is not limited here.
[0040] In some embodiments, the near-eye display device can perform key point recognition on the target hand image to obtain first position information of preset key points of the user's hand, where the first position information includes 2D coordinates. Figure 3 As shown, the 2D coordinates of multiple preset key points of the user's hand can be obtained by performing 2D key point recognition on the target hand image.
[0041] In some embodiments, the near-eye display device can perform key point recognition on the target hand image to obtain second position information of preset key points of the user's hand, where the second position information includes 2.5D coordinates. Figure 4As shown, the 2.5D coordinates of multiple preset key points of the user's hand can be obtained by performing 2.5D key point recognition on the target hand image. The coordinate axes of the coordinate system corresponding to the 2.5D coordinates are in the same direction as the coordinate axes of the camera coordinate system corresponding to the near-eye display device. For example, the coordinate axes of the coordinate system corresponding to the 2.5D coordinates are in the same direction as the coordinate axes of the camera coordinate system corresponding to the target hand image. The 2.5D coordinates do not have scale information.
[0042] For example, before determining the first position information of the preset key point of the user's hand and the second position information of the preset key point according to the target hand image, since the target hand image may include a background image area other than the user's hand, in order to avoid the background image area from adversely affecting the recognition efficiency and recognition accuracy of the preset key point, the near-eye display device may detect the hand image area in the target hand image. Figure 3 As shown, the near-eye display device can perform hand detection on the target hand image to detect the position of the user's hand in the target hand image. Accordingly, the near-eye display device can frame the hand image area in the target hand image with a hand rectangular frame, which is not limited here.
[0043] In this way, when the first position information of the preset key points of the user's hand and the second position information of the preset key points are determined based on the target hand image, the first position information of the preset key points of the user's hand and the second position information of the preset key points can be used for the subsequent near-eye display device to recognize the user's gestures.
[0044] S103, obtaining a target distance between at least two target key points of the user's hand; the target key points are selected from preset key points.
[0045] In some embodiments, the near-eye display device can select at least two target key points from the preset key points according to a preset key point selection strategy; the key point selection strategy includes that the distance between at least two preset key points will not change with changes in the user's gesture.
[0046] For example, each joint of the user's hand can be moved. Figure 2 As shown, each joint point of the user's hand can be set as a corresponding preset key point.
[0047] The distances between some joints in the user's hand will change with the user's gestures. Figure 2 The key point 7) and the second joint near the tip of the index finger (such as Figure 2For example, when the user's gesture changes from straightening the index finger to bending the index finger, the distance between the fingertips of key points 7 and 6 will decrease. Figure 2 The key point 15 in the little finger) and the first joint of the little finger near the tip of the little finger (such as Figure 2 Taking key point 19 in the figure as an example, when the user's gesture changes from putting the ring finger and the little finger together to spreading the ring finger and the little finger apart, the distance between the fingertips of key point 15 and key point 19 will increase.
[0048] Correspondingly, there are also some joints in the user's hand whose distances do not change with the user's gestures. Figure 2 The key point 9 in the figure and the wrist joint point (such as Figure 2 Taking key point 0 in the figure as an example, no matter how the user's gesture changes, such as changing from clenching a fist to opening the palm, from putting fingers together to opening fingers, making gestures, etc., since the palm part between key point 9 and key point 0 cannot be bent, the distance between key point 9 and key point 0 will not change with the change of the user's gesture.
[0049] Since the distance between some joints of the user's hand does not change with the change of the user's gesture, the at least two preset key points can be determined as target key points to determine the target distance between the at least two target key points. For example, the near-eye display device can determine key point 9 and key point 0 as target key points and determine the target distance between key point 9 and key point 0.
[0050] For example, when determining the target distance between at least two target key points, the target distance can be used as a basis for the subsequent near-eye display device to identify the user's gesture. For example, when the near-eye display device obtains the target hand image and determines the first position information of the preset key point of the user's hand and the second position information of the preset key point according to the target hand image, since the first position information includes 2D coordinates, the 2D coordinates do not have the depth information of the preset key point, and the second position information includes 2.5D coordinates, and 2.5D does not have scale information, then according to at least one of the first position information and the second position information of the preset key point, the depth information of the preset key point still cannot be determined. Based on this, since the target distance between at least two target key points in the user's hand will not change with the change of the user's gesture, the near-eye display device can determine the depth information of the preset key point based on the first position information and the second position information of the preset key point determined, combined with the target distance between at least two target key points, so that the near-eye display device can identify the user's gesture.
[0051] In some embodiments, the near-eye display device can pre-acquire and store the target distance between at least two target key points of the user's hand. When the near-eye display device subsequently captures the target hand image of the user, the pre-stored target distance between at least two target key points of the user's hand can be obtained to identify the user's gesture corresponding to the target hand image. There is no limitation here.
[0052] In some embodiments, the near-eye display device may pre-acquire and store the target distance between at least two target key points of the user hands of different users. When the near-eye display device acquires and stores the target distance between at least two target key points of the user hands of different users, it may establish an association relationship between the target distance between at least two target key points of the user hands of different users and the user identification of different users. Based on this, when the near-eye display device subsequently recognizes the gesture of the user corresponding to the target hand image based on the target hand image, it may acquire the user identification of the user corresponding to the target hand image, so as to acquire the target distance between at least two target key points of the corresponding user's hand based on the user identification. The user identification may include information that can be used to indicate the identity of the user, such as fingerprints, voiceprints, iris information, etc., which is not limited here.
[0053] In this way, by obtaining the target distance between at least two target key points of the user's hand, the near-eye display device can subsequently combine the first position information of the preset key point, the second position information of the preset key point, and the target distance between at least two target key points to determine the depth information of the preset key point, so that the near-eye display device can recognize the user's gesture. Based on this, the near-eye display device does not need to add more or heavier shooting devices, such as multi-eye cameras or depth cameras, to determine the depth information of the preset key points of the user's hand, and can still recognize the user's gesture through the shooting device, which is conducive to improving the accuracy and convenience of the near-eye display device in recognizing the user's gesture.
[0054] In some embodiments, when it is detected that the user's hand is within a preset shooting range corresponding to the near-eye display device, the user's hand is photographed to obtain a first hand image; when it is detected that the change in the device posture of the near-eye display device is greater than or equal to a preset change threshold, and the user's hand continues to be within the preset shooting range corresponding to the near-eye display device within a time period corresponding to the change, a second hand image obtained by photographing the user's hand is obtained.
[0055] For example, the user can extend his hand into the preset shooting range corresponding to the near-eye display device. When the near-eye display device detects that the user's hand is within the preset shooting range corresponding to the near-eye display device, the near-eye display device can shoot the user's hand to obtain a first hand image. After the near-eye display device shoots the user's hand to obtain the first hand image, the user can keep his hand still and change the user's head posture to drive the posture of the near-eye display device to change. When it is detected that the change in the device posture of the near-eye display device is greater than or equal to the preset change threshold, the near-eye display device can determine that the posture of the near-eye display device has changed. In the process of the posture of the near-eye display device changing, if the user's hand continues to be within the preset shooting range corresponding to the near-eye display device within the time length corresponding to the change in the device posture of the near-eye display device, the near-eye display device can shoot the user's hand again to obtain a second hand image.
[0056] Take the first device posture of the near-eye display device corresponding to the first hand image, which includes the first device direction information and the first device position information. The second device posture of the near-eye display device corresponding to the second hand image includes the second device direction information and the second device position information as an example. In the case where the near-eye display device captures the user's hand to obtain the first hand image, the near-eye display device needs to change the first device position information included in the first device posture, so as to capture the user's hand again based on the changed second device posture to obtain the second hand image. For example, when the position change amount between the first device position information and the second device position information is greater than or equal to the preset position change threshold, regardless of whether the first device direction information is different from the second device direction information, it can be determined that the change amount of the device posture of the near-eye display device is greater than or equal to the preset change amount threshold. Based on this, the near-eye display device can capture the user's hand again to obtain the second hand image when the user's hand is still within the preset shooting range corresponding to the near-eye display device. Correspondingly, when it is determined that the change in the device posture of the near-eye display device is greater than or equal to the preset change threshold based on the fact that the position change between the first device position information and the second device position information is greater than or equal to the preset position change threshold, if the first device direction information is different from the second device direction information, it is possible to judge whether the user's hand is still within the preset shooting range corresponding to the near-eye display device based on the first device direction information and the second device direction information.
[0057] In the case where the detected change in the device posture of the near-eye display device is less than the preset change threshold, it may be that the near-eye display device is slightly shaken due to the user or a user other than the user wearing the near-eye device operating the near-eye display device body by hand, or the near-eye display device is slightly shaken due to the ups and downs of the road surface when the user is walking, etc., which are not limited here. Based on the setting of the preset change threshold, it is possible to avoid erroneously triggering the near-eye display device to shoot the user's hand again due to the slight shake of the near-eye display device.
[0058] Accordingly, based on detecting whether the user's hand is within the preset shooting range corresponding to the near-eye display device, or detecting whether the user's hand is continuously within the preset shooting range corresponding to the near-eye display device within the time length corresponding to the change amount, it is possible to avoid erroneously triggering the near-eye display device to shoot the user's hand when the user's hand is not within the preset shooting range corresponding to the near-eye display device.
[0059] Of course, the way in which the near-eye display device photographs the user's hand is not limited to this. For example, when the near-eye display device detects at least one of a preset touch instruction and a preset voice instruction, the near-eye display device can photograph the user's hand to obtain at least one of a first hand image and a second hand image. The preset touch instruction can be determined based on the user's touch operation on the near-eye display device. For example, when the user's touch operation on the near-eye display device meets the preset touch operation corresponding to the preset touch instruction, the near-eye display device receives the preset touch instruction. The preset voice instruction can be determined based on the user's voice information. For example, when the near-eye display device detects voice information used to instruct the near-eye display device to perform a shooting function, the near-eye display device receives the preset voice instruction. The way in which the near-eye display device photographs the user's hand can be preset or set by the user, and is not limited here.
[0060] In an exemplary embodiment, when it is detected that the user's hand is within the preset shooting range corresponding to the near-eye display device, the near-eye display device may output first shooting prompt information, and the first shooting prompt information may be used to instruct the user to make a preset gesture. The preset gesture may include spreading the palm, clenching the fist, etc. The preset gesture may be pre-set or set by the user, which is not limited here.
[0061] In an exemplary embodiment, after the near-eye display device captures the user's hand and obtains the first hand image, the near-eye display device may further output second capture prompt information, and the second capture prompt information may be used to instruct the user to change the head posture while keeping the hand still. In response to the change in the head posture, the device posture of the near-eye display device may be changed, so that the near-eye display device can subsequently capture the user's hand to obtain the second hand image. For example, the second capture prompt information may guide the user to at least change the head position information of the head posture to change the device position information of the near-eye display device.
[0062] In this way, by acquiring the first hand image and the second hand image of the user's hand, the first hand image and the second hand image respectively correspond to different device postures, and the first hand image and the second hand image can be used for the subsequent near-eye display device to determine the target distance between at least two target key points of the user's hand, which is beneficial to improving the convenience and accuracy of the near-eye display device in acquiring the target distance between at least two target key points of the user's hand, thereby helping to improve the convenience and accuracy of the near-eye display device in recognizing the user's gestures.
[0063] Exemplarily, when the near-eye display device obtains the first hand image and the second hand image, it can determine the target distance between at least two target key points in the user's hand based on the first hand image and the second hand image.
[0064] In some embodiments, a first hand image and a second hand image obtained by photographing a user's hand by a near-eye display device are acquired; a first device posture of the near-eye display device corresponding to the first hand image is different from a second device posture of the near-eye display device corresponding to the second hand image; and a target distance between at least two target key points is determined based on the first hand image and the second hand image.
[0065] For example, since the user needs to wear the near-eye display device on the head when using the near-eye display device, the device posture of the near-eye display device will also change in response to the change of the user's head posture, such as the user moves the head to the left, the user moves the head to the right and rotates the head, etc., which at least includes a change in the head position. Based on this, the near-eye display device can shoot the user's hand of the same user in different device postures to obtain different hand images, such as a first hand image and a second hand image. The number of first hand images may include one or more, and the number of second hand images may also include one or more. The device postures of the near-eye display device corresponding to each of the multiple first hand images may be different, and the device postures of the near-eye display device corresponding to each of the multiple second hand images may be different, which is not limited here.
[0066] When a first hand image and a second hand image of a user's hand are acquired by a near-eye display device, the near-eye display device can determine a target distance between at least two target key points in the user's hand based on the first hand image and the second hand image.
[0067] For example, in the process of the near-eye display device photographing the user's hand to obtain the first hand image and the second hand image, since the target distance between the target key points will not change with the change of the device posture of the near-eye display device, the near-eye display device can determine the first preset position information of the target key points, such as 2D coordinates, respectively, based on the first hand image and the second hand image. Correspondingly, the near-eye display device can also perform pixel matching on the first hand image and the second hand image to obtain the second preset position information of the target key points, such as 3D coordinates. When the second preset position information of the target key points is determined, the target distance between at least two target key points can be determined based on the second preset position information of the target key points.
[0068] In this way, when determining the target distance between at least two target key points, since the target distance between the at least two target key points will not change with the change of the device posture of the near-eye display device, the target distance between the at least two target key points can be used for the subsequent near-eye display device to recognize the user's gesture, which is beneficial to improving the accuracy and convenience of the near-eye display device in recognizing the user's gesture.
[0069] For example, key point detection is performed on the first hand image and the second hand image to obtain first preset position information of the target key point, where the first preset position information includes 2D coordinates; based on the first preset position information of the target key point, the first device posture corresponding to the first hand image, and the second device posture corresponding to the second hand image, the second preset position information of the target key point is determined, where the second preset position information includes 3D coordinates; based on the second preset position information of the target key point, the target distance between at least two target key points is determined.
[0070] When the first hand image is acquired, the near-eye display device can perform key point detection on the first hand image to obtain first preset position information of preset key points corresponding to the first hand image. Correspondingly, when the second hand image is acquired, the near-eye display device can perform key point detection on the second hand image to obtain first preset position information of preset key points corresponding to the second hand image. For example, the near-eye display device can perform 2D key point recognition on the first hand image to obtain first preset position information of preset key points of the user's hand corresponding to the first hand image. The near-eye display device can also perform 2D key point recognition on the second hand image to obtain first preset position information of preset key points of the user's hand corresponding to the second hand image. The first preset position information includes 2D coordinates.
[0071] With the tip of the index finger (such as Figure 2 For example, by performing key point recognition on the first hand image, the first position information of the key point 8 corresponding to the first hand image can be obtained as position X1. Correspondingly, by performing key point recognition on the second hand image, the first position information of the key point 8 corresponding to the second hand image can be obtained as position X2.
[0072] Since the key point 8 can be projected onto the same near-eye display device in different device postures to obtain the first hand image and the second hand image, there is a corresponding correlation between position X1 and position X2. For example, position X2 can be converted by the camera intrinsic parameters of the near-eye display device, the camera extrinsic parameters corresponding to the second hand image, and the camera extrinsic parameters corresponding to the first hand image to obtain position X1.
[0073] By analogy, for the preset key points of the user's hand, key point detection can be performed on the first hand image to obtain the first preset position information of the preset key points corresponding to the first hand image, and key point detection can be performed on the second hand image to obtain the first preset position information of the preset key points corresponding to the second hand image.
[0074] Accordingly, since the preset key points can be projected onto the same near-eye display device in different device postures respectively to obtain a first hand image and a second hand image, there is a corresponding correlation relationship between the first preset position information of the preset key points corresponding to the first hand image and the first preset position information of the preset key points corresponding to the second hand image.
[0075] Furthermore, since the target key point is selected from the preset key points, the first preset position information of the target key point corresponding to the first hand image and the first preset position information of the target key point corresponding to the second hand image can be determined based on the first hand image and the second hand image, thereby constructing an association relationship between the first preset position information of the target key point corresponding to the first hand image and the first preset position information of the target key point corresponding to the second hand image.
[0076] Based on this, when the first preset position information of the target key point is determined, such as the first preset position information of the target key point corresponding to the first hand image and the first preset position information of the target key point corresponding to the second hand image, the first device posture corresponding to the first hand image and the second device posture corresponding to the second hand image can be combined to determine the second preset position information of the target key point.
[0077] Since the first device posture corresponding to the first hand image is different from the second device posture corresponding to the second hand image, it is equivalent to that the same user's hand can be projected onto the same near-eye display device with different device postures.
[0078] In the process of the user changing the device posture of the near-eye display device from the first device posture to the second device posture by changing the head posture, if the user's gesture has not changed, it can be determined that the first hand image and the second hand image can be matched pixel by pixel. For example, there is a correspondence between the first preset position information of the preset key point corresponding to the first hand image and the first preset position information of the preset key point corresponding to the second hand image. Furthermore, since the first hand image and the second hand image are both captured by the near-eye display device, the camera intrinsic parameters corresponding to the first hand image and the second hand image are the same.
[0079] However, since the first device posture corresponding to the first hand image is different from the second device posture corresponding to the second hand image, the camera extrinsics corresponding to the first hand image and the second hand image are different. For example, in the process of changing the device posture of the near-eye display device from the first device posture to the second device posture, the rotation and translation transformation relationship of the near-eye display device relative to the world coordinate system changes. Based on this, when the first hand image and the second hand image are acquired, the first device posture corresponding to the first hand image and the second device posture corresponding to the second hand image can be combined to process the first preset position information of the preset key point, such as processing the first preset position information of the preset key point corresponding to the first hand image and the first preset position information of the preset key point corresponding to the second hand image, to obtain the second preset position information of the preset key point of the user's hand.
[0080] With the tip of the index finger (such as Figure 2 Taking the key point 8 in the figure as an example, the first device posture, the second device posture of the near-eye display device, the first preset position information (position X1) of the key point 8 corresponding to the first hand image, and the first preset position information (position X2) of the key point 8 corresponding to the second hand image can be combined to determine the second preset position information of the key point 8.
[0081] By analogy, for the preset key points of the user's hand, the first device posture, the second device posture and the first preset position information of the preset key points can be comprehensively considered to determine the second preset position information of the preset key points.
[0082] Furthermore, since the target key point is selected from preset key points, the second preset position information of the target key point can be determined based on the first device posture corresponding to the first hand image, the second device posture corresponding to the second hand image, and the first preset position information of the target key point.
[0083] In some embodiments, a first projection matrix corresponding to the first device posture and a second projection matrix corresponding to the second device posture are obtained; and second preset position information of the target key point is determined based on the first preset position information of the target key point, the first projection matrix and the second projection matrix.
[0084] For example, the camera coordinate system corresponding to the near-eye display device, such as the camera coordinate system corresponding to the first hand image, can be used as the world coordinate system. When the first device posture corresponding to the first hand image and the second device posture corresponding to the second hand image are determined, the first projection matrix corresponding to the first device posture and the second projection matrix corresponding to the second device posture can be obtained. Based on the obtained first projection matrix and second projection matrix, the rotation and translation transformation relationship of the camera coordinate system corresponding to the second hand image relative to the camera coordinate system corresponding to the first hand image can be determined. Based on this, when the first hand image and the second hand image are obtained, the depth information corresponding to the first preset position information of the target key point can be determined in combination with the rotation and translation transformation relationship of the camera coordinate system corresponding to the second hand image relative to the camera coordinate system corresponding to the first hand image, so as to determine the second preset position information of the target key point.
[0085] In this way, when the second preset position information of the target key point is determined, the second preset position information of the target key point can be used for the subsequent near-eye display device to determine the target distance between at least two target key points, thereby helping to improve the convenience and accuracy of the near-eye display device in recognizing the user's gestures.
[0086] In some embodiments, a first projection matrix corresponding to a first device posture is obtained; based on measurement information of an inertial measurement unit on a near-eye display device, a posture relationship between the first device posture and the second device posture is obtained, and a rotation matrix and a translation matrix when the near-eye display device changes from the first device posture to the second device posture are determined based on the posture relationship; based on the rotation matrix and the translation matrix, the first projection matrix is transformed to obtain a second projection matrix corresponding to the second hand image.
[0087] For example, an inertial measurement unit (IMU) is provided on the near-eye display device. In the process of changing the device posture of the near-eye display device from the first device posture corresponding to the first hand image to the second device posture corresponding to the second hand image, in response to the change of the device posture of the near-eye display device, the inertial measurement unit can collect acceleration data and angular velocity data of the near-eye display device in the three axes included in the camera coordinate system corresponding to the first hand image. The measurement information of the inertial measurement unit may include the acceleration data and angular velocity data of the near-eye display device in the three axes included in the camera coordinate system corresponding to the first hand image.
[0088] Take the camera coordinate system corresponding to the near-eye display device, such as the camera coordinate system corresponding to the first hand image, as an example of the world coordinate system. When the measurement information of the inertial measurement unit is obtained, the posture relationship between the first device posture corresponding to the first hand image and the second device posture corresponding to the second hand image can be determined. For example, based on the acceleration data and angular velocity data of the three axes included in the world coordinate system of the near-eye display device, the posture change amount of the second device posture corresponding to the second hand image relative to the first device posture corresponding to the first hand image is determined.
[0089] When the posture relationship between the first device posture and the second device posture is determined, the rotation matrix and the translation matrix of the near-eye display device when the first device posture is changed to the second device posture can be determined according to the posture relationship, so that the first projection matrix can be transformed in combination with the rotation matrix and the translation matrix to obtain the second projection matrix corresponding to the second hand image.
[0090] For example, the first device posture corresponding to the first hand image is posture pose1, the first projection matrix corresponding to the first hand image is matrix P1, the second device posture corresponding to the second hand image is posture pose2, and the second projection matrix corresponding to the second hand image is matrix P2. When posture pose1 and posture pose2 are obtained, the matrix R and the matrix T when the near-eye display device changes from posture pose1 to posture pose2 can be calculated based on the measurement information of the IMU. Among them, the matrix R is used to indicate the rotation matrix when the near-eye display device changes from posture pose1 to posture pose2, and the matrix T is used to indicate the translation matrix when the near-eye display device changes from posture pose1 to posture pose2. When the matrix R and the matrix T are obtained, the matrix P2 can be determined in combination with the matrix P1. For example, the relationship between the matrix P1 and the matrix P2 can be determined based on the matrix R and the matrix T as follows: Based on this, the matrix P1, the matrix R and the matrix T can be substituted into the association relationship between the matrix P1 and the matrix P2 to determine the matrix P2.
[0091] With the tip of the index finger (such as Figure 2 Taking the key point 8 in the figure as an example, the second preset position information of the key point 8 can be determined according to the matrix P1 corresponding to the posture pose1, the matrix P2 corresponding to the posture pose2, the position X1 and the position X2. For example, when the key point 8 is projected onto the same near-eye display device in different device postures to form the first hand image and the second hand image, corresponding similar triangles can be formed. Based on this, the second preset position information of the key point 8 can be solved according to the matrix P1, the matrix P2, the position X1 and the position X2 based on the preset triangulation algorithm to obtain the second preset position information of the key point 8.
[0092] By analogy, the second preset position information of the preset key point in the user's hand can be determined. Of course, the method of determining the second preset position information of the preset key point in the user's hand is not limited to this. For example, the number of first hand images can include multiple, the number of second hand images can also include multiple, the device postures of the near-eye display devices corresponding to the multiple first hand images can be different, and the device postures of the near-eye display devices corresponding to the multiple second hand images can also be different. Then, based on the multiple first hand images and the multiple second hand images, combined with the least squares algorithm, the second preset position information of the preset key point in the user's hand can be determined, which is not limited here.
[0093] Accordingly, since the target key point is selected from the preset key points, the second preset position of the target key point in the user's hand can also be determined.
[0094] In this way, when the first projection matrix corresponding to the first hand image and the first preset position information of the preset key point are obtained, the second projection matrix corresponding to the second hand image can be determined in combination with the measurement information of the inertial measurement unit. Accordingly, the near-eye display device can determine the second preset position information of the target key point in combination with the first projection matrix, the second projection matrix and the first preset position information of the target key point. The second preset position information of the target key point can be used by the subsequent near-eye display device to determine the target distance between at least two target key points. The target distance between at least two target key points can be used by the subsequent near-eye display device to recognize the user's gesture, which is conducive to improving the convenience and accuracy of the near-eye display device in recognizing the user's gesture.
[0095] S104: Recognize a user's gesture according to the first position information of the preset key point, the second position information of the preset key point, and the target distance between at least two target key points.
[0096] Take the camera coordinate system corresponding to the near-eye display device, such as the camera coordinate system corresponding to the target hand image, as an example of the world coordinate system. When the first position information of the preset key point, the second position information of the preset key point, and the target distance between at least two target key points are determined, the position information of the preset key point in the world coordinate system can be determined in combination with the first position information of the preset key point and the second position information of the preset key point. The position information of the preset key point in the world coordinate system can be used by the near-eye display device to recognize the user's gesture. The near-eye display device can determine the position information of the preset key point in the world coordinate system as the target position information of the preset key point.
[0097] In some embodiments, based on a position calculation model, target position information of a preset key point is determined according to camera intrinsic parameters of a near-eye display device, first position information of the preset key point, second position information of the preset key point, and a target distance between at least two target key points; the target position information includes 3D coordinates; and based on the target position information of the preset key point, the user's gesture is recognized.
[0098] For example, based on the camera intrinsic parameters and the first position information of the target key point, the projection relationship between the target position information of the target key point and the first position information of the target key point is determined; based on the target distance between at least two target key points, the distance between the target position information of at least two target key points is determined; based on the target distance between at least two target key points and the second position information of at least two target key points, the proportional relationship between the difference between the target position information of at least two target key points and the difference between the second position information of at least two target key points is determined; based on the projection relationship, the target distance between the target position information of at least two target key points and the proportional relationship, the target position information of the target key point is determined; based on the target position information of the target key point, the proportional relationship and the second position information of the preset key point other than the target key point, the target position information of the preset key point other than the target key point is determined.
[0099] The camera coordinate system corresponding to the near-eye display device, such as the camera coordinate system corresponding to the target hand image, is the world coordinate system, and the camera intrinsic parameters are:
[0100]
[0101] Among them, f x Used to indicate the focal length of the near-eye display device in the x-axis direction, f y It is used to indicate the focal length of the Y axis corresponding to the near-eye display device. u0 and v0 are used to indicate the actual position information of the principal point corresponding to the near-eye display device. The target key point is the wrist joint point ( Figure 2 The key point 0 in the middle finger and the third joint point near the tip of the middle finger ( Figure 2 The first position information of key point 0 is (U0, V0), the first position information of key point 9 is (U9, V9), the second position information of key point 0 is (X0, Y0, Z0), the second position information of key point 9 is (X9, Y9, Z9), and the target position information of key point 0 is (X0, Y0, Z0). W0 ,Y W0 ,Z W0 ), the target position information of key point 9 is (X W9 ,Y W9 ,Z W9 ). Take the target distance between key point 0 and key point 9 as L for example.
[0102] According to the camera internal parameters and the first position information of key point 0 and key point 9, the target position information (X W0 ,Y W0 ,Z W0) and the projection relationship between the first position information (U0, V0) of key point 0, and the target position information (X W9 ,Y W9 ,Z W9 ) and the projection relationship between the first position information (U9, V9) of key point 9 is as follows:
[0103]
[0104]
[0105] The above projection relationship can be organized into formula (1) to formula (4), as shown below:
[0106] Z W0 U0=f x ·X W0 +u0·Z W0 (1)
[0107] Z W0 V0=f y ·Y W0 +u0·Z W0 (2)
[0108] Z W9 U9=f x ·X W9 +u0·Z W9 (3)
[0109] Z W9 V9 = f y ·X W9 +u0·Z W9 (4)
[0110] According to the target distance L between key point 0 and key point 9, the target position information (X W0 ,Y W0 ,Z W0 ) and the target position information of key point 9 (X W9 ,Y W9 ,Z W9 ), as shown in formula (5).
[0111] (X W0 -X W9 ) 2 +(Y W0 -Y W9 ) 2 +(Z W0 -Z W9 ) 2 =L 2 (5)
[0112] According to the target distance L between key point 0 and key point 9 and the second position information (X0, T0, Z0) of key point 0 and the second position information (X9, Y9, Z9) of key point 9, the target position information (X0, T0, Z0) of key point 0 can be determined. W0 ,Y W0 ,Z W0 ) and the target position information of key point 9 (X W9 ,Y W9 ,Z W9 ) and the difference between the second position information (X0, Y0, Z0) of key point 0 and the second position information (X9, Y9, Z9) of key point 9. In addition, since the coordinate axes of the coordinate systems corresponding to the second position information of key point 0 and the second position information of key point 9 are respectively in the same direction as the coordinate axes of the camera coordinate system corresponding to the near-eye display device, it can be determined that the proportional relationship is greater than 0. As shown in formula (6).
[0113]
[0114] Here, R is used to indicate a proportional relationship, and the proportional relationship R is related to a target distance L between key point 0 and key point 9.
[0115] When formulas (1) to (6) are determined, formulas (1) to (6) can be combined, which is equivalent to combining the projection relationship, the target distance L between the target position information of key point 0 and key point 9, and the proportional relationship R to determine the target position information of key point 0 and key point 9.
[0116] For example, we can combine formula (1) to formula (6) to get W0 , Y W0 , Z W0 , X W9 , Y W9 and Z W9 To solve.
[0117] For example, from formula (6) we can get:
[0118]
[0119]
[0120] Substituting formula (7) and formula (8) into formula (5) we can get (Z W0 -Z W9 ) 2 According to formula (6), Z W0 -Z W9 The sign of ZW0 -Z W9 , X W0 -X W9 and Y W0 -Y W9 .
[0121] Assumptions:
[0122] Z W0 -Z W9 =a (9)
[0123] X W0 -X W9 =b (10)
[0124] Subtracting formula (3) from formula (1) yields:
[0125] Z W0 ·U0-Z W9 U9=f x ·(X W0 -X W9 )+u0·(Z W0 -Z W9 ) (11)
[0126] Substituting formula (9) and formula (10) into formula (11), we can obtain Z W0 ·U0-Z W9 ·U9.
[0127] Assumptions:
[0128] Z W0 ·U0-Z W9 ·U9=c (12)
[0129] According to formula (9) and formula (12), Z can be obtained W0 and Z W9 , and then we can get X W0 , Y W0 , X W9 and Y W9 .
[0130] After determining the target position information of key point 0 (X W0 ,Y W0 ,Z W0 ) and the target position information of key point 9 (X W9 ,Y W9 ,Z W9 ), the proportional relationship R can be determined by combining the second position information (X0, Y0, Z0) of key point 0 and the second position information (X9, Y9, Z9) of key point 9.
[0131] Accordingly, the target position information of the preset key points other than the key point 0 and the key point 9 may be determined according to the proportional relationship R in combination with any one of the target position information of the key point 0 and the target position information of the key point 9.
[0132] With the tip of the user's index finger (such as Figure 2 As an example, the second position information (X8, Y8, Z8) of key point 8 can be substituted into formula (6), combined with the target position information (X8, Y8, Z8) of key point 0. W0 ,Y W0 ,Z W0 ), determine the target position information of key point 8 (X W8 ,Y W8 ,Z W8 ) and the second position information (X8, Y8, Z8) of key point 8, as shown in formulas (13) to (15):
[0133] X W8 =R·(X8-X0)+X W0 (13)
[0134] Y W8 =R·(Y8-Y0)+Y W0 (14)
[0135] Z W8 =R·(Z8-Z0)+Z W0 (15)
[0136] Since the second position information (X0, Y0, Z0) of key point 0 and the second position information (X8, Y8, Z8) of key point 8 can be determined by the first hand image and the second hand image acquired by the near-eye display device, the target position information (X0, Y0, Z0) of key point 8 can be obtained according to formulas (13) to (15). W8 ,Y W8 ,Z W8 ).
[0137] By analogy, the target position information of all preset key points of the user's hand can be obtained, which will not be repeated here.
[0138] When the target position information of the preset key point is determined, the near-eye display device can recognize the user's gesture in combination with the target position information of the preset key point.
[0139] In some embodiments, the near-eye display device may input the target position information of the preset key point into a trained gesture recognition model to obtain the gesture output result of the gesture recognition model, and determine the user's gesture based on the gesture output result. Of course, it is not limited to this. The near-eye display device may compare the target position information of the preset key point with the preset position information of the preset key point in the preset gesture image. When the position difference between the target position information and the preset position information is less than or equal to the preset position difference threshold, it can be determined that the user's gesture is the gesture corresponding to the preset gesture image, which is not limited here.
[0140] In some embodiments, when the target position information of the preset key points is determined, the size information of the user's hand can be determined according to the target position information of the preset key points. For example, the distance between different preset key points can be determined according to the target position information of the preset key points, so as to determine the size information of the user's hand according to the distance between different preset key points.
[0141] In some embodiments, the near-eye display device determines the distance between at least two preset key points based on the target position information of the preset key points, and recognizes the user's gesture based on the distance between the at least two preset key points. For example, when the user clenches his fist, the tip of the thumb of the user's hand (such as Figure 2 The key point 4) and the second joint point near the tip of the ring finger (such as Figure 2 Based on this, it can be determined whether the user's gesture is a clenched fist according to whether the distance between the key point 4 and the key point 14 is less than or equal to the preset distance threshold. Of course, the method of identifying the user's gesture based on the distance between at least two preset key points is not limited to this, and can be pre-set or set by the user, which is not limited here.
[0142] In some embodiments, after the near-eye display device recognizes the user's gesture according to the target position information of the preset key points, it can also determine the size information of the user's hand in combination with the user's gesture. For example, when the near-eye display device determines that the user's gesture is to stretch the hand, the near-eye display device can perform image recognition on the target hand image to measure the user's finger width, wrist width and other size information to determine the size information of the user's hand. Of course, the method of determining the size information of the user's hand according to the user's gesture is not limited to this, and can be pre-set or set by the user, which is not limited here.
[0143] In this way, the near-eye display device can determine the target position information of the preset key point based on the first position information of the preset key point, the second position information of the preset key point, and the target distance between at least two target key points. The target position information of the preset key point can be used by the near-eye display device to recognize the user's gesture, which is conducive to improving the convenience and accuracy of gesture recognition of the near-eye display device. Accordingly, after the near-eye display device determines the user's gesture, the near-eye display device can execute the function corresponding to the user's gesture according to the user's gesture, which is conducive to improving the convenience of the user's control of the near-eye display device, thereby helping to improve the user's experience of using the near-eye display device.
[0144] The gesture recognition method provided in the above embodiment is applied to a near-eye display device, and the gesture recognition method includes: obtaining a target hand image obtained by photographing a user's hand by the near-eye display device; determining, based on the target hand image, first position information of a preset key point of the user's hand and second position information of the preset key point, the first position information includes 2D coordinates, and the second position information includes 2.5D coordinates; obtaining a target distance between at least two target key points of the user's hand; the target key point is selected from the preset key points; and recognizing the user's gesture based on the first position information of the preset key point, the second position information of the preset key point, and the target distance between at least two target key points.
[0145] When the target hand image is acquired, the near-eye display device can determine the first position information and the second position information of the preset key points of the user's hand based on the target hand image. In addition, the near-eye display device can acquire the target distance between at least two target key points of the user's hand. Since the target distance between at least two target key points will not change with the change of the device posture of the near-eye display device or the change of the gesture made by the user's hand, the user's gesture can be identified in combination with the first position information, the second position information and the target distance of the preset key points of the user's hand. Based on this, the near-eye display device does not need to add more or heavier shooting devices to obtain the depth information of the user's hand. For example, the user's gesture can be identified without setting a depth camera, a binocular camera, etc. on the near-eye display device. In this way, the near-eye display device recognizes the user's gesture by acquiring the target hand image and the target distance between at least two target key points of the user's hand, which is conducive to improving the convenience and accuracy of the near-eye display device in recognizing the user's gesture.
[0146] See also Figure 5 , Figure 5: is a schematic block diagram of a gesture recognition device provided in an embodiment of the present application. The gesture recognition device can be configured in a near-eye display device to perform the aforementioned gesture recognition method. The near-eye display device can include AR glasses, VR glasses, AR helmets, VR helmets, etc., which are not limited here.
[0147] like Figure 5 As shown, the gesture recognition device includes an image acquisition module 110 , a first position determination module 120 , a distance acquisition module 130 , a second position determination module 140 and a gesture recognition module 150 .
[0148] The image acquisition module 110 is used to acquire a target hand image obtained by photographing a user's hand using a near-eye display device.
[0149] The position determination module 120 is used to determine the first position information of the preset key points of the user's hand and the second position information of the preset key points according to the target hand image, wherein the first position information includes 2D coordinates and the second position information includes 2.5D coordinates.
[0150] The distance acquisition module 130 is used to acquire the target distance between at least two target key points of the user's hand; the target key points are selected from the preset key points.
[0151] The gesture recognition module 140 is used to recognize the user's gesture according to the first position information of the preset key point, the second position information of the preset key point, and the target distance between the at least two target key points.
[0152] Exemplarily, the distance acquisition module 130 includes a hand image submodule and a distance determination submodule.
[0153] A hand image submodule is used to obtain a first hand image and a second hand image obtained by the near-eye display device photographing the user's hand; a first device posture of the near-eye display device corresponding to the first hand image is different from a second device posture of the near-eye display device corresponding to the second hand image.
[0154] The distance determination submodule is used to determine the target distance between the at least two target key points according to the first hand image and the second hand image.
[0155] Exemplarily, the hand image submodule includes a first shooting submodule and a second shooting submodule.
[0156] The first shooting submodule is used to shoot the user's hand to obtain a first hand image when it is detected that the user's hand is within a preset shooting range corresponding to the near-eye display device.
[0157] The second shooting submodule is used to obtain a second hand image obtained by shooting the user's hand when it is detected that the change in the device posture of the near-eye display device is greater than or equal to a preset change threshold, and the user's hand is continuously in the preset shooting range corresponding to the near-eye display device within the time period corresponding to the change.
[0158] Exemplarily, the distance determination submodule includes a key point detection submodule, a first position determination submodule and a first distance determination submodule.
[0159] The key point detection submodule is used to perform key point detection on the first hand image and the second hand image to obtain first preset position information of the target key point; the first preset position information includes 2D coordinates.
[0160] The first position determination submodule is used to determine the second preset position information of the target key point based on the first preset position information of the target key point, the first device posture corresponding to the first hand image, and the second device posture corresponding to the second hand image, wherein the second preset position information includes 3D coordinates.
[0161] The first distance determination submodule is used to determine the target distance between the at least two target key points according to the second preset position information of the target key points.
[0162] Exemplarily, the first position determination submodule includes a matrix acquisition submodule and a second position determination submodule.
[0163] The matrix acquisition submodule is used to acquire a first projection matrix corresponding to the first device posture and a second projection matrix corresponding to the second device posture.
[0164] The second position determination submodule is used to determine the second preset position information of the target key point according to the first preset position information of the target key point, the first projection matrix and the second projection matrix.
[0165] Exemplarily, the matrix acquisition submodule includes a first matrix acquisition submodule, a matrix change submodule and a second matrix acquisition submodule.
[0166] The first matrix acquisition submodule is used to acquire a first projection matrix corresponding to the first device posture.
[0167] The matrix change submodule is used to obtain the posture relationship between the first device posture and the second device posture based on the measurement information of the inertial measurement unit on the near-eye display device, and determine the rotation matrix and translation matrix of the near-eye display device when the first device posture is changed to the second device posture based on the posture relationship.
[0168] The second matrix acquisition submodule is used to transform the first projection matrix according to the rotation matrix and the translation matrix to obtain a second projection matrix corresponding to the second hand image.
[0169] Exemplarily, the gesture recognition module 140 includes a position calculation submodule and a gesture recognition submodule.
[0170] A position calculation submodule, for determining target position information of the preset key point based on a position calculation model according to a camera intrinsic parameter of the near-eye display device, the first position information of the preset key point, the second position information of the preset key point, and a target distance between the at least two target key points; the target position information includes 3D coordinates;
[0171] The gesture recognition submodule is used to recognize the user's gesture according to the target position information of the preset key point.
[0172] Exemplarily, the position operation submodule includes a projection relationship determination submodule, a distance determination submodule, a ratio relationship determination submodule, a first position operation submodule, and a second position operation submodule.
[0173] The projection relationship determination submodule is used to determine the projection relationship between the target position information of the target key point and the first position information of the target key point according to the camera intrinsic parameter and the first position information of the target key point.
[0174] The distance determination submodule is used to determine the distance between the target position information of the at least two target key points according to the target distance between the at least two target key points.
[0175] A proportional relationship determination submodule is used to determine the proportional relationship between the difference between the target position information of the at least two target key points and the difference between the second position information of the at least two target key points based on the target distance between the at least two target key points and the second position information of the at least two target key points.
[0176] The first position operation submodule is used to determine the target position information of the target key point according to the projection relationship, the distance between the target position information of the at least two target key points and the proportional relationship.
[0177] The second position calculation submodule is used to determine the target position information of the preset key points other than the target key points according to the target position information of the target key points, the proportional relationship and the second position information of the preset key points other than the target key points.
[0178] It should be noted that technicians in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0179] The method of the present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0180] Exemplarily, the above method and apparatus may be implemented in the form of a computer program, which may be run on a near-eye display device to recognize a user's gesture through the near-eye display device. Exemplarily, the near-eye display device may include VR glasses, AR glasses, VR helmets, AR helmets, etc., which are not limited here.
[0181] See also Figure 6 , Figure 6 It is a schematic block diagram of the structure of a near-eye display device provided in an embodiment of the present application.
[0182] like Figure 6 As shown, the near-eye display device includes a memory and a processor. The memory and the processor may be connected via a system bus, and the memory may include a storage medium and an internal memory.
[0183] The storage medium may store an operating system and a computer program. When the computer program is executed, the processor may execute any gesture recognition method.
[0184] The processor is used to provide computing and control capabilities to support the operation of the entire near-eye display device.
[0185] The internal memory provides an environment for the operation of the computer program in the storage medium. When the computer program is executed by the processor, the processor can execute any gesture recognition method.
[0186] Those skilled in the art will understand that Figure 6 The structure shown in the figure is merely a block diagram of a portion of the structure related to the scheme of the present application, and does not constitute a limitation on the near-eye display device to which the scheme of the present application is applied. The specific near-eye display device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0187] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0188] In one embodiment, the processor is used to execute a computer program and implement the following steps when executing the computer program:
[0189] Acquire a target hand image obtained by photographing a user's hand by the near-eye display device;
[0190] Determine, according to the target hand image, first position information of a preset key point of the user's hand and second position information of the preset key point, wherein the first position information includes a 2D coordinate and the second position information includes a 2.5D coordinate;
[0191] Acquire a target distance between at least two target key points of the user's hand; the target key points are selected from the preset key points;
[0192] The user's gesture is recognized according to the first position information of the preset key point, the second position information of the preset key point, and the target distance between the at least two target key points.
[0193] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the gesture recognition described above can refer to the corresponding process in the aforementioned gesture recognition method embodiment, which will not be repeated here.
[0194] The embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. The method implemented when the computer program is executed by a processor can refer to the various embodiments of the gesture recognition method of the present application.
[0195] The computer-readable storage medium may be an internal storage unit of the near-eye display device described in the aforementioned embodiment, such as a hard disk or memory of the near-eye display device. The computer-readable storage medium may also be an external storage device of the near-eye display device, 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 (Flash Card), etc., equipped on the near-eye display device.
[0196] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0197] It should also be understood that the term "and / or" used in the specification of this application and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0198] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A gesture recognition method, characterized in that: Applied to a near-eye display device, the gesture recognition method comprises: Acquire a target hand image obtained by photographing a user's hand by the near-eye display device; Determine, according to the target hand image, first position information of a preset key point of the user's hand and second position information of the preset key point, wherein the first position information includes a 2D coordinate and the second position information includes a 2.5D coordinate; Acquire a target distance between at least two target key points of the user's hand; the target key points are selected from the preset key points; The user's gesture is recognized according to the first position information of the preset key point, the second position information of the preset key point, and the target distance between the at least two target key points.
2. The gesture recognition method according to claim 1, characterized in that: Obtaining a target distance between at least two target key points of the user's hand, comprising: Acquire a first hand image and a second hand image obtained by photographing the user's hand by the near-eye display device; a first device posture of the near-eye display device corresponding to the first hand image is different from a second device posture of the near-eye display device corresponding to the second hand image; A target distance between the at least two target key points is determined according to the first hand image and the second hand image.
3. The gesture recognition method according to claim 2, characterized in that: The acquiring of a first hand image and a second hand image obtained by photographing a hand of a user by the near-eye display device includes: When it is detected that the user's hand is within a preset shooting range corresponding to the near-eye display device, photographing the user's hand to obtain a first hand image; When it is detected that the change in the device posture of the near-eye display device is greater than or equal to a preset change threshold, and the user's hand is continuously within the preset shooting range corresponding to the near-eye display device within the time period corresponding to the change, a second hand image obtained by photographing the user's hand is obtained.
4. The gesture recognition method according to claim 2, characterized in that: The step of determining the target distance between the at least two target key points according to the first hand image and the second hand image includes: Performing key point detection on the first hand image and the second hand image to obtain first preset position information of the target key point, where the first preset position information includes 2D coordinates; Determine second preset position information of the target key point according to the first preset position information of the target key point, the first device posture corresponding to the first hand image, and the second device posture corresponding to the second hand image, wherein the second preset position information includes 3D coordinates; The target distance between the at least two target key points is determined according to the second preset position information of the target key point.
5. The gesture recognition method according to claim 4, characterized in that: The determining, according to the first preset position information of the target key point, the first device posture corresponding to the first hand image, and the second device posture corresponding to the second hand image, the second preset position information of the target key point includes: Obtain a first projection matrix corresponding to the first device posture and a second projection matrix corresponding to the second device posture; The second preset position information of the target key point is determined according to the first preset position information of the target key point, the first projection matrix and the second projection matrix.
6. The gesture recognition method according to claim 5, characterized in that: The acquiring a first projection matrix corresponding to the first device posture and a second projection matrix corresponding to the second hand image of the second device posture includes: Obtaining a first projection matrix corresponding to the first device posture; Acquire a posture relationship between the first device posture and the second device posture according to measurement information of an inertial measurement unit on the near-eye display device, and determine a rotation matrix and a translation matrix when the near-eye display device changes from the first device posture to the second device posture according to the posture relationship; The first projection matrix is transformed according to the rotation matrix and the translation matrix to obtain a second projection matrix corresponding to the second hand image.
7. The gesture recognition method according to any one of claims 1 to 6, characterized in that: The identifying the user's gesture according to the first position information of the preset key point, the second position information of the preset key point, and the target distance between the at least two target key points includes: Based on the position calculation model, the target position information of the preset key point is determined according to the camera intrinsic parameters of the near-eye display device, the first position information of the preset key point, the second position information of the preset key point and the target distance between the at least two target key points; the target position information includes 3D coordinates; The user's gesture is recognized according to the target position information of the preset key point.
8. The gesture recognition method according to claim 7, characterized in that: The method of determining the target position information of the preset key point based on the position calculation model according to the camera intrinsic parameter of the near-eye display device, the first position information of the preset key point, the second position information of the preset key point, and the target distance between the at least two target key points includes: Determine, according to the camera intrinsic parameter and the first position information of the target key point, a projection relationship between the target position information of the target key point and the first position information of the target key point; Determining a distance between target position information of the at least two target key points according to a target distance between the at least two target key points; Determining a proportional relationship between a difference between the target position information of the at least two target key points and a difference between the second position information of the at least two target key points according to the target distance between the at least two target key points and the second position information of the at least two target key points; Determining the target position information of the target key point according to the projection relationship, the distance between the target position information of the at least two target key points, and the proportional relationship; The target position information of the preset key points other than the target key point is determined according to the target position information of the target key point, the proportional relationship and the second position information of the preset key points other than the target key point.
9. A gesture recognition device, characterized in that: The gesture recognition device comprises: An image acquisition module, used to acquire a target hand image obtained by photographing a user's hand by a near-eye display device; A position determination module, used to determine first position information of a preset key point of the user's hand and second position information of the preset key point according to the target hand image, wherein the first position information includes a 2D coordinate and the second position information includes a 2.5D coordinate; A distance acquisition module, used to acquire a target distance between at least two target key points of the user's hand; the target key points are selected from the preset key points; The gesture recognition module is used to recognize the user's gesture according to the first position information of the preset key point, the second position information of the preset key point and the target distance between the at least two target key points.
10. A near-eye display device, characterized in that: The near-eye display device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the steps of the gesture recognition method according to any one of claims 1 to 8 when executing the computer program.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the gesture recognition method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Gesture recognition method and device, electronic device and storage medium
CN109858524A
Gesture determination method and device, electronic equipment and storage medium
CN114489341A
Gesture recognition method and device, intelligent glasses and storage medium
CN116416676A
Three-dimensional (3D) pose estimation from a monocular camera
US20190278983A1
Cited By
Payment method and device, near-to-eye display equipment and storage medium
CN119887193A
Payment method, device, near-eye display device and storage medium
CN119887193B
