Image processing method, device and electronic equipment

Through multi-frame image processing and multi-branch network technology, hand detection and status recognition are realized, solving the problems of high cost and poor stability in existing gesture interaction technology, and providing efficient gesture interaction support.

CN113469017BActive Publication Date: 2024-09-17SHENZHEN ZHIRUIYIN TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110725463.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-29
Publication Date
2024-09-17
Estimated Expiration
2041-06-29

AI Technical Summary

Technical Problem

Existing gesture interaction technology relies on depth cameras or infrared cameras, which are costly and unstable, making it difficult to achieve efficient hand detection and status recognition.

Method used

By obtaining multiple frames of two-dimensional images, the hands are detected and the initial detection frame is determined. Based on this frame, the subsequent image area is determined, feature recognition and multi-task processing are performed, and a multi-branch network is used for hand detection, key point identification and status classification to avoid Use the depth image acquisition component.

Benefits of technology

It reduces the implementation cost, improves the accuracy and efficiency of hand detection, provides rich recognition information, supports gesture interaction functions, and shortens the time for information acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113469017B
    Figure CN113469017B
Patent Text Reader

Abstract

The embodiment of the present invention discloses an image processing method, device and electronic device. The method comprises: obtaining multiple frames of two-dimensional images containing a target object; detecting the hand of the first two-dimensional image in the multiple frames of two-dimensional images, and obtaining an initial detection frame of the hand of the target object in the first two-dimensional image; determining a first area in a second two-dimensional image based on the area of ​​the initial detection frame in the first two-dimensional image, and obtaining at least one of the detection frame of the hand, the key point information of the hand and the state category information corresponding to the hand in the second two-dimensional image based on the pixel points in the first area in the second two-dimensional image; the second two-dimensional image is a frame image after the first two-dimensional image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to image processing technology, and in particular to an image processing method, device and electronic equipment. Background Art

[0002] In recent years, touch interaction has been widely used and designed in mobile terminals such as mobile phones and tablets, and the interactive experience has been greatly improved. In recent years, gesture interaction (gesture operation in the air) has become a new technology that manufacturers are exploring and pursuing. At present, gesture interaction collects data through depth cameras or infrared cameras, which is costly and unstable. Summary of the invention

[0003] In order to solve the existing technical problems, the embodiments of the present invention provide an image processing method, device and electronic device.

[0004] To achieve the above object, the technical solution of the embodiment of the present invention is implemented as follows:

[0005] An embodiment of the present invention provides an image processing method, the method comprising:

[0006] Acquire multiple frames of two-dimensional images containing the target object;

[0007] Detecting a hand in a first two-dimensional image of the multiple two-dimensional image frames to obtain an initial detection frame of a hand of the target object in the first two-dimensional image;

[0008] A first area in a second two-dimensional image is determined based on the area of ​​the initial detection frame in the first two-dimensional image, and at least one of the detection frame of the hand, the key point information of the hand and the state category information corresponding to the hand in the second two-dimensional image is obtained based on the pixel points in the first area in the second two-dimensional image; the second two-dimensional image is a frame image after the first two-dimensional image.

[0009] In the above solution, the obtaining, based on the pixel points in the first area in the second two-dimensional image, at least one of the detection frame of the hand, the key point information of the hand, and the state category information corresponding to the hand in the second two-dimensional image includes:

[0010] shearing the second three-dimensional image according to the first region to obtain a sheared image;

[0011] Perform feature recognition on the cut image, and determine at least one of a detection frame of the hand, key point information of the hand, and state category information corresponding to the hand based on the recognized features.

[0012] In the above solution, the method further includes: performing hand detection on the cut-out image based on the identified features to obtain determination information on whether the cut-out image includes a hand.

[0013] In the above scheme, the performing feature recognition on the cut image and determining at least one of the detection frame of the hand, the key point information of the hand and the state category information corresponding to the hand based on the recognized features includes: performing feature recognition on the cut image through a feature extraction part of a first network to obtain a feature image set, wherein the feature image set includes a plurality of feature images with different receptive fields;

[0014] Input at least part of the feature images in the feature image set to the first network, so as to perform at least one of the following through the first network:

[0015] Performing hand detection on the feature image input to the first network based on the first branch in the first network to obtain a detection frame of the hand;

[0016] Performing hand key point detection on the feature image input to the first network based on the second branch in the first network to obtain key point information of the hand;

[0017] Based on the third branch in the first network, hand state recognition is performed on the feature image input into the first network to obtain state category information corresponding to the hand state;

[0018] Among them, the feature image input to the first network has at least some different weight parameters among the multiple weight parameters corresponding to the first branch, the second branch and the third branch respectively.

[0019] In the above scheme, the method also includes: performing hand detection on the feature image input to the first network based on the fourth branch in the first network to obtain discrimination information of whether the cut image includes a hand; wherein, the feature image input to the first network, the multiple weight parameters corresponding to the fourth branch, are different from at least some of the weight parameters of the multiple weight parameters corresponding to the multiple feature images in the first branch, the second branch and the third branch respectively.

[0020] In the above scheme, the method also includes: in response to the judgment information indicating that the cut image does not include a hand, re-detecting the hand in the second two-dimensional image to obtain a detection frame of the hand of the target object in the second two-dimensional image.

[0021] In the above solution, the determining the first area in the second two-dimensional image based on the area of ​​the initial detection frame in the first two-dimensional image includes:

[0022] Performing equal-amplitude magnification processing on the area of ​​the initial detection frame in the first two-dimensional image to obtain a second area;

[0023] A first area corresponding to a position range of the second area in the second two-dimensional image is determined according to the second area.

[0024] In the above solution, before determining the first area in the second two-dimensional image based on the area of ​​the initial detection frame in the first two-dimensional image, the method further includes:

[0025] Detecting a hand in a third two-dimensional image among the multiple frames of two-dimensional images, and determining a position of the hand in the third two-dimensional image; the third two-dimensional image is an image frame before the second two-dimensional image;

[0026] The movement trend of the hand is determined based on the position of the hand in the third two-dimensional image and the position of the hand in the first two-dimensional image.

[0027] In the above solution, the determining the first area in the second two-dimensional image based on the area of ​​the initial detection frame in the first two-dimensional image includes:

[0028] Based on the movement trend of the hand, the area of ​​the initial detection frame in the first two-dimensional image is enlarged to obtain a second area; in the area of ​​the initial detection frame in the first two-dimensional image, the enlargement amplitude of the sub-area corresponding to the movement trend is greater than the enlargement amplitude of other sub-areas except the sub-area;

[0029] A first area corresponding to a position range of the second area in the second two-dimensional image is determined according to the second area.

[0030] The embodiment of the present invention further provides an image processing device, the device comprising: an acquisition unit, a detection unit, a determination unit and a processing unit; wherein,

[0031] The acquisition unit is used to obtain multiple frames of two-dimensional images containing the target object;

[0032] The detection unit is used to detect a hand in a first two-dimensional image of the multiple two-dimensional image frames, and obtain an initial detection frame of the hand of the target object in the first two-dimensional image;

[0033] The determining unit is configured to determine a first area in the second two-dimensional image based on an area of ​​the initial detection frame in the first two-dimensional image;

[0034] The processing unit is used to obtain at least one of the following information: a detection frame of the hand, key point information of the hand, and state category information corresponding to the hand in the second two-dimensional image based on pixel points in the first area in the second two-dimensional image; the second two-dimensional image is a frame image after the first two-dimensional image.

[0035] In some optional embodiments of the present invention, the processing unit is used to cut the second three-dimensional image according to the first area to obtain a cut image, perform feature recognition on the cut image, and determine at least one of the detection frame of the hand, the key point information of the hand, and the state category information corresponding to the hand based on the recognized features.

[0036] In some optional embodiments of the present invention, the processing unit is further used to perform hand detection on the cutout image based on the identified features to obtain discrimination information of whether the cutout image includes a hand.

[0037] In some optional embodiments of the present invention, the processing unit is used to perform feature recognition on the cut image through a feature extraction part of the first network to obtain a feature image set, wherein the feature image set includes a plurality of feature images with different receptive fields; and input at least part of the feature images in the feature image set into the first network to perform at least one of the following through the first network:

[0038] Performing hand detection on the feature image input to the first network based on the first branch in the first network to obtain a detection frame of the hand;

[0039] Performing hand key point detection on the feature image input to the first network based on the second branch in the first network to obtain key point information of the hand;

[0040] Based on the third branch in the first network, hand state recognition is performed on the feature image input into the first network to obtain state category information corresponding to the hand state;

[0041] Among them, the feature image input to the first network has at least some different weight parameters among the multiple weight parameters corresponding to the first branch, the second branch and the third branch respectively.

[0042] In some optional embodiments of the present invention, the processing unit is further used to perform hand detection on the feature image input to the first network based on the fourth branch in the first network to obtain discrimination information of whether the cut image includes a hand; wherein, the feature image input to the first network, the multiple weight parameters corresponding to the fourth branch, are different from at least some of the weight parameters of the multiple weight parameters corresponding to the multiple feature images in the first branch, the second branch and the third branch respectively.

[0043] In some optional embodiments of the present invention, the detection unit is further used to re-detect the hand in the second two-dimensional image in response to the discrimination information obtained by the processing unit indicating that the cut image does not include the hand, so as to obtain an initial detection frame of the hand of the target object in the second two-dimensional image.

[0044] In some optional embodiments of the present invention, the determination unit is used to perform equal-amplification processing on the area of ​​the initial detection frame in the first two-dimensional image to obtain a second area; and determine, based on the second area, a first area in the second two-dimensional image corresponding to the position range of the second area.

[0045] In some optional embodiments of the present invention, the device also includes a trend detection unit, which is used to detect a hand in a third two-dimensional image among the multiple frames of two-dimensional images, and determine the position of the hand in the third two-dimensional image; the third two-dimensional image is a frame image before the second two-dimensional image; and the movement trend of the hand is determined based on the position of the hand in the third two-dimensional image and the position of the hand in the first two-dimensional image.

[0046] In some optional embodiments of the present invention, the determination unit is used to enlarge the area of ​​the initial detection frame in the first two-dimensional image based on the movement trend of the hand to obtain a second area; in the area of ​​the initial detection frame in the first two-dimensional image, the enlargement amplitude of the sub-area corresponding to the movement trend is greater than the enlargement amplitude of other sub-areas except the sub-area; based on the second area, determine the first area in the second two-dimensional image corresponding to the position range of the second area.

[0047] The embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the method described in the embodiment of the present invention are implemented.

[0048] An embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the embodiment of the present invention when executing the program.

[0049] The image processing method, device and electronic device provided by the embodiments of the present invention detect the hand in the first two-dimensional image to obtain the initial detection frame of the hand, and then determine the pixel points in the first area of ​​the subsequent image (the second two-dimensional image) based on the initial detection frame to obtain at least one of the detection frame of the hand, the key point information of the hand and the state category information corresponding to the hand in the second two-dimensional image. On the one hand, there is no need to use a depth camera or infrared camera for depth image acquisition components, which greatly reduces the implementation cost; on the other hand, the detection frame of the hand, the key point information of the hand and the state category information corresponding to the hand are obtained by multi-tasking processing, and the recognition information is rich, which provides support for subsequent gesture interaction functions and shortens the time for information acquisition. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 FIG. 1 is a flow chart of an image processing method according to an embodiment of the present invention. Figure 1 ;

[0051] Figure 2 FIG. 1 is a flow chart of an image processing method according to an embodiment of the present invention. Figure 2 ;

[0052] Figure 3 is a method flow diagram of step 1032 in the image processing method according to an embodiment of the present invention;

[0053] Figure 4 A schematic diagram of key points of a hand in an image processing method according to an embodiment of the present invention;

[0054] Figure 5 is a schematic diagram of the structure of a first network in an image processing method according to an embodiment of the present invention;

[0055] Figure 6 is a schematic diagram of the composition structure of an image processing device according to an embodiment of the present invention;

[0056] Figure 7 The figure is a schematic diagram of the hardware structure of the electronic device according to the embodiment of the present invention. DETAILED DESCRIPTION

[0057] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0058] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.

[0059] The term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. In addition, "many" in this article means two or more than two.

[0060] An embodiment of the present invention provides an image processing method. Figure 1 FIG. 1 is a flow chart of an image processing method according to an embodiment of the present invention. Figure 1 ;like Figure 1 As shown, the method includes:

[0061] Step 101: obtaining a plurality of two-dimensional images containing a target object;

[0062] Step 102: Detecting a hand in a first two-dimensional image of the plurality of two-dimensional image frames to obtain an initial detection frame of a hand of the target object in the first two-dimensional image;

[0063] Step 103: Determine a first area in a second two-dimensional image based on the area of ​​the initial detection frame in the first two-dimensional image, and obtain at least one of the detection frame of the hand, the key point information of the hand, and the state category information corresponding to the hand in the second two-dimensional image based on the pixel points in the first area in the second two-dimensional image; the second two-dimensional image is a frame image after the first two-dimensional image.

[0064] The image processing method of this embodiment can be applied to an image processing device, and the image processing device can be set in an electronic device with processing functions such as a personal computer and a server. The electronic device can also be a display device such as a smart TV, a projector, a smart screen, an outdoor display machine, or can be implemented by a processor or a chip executing a computer program.

[0065] In this embodiment, the above-mentioned multi-frame two-dimensional images can be continuous videos collected by an image acquisition device built into or external to the electronic device, or can also be videos received and transmitted by other electronic devices, etc. In some optional embodiments, the electronic device may include an image acquisition component (such as a camera), and obtains multi-frame two-dimensional images containing the target object through the image acquisition component. In other optional embodiments, the electronic device may include a communication component, and obtains multi-frame two-dimensional images containing the target object collected by other cameras (such as cameras independently set in the image acquisition area, or cameras in other electronic devices) through the communication component. Exemplarily, taking the electronic device as a mobile phone as an example, the multi-frame two-dimensional images containing the target object can be collected by the front camera of the mobile phone. In other optional embodiments, the above-mentioned multi-frame two-dimensional images can also be videos stored in local or other video libraries.

[0066] Exemplarily, the image acquisition device (or image acquisition component) can be an ordinary camera, and does not need to be a camera with depth data acquisition such as a depth camera or an infrared camera. Exemplarily, the above-mentioned multi-frame two-dimensional image can be, for example, an RGB image. The embodiment of the present application can use an ordinary image acquisition device (or image acquisition component) to obtain an ordinary two-dimensional image, and identify relevant information of the hand based on the ordinary two-dimensional image, without the need to use a depth camera or infrared camera for depth images. The depth image acquisition component greatly reduces the implementation cost.

[0067] It should be noted that the two-dimensional image in this embodiment may be simply referred to as an image.

[0068] In this embodiment, the target object may specifically be a target person; the target person may specifically be a person in the foreground of the image; or the target person may be a designated person in the image.

[0069] In this embodiment, each frame of the multi-frame two-dimensional image can be called a frame image, which is the smallest unit of the video (i.e., the image to be processed). It can be understood that the multi-frame two-dimensional image is a group of time-continuous frame images, and the multi-frame two-dimensional image is formed according to the acquisition time of each frame image, and the time parameters corresponding to each frame image are continuous. Exemplarily, taking the target object as a real person as an example, when the multi-frame two-dimensional image includes the target object, the time range corresponding to the multi-frame two-dimensional image may include one or more target objects, or one or more target objects may be included in a partial time range of the time range of the multi-frame two-dimensional image, which is not limited in this embodiment.

[0070] In this embodiment, the first two-dimensional image is any one of the multiple two-dimensional images. Optionally, the first two-dimensional image may be the first frame of the multiple two-dimensional images; the second image is a two-dimensional image after the first two-dimensional image. The second two-dimensional image may be a frame of the first two-dimensional image that is continuous in time with the first two-dimensional image. For example, the multiple two-dimensional images include 10 frames of images, the first two-dimensional image is the second frame of the 10 frames, and the second two-dimensional image is the third frame of the image. Alternatively, the second two-dimensional image may also be a frame of the first two-dimensional image that is separated from the first two-dimensional image by a preset number of frames. For example, the multiple two-dimensional images include 20 frames of images, the first two-dimensional image is the second frame of the 20 frames, and assuming that the preset number of frames is 3, the second two-dimensional image may be the sixth frame of the 20 frames. The preset number may be preset according to actual conditions, for example, the preset number may be preset according to the moving speed of the target object. This implementation can effectively reduce the amount of data processing, thereby reducing the consumption of the image processing device.

[0071] In this embodiment, the hand in the first two-dimensional image can be detected by the target detection network to obtain an initial detection frame of the hand of the target object in the first two-dimensional image. The above target detection network can be obtained by training sample images marked with detection frames of the hands, and the hand in the image can be detected to obtain an initial detection frame of the hand. Among them, the above target detection network can adopt any network structure that can detect the hand of the target object, which is not limited in this embodiment.

[0072] Exemplarily, the first two-dimensional image may be subjected to feature extraction through the target detection network, and two diagonal coordinates of the region where the hand of the target object is located, or the coordinates of the four corners of the region where the hand is located, may be determined based on the extracted feature map. Taking the two diagonal coordinates as an example, they may be the coordinates of the upper left corner and the lower right corner, and then the initial detection frame of the hand may be obtained according to the determined coordinates of the upper left corner and the lower right corner.

[0073] In some optional embodiments, determining the first area in the second two-dimensional image based on the area of ​​the initial detection box in the first two-dimensional image includes: performing equal-amplification processing on the area of ​​the initial detection box in the first two-dimensional image to obtain the second area; and determining, based on the second area, a first area in the second two-dimensional image corresponding to the position range of the second area.

[0074] For example, if the height of the initial detection frame is H and the width is W, the center point of the region can be taken as the center, and the four sides of the region can be extended in the direction away from the center point, for example, in the height direction, H / 4 is extended in the direction away from the center point, and in the width direction, W / 4 is extended in the direction away from the center point, to obtain the second region. Of course, the degree of enlargement of the region where the initial detection frame is located in this embodiment is not limited to the above, and other degree parameters of enlargement processing can also be within the protection scope of this embodiment.

[0075] In other optional embodiments, before determining the first area in the second two-dimensional image based on the area of ​​the initial detection frame in the first two-dimensional image, the method also includes: detecting a hand in a third two-dimensional image in the multiple frames of two-dimensional images, and determining the position of the hand in the third two-dimensional image; the third two-dimensional image is a frame image before the second two-dimensional image; and determining the movement trend of the hand based on the position of the hand in the third two-dimensional image and the position of the hand in the first two-dimensional image.

[0076] The method of determining the first area in the second two-dimensional image based on the area of ​​the initial detection frame in the first two-dimensional image includes: enlarging the area of ​​the initial detection frame in the first two-dimensional image based on the movement trend of the hand to obtain the second area; in the area of ​​the initial detection frame in the first two-dimensional image, the enlargement amplitude of the sub-area corresponding to the movement trend is greater than the enlargement amplitude of other sub-areas except the sub-area; and determining the first area in the second two-dimensional image corresponding to the position range of the second area based on the second area.

[0077] In this embodiment, since the hand may be in a fast-moving state, for example, the initial detection frame of the hand is detected in area A in the first two-dimensional image, and only part of the hand may be detected or even no hand may be detected in area A in the second two-dimensional image. Based on this, in this embodiment, the movement trend of the hand is first determined according to the position of the hand in the third two-dimensional image and the position of the hand in the first two-dimensional image, and then the area of ​​the initial detection frame in the first two-dimensional image is amplified by non-uniform amplitudes according to the movement trend of the hand to obtain the second area.

[0078] Exemplarily, if the third two-dimensional image is a frame of image after the first two-dimensional image and before the second two-dimensional image, the displacement between the two positions can be determined according to the position of the hand in the third two-dimensional image and the position of the hand in the first two-dimensional image, the direction of the displacement represents the direction of movement of the hand, and the magnitude of the displacement represents the distance moved by the hand within the corresponding time range between the third two-dimensional image and the first two-dimensional image. Further, the area of ​​the initial detection frame in the first two-dimensional image can be enlarged according to the displacement to obtain the second area.

[0079] Exemplarily, the direction of displacement corresponds to the sub-region. For example, a plane coordinate system is established with the center point of the image as the origin. If the direction of displacement is the positive direction of the x-axis, in the process of enlarging the area of ​​the initial detection frame in the first two-dimensional image to obtain the second area, if the height of the initial detection frame is H and the width is W, the center point of this area can be taken as the center, and the four sides of the area are extended in the direction away from the center point, and the extension amplitude in the positive direction of the x-axis is greater than the extension amplitude in other directions. For example, in the height direction, H / 4 is extended in the direction away from the center point, and in the width direction, W / 4 is extended in the negative direction of the x-axis, and W / 2 is extended in the positive direction of the x-axis to obtain the second area. Of course, in this embodiment, the expansion parameter for the sub-region can be determined according to the magnitude of the above displacement. If the moving speed of the hand is large, the expansion parameter of the sub-region can be correspondingly large. If the moving speed of the hand is small, the expansion parameter of the sub-region can also be correspondingly small. This reduces the probability of the hand not being detected in the first area of ​​the second two-dimensional image.

[0080] In this embodiment, according to the second area obtained after the area where the initial detection frame is located is enlarged, the first area in the second two-dimensional image corresponding to the position range of the second area can be determined. Optionally, the size of the second area needs to meet the condition. Since the technical solution of obtaining the hand in the second two-dimensional image based on hand tracking in the first two-dimensional image is adopted, the first two-dimensional image and the second two-dimensional image are two adjacent frames of images or images that are close in acquisition time, then the size of the same hand corresponding to the same target object in the first two-dimensional image and the second two-dimensional image is usually similar in the first two-dimensional image and the second two-dimensional image; based on this, the size of the second area needs to meet the condition that: the enlargement ratio of the size of the second area relative to the size of the initial detection frame is not greater than the first threshold, that is, the ratio of the size of the hand of the target object in the second area to the size of the second area must be greater than or equal to the second threshold, and correspondingly, the ratio of the size of the hand in the first area to the size of the first area must be greater than or equal to the second threshold. In this way, the proportion of the area occupied by the hand in the image is large, and the effective data is more, so that the information related to the hand can be better obtained by processing through the first network.

[0081] In this embodiment, the first area in the second two-dimensional image is determined according to the area of ​​the initial detection frame in the first two-dimensional image, and then the detection frame of the hand in the second two-dimensional image, the key point information of the hand, and at least one of the state category information corresponding to the hand are obtained based on the pixels in the first area in the second two-dimensional image and the first network. That is, the pixels in the first area in the second two-dimensional image are used as the input values ​​of the first network, and the detection frame of the hand in the second two-dimensional image, the key point information of the hand, and at least one of the state category information corresponding to the hand can be obtained through processing by the first network.

[0082] By adopting the technical solution of the embodiment of the present invention, the initial detection frame of the hand is obtained by detecting the hand in the first two-dimensional image, and then the pixel points in the first area of ​​the subsequent image (the second two-dimensional image) are determined based on the initial detection frame to obtain at least one of the detection frame of the hand, the key point information of the hand, and the state category information corresponding to the hand in the second two-dimensional image. On the one hand, there is no need to use a depth camera or infrared camera for depth image acquisition components, which greatly reduces the implementation cost; on the other hand, the detection frame of the hand, the key point information of the hand, and the state category information corresponding to the hand are obtained by multi-tasking processing, and the recognition information is rich, which provides support for subsequent gesture interaction functions and shortens the time for information acquisition.

[0083] Figure 2 FIG. 1 is a flow chart of an image processing method according to an embodiment of the present invention. Figure 2;exist Figure 1 Based on the embodiment shown, in this embodiment, step 103 may further include:

[0084] Step 1031: cutting the second three-dimensional image according to the first region to obtain a cut image;

[0085] Step 1032: Perform feature recognition on the cut image, and determine at least one of the detection frame of the hand, key point information of the hand, and state category information corresponding to the hand based on the recognized features.

[0086] In this embodiment, the cut image is feature recognized based on the first network, and at least one of the detection frame of the hand, the key point information of the hand, and the state category information corresponding to the hand is determined based on the recognized features. Therefore, the second three-dimensional image needs to be cut according to the first area so that the obtained cut image meets the size of the input image of the first network. Exemplarily, the size of the cut image can be 80*80.

[0087] Alternatively, if Figure 3 As shown, step 1032 may include:

[0088] Step 10321: performing feature recognition on the cut image through the feature extraction part of the first network to obtain a feature image set, wherein the feature image set includes a plurality of feature images with different receptive fields;

[0089] Step 10322: Perform hand detection on the feature image input to the first network based on the first branch in the first network to obtain a detection frame of the hand;

[0090] Step 10323: performing hand key point detection on the feature image input to the first network based on the second branch in the first network to obtain the hand key point information;

[0091] Step 10324: Based on the third branch in the first network, perform hand state recognition on the feature image input to the first network to obtain state category information corresponding to the hand state.

[0092] In this embodiment, among the plurality of weight parameters respectively corresponding to the feature image input to the first network in the first branch, the second branch and the third branch, at least some of the weight parameters are different.

[0093] In this embodiment, the execution order of the above steps 10322 to 10324 is not limited to that shown above, and the above steps 10322 to 10324 can be executed in parallel.

[0094] In this embodiment, on the one hand, the first network includes a feature extraction part, which performs feature extraction on the cut image through the feature extraction part to obtain multiple feature images with different receptive fields (i.e., a set of feature images). Exemplarily, the feature extraction part of the first network has convolution kernels of multiple sizes, and the cut image is respectively subjected to feature extraction through convolution kernels of multiple sizes, thereby obtaining multiple feature images processed by convolution kernels of different sizes. The receptive field of the feature image corresponds to the size of the convolution kernel. Therefore, the feature image processed by the convolution kernel of a small size has a smaller corresponding receptive field, that is, the feature image is more focused on local features; the feature image processed by the convolution kernel of a large size has a larger corresponding receptive field, that is, the feature image is more focused on global features.

[0095] On the other hand, the first network has at least three branches, namely: a first branch, a second branch and a third branch; wherein the first branch is used to obtain a detection frame of the hand, the second branch is used to obtain key point information of the hand, and the third branch is used to identify the state of the hand, thereby obtaining state category information corresponding to the state of the hand. Since the tasks of each branch are different, the feature images input to each branch have different weight parameters in the first branch, the second branch and the third branch. Exemplarily, a plurality of feature images with different receptive fields are respectively input to the first branch, the second branch and the third branch. Since the tasks of each branch are different, the emphasis of the required features is also different. Therefore, the weight parameters of the plurality of weight parameters corresponding to each feature image in the first branch, the second branch and the third branch are different. For example, for the first branch, the detection frame used to detect the hand focuses on the shape of the hand and the overall state of the hand. The weight parameter corresponding to the feature image with a larger receptive field can be relatively large, and the weight parameter corresponding to the feature image with a smaller receptive field can be relatively small. For another example, for the second branch, which is used to detect the key points of the hand, the focus is on the local information of the hand. The weight parameter corresponding to the feature image with a smaller receptive field can be relatively large, and the weight parameter corresponding to the feature image with a larger receptive field can be relatively small.

[0096] In some optional embodiments, the key points of the hand can refer to Figure 4As shown, the key points of the hand may include at least one of the following: wrist key points, finger joint key points, finger tip (TIP) key points, etc.; wherein, the finger joint key points may include at least one of the following: metacarpophalangeal point (MCP) key point, proximal interphalangeal point (PIP) key point, distal interphalangeal point (DIP) key point. The fingers may include at least one of the following: thumb (Thumb), index finger (Index), middle finger (Middle), ring finger (Ring), little finger (Little); as shown in FIG. Figure 2 As shown, the wrist key points may include key point P1; the thumb key points may include at least one of P2, P3, and P4; the index finger key points may include at least one of P5, P6, P7, and P8; the middle finger key points may include P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P49, P50, P51, P52, P53, P54, P55 10 , P 11 , P 12 At least one key point in the ring finger; the ring finger key point may include P 13 , P 14 , P 15 , P 16 At least one key point in the little finger (Little) key point may include P 17 , P 18 , P 19 , P 20 At least one key point in .

[0097] In some optional embodiments, the hand state can be, for example, a palm state, a fist state, or other hand forms. Exemplarily, if the five fingers of the hand are open, the palm is facing the image acquisition component, or the back of the hand is facing the image acquisition component, it can be determined that the hand is in the palm state; or if the hand is clenched into a fist, the palm is facing the image acquisition component, or the back of the hand is facing the image acquisition component, it can be determined that the hand is in the fist state. Of course, the hand state in this embodiment is not limited to the above examples, and other hand states may also be within the protection scope of this embodiment.

[0098] In this embodiment, the state category information may be a pre-set or pre-defined hand state category. If the electronic device detects that the hand state corresponds to a pre-set or defined state category information, the electronic device may execute a corresponding instruction based on the state category information. It can be considered that the hand state corresponds to N states, the state category information is M, and N is a positive integer greater than or equal to M.

[0099] In some optional embodiments of the present invention, the above method may further include: performing hand detection on the cutout image based on the identified features to obtain discrimination information of whether the cutout image includes a hand.

[0100] Alternatively, if Figure 3 As shown, after step 10321, the following steps may also be included:

[0101] Step 10325: performing hand detection on the feature image input to the first network based on the fourth branch in the first network to obtain discrimination information of whether the cut image includes a hand;

[0102] Among them, the multiple weight parameters corresponding to the feature image input to the first network in the fourth branch are different from at least some of the weight parameters corresponding to the multiple feature images in the first branch, the second branch and the third branch respectively.

[0103] In which, in response to the judgment information indicating that the cut image does not include a hand, the hand of the second two-dimensional image is re-detected to obtain an initial detection frame of the hand of the target object in the second two-dimensional image.

[0104] In this embodiment, the execution order of the above-mentioned step 10325 and the above-mentioned steps 10322 to 10324 is not limited to that shown above, and the above-mentioned steps 10322 to 10325 can be executed in parallel.

[0105] In this embodiment, the fourth branch is used to process multiple feature images to obtain the discrimination information of whether the cut image includes the hand. Exemplarily, the output result of the fourth branch can be "1" or "0", "1" indicates the discrimination result that the cut image includes the hand; "0" indicates the discrimination result that the cut image does not include the hand. If the cut image does not include the hand, it can be indicated that the hand is not tracked in the second two-dimensional image, and it is necessary to re-detect the initial detection frame of the hand of the target object in the second two-dimensional image through the detection method of step 102.

[0106] For example, Figure 5 FIG. 1 is a schematic diagram of the structure of the first network in the image processing method according to an embodiment of the present invention; Figure 5As shown, the first network at least includes a feature extraction part and a first branch, a second branch, a third branch and a fourth branch. The feature extraction part performs feature extraction on the cut hand image to obtain a feature image set, and the feature image set includes multiple feature images with different receptive fields; then the feature image set is used as input data of the first branch, the second branch, the third branch and the fourth branch respectively, so as to obtain the hand detection frame, the hand key point information, the hand state category information and the loss information (the loss information is also the judgment result indicating whether the hand is included in the cut image) output by each branch respectively.

[0107] The feature extraction layer and the first branch network, the second branch network, the third branch network and the fourth branch network all include multiple convolution layers to perform convolution processing on the image through the convolution layer. The second branch network is also provided with a heat map network layer to regress the key points of the hand. The first branch network, the third branch network and the fourth branch network are also provided with a fully connected layer.

[0108] The embodiment of the present invention also provides an image processing device. Figure 6 FIG. 1 is a schematic diagram of the structure of an image processing device according to an embodiment of the present invention; Figure 6 As shown, the device includes: an acquisition unit 31, a detection unit 32, a determination unit 33 and a processing unit 34; wherein,

[0109] The acquisition unit 31 is used to obtain multiple frames of two-dimensional images containing the target object;

[0110] The detection unit 32 is used to detect the hand of the first two-dimensional image in the multiple two-dimensional image frames, and obtain an initial detection frame of the hand of the target object in the first two-dimensional image;

[0111] The determining unit 33 is used to determine a first area in the second two-dimensional image based on an area of ​​the initial detection frame in the first two-dimensional image;

[0112] The processing unit 34 is used to obtain at least one of the following information: a detection frame of the hand, key point information of the hand, and state category information corresponding to the hand in the second two-dimensional image based on pixel points in the first area in the second two-dimensional image; the second two-dimensional image is a frame image after the first two-dimensional image.

[0113] In some optional embodiments of the present invention, the processing unit 34 is used to cut the second three-dimensional image according to the first area to obtain a cut image, perform feature recognition on the cut image, and determine at least one of the detection frame of the hand, the key point information of the hand, and the state category information corresponding to the hand based on the recognized features.

[0114] In some optional embodiments of the present invention, the processing unit 34 is further configured to perform hand detection on the cutout image based on the identified features to obtain determination information on whether the cutout image includes a hand.

[0115] In some optional embodiments of the present invention, the processing unit 34 is used to perform feature recognition on the cut image through a feature extraction part of the first network to obtain a feature image set, wherein the feature image set includes a plurality of feature images with different receptive fields; and input at least part of the feature images in the feature image set into the first network to perform at least one of the following through the first network:

[0116] Performing hand detection on the feature image input to the first network based on the first branch in the first network to obtain a detection frame of the hand;

[0117] Performing hand key point detection on the feature image input to the first network based on the second branch in the first network to obtain key point information of the hand;

[0118] Based on the third branch in the first network, hand state recognition is performed on the feature image input into the first network to obtain state category information corresponding to the hand state;

[0119] Among them, the feature image input to the first network has at least some different weight parameters among the multiple weight parameters corresponding to the first branch, the second branch and the third branch respectively.

[0120] In some optional embodiments of the present invention, the processing unit 34 is further used to perform hand detection on the feature image input to the first network based on the fourth branch in the first network to obtain discrimination information of whether the cut image includes a hand; wherein, the feature image input to the first network, the multiple weight parameters corresponding to the fourth branch, are different from at least some of the weight parameters of the multiple weight parameters corresponding to the multiple feature images in the first branch, the second branch and the third branch respectively.

[0121] In some optional embodiments of the present invention, the detection unit 32 is further used to re-detect the hand in the second two-dimensional image in response to the judgment information obtained by the processing unit 34 indicating that the cut image does not include the hand, so as to obtain an initial detection frame of the hand of the target object in the second two-dimensional image.

[0122] In some optional embodiments of the present invention, the determination unit 33 is used to perform equal-amplification processing on the area of ​​the initial detection frame in the first two-dimensional image to obtain a second area; and determine, based on the second area, a first area in the second two-dimensional image corresponding to the position range of the second area.

[0123] In some optional embodiments of the present invention, the device also includes a trend detection unit, which is used to detect a hand in a third two-dimensional image among the multiple frames of two-dimensional images, and determine the position of the hand in the third two-dimensional image; the third two-dimensional image is a frame image before the second two-dimensional image; and the movement trend of the hand is determined based on the position of the hand in the third two-dimensional image and the position of the hand in the first two-dimensional image.

[0124] In some optional embodiments of the present invention, the determination unit 33 is used to enlarge the area of ​​the initial detection frame in the first two-dimensional image based on the movement trend of the hand to obtain a second area; in the area of ​​the initial detection frame in the first two-dimensional image, the enlargement amplitude of the sub-area corresponding to the movement trend is greater than the enlargement amplitude of other sub-areas except the sub-area; based on the second area, determine the first area in the second two-dimensional image corresponding to the position range of the second area.

[0125] In the embodiment of the present invention, the acquisition unit 31, the detection unit 32, the determination unit 33, the processing unit 34 and the trend detection unit in the image processing device can be implemented by a central processing unit (CPU), a digital signal processor (DSP), a microcontroller unit (MCU) or a programmable gate array (FPGA) in practical applications.

[0126] It should be noted that: when the image processing device provided in the above embodiment performs image processing, only the division of the above program modules is used as an example. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the above-described processing. In addition, the image processing device provided in the above embodiment and the image processing method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0127] An embodiment of the present invention further provides an electronic device. Figure 7 FIG. 1 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Figure 7As shown, the electronic device includes a memory 42, a processor 41, and a computer program stored in the memory 42 and executable on the processor 41. When the processor 41 executes the program, the steps of the image processing method described in the embodiment of the present invention are implemented.

[0128] Optionally, the components in the electronic device are coupled together via a bus system 43. It is understood that the bus system 43 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 43 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 7 Various buses are labeled as bus system 43 .

[0129] It can be understood that the memory 42 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memory 42 described in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.

[0130] The method disclosed in the above embodiment of the present invention can be applied to the processor 41, or implemented by the processor 41. The processor 41 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 41 or the instruction in the form of software. The above processor 41 can be a general-purpose processor, a DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 41 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiment of the present invention. The general-purpose processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present invention, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory 42. The processor 41 reads the information in the memory 42 and completes the steps of the above method in combination with its hardware.

[0131] In an exemplary embodiment, the electronic device may be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), FPGA, general purpose processor, controller, MCU, microprocessor, or other electronic components to execute the aforementioned method.

[0132] In an exemplary embodiment, the present invention also provides a computer-readable storage medium, such as a memory 42 including a computer program, and the computer program can be executed by a processor 41 of an electronic device to complete the steps of the aforementioned method. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disk, or CD-ROM; or it can be various devices including one or any combination of the above memories.

[0133] The computer-readable storage medium provided by the embodiment of the present invention stores a computer program, which, when executed by a processor, implements the steps of the image processing method described in the embodiment of the present invention.

[0134] The methods disclosed in several method embodiments, device embodiments, equipment embodiments, etc. provided in this application can be arbitrarily combined without conflict to obtain new method embodiments, device embodiments, equipment embodiments, etc.

[0135] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0136] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0137] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0138] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium, which, when executed, executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, disks or optical disks.

[0139] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.

[0140] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. An image processing method, characterized in that: The method comprises: Acquire multiple frames of two-dimensional images containing the target object; Detecting a hand in a first two-dimensional image of the multiple two-dimensional image frames to obtain an initial detection frame of a hand of the target object in the first two-dimensional image; Detecting a hand in a third two-dimensional image among the multiple frames of two-dimensional images, and determining a position of the hand in the third two-dimensional image; the third two-dimensional image is an image frame after the first two-dimensional image; determining a movement trend of the hand based on the position of the hand in the third two-dimensional image and the position of the hand in the first two-dimensional image; According to the movement trend of the hand, a region of the initial detection frame in the first two-dimensional image is magnified by non-uniform amplitudes to obtain a second region; Based on the second area, determine the first area in the second two-dimensional image that corresponds to the position range of the second area, and obtain the detection frame of the hand, the key point information of the hand and the state category information corresponding to the hand in the second two-dimensional image based on the pixel points in the first area in the second two-dimensional image; the second two-dimensional image is a frame image after the first two-dimensional image and the third two-dimensional image.

2. The method according to claim 1, characterized in that: The obtaining, based on the pixel points in the first area in the second two-dimensional image, a detection frame of the hand, key point information of the hand, and state category information corresponding to the hand in the second two-dimensional image includes: shearing the second two-dimensional image according to the first area to obtain a sheared image; Feature recognition is performed on the cut image, and a detection frame of the hand, key point information of the hand, and state category information corresponding to the hand are determined based on the recognized features.

3. The method according to claim 2, characterized in that The method further comprises: Hand detection is performed on the cutout image based on the identified features to obtain determination information of whether the cutout image includes a hand.

4. The method according to claim 3, characterized in that The performing feature recognition on the cut image and determining the detection frame of the hand, key point information of the hand and state category information corresponding to the hand based on the recognized features includes: Performing feature recognition on the cut image through a feature extraction part of a first network to obtain a feature image set, wherein the feature image set includes a plurality of feature images with different receptive fields; Input at least part of the feature images in the feature image set to the first network, so as to perform, through the first network: Performing hand detection on the feature image input to the first network based on the first branch in the first network to obtain a detection frame of the hand; Performing hand key point detection on the feature image input to the first network based on the second branch in the first network to obtain key point information of the hand; Based on the third branch in the first network, hand state recognition is performed on the feature image input into the first network to obtain state category information corresponding to the hand state; Among them, the feature image input to the first network has at least some different weight parameters among the multiple weight parameters corresponding to the first branch, the second branch and the third branch respectively.

5. The method according to claim 4, characterized in that The method further comprises: Performing hand detection on the feature image input to the first network based on the fourth branch in the first network to obtain discrimination information of whether the cut image includes a hand; Among them, the multiple weight parameters corresponding to the feature image input to the first network in the fourth branch are different from at least some of the weight parameters corresponding to the multiple feature images in the first branch, the second branch and the third branch respectively.

6. The method according to any one of claims 3 to 5, characterized in that: The method further comprises: In response to the determination information indicating that the cut image does not include a hand, the hand of the second two-dimensional image is re-detected to obtain a detection frame of the hand of the target object in the second two-dimensional image.

7. The method according to claim 1, characterized in that The step of performing non-uniform amplification processing on the area of ​​the initial detection frame in the first two-dimensional image to obtain the second area according to the movement trend of the hand includes: Based on the movement trend of the hand, the area of ​​the initial detection frame in the first two-dimensional image is enlarged to obtain a second area; in the area of ​​the initial detection frame in the first two-dimensional image, the enlargement amplitude of the sub-area corresponding to the movement trend is greater than the enlargement amplitude of other sub-areas except the sub-area.

8. An image processing device, characterized in that: The device comprises: an acquisition unit, a detection unit, a determination unit and a processing unit; wherein, The acquisition unit is used to obtain multiple frames of two-dimensional images containing the target object; The detection unit is used to detect a hand in a first two-dimensional image of the multiple two-dimensional image frames, and obtain an initial detection frame of the hand of the target object in the first two-dimensional image; The determination unit is used to detect the hand in the third two-dimensional image among the multiple frames of two-dimensional images, and determine the position of the hand in the third two-dimensional image; the third two-dimensional image is a frame of image after the first two-dimensional image; it is used to determine the movement trend of the hand based on the position of the hand in the third two-dimensional image and the position of the hand in the first two-dimensional image; and it is also used to determine, based on the second area, a first area in the second two-dimensional image corresponding to the position range of the second area; The processing unit is used to perform non-uniform amplification processing on the area of ​​the initial detection frame in the first two-dimensional image to obtain the second area according to the movement trend of the hand; and is also used to obtain the detection frame of the hand, the key point information of the hand and the state category information corresponding to the hand in the second two-dimensional image based on the pixel points in the first area in the second two-dimensional image; the second two-dimensional image is a frame image after the first two-dimensional image and the third two-dimensional image.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 7 are implemented.