A method, device and electronic device for obtaining depth information
By acquiring feature point position information and target processing in the face image, the problem of poor accuracy in depth information acquisition is solved, and clear and effective acquisition of face depth information is achieved.
Patent Information
- Application Number
- CN202011639724.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-31
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2040-12-31
AI Technical Summary
In the prior art, the accuracy of depth information acquisition is poor, mainly due to the loss of depth value and noise interference, resulting in a large number of black holes and outliers in the face image, affecting the full utilization of depth information.
By obtaining the position information of the M feature points of the face in the target face image, determining the target area corresponding to the feature points, and targeting the pixel points in the area are processed to remove outlier noise and background interference to obtain the target feature points, thereby obtaining clear and effective face depth information.
Effectively remove outlier noise and background interference, segment non-face areas and complete the lost depth values, significantly improving the accuracy and efficiency of face depth information acquisition.
Smart Images

Figure CN114693761B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer vision technology, and in particular to a depth information acquisition method and electronic device. Background Art
[0002] Generally, the three-dimensional information of face images promotes the development of computer vision in application fields such as face detection, 3D face recognition, and 3D liveness detection. As a universal expression of three-dimensional face information, face depth images have been widely used, and each pixel represents the distance from a certain point in the scene to the depth camera.
[0003] In the related art, the depth images collected by the depth camera often cause a large number of black holes in the face image due to the loss of depth values, resulting in the inability to fully utilize the face depth information. In addition, due to various noise interferences, the face depth map collected by the depth camera often has many outliers. In addition, due to the influence of background depth information on face depth information, the depth map often cannot fully represent the face 3D information.
[0004] Therefore, the accuracy of obtaining depth information is poor. Summary of the invention
[0005] Embodiments of the present invention provide a method, device and electronic device for acquiring depth information, which can solve the problem of poor accuracy in acquiring depth information.
[0006] In order to solve the above technical problems, the embodiments of the present invention adopt the following technical solutions:
[0007] According to a first aspect of an embodiment of the present invention, a method for acquiring depth information is provided, which is applied to an electronic device. The method for acquiring depth information comprises: acquiring M positions information of M feature points of a face in a target face image; each feature point corresponds to one position information; M is a positive integer; based on the M positions information, determining a target area corresponding to a first feature point among the M feature points; for pixel points in the target area, using a target processing method to obtain target feature points; and based on the target feature points, acquiring depth information corresponding to the face.
[0008] The second aspect of the embodiment of the present invention provides a depth information acquisition device, which includes: an acquisition module, a determination module and a processing module. The acquisition module is used to obtain M position information of M feature points of a face in a target face image; each feature point corresponds to one position information; M is a positive integer; the determination module is used to determine the target area corresponding to the first feature point of the M feature points based on the M position information; the processing module is used to obtain the target feature points by using a target processing method for the pixel points in the target area; the acquisition module is also used to obtain the depth information corresponding to the face based on the target feature points.
[0009] According to a third aspect of an embodiment of the present invention, an electronic device is provided, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the depth information acquisition method as described in the first aspect are implemented.
[0010] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the depth information acquisition method as described in the first aspect are implemented.
[0011] In an embodiment of the present invention, an electronic device can obtain M position information of M feature points of a face in a target face image; each feature point corresponds to one position information; M is a positive integer; based on the M position information, a target area corresponding to a first feature point among the M feature points is determined; for pixels in the target area, a target processing method is used to obtain target feature points; based on the target feature points, depth information corresponding to the face is obtained. In an embodiment of the present application, the method for processing face data is more efficient. Since the area corresponding to a feature point can be determined based on the position information of at least one feature point of the face in the target face image, and a target processing method is used for all pixels in the area corresponding to the feature point to remove outlier noise and background interference to obtain the target feature point, clear and effective face depth information of the face can be obtained based on the target feature point. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 One of the schematic diagrams of a method for obtaining depth information provided by an embodiment of the present invention;
[0013] Figure 2 A schematic diagram of the distribution of feature points of a facial image provided by an embodiment of the present invention;
[0014] Figure 3 A second schematic diagram of a method for obtaining depth information provided by an embodiment of the present invention;
[0015] Figure 4 A schematic diagram of a depth image result after processing according to an embodiment of the present invention;
[0016] Figure 5 A structural diagram of a depth information acquisition device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] The terms "first" and "second" in the description and claims of the embodiments of the present invention are used to distinguish different objects rather than to describe a specific order of the objects. For example, a first image and a second image are used to distinguish different inputs rather than to describe a specific order of the inputs.
[0019] In the description of the embodiments of the present invention, unless otherwise specified, the meaning of "plurality" refers to two or more than two. For example, a plurality of elements refers to two elements or more than two elements.
[0020] The term "and / or" in this document is a description of the association relationship of associated objects, indicating that there can be three relationships. For example, the display panel and / or backlight can represent: the display panel exists alone, the display panel and backlight exist at the same time, and the backlight exists alone. The symbol " / " in this document indicates that the associated objects are in an or relationship, for example, input / output means input or output.
[0021] In the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0022] The embodiment of the present invention provides a method, device and electronic device for obtaining depth information, and the electronic device can obtain M position information of M feature points of a face in a target face image; each feature point corresponds to one position information; M is a positive integer; based on the M position information, the target area corresponding to the first feature point of the M feature points is determined; for the pixel points in the target area, a target processing method is used to obtain the target feature point; based on the target feature point, the depth information corresponding to the face is obtained. In the embodiment of the present application, the method for processing face data is more efficient. Since the area corresponding to a feature point can be determined based on the position information of at least one feature point of the face in the target face image, and the target processing method is used for all the pixels in the area corresponding to the feature point to remove outlier noise and background interference to obtain the target feature point, clear and effective face depth information of the face can be obtained based on the target feature point.
[0023] A depth information acquisition method, device and electronic device provided by an embodiment of the present invention can be applied to a process in which an electronic device acquires depth information.
[0024] The electronic device in the embodiment of the present invention may be an electronic device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present invention.
[0025] In conjunction with the accompanying drawings, a picture deletion method and an electronic device provided by an embodiment of the present invention are described in detail through specific embodiments and application scenarios.
[0026] An embodiment of the present invention provides a method for obtaining depth information. Figure 1 FIG. 1 is a flow chart of a method for obtaining depth information provided by an embodiment of the present invention. Figure 1 As shown, the depth information acquisition method provided by the embodiment of the present invention may include the following steps 101 to 104.
[0027] Step 101: Obtain M pieces of position information of M feature points of the face in the target face image; each feature point corresponds to one piece of position information.
[0028] In the embodiment of the present application, M is a positive integer.
[0029] Optionally, in an embodiment of the present application, when a user captures a facial image through an electronic device and the electronic device displays a capturing interface, the user can input a "capture" control in the capturing interface so that the electronic device can capture an image through the camera of the electronic device to obtain a target facial image.
[0030] Further optionally, in an embodiment of the present application, after the electronic device captures an image through a camera, the electronic device may detect the captured image to determine whether the captured image includes a face, and if it is determined that the image includes a face, store the captured image to obtain a target face image.
[0031] Optionally, in the embodiment of the present application, the above-mentioned camera may specifically be a depth camera.
[0032] Optionally, in an embodiment of the present application, the faces in the above-mentioned target facial image may include one face or multiple faces.
[0033] In the embodiment of the present application, a face detection model is used to perform face detection on an RGB image (i.e., a target face image), and a face frame is represented by (x, y, width, height); wherein x and y represent the coordinates of the upper left corner of the face frame, and width and height represent the width and height of the face frame, respectively. Subsequently, the present invention uses a face feature point detection model to detect M feature points (e.g., 68 feature points) of the RGB face image, and the distribution of the feature point positions is as follows: Figure 2 shown.
[0034] Since the RGB image and the Depth image (i.e., the depth information image in the following embodiment) of each frame have been spatially aligned, the face frame and the 68 facial feature points of the RGB image can be located to the corresponding face area and the 68 feature point coordinates of the Depth image.
[0035] It can be understood that since the camera is a depth camera, the RGB image and the Depth image collected by the camera have been aligned in time and space, so that there is a one-to-one correspondence between the pixels of each frame of the RGB image and the Depth image, that is, the face frame coordinates of the RGB image are the face frame coordinates of the depth image, and they can be directly mapped.
[0036] Optionally, in an embodiment of the present application, the above-mentioned face detection model can specifically be any one of the following: deepface model, dlib model, YOLO model, etc.
[0037] It should be noted that for the description of the deepface model, dlib model, and YOLO model, reference can be made to the specific description in the relevant technology, and the embodiments of the present application will not be repeated here.
[0038] Step 102: Based on the M pieces of position information, determine a target area corresponding to a first feature point among the M feature points.
[0039] In the embodiment of the present application, the first feature point (i.e., nose tip point) of the Depth face image is located ( Figure 2Since the depth value of the nose tip point may be lost or interfered by noise, the present invention first locates the target area where the nose tip point is located (eg, an area of 10×10 pixels).
[0040] Step 103: For the pixel points in the target area, a target processing method is used to obtain target feature points.
[0041] In the embodiment of the present application, the above-mentioned target processing method is used to remove outlier noise and background interference of pixel points in the target area.
[0042] It should be noted that, for the description of obtaining target feature points by adopting the target processing method, reference may be made to the specific description in the following embodiments, which will not be described in detail in the embodiments of the present application.
[0043] Step 104: Based on the target feature points, obtain depth information corresponding to the face.
[0044] The depth information acquisition method provided in the embodiment of the present application can obtain M position information of M feature points of the face in the target face image; each feature point corresponds to one position information; M is a positive integer; based on the M position information, determine the target area corresponding to the first feature point in the M feature points; for the pixel points in the target area, use the target processing method to obtain the target feature points; based on the target feature points, obtain the depth information corresponding to the face. In the embodiment of the present application, the method for processing face data is more efficient. The method effectively removes outlier noise and background interference. By segmenting non-face areas and completing lost depth values, the present invention can obtain clear and effective face depth information.
[0045] Optionally, in an embodiment of the present application, when the face in the target facial image includes multiple faces, the electronic device may perform steps 101 to 104 multiple times to obtain clear and effective facial depth information of the faces.
[0046] Optionally, in the embodiment of the present application, combined with Figure 1 ,like Figure 3 As shown, before the above step 101, the depth information acquisition method provided in the embodiment of the present application may further include the following steps 201 and 202.
[0047] Step 201: Acquire the target face image and depth information image.
[0048] In this embodiment of the present application, the second image is a depth image of the face.
[0049] Step 202: perform registration processing on the target face image according to the depth information image.
[0050] The depth camera is used to collect RGB image and depth image pairs (because the depth camera has performed temporal and spatial registration on the RGB image and the depth image, there is a one-to-one correspondence between the pixels of each frame of the RGB image and the depth image).
[0051] In the embodiment of the present application, since the target face image and the depth information image can be simultaneously acquired through the depth camera, when the RGB image and the Depth image are acquired, the RGB image and the Depth image are registered in time and space, so there is a one-to-one correspondence between the pixels of each frame of the RGB image and the Depth image, which can improve the accuracy of determining the depth information of the face.
[0052] Optionally, in the embodiment of the present application, the above step 103 can be specifically implemented by the following steps 103a to 103c.
[0053] Step 103a: Acquire N pixels in the target area.
[0054] In the embodiment of the present application, N is a positive integer.
[0055] Further optionally, in an embodiment of the present application, the electronic device may perform a traversal process on the pixel points of the target area to obtain all the pixel points in the target area.
[0056] It can be understood that the target area is an area of 10×10 pixels, and the above N pixel points are all pixel points in the area, that is, 100 pixel points.
[0057] Step 103b: Determine X pixel points whose depth information meets a first preset condition from the N pixel points.
[0058] In the embodiment of the present application, X is a positive integer less than or equal to N.
[0059] In the embodiment of the present application, the first preset condition may be: the depth value is not 0, and / or the depth value is less than or equal to a preset threshold.
[0060] It can be understood that the pixels in this area whose depth value is zero or whose depth value is greater than a preset threshold (the threshold value is set to 1000, in millimeters) can be filtered out.
[0061] Step 103c: performing median processing on the depth values of the X pixel points, and determining the depth value obtained by the processing as the depth value of the target feature point to obtain the target feature point.
[0062] It can be understood that the depth values of the X pixels in the area that meet the first preset condition may be median, and the median obtained may be used as the depth value of the target feature point, that is, the nose tip point after the depth map is calibrated.
[0063] Optionally, in the embodiment of the present application, the above step 104 can be specifically implemented by the following steps 104a to 104d.
[0064] Step 104a: perform target processing on the depth information image to obtain a first depth information image.
[0065] It can be understood that the present invention can first determine the area where the face is located based on the feature points, then crop the area, and adjust the size of the cropped area to (128×128), and then map the adjusted area to a three-dimensional area, that is, a three-dimensional point cloud, to obtain a first depth information image.
[0066] Further optionally, in an embodiment of the present application, the electronic device may map each feature point of the Depth face image to a three-dimensional area one by one using an image mapping algorithm to obtain a first depth information image.
[0067] Step 104b: based on the target feature points, crop the first depth information image to obtain a second depth information image.
[0068] It can be understood that based on the obtained calibrated nose tip point (i.e., the target feature point), the first depth information image of the present invention can be ellipsoidally cropped (wherein the spherical radius threshold is set to raidus=s*105, and the scale factor s=depth.shape[0] / 256, depth.shape[0] is the height of the depth map), and then the second depth information image (i.e., the face elliptical area of the depth map) can be obtained. This method can effectively eliminate the interference of non-face areas.
[0069] Step 104c: Using the first algorithm on the second depth information image to obtain a target mask.
[0070] It can be understood that this solution first performs a binarization algorithm (i.e., the first algorithm) on the processed Depth image (i.e., the second depth information image) to obtain a target mask; then the maximum contour of the mask is calculated, and the area within the maximum contour of the mask is filled so that the depth of the area within the maximum contour is a non-zero value; then the mask is morphologically expanded to make the mask shape smoother and remove edge noise. Based on the calculation of the above mask, the present invention can locate the valid area and invalid area of the Depth face image.
[0071] Further optionally, in an embodiment of the present application, the electronic device can use a traversal algorithm based on the mask to determine pixel points with depth information of 255 from the mask, and determine the pixel points as maximum contour points respectively to obtain at least one maximum contour point, so that the electronic device can determine the maximum contour of the mask based on the at least one maximum contour point, and use a preset value (for example, "1") to fill the area within the maximum contour of the mask.
[0072] Step 104d: Based on the target mask, obtain depth information corresponding to the face.
[0073] Optionally, in the embodiment of the present application, the above step 104d can be specifically implemented by the following steps 104d1 and 104d2.
[0074] Step 104d1: Determine a third depth information map from the second depth information image according to the target mask.
[0075] Step 104d2: perform depth completion processing on pixels in the third depth information image.
[0076] It can be understood that the present invention first obtains the maximum value of the processed Depth face image (i.e., the second depth information image) according to the mask to determine the third depth information image, and then replaces the value of the depth information of 0 in the third depth information image with the obtained maximum value to prevent the zero value from interfering with the subsequent black hole completion.
[0077] Since the obtained mask can locate the valid area (i.e., the area with a mask value of 1) and the invalid area (i.e., the area with a mask value of 0) of the depth map, the present invention traverses the Depth face map. If the depth value is 0 and the corresponding mask value is non-zero, the depth value of the position is completed. The completion step is specifically as follows: first locate the area to be completed (set to 3×3 in the present invention), then filter out the pixels with a depth value of zero in the area, and perform median calculation on the pixels with non-zero depth values in the area, and finally use the median as the completed depth value.
[0078] Optionally, in the embodiment of the present application, after the above step 104d2, the depth information acquisition method provided in the embodiment of the present application may further include the following steps 301 to 304.
[0079] Step 301: Determine at least one contour point from the first depth information image.
[0080] It can be understood that the contour points of the face contour in the Depth image are located ( Figure 2 Points 1 to 17).
[0081] Step 302: Determine a plurality of contour points satisfying a second preset condition from the at least one contour point.
[0082] In the embodiment of the present application, the second preset condition may satisfy any one of the following:
[0083] AV <Vnose
[0084] BV>Vnose+100
[0085] CV<100
[0086] Here, the depth value of the contour point is assumed to be V, and the depth value of the target feature point is assumed to be Vnose.
[0087] Step 303: Determine a contour point with the second smallest depth value from the multiple contour points, and perform screening processing on the at least one contour point based on the depth value of the contour point with the second smallest depth value.
[0088] It can be understood that the remaining contour points after screening are sorted by depth value, and the contour point with the second smallest depth value is selected (the second smallest is selected because the smallest contour point may be a noise point, which can make the algorithm more robust).
[0089] The outliers in the Depth map are screened out based on the depth values of the selected contour points. Specifically, if the depth value of a point in the Depth map is less than the depth value of the contour point, the depth value of the point in the Depth map is defined as an outlier and set to 0.
[0090] Step 304: normalize the contour points after the screening process.
[0091] It can be understood that the depth map is normalized to 0-255.
[0092] The processed depth map is as follows Figure 4 As shown by Figure 4 It can be seen that the algorithm proposed in the present invention can effectively remove outlier noise and background interference, and complete the lost depth value.
[0093] The embodiment of the present invention also provides a depth information acquisition device, such as Figure 5 As shown, the depth information acquisition device 20 includes: an acquisition module 21 , a determination module 22 and a processing module 23 .
[0094] The acquisition module 21 is used to acquire M position information of M feature points of the face in the target face image; each feature point corresponds to one position information; M is a positive integer;
[0095] The determination module 22 is used to determine the target area corresponding to the first feature point among the M feature points based on the M position information;
[0096] The processing module 23 is used to obtain target feature points by using a target processing method for the pixel points in the target area;
[0097] The acquisition module 21 is further used to acquire depth information corresponding to the face based on the target feature points.
[0098] Optionally, in the embodiment of the present application, the acquisition module 21 is further used to acquire the target face image and the depth information image, and the second image is the depth image of the face;
[0099] The depth information acquisition device further includes: a registration module;
[0100] The registration module is used to perform registration processing on the target face image according to the depth information image.
[0101] Optionally, in an embodiment of the present application, the processing module 23 is specifically used to obtain N pixel points in the target area; N is a positive integer; from the N pixel points, determine X pixel points whose depth information meets the first preset condition; X is a positive integer less than or equal to N; perform median processing on the depth values of the X pixel points, and determine the processed depth value as the depth value of the target feature point to obtain the target feature point.
[0102] Optionally, in an embodiment of the present application, the acquisition module 21 is specifically used to perform target processing on the depth information image to obtain a first depth information image; based on the target feature points, the first depth information image is cropped to obtain a second depth information image; for the second depth information image, a first algorithm is used to obtain a target mask; based on the target mask, the depth information corresponding to the face is acquired.
[0103] Optionally, in an embodiment of the present application, the acquisition module 21 is specifically used to determine a third depth information map from the second depth information image according to the target mask; and perform depth completion processing on pixels in the third depth information image.
[0104] Optionally, in the embodiment of the present application, the determining module 22 is further configured to determine at least one contour point from the first depth information image; determine a plurality of contour points satisfying a second preset condition from the at least one contour point; determine a contour point having a second smallest depth value from the plurality of contour points, and perform screening processing on the at least one contour point based on the depth value of the contour point having the second smallest depth value;
[0105] The processing module is also used to perform normalization processing on the contour points after the screening processing.
[0106] The depth information acquisition device provided by the embodiment of the present invention has a more efficient method for processing face data. The method effectively removes outlier noise and background interference, and can obtain clear and effective face depth information by segmenting non-face areas and completing lost depth values.
[0107] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0108] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device 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 device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0109] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling an electronic device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0110] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
Claims
1. A depth information acquisition method, applied to an electronic device, characterized in that: The method comprises: Obtain M position information of M feature points of the face in the target face image; each feature point corresponds to one position information; M is a positive integer; Based on the M pieces of position information, determine a target area corresponding to a first feature point among the M feature points; For the pixel points in the target area, a target processing method is used to obtain target feature points; Based on the target feature points, obtaining depth information corresponding to the face; Before obtaining the M position information of the M feature points of the face in the target face image, the method further includes: Acquire the target face image and a depth information image, wherein the depth information image is a depth image of the face; Performing registration processing on the target face image according to the depth information image; Wherein, obtaining the depth information corresponding to the face based on the target feature points includes: Performing target processing on the depth information image to obtain a first depth information image; Based on the target feature points, the first depth information image is cropped to obtain a second depth information image; For the second depth information image, a binarization algorithm is used to obtain a target mask; Based on the target mask, depth information corresponding to the face is obtained.
2. The method according to claim 1, characterized in that For the pixel points in the target area, a target processing method is used to obtain target feature points, including: Obtain N pixel points in the target area; N is a positive integer; Determine, from the N pixels, X pixels whose depth information satisfies a first preset condition; X is a positive integer less than or equal to N; A median processing is performed on the depth values of the X pixel points, and the depth value obtained by the processing is determined as the depth value of the target feature point to obtain the target feature point.
3. The method according to claim 1, characterized in that The acquiring, based on the target mask, depth information corresponding to the face includes: determining, according to the target mask, a third depth information image from the second depth information image; Perform depth completion processing on the pixels in the third depth information image.
4. The method according to claim 3, characterized in that After the depth completion process is performed, the method further includes: Determining at least one contour point from the first depth information image; Determining, from the at least one contour point, a plurality of contour points that meet a second preset condition; Determine a contour point having a second smallest depth value from the plurality of contour points, and perform screening processing on the at least one contour point based on the depth value of the contour point having the second smallest depth value; Normalize the contour points after filtering.
5. A depth information acquisition device, characterized in that: The depth information acquisition device comprises: an acquisition module, a determination module and a processing module; The acquisition module is used to acquire M position information of M feature points of the face in the target face image; each feature point corresponds to one position information; M is a positive integer; The determination module is used to determine the target area corresponding to the first feature point among the M feature points based on the M position information; The processing module is used to obtain target feature points by using a target processing method for pixel points in the target area; The acquisition module is further used to acquire depth information corresponding to the face based on the target feature points; Wherein, the acquisition module is further used to acquire the target face image and the depth information image, and the depth information image is the depth image of the face; The depth information acquisition device further includes: a registration module; The registration module is used to perform registration processing on the target face image according to the depth information image; Wherein, the acquisition module is also used for: Performing target processing on the depth information image to obtain a first depth information image; Based on the target feature points, the first depth information image is cropped to obtain a second depth information image; For the second depth information image, a binarization algorithm is used to obtain a target mask; Based on the target mask, depth information corresponding to the face is obtained.
6. An electronic device, characterized in that: It comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the depth information acquisition method as described in any one of claims 1 to 4.
7. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the depth information acquisition method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Image processing method and related equipment
CN111160309A