A depth data determination method, apparatus, terminal and storage medium

By acquiring the optical parameters and disparity data of a monocular structured light depth camera and performing simplified addition and division operations, the problem of numerous steps in monocular structured light vision-to-depth calculation is solved, thus improving computational efficiency.

CN114494390BActive Publication Date: 2025-12-16SHENZHEN ORBBEC CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111677691.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-12-16
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

Existing methods for calculating depth using monocular structured light vision involve too many steps, resulting in excessive computational overhead.

Method used

By acquiring the optical parameters of the target monocular structured light depth camera, the target dividend and initial divisor are determined, and addition and division operations are performed using parallax data to simplify the calculation process.

Benefits of technology

It achieves efficient vision-to-depth calculation, reduces computational overhead, and improves computational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114494390B_ABST
    Figure CN114494390B_ABST
Patent Text Reader

Abstract

The application discloses a depth data determination method and device, a terminal and a storage medium. The divisor and the initial divisor in the application can be calculated based on optical parameters in advance. Subsequently, only parallax data needs to be obtained, and the calculation of visual-to-depth conversion can be realized through one addition operation and one division operation. The application solves the problem that the calculation method steps of monocular structured light visual-to-depth conversion in the prior art are too numerous, resulting in excessive calculation overhead.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of visual computing, and particularly relates to a depth data determination method and device, a terminal and a storage medium. BACKGROUND

[0002] With the development of computers, three-dimensional measurement has gradually become an important field of computer vision. Through three-dimensional measurement technology, face detection, industrial detection, intelligent manufacturing and the like can be realized. Among them, structure light measurement has the advantages of high precision, fast speed and the like because it does not directly contact the measured target, and has become the mainstream measurement method. The monocular structure light vision to depth calculation method in the prior art mainly includes the following steps: 1. first taking the positive and negative relationship of the dividend and the dividend, and then normalizing the dividend. Because the division needs to be in a decreasing relationship, the dividend takes the negative value of the complement, which is convenient for operation. 2. The dividend is decreased and the divisor is increased each time. 3. Until the dividend is less than the divisor, the remainder is left in the decreasing process. 4. The output result is according to the positive and negative relationship of the dividend and the dividend. It can be seen that the monocular structure light vision to depth calculation method in the prior art has too many steps, and therefore excessive calculation overhead is generated.

[0003] Therefore, the prior art still needs to be improved and developed. SUMMARY

[0004] The technical problem to be solved by the present application is that, in view of the above defects of the prior art, a depth data determination method, device, terminal and storage medium are provided, aiming at solving the problem of excessive calculation overhead caused by too many steps of the monocular structure light vision to depth calculation method in the prior art.

[0005] The technical scheme adopted by the present application to solve the problem is as follows:

[0006] In a first aspect, the present application provides a depth data determination method, wherein the method comprises:

[0007] obtaining an optical parameter corresponding to a target monocular structure light depth camera, and determining a target dividend and an initial divisor according to the optical parameter;

[0008] obtaining a position distance between a first projection point and a second projection point, and taking the position distance as parallax data, wherein the first projection point and the second projection point are generated by the same laser beam emitted by the target monocular structure light depth camera, the first reflection point corresponding to the first projection point is located on a target object, and the second reflection point corresponding to the second projection point is located on a reference plane;

[0009] According to the initial divisor and the parallax data, a target divisor is obtained by an addition operation, and according to the target dividend and the target divisor, depth data is obtained by a division operation, wherein the depth data is used to reflect a distance of the target object to the target monocular structured light depth camera.

[0010] In an embodiment, the target monocular structured light depth camera comprises a laser module and an imaging module, and the target dividend and the initial divisor are determined according to the optical parameters, comprising:

[0011] According to the optical parameters, a reference plane distance, a baseline length and a focal length are determined, wherein the reference plane distance is used to reflect a distance of the reference plane to the target monocular structured light depth camera, and the baseline length is used to reflect a distance between the laser module and the imaging module;

[0012] The target dividend is determined according to the baseline length and the focal length;

[0013] The initial divisor is determined according to the target dividend and the reference plane distance.

[0014] In an embodiment, the target dividend is determined according to the baseline length and the focal length, comprising:

[0015] The target dividend is obtained by a multiplication operation according to the baseline length and the focal length.

[0016] In an embodiment, the initial divisor is determined according to the target dividend and the reference plane distance, comprising:

[0017] The initial divisor is obtained by a division operation according to the target dividend and the reference plane distance.

[0018] In an embodiment, the position distance between the first projection point and the second projection point is obtained, comprising:

[0019] The same laser beam is emitted to the target object and the reference plane by the laser module respectively;

[0020] The first projection point generated by the reflection light beam corresponding to the first reflection point is obtained by the imaging module, and first position data corresponding to the first projection point is obtained;

[0021] The second projection point generated by the reflection light beam corresponding to the second reflection point is obtained by the imaging module, and second position data corresponding to the second projection point is obtained;

[0022] The position distance is determined according to the first position data and the second position data.

[0023] In one embodiment, the depth data is obtained by performing a division operation on the target dividend and the target divisor, comprising:

[0024] inputting the target dividend and the target divisor into a preset hardware divider;

[0025] outputting the depth data by the hardware divider.

[0026] In one embodiment, the target object includes a plurality of the first reflection points, and the method further comprises:

[0027] obtaining the depth data corresponding to each of the first reflection points;

[0028] obtaining a depth map corresponding to the target object according to the depth data corresponding to each of the first reflection points;

[0029] performing face recognition according to the depth map to obtain identity information corresponding to the target object.

[0030] In a second aspect, an embodiment of the present application provides a depth data determination apparatus, comprising:

[0031] an optical calculation module, configured to obtain optical parameters corresponding to a target monocular structured light depth camera, and determine a target dividend and an initial divisor according to the optical parameters;

[0032] a parallax calculation module, configured to obtain a position distance between a first projection point and a second projection point, and take the position distance as parallax data, wherein the first projection point and the second projection point are generated by a same laser beam emitted by the target monocular structured light depth camera, the first reflection point corresponding to the first projection point is located on a target object, and the second reflection point corresponding to the second projection point is located on a reference plane;

[0033] a depth determination module, configured to obtain a target divisor by performing an addition operation on the initial divisor and the parallax data, and obtain depth data by performing a division operation on the target dividend and the target divisor, wherein the depth data is used to reflect a distance from the target object to the target monocular structured light depth camera.

[0034] In a third aspect, an embodiment of the present application provides a terminal, comprising a memory and one or more processors; the memory stores one or more programs; the programs contain instructions for executing the depth data determination method described in any of the above embodiments; and the processor is configured to execute the programs.

[0035] In a fourth aspect, the embodiments of the present application provide a computer readable storage medium having stored thereon a plurality of instructions, wherein the instructions are adapted to be loaded and executed by a processor to implement the steps of any of the above-described depth data determination methods.

[0036] The present application has the following beneficial effects: The embodiments of the present application obtain optical parameters corresponding to a target monocular structured light depth camera, determine a target divisor and an initial divisor according to the optical parameters, obtain a position distance between a first projection point and a second projection point, take the position distance as parallax data, wherein the first projection point and the second projection point are generated by the same laser beam emitted by the target monocular structured light depth camera, a first reflection point corresponding to the first projection point is located on a target object, and a second reflection point corresponding to the second projection point is located on a reference plane, perform addition operation on the initial divisor and the parallax data to obtain a target divisor, and perform division operation on the target divisor and the target divisor to obtain depth data, wherein the depth data is used to reflect the distance from the first reflection point to the target monocular structured light depth camera. Since the optical parameters of the structured light depth camera are determined, the divisor and the initial divisor in the present application can be calculated in advance based on the optical parameters, and subsequently only the parallax data needs to be obtained, and the visual-to-depth calculation can be realized through one addition operation and one division operation, thereby solving the problem that the calculation method of the visual-to-depth of the monocular structured light in the prior art has too many steps, resulting in excessive calculation overhead. BRIEF DESCRIPTION OF DRAWINGS

[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without any creative effort.

[0038] Figure 1 is a flowchart of the depth data determination method provided by the embodiments of the present application.

[0039] Figure 2 is a schematic diagram of internal modules of the depth data determination apparatus provided by the embodiments of the present application.

[0040] Figure 3 is a principle block diagram of a terminal provided by the embodiments of the present application. DETAILED DESCRIPTION

[0041] In order to make the objects, technical solutions and advantages of the present application more clear and explicit, the following will further describe the present application in detail with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0042] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, motion condition, etc. between components in a certain specific posture (as shown in the drawings), and if the specific posture changes, the directional indications will also change accordingly.

[0043] With the development of computers, three-dimensional measurement has gradually become an important field of computer vision. Through three-dimensional measurement technology, face detection, industrial detection, intelligent manufacturing and the like can be realized. Among them, the structured light measurement has the advantages of high precision, fast speed and the like because it does not directly contact the measured target, and has become the mainstream measurement method. The calculation method of monocular structured light vision to depth in the prior art mainly includes the following steps: 1. first taking the positive and negative relationship of the dividend and the dividend, and then normalizing the dividend. Because of the need for decrement, the dividend takes the negative value of the complement, which is convenient for operation. 2. The dividend is decremented with the divisor, and the quotient is incremented each time. 3. Until the dividend is less than the divisor, the remainder is left in the decrement process. 4. The output result is according to the positive and negative relationship of the dividend and the dividend. It can be seen that the calculation method of monocular structured light vision to depth in the prior art has too many steps, and therefore excessive calculation overhead is generated.

[0044] In view of the above defects of the prior art, the present application provides a depth data determination method, which comprises: acquiring optical parameters corresponding to a target monocular structured light depth camera, determining a target dividend and an initial divisor according to the optical parameters; acquiring a position distance between a first projection point and a second projection point, taking the position distance as parallax data, wherein the first projection point and the second projection point are generated by the same laser beam emitted by the target monocular structured light depth camera, the first reflection point corresponding to the first projection point is located on a target object, and the second reflection point corresponding to the second projection point is located on a reference plane; performing addition operation on the initial divisor and the parallax data to obtain a target divisor, and performing division operation on the target dividend and the target divisor to obtain depth data, wherein the depth data is used to reflect the distance from the first reflection point to the target monocular structured light depth camera. Since the optical parameters of the structured light depth camera are determined, the divisor and the initial divisor in the present application can be calculated in advance based on the optical parameters, and subsequently only the parallax data needs to be acquired, and the calculation of vision to depth can be realized through one addition operation and one division operation, thereby solving the problem of excessive calculation overhead caused by the too many steps of the calculation method of monocular structured light vision to depth in the prior art.

[0045] As shown in Figure 1 , the method comprises the following steps:

[0046] In step S100, an optical parameter corresponding to the target monocular structured light depth camera is acquired, and a target divisor and an initial divisor are determined according to the optical parameter.

[0047] Specifically, the target monocular structured light depth camera can be any monocular structured light depth camera that needs to perform visual-to-depth calculation. The monocular structured light depth camera generally includes a laser module, an imaging module (IR camera), an RGB camera, and a processor (depth engine) specially used for depth calculation. Since the principle of visual-to-depth calculation is related to optical imaging, the optical parameter corresponding to the monocular structured light depth camera needs to be acquired. Then, the target divisor and the initial divisor are determined based on the optical parameter. It can be understood that since the optical parameter of the target monocular structured light depth camera generally does not change, the target divisor and the initial divisor only need to be calculated when used for the first time, and do not need to be repeatedly calculated in subsequent use.

[0048] In an implementation manner, the target monocular structured light depth camera includes a laser module and an imaging module, and the step S100 specifically includes the following steps.

[0049] In step S101, a reference plane distance, a baseline length, and a focal length are determined according to the optical parameter, where the reference plane distance is used to reflect the distance from the reference plane to the target monocular structured light depth camera, and the baseline length is used to reflect the distance between the laser module and the imaging module.

[0050] In step S102, the target divisor is determined according to the baseline length and the focal length.

[0051] In step S103, the initial divisor is determined according to the baseline length, the focal length, and the reference plane distance.

[0052] Briefly, the visual-to-depth calculation of the monocular structured light depth camera needs to determine a reference plane in advance, and the distance from the camera to the reference plane (reference plane distance), the distance between the laser module and the imaging module (baseline length), and the focal length of the camera are determined according to the optical parameter. Specifically, the target divisor in this embodiment is determined based on the baseline length and the focal length, and the initial divisor is determined based on the baseline length, the focal length, and the reference plane distance. Therefore, if the baseline length and the focal length do not change, the specific value of the target divisor will not change; if the baseline length, the focal length, and the reference plane distance do not change, the specific value of the initial divisor will not change.

[0053] In an implementation manner, the step S102 specifically includes the following steps.

[0054] Step S1021, multiplying the baseline length and the focal length to obtain the target dividend.

[0055] Specifically, the specific value of the target dividend in the embodiment is the product of the baseline length and the focal length. For example, assuming that the target dividend is A, the baseline length is b, and the focal length is f, the calculation formula of the target dividend is: A = b * f.

[0056] In an implementation manner, the step S103 specifically includes the following steps:

[0057] Step S1031, performing division operation on the target dividend and the reference plane distance to obtain the initial divisor.

[0058] Specifically, the specific value of the initial divisor in the embodiment is the quotient of the target dividend and the reference plane distance. For example, assuming that the initial divisor is B, the target dividend is A, and the reference plane distance is Z0, the calculation formula of the initial divisor is: B = A / Z0.

[0059] As shown in the method further includes the following steps: Figure 1

[0060] Step S200, obtaining a position distance between a first projection point and a second projection point, and taking the position distance as parallax data, wherein the first projection point and the second projection point are generated by the same laser beam emitted by the target monocular structured light depth camera, the first reflection point corresponding to the first projection point is located on a target object, and the second reflection point corresponding to the second projection point is located on a reference plane.

[0061] In simple terms, one of the most critical steps in the visual-to-depth calculation of a monocular structured light depth camera is to determine the parallax, which can be understood as the directional difference produced by observing the same target from two points with a certain distance. Specifically, when the target monocular structured light depth camera is in use, it will emit a laser beam to the target object through the laser module. After the laser beam contacts the target object, it will be reflected, and the reflected laser beam will be received by the imaging module in the target monocular structured light depth camera, thereby obtaining the first projection point. In addition, the same laser beam will also contact the reference plane and be reflected, and the laser beam reflected by the reference plane will also be received by the imaging module, thereby obtaining the second projection point. The first projection point and the second projection point do not overlap because the reflection points are different, but have a certain position distance, which is the parallax data required to be obtained in the embodiment.

[0062] In an implementation manner, the step S200 specifically includes the following steps:

[0063] ​Step S201: The same laser beam is emitted from the laser module toward the target object and the reference plane respectively;

[0064] Step S202: Obtain the first projection point generated by the reflected beam corresponding to the first reflection point through the imaging module, and obtain the first position data corresponding to the first projection point;

[0065] Step S203: Obtain the second projection point generated by the reflected beam corresponding to the second reflection point through the imaging module, and obtain the second position data corresponding to the second projection point;

[0066] Step S204: Determine the location distance based on the first location data and the second location data.

[0067] Specifically, in this embodiment, the reference plane can be a plane located between the target object and the target monocular structured light depth camera, and parallel to the baseline. When the laser module emits the same laser beam towards the target object and the reference plane respectively, after the laser beam contacts the reference plane and the target object, it will form a first reflection point and a second reflection point on the target object and the reference plane respectively. The first reflection point and the second reflection point will each generate a reflected beam, which will be received by the imaging module. Then, imaging is performed based on the reflected beam corresponding to the first reflection point to obtain a first projection point; imaging is performed based on the reflected beam corresponding to the second reflection point to obtain a second projection point. Finally, based on the imaging map, the first position data and the second position data corresponding to the first projection point and the second projection point can be determined respectively, and the positional distance between the two projection points can be determined according to the first position data and the second position data.

[0068] like Figure 1 As shown, the method further includes the following steps:

[0069] Step S300: Perform an addition operation on the initial divisor and the disparity data to obtain the target divisor, and perform a division operation on the target dividend and the target divisor to obtain the depth data, wherein the depth data is used to reflect the distance from the target object to the target monocular structured light depth camera.

[0070] Specifically, in this embodiment, after obtaining the initial divisor and disparity data, the two are added together to obtain the target divisor. Finally, the quotient of the target dividend and the target divisor is used as the distance from the target object to the target monocular structured light depth camera, thus obtaining the depth data. For example, assuming the initial divisor is B and the disparity data is d, then the target divisor = B + d; assuming the target dividend is A and the depth data is Z, then Z = A / B + d.

[0071] In an implementation, the target dividend is 16-bit unsigned, 1-bit decimal; the initial divisor is 16-bit signed, 4-bit decimal; the parallax data is 16-bit signed, 4-bit decimal, and bit[11:4] is 8-bit signed. The calculated depth data is 16-bit unsigned, 2-bit decimal.

[0072] In an implementation, the step S300 specifically comprises the following steps:

[0073] Step S301: inputting the target dividend and the target divisor into a preset hardware divider;

[0074] Step S302: outputting the depth data by the hardware divider.

[0075] In brief, compared with a traditional divider, the hardware divider occupies less clock cycle in calculation, so the hardware divider is used to complete the division operation in the embodiment, thereby achieving the purpose of accelerating the calculation. Specifically, the target dividend and the target divisor are input into the hardware divider, the hardware divider automatically performs the division operation according to the input data, and outputs an operation result, which is the depth data required to be obtained in the embodiment.

[0076] In an implementation, the target object comprises a plurality of first reflection points, and the method further comprises the following steps:

[0077] Step S10: obtaining the depth data corresponding to each of the first reflection points;

[0078] Step S20: obtaining a depth map corresponding to the target object according to the depth data corresponding to each of the first reflection points;

[0079] Step S30: performing face recognition according to the depth map to obtain identity information corresponding to the target object.

[0080] In brief, the depth data determination method in the embodiment can also be applied to a low-cost and low-power 3D living body face recognition door lock scheme. Specifically, a face to be recognized is taken as a target object, the depth data of reflection points at different positions on the target object is obtained by the depth data determination method, the depth map corresponding to the face to be recognized is obtained, and the identity information of the user is accurately obtained by performing face recognition according to the depth map, so that whether the user has the permission to open the lock is determined according to the identity information.

[0081] Based on the above embodiment, the application further provides a depth data determination device, as shown in Figure 2 The device comprises:

[0082] An optical calculation module 01 is configured to acquire optical parameters corresponding to a target monocular structured light depth camera, and determine a target dividend and an initial divisor according to the optical parameters.

[0083] A parallax calculation module 02 is configured to acquire a position distance between a first projection point and a second projection point, and take the position distance as parallax data, wherein the first projection point and the second projection point are generated by a same laser beam emitted by the target monocular structured light depth camera, the first projection point corresponds to a first reflection point on a target object, and the second projection point corresponds to a second reflection point on a reference plane.

[0084] A depth determination module 03 is configured to acquire a target divisor by performing addition operation on the initial divisor and the parallax data, and acquire depth data by performing division operation on the target dividend and the target divisor, wherein the depth data is used to reflect a distance from the target object to the target monocular structured light depth camera.

[0085] Based on the above-mentioned embodiments, the present application further provides a terminal, a principle block diagram of which can be shown in FIG. 8. Figure 3 The terminal includes a processor, a memory, a network interface, and a display screen connected through a system bus. The processor of the terminal is configured to provide computing and control capabilities. The memory of the terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the terminal is configured to communicate with external terminals through network connection. The computer program is executed by the processor to implement the depth data determination method. The display screen of the terminal can be a liquid crystal display screen or an electronic ink display screen.

[0086] Those skilled in the art can understand that, Figure 3 The principle block diagram shown in FIG. 8 is only a block diagram of part of the structure related to the present application, and does not constitute a limitation on the terminal to which the present application is applied. The specific terminal can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.

[0087] In an implementation manner, the memory of the terminal stores one or more programs, and is configured to execute the one or more programs by one or more processors, which includes instructions for performing the depth data determination method.

[0088] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiments of each method. Any reference to memory, storage, database or other medium used in each embodiment provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0089] In summary, the present application discloses a depth data determination method and device, a terminal and a storage medium. The method comprises: obtaining optical parameters corresponding to a target monocular structured light depth camera, determining a target dividend and an initial divisor according to the optical parameters; obtaining a position distance between a first projection point and a second projection point, taking the position distance as parallax data, wherein the first projection point and the second projection point are generated by the same laser beam emitted by the target monocular structured light depth camera, the first reflection point corresponding to the first projection point is located on a target object, and the second reflection point corresponding to the second projection point is located on a reference plane; performing addition operation on the initial divisor and the parallax data to obtain a target divisor, and performing division operation on the target dividend and the target divisor to obtain depth data, wherein the depth data is used to reflect the distance from the first reflection point to the target monocular structured light depth camera. Since the optical parameters of the structured light depth camera are determined, the divisor and the initial divisor in the present application can be calculated based on the optical parameters in advance, and subsequently only the parallax data needs to be obtained, and the visual-to-depth calculation can be realized through one addition operation and one division operation, thereby solving the problem of excessive calculation overhead caused by too many steps in the visual-to-depth calculation method of the monocular structured light in the prior art.

[0090] It is to be understood that the application is not limited to the examples described above, which can be modified or adapted in several ways by those skilled in the art without departing from the scope of the present application, as defined by the appended claims.

Claims

1. A method of determining depth data, characterized by, The method comprises: acquiring optical parameters corresponding to a target monocular structured light depth camera, the target monocular structured light depth camera comprising a laser module and an imaging module, determining a reference plane distance, a baseline length and a focal length according to the optical parameters, wherein the reference plane distance is used to reflect the distance from the reference plane to the target monocular structured light depth camera, and the baseline length is used to reflect the distance between the laser module and the imaging module; performing a division operation according to a target dividend and the reference plane distance to obtain an initial divisor; performing a multiplication operation according to the baseline length and the focal length to obtain the target dividend; the target dividend and the initial divisor only need to be calculated when the target monocular structured light depth camera is used for the first time; acquiring first position data corresponding to a first projection point and position data corresponding to a second projection point to determine the position distance between the first projection point and the second projection point, and taking the position distance as parallax data, wherein the first projection point and the second projection point are generated by the same laser beam emitted by the target monocular structured light depth camera, the first reflection point corresponding to the first projection point is located on a target object, and the second reflection point corresponding to the second projection point is located on a reference plane; performing an addition operation according to the initial divisor and the parallax data to obtain a target divisor, and inputting the target dividend and the target divisor into a preset hardware divider; performing a division operation according to the input data by the hardware divider to obtain depth data, wherein the depth data is used to reflect the distance from the target object to the target monocular structured light depth camera; the target dividend is 16-bit unsigned, and 1-bit decimal place; the initial divisor is 16-bit signed, and 4-bit decimal place; the parallax data is 16-bit signed, and 4-bit decimal place, and bit[11:4] 8-bit is signed calculated depth data is 16-bit unsigned, and 2-bit decimal.

2. The depth data determination method according to claim 1, characterized by, The method comprises: acquiring first position data corresponding to a first projection point and position data corresponding to a second projection point to determine the position distance between the first projection point and the second projection point, and taking the position distance as parallax data, wherein the first projection point and the second projection point are generated by the same laser beam emitted by the target monocular structured light depth camera, the first reflection point corresponding to the first projection point is located on a target object, and the second reflection point corresponding to the second projection point is located on a reference plane; acquiring the first projection point generated by the reflection light beam corresponding to the first reflection point through the imaging module, acquiring the first position data corresponding to the first projection point; acquiring the second projection point generated by the reflection light beam corresponding to the second reflection point through the imaging module, acquiring the second position data corresponding to the second projection point; 3. The depth data determination method according to claim 1, characterized by, determining the position distance according to the first position data and the second position data. The target object comprises a plurality of first reflection points, and the method further comprises: acquiring the depth data corresponding to the plurality of first reflection points respectively; obtaining a depth map corresponding to the target object according to the depth data corresponding to the plurality of first reflection points respectively. Face recognition is performed according to the depth map, and identity information corresponding to the target object is obtained.

4. A depth data determination apparatus characterized by comprising: The device comprises: An optical calculation module is configured to acquire optical parameters corresponding to a target monocular structured light depth camera, the target monocular structured light depth camera comprising a laser module and an imaging module, and determine a reference plane distance, a baseline length and a focal length according to the optical parameters, wherein the reference plane distance is used to reflect a distance from the reference plane to the target monocular structured light depth camera, and the baseline length is used to reflect a distance between the laser module and the imaging module. A multiplication operation is performed according to the baseline length and the focal length to obtain a target dividend. A division operation is performed according to the target dividend and the reference plane distance to obtain an initial divisor, and the target dividend and the initial divisor only need to be calculated when the target monocular structured light depth camera is used for the first time. A disparity calculation module is configured to acquire a position distance between a first projection point and a second projection point, and use the position distance as disparity data, wherein the first projection point and the second projection point are generated by a same laser beam emitted by the target monocular structured light depth camera, the first projection point corresponds to a first reflection point on a target object, and the second projection point corresponds to a second reflection point on a reference plane. A depth determination module is configured to perform an addition operation according to the initial divisor and the disparity data to obtain a target divisor, input the target dividend and the target divisor into a preset hardware divider, and perform a division operation according to the input data by the hardware divider to obtain depth data, wherein the depth data is used to reflect a distance from the target object to the target monocular structured light depth camera. The target dividend is 16-bit unsigned, and 1-bit decimal place; the initial divisor is 16-bit signed, and 4-bit decimal place; the disparity data is 16-bit signed, and 4-bit decimal place; bit[11:4] is 8-bit signed; and the calculated depth data is 16-bit unsigned, and 2-bit decimal place.

5. A terminal, characterized by comprising: The terminal comprises a memory and one or more processors, the memory stores one or more programs, the programs contain instructions for performing the depth data determination method according to any one of claims 1-3, and the processors are configured to execute the programs.

6. A computer readable storage medium having stored thereon a plurality of instructions, the plurality of instructions comprising: The instructions are suitable for being loaded and executed by the processors to implement the steps of the depth data determination method according to any one of claims 1-3.

Citation Information

Patent Citations

  • Image depth recovery method and device

    CN111402313A

  • Depth imaging method and device and computer readable storage medium

    CN111664798A

  • Reference image acquisition method and device for speckle structured light system

    CN112529967A