Depth measurement accuracy determination method, device, equipment and storage medium
By calculating the truncated normal distribution of the test board images, the problem of depth measurement accuracy evaluation of depth cameras in non-planar scenes is solved, and the accurate measurement of the three-dimensional camera on complex surfaces is achieved.
Patent Information
- Application Number
- CN202110845134.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-26
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2041-07-26
AI Technical Summary
The prior art cannot effectively evaluate the depth measurement accuracy of depth cameras in non-planar scenarios.
By acquiring the test board image, the truncated normal distribution of the test area is calculated, and the test area combination is judged based on the truncated normal distribution, the depth measurement accuracy of the three-dimensional camera is determined.
Accurately determine the depth measurement accuracy of a three-dimensional camera in non-planar scenarios, and is suitable for complex surfaces such as uneven steps.
Smart Images

Figure CN113822922B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, device, equipment and storage medium for determining depth measurement accuracy. Background Art
[0002] The depth camera adds a depth measurement function.
[0003] To ensure the performance of the depth camera, the accuracy of its depth measurement needs to be evaluated. For example, absolute accuracy testing can be used to evaluate the accuracy. For example, the camera collects three depth maps at distances of 30cm, 50cm, and 80cm from a white wall. The deviation between the depth value in each depth map and the actual distance corresponding to that depth value is measured, and the accuracy of the depth measurement is evaluated based on this deviation.
[0004] However, the above method of testing absolute accuracy cannot evaluate the accuracy of depth measurement in non-planar scenes. Summary of the Invention
[0005] The embodiments of the present application provide a method, apparatus, device, and storage medium for determining depth measurement accuracy, which can accurately determine the depth measurement accuracy of a three-dimensional camera. The technical solution is as follows:
[0006] According to one aspect of the present application, a method for determining depth measurement accuracy is provided, the method comprising:
[0007] Acquire a test board image, where the test board image is an image captured by the three-dimensional camera of the test board when the plane of the three-dimensional camera is parallel to the plane of the test board; the test board includes at least two test blocks, at least two planes of the at least two test blocks are parallel and non-overlapping, and the test board image includes at least two test areas corresponding one-to-one to the at least two test blocks;
[0008] Calculating a truncated normal distribution of depth values of pixels in each of at least two test areas;
[0009] Determining a test area combination from at least two test areas based on the truncated state distribution, the test area combination including two target areas, and no overlapping portion between two truncated normal distributions corresponding to the two target areas;
[0010] The depth measurement accuracy of the 3D camera is determined based on the depth difference between two target areas.
[0011] According to another aspect of the present application, a device for determining depth measurement accuracy is provided, the device comprising:
[0012] An acquisition module is configured to acquire an image of a test board, the image of the test board being an image captured by the three-dimensional camera of the test board when the plane on which the three-dimensional camera is located is parallel to the plane on which the test board is located; the test board includes at least two test blocks, at least two planes on which the at least two test blocks are located are parallel and do not overlap, and the image of the test board includes at least two test areas corresponding one-to-one to the at least two test blocks;
[0013] A calculation module, configured to calculate a truncated normal distribution of depth values of pixels in each of at least two test areas;
[0014] a determination module, configured to determine a test area combination from at least two test areas based on the truncated normal distribution, wherein the test area combination includes two target areas, and there is no overlap between the two truncated normal distributions corresponding to the two target areas;
[0015] The determination module is used to determine the depth measurement accuracy of the three-dimensional camera based on the depth difference between the two target areas.
[0016] According to another aspect of the present application, a computer device is provided, comprising: a processor and a memory, wherein the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the method for determining depth measurement accuracy as described above.
[0017] According to another aspect of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the method for determining depth measurement accuracy as described above.
[0018] According to another aspect of the present application, a computer program product is provided. The computer program product includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method for determining depth measurement accuracy as described above.
[0019] The beneficial effects of the technical solutions provided in the embodiments of the present application include at least:
[0020] In this method, under the premise that the plane where the three-dimensional camera is located is parallel to the plane where the test board is located, the three-dimensional camera is used to collect a test board image of the test board, there are at least two test blocks on the test board, and the at least two planes where the at least two test blocks are located are parallel and do not overlap. Accordingly, there are different depth differences between the test blocks. Therefore, in at least two test areas corresponding to the at least two test blocks on the test board image, there are also different depth values on the pixels between the test areas. Then, the truncated normal distribution of the depth value on each of the at least two test areas is calculated, and it is determined whether there is an overlapping part between the two truncated normal distributions to determine whether the three-dimensional camera can clearly distinguish the two test areas corresponding to the two truncated normal distributions in depth. The depth measurement accuracy of the three-dimensional camera is determined by the depth difference between the two test areas that can be clearly distinguished. This method can ensure the accuracy of the depth measurement accuracy of the three-dimensional camera even when facing uneven non-planar surfaces such as step surfaces. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0022] Figure 1 A schematic diagram of the structure of a computer system provided by an exemplary embodiment of the present application is shown;
[0023] Figure 2 A flow chart showing a method for determining depth measurement accuracy provided by an exemplary embodiment of the present application is shown;
[0024] Figure 3 A three-dimensional image of a step plate provided by an exemplary embodiment of the present application is shown;
[0025] Figure 4 A schematic diagram showing the positions of a step plate and a three-dimensional camera provided by an exemplary embodiment of the present application is shown;
[0026] Figure 5 A schematic diagram showing the positions of a step plate and a three-dimensional camera provided by another exemplary embodiment of the present application is shown;
[0027] Figure 6 A schematic diagram showing the positions of a step plate and a three-dimensional camera provided by another exemplary embodiment of the present application is shown;
[0028] Figure 7 shows a depth diagram of a step plate provided by an exemplary embodiment of the present application;
[0029] Figure 8 shows a depth diagram of a step plate provided by another exemplary embodiment of the present application;
[0030] Figure 9 shows a depth diagram of a step plate provided by another exemplary embodiment of the present application;
[0031] Figure 10 A flow chart showing a method for determining depth measurement accuracy provided by another exemplary embodiment of the present application is shown;
[0032] Figure 11 A flow chart showing a method for determining depth measurement accuracy provided by another exemplary embodiment of the present application is shown;
[0033] Figure 12 A plan view of a step plate provided by an exemplary embodiment of the present application is shown;
[0034] Figure 13 An infrared image of a step plate provided by an exemplary embodiment of the present application is shown;
[0035] Figure 14 shows an infrared image of a step plate provided by another exemplary embodiment of the present application;
[0036] Figure 15 shows an infrared image of a step plate provided by another exemplary embodiment of the present application;
[0037] Figure 16 A flow chart showing a method for determining depth measurement accuracy provided by another exemplary embodiment of the present application is shown;
[0038] Figure 17 A block diagram of a device for determining depth measurement accuracy provided by an exemplary embodiment of the present application is shown;
[0039] Figure 18 A schematic structural diagram of a computer device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0040] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0041] First, let’s introduce several terms involved in this application:
[0042] A truncated normal distribution (Truncated_normal_distribution) is a distribution that limits the range of values of a random variable in a normal distribution. Depending on the constraints, truncation can be divided into: limiting the upper limit of the value, such as the value of x being greater than negative infinity and less than 60; limiting the lower limit of the value, such as the value of x being greater than 0 and less than positive infinity; and limiting both the upper and lower limits, such as the value of x being greater than 0 and less than 60. For example, in the embodiment of the present application, the truncated normal distribution adopts a method of limiting both the upper and lower limits.
[0043] Three-dimensional (3D) cameras utilize principles of 3D cameras, such as structured light, time of flight (ToF), and binocular stereo vision, to detect distance information in the captured space. Each pixel in the image captured by the 3D camera includes a depth value, which is the distance between the corresponding point on the physical object and the camera. This depth value is added to the plane coordinates (x, y) on the two-dimensional (2D) image to obtain the three-dimensional spatial coordinates of each point on the physical object in the image, and then the physical object is restored using the three-dimensional spatial coordinates.
[0044] For example, the above-mentioned 3D camera has functions such as face recognition, gesture recognition, human skeleton recognition, three-dimensional measurement, environmental perception, and three-dimensional map reconstruction, and can be widely used in televisions, smart terminals (referred to as "terminals"), robots, drones, logistics, virtual reality (VR), augmented reality (AR), smart homes, security, and car driving assistance.
[0045] In order to ensure the accuracy of the distance measurement of the 3D camera, it is necessary to determine the depth measurement accuracy of the 3D camera. Therefore, an embodiment of the present application provides a method for determining the depth measurement accuracy. The implementation steps of the method are detailed in the following embodiments.
[0046] Figure 1 FIG1 is a schematic diagram of a computer system according to an exemplary embodiment of the present application. The computer system includes a 3D camera 120, a computer device 140, and a terminal 160. The 3D camera 120 and the computer device 140 are connected to each other via a wired or wireless connection; and the computer device 140 and the terminal 160 are connected to each other via a wired or wireless connection.
[0047] In the embodiment of the present application, the 3D camera 120 is used to capture an image of the test board to obtain a test board image, and then transmit the test board image to the computer device 140 via a communication connection. After receiving the test board image sent by the 3D camera 120, the computer device 140 is used to store and process the test board image to determine the depth measurement accuracy of the 3D camera 120. Exemplarily, the computer device 140 executes the depth measurement accuracy determination method provided in the embodiment of the present application to determine the depth measurement accuracy of the 3D camera 120.
[0048] After determining the depth measurement accuracy of the 3D camera 120 , the computer device 140 sends the depth measurement accuracy of the 3D camera 120 to the terminal 160 via a communication connection; and the terminal 160 displays the depth measurement accuracy of the 3D camera 120 .
[0049] Exemplarily, the terminal 160 includes a display; the terminal 160 can display the depth measurement accuracy of the 3D camera 120 on the display. Exemplarily, the terminal 160 includes a speaker; the terminal 160 can broadcast the depth measurement accuracy of the 3D camera 120 through the speaker.
[0050] Exemplarily, terminal 160 includes an input device; terminal 160 can input a first operating instruction through the input device, triggering computer device 140 to execute the method for determining depth measurement accuracy through the first operating instruction. Exemplarily, terminal 160 can input a second operating instruction through the input device, so that at least one of the test plate image, the test area, the positioning area, and the edge area can be determined during the execution of the method for determining depth measurement accuracy through the second operating instruction.
[0051] In some embodiments, the computer device 140 may include at least one of a display and a speaker. Therefore, the display of the depth measurement accuracy of the 3D camera 120 may be performed by the computer device 140. For example, the computer device 140 may also include an input device. Therefore, the above-mentioned operation instructions may also be executed by the computer device 140. The operation instructions include at least one of the first operation instruction and the second operation instruction.
[0052] In some embodiments, the 3D camera 120 and the terminal 160 are connected to each other via wired or wireless communication; after the 3D camera 120 acquires the test board image, it can first send the test board image to the terminal 160; the terminal 160 uploads the test board image to the computer device 140 for storage and processing.
[0053] For example, the tester can selectively store and process the test board image using the computer device 140 or the terminal 160. For example, the computer device 140 can include at least one of a server, a server cluster, and a cloud server. For example, the terminal 160 can include at least one of a laptop computer, a desktop computer, a smartphone, a tablet computer, and an intelligent robot. The embodiments of the present application do not limit the types of the 3D camera 120, the computer device 140, and the terminal 160.
[0054] It should be noted that the above-mentioned computer system is only an example of the implementation environment of the method provided in the embodiment of the present application.
[0055] Figure 2 A method for determining depth measurement accuracy provided by an exemplary embodiment of the present application is applied to Figure 1 Taking the computer device shown in FIG. 1 as an example, the method includes:
[0056] Step 201: Acquire a test board image, where the test board image includes at least two test areas.
[0057] Among them, the test board image is the image of the test board captured by the three-dimensional camera when the plane where the three-dimensional camera is located is parallel to the plane where the test board is located; the test board includes at least two test blocks, and the at least two planes where the at least two test blocks are located are parallel and do not overlap, and the test board image includes at least two test areas corresponding one-to-one to the at least two test blocks.
[0058] Exemplarily, the test plate includes a step plate, and accordingly, the test plate image includes a step plate image. Figure 3 , the step plate 11 is exemplarily described, Figure 3is a three-dimensional front image of the step plate 11. The test block on the step plate 11 is a rectangular block. The step plate 11 includes 8 rectangular blocks 12. Among the 8 rectangular blocks, rectangular block 4 is in the same plane as the background plate. The gradient of rectangular blocks 1 to 3 is in an upward trend. From the perspective of the three-dimensional front view, rectangular blocks 1 to 3 are concave. The depth of the concave becomes smaller and smaller in the order of rectangular blocks 1 to 3. The gradient of rectangular blocks 5 to 8 is also in an upward trend. From the perspective of the three-dimensional front view, rectangular blocks 5 to 8 are convex. The depth of the convex becomes larger and larger in the order of rectangular blocks 5 to 8. For example, the depth difference between each adjacent two rectangular blocks in the above rectangular blocks 1 to 4 is 1 millimeter (mm), the depth difference between each adjacent two rectangular blocks in the above rectangular blocks 5 to 8 is 1 mm, and the depth difference between the above rectangular blocks 4 and the above rectangular block 5 is 1 mm. Therefore, the depth difference on the step plate 11 ranges from {1, 2, 3, ..., 7}, in mm. Correspondingly, the step plate image collected for the step plate 11 includes eight rectangular areas corresponding to rectangular blocks 1 to 8 .
[0059] Exemplarily, the test blocks on the above-mentioned test board can adopt various shapes. For example, the test blocks can be various types of columns such as cylinders, trapezoidal columns, triangular columns, and prisms; accordingly, the test areas corresponding to the test blocks can be various types of shapes such as circles, trapezoids, triangles, and prisms; the shape of the test blocks is not limited in this application.
[0060] Exemplarily, the test blocks can be distributed in steps; or they can be distributed arbitrarily, for example, the depth difference between the first test block and the second test block of three adjacent test blocks is d, and the depth difference between the third test block and the second test block is 5d, that is, the three test blocks are low in the middle and high on both sides.
[0061] Exemplarily, the test board image is stored in a memory of the computer device, and the computer device obtains the test board image from the memory. Alternatively, the test board image is stored in a database of the computer device, and the computer device reads the test board image from the database.
[0062] For example, there is a vertical distance between the plane where the 3D camera is located and the plane where the test board is located. The vertical distance is negatively correlated with the depth measurement accuracy of the 3D camera, that is, the smaller the vertical distance is, the finer the depth measurement accuracy of the 3D camera is.
[0063] For example, take the test plate as a step plate as an example, Figure 4 , the plane where the three-dimensional camera 120 is located is parallel to the plane where the step plate 11 is located, and the vertical distance between the plane where the three-dimensional camera 120 is located and the plane where the step plate 11 is located is 30 cm, and the three-dimensional camera 120 captures the step plate image of the step plate 11; Figure 5 , the plane where the three-dimensional camera 120 is located is parallel to the plane where the step plate 11 is located, and the vertical distance between the plane where the three-dimensional camera 120 is located and the plane where the step plate 11 is located is 50 cm, and the three-dimensional camera 120 captures the step plate image of the step plate 11; Figure 6 The plane where the 3D camera 120 is located is parallel to the plane where the step plate 11 is located, and the vertical distance between the plane where the 3D camera 120 is located and the plane where the step plate 11 is located is 80 cm. The 3D camera 120 captures the step plate image of the step plate 11. The computer device stores the captured step plate image.
[0064] Therefore, the computer device can obtain images of the test board corresponding to at least two vertical distances and calculate the depth measurement accuracy of the 3D camera. For example, the computer device obtains an image of the test board captured at a vertical distance of 30 centimeters (cm), an image of the test board captured at a vertical distance of 50 cm, and an image of the test board captured at a vertical distance of 80 cm.
[0065] Step 202 : Calculate a truncated normal distribution of depth values of pixels in each of at least two test areas.
[0066] Exemplarily, the test board image includes a depth map; the computer device determines at least two test areas corresponding to at least two test blocks on the depth map, and calculates a truncated normal distribution of depth values of pixel points on each of the at least two test areas.
[0067] For the Lth test area, the computer device calculates the normal distribution of the depth value on the Lth test area, wherein the depth in the normal distribution is the horizontal axis (i.e., random variable), the distribution probability of the depth value on the Lth test area is the vertical axis, and the normal distribution includes the expected value E _L and standard deviation std _L , L is a positive integer greater than 1; based on the expected value E _L and standard deviation std _L The range of the depth is determined as (E _L -std _L , E _L +std _L ), that is, the truncated normal distribution of the Lth test area is obtained.
[0068] Among them, (E _L -std _L , E _L +std _L ) indicates that the value of the horizontal axis is greater than E _L -std _L and less than E _L +std_L For example, the range of the depth may include E _L -std _L and E _L +std _L At least one of .
[0069] Step 203 : determining a test area combination from at least two test areas based on the truncated normal distribution, where the test area combination includes two target areas, and there is no overlap between the two truncated normal distributions corresponding to the two target areas.
[0070] Exemplarily, the computer device compares the pairwise truncated normal distributions corresponding to the two test areas to determine whether there is any overlapping part between the two truncated normal distributions; after there is no overlapping part between the two truncated normal distributions, the two test areas corresponding to the above two truncated normal distributions are determined as a test area combination, and the above two test areas are also two target areas.
[0071] For example, for the first test area and the second test area, the first test area corresponds to the first truncated normal distribution, and the second test area corresponds to the second truncated normal distribution; the computer device determines whether there is an overlapping part between the first truncated normal distribution and the second truncated normal distribution; when there is no overlapping part between the first truncated normal distribution and the second truncated normal distribution, the first test area and the second test area are determined to be a test area combination. At this time, the first test area and the second test area are target areas.
[0072] Exemplarily, each truncated normal distribution corresponds to a depth value range. If the first truncated normal distribution corresponds to a first depth value range, the second truncated normal distribution corresponds to a second depth value range; the judgment on whether there is an overlapping part between the first truncated normal distribution and the second truncated normal distribution is the judgment on whether there is an overlapping part between the first value range and the second value range.
[0073] For example, the computer device determines whether there is an overlapping part between the first value range and the second value range; if it is determined that there is no overlapping part between the first value range and the second value range, the first test area and the second test area are determined as a test area combination.
[0074] Optionally, when the test plate image includes at least three test areas, the computer device determines at least two test area combinations from the at least three test areas based on the truncated state distribution.
[0075] Step 204 : Determine the depth measurement accuracy of the 3D camera based on the depth difference between the two target areas.
[0076] Exemplarily, when the computer device determines a test area combination, the computer device calculates the depth difference between two target areas in the test area combination, and uses the depth difference as the depth measurement accuracy of the three-dimensional camera, indicating the depth measurement accuracy of the three-dimensional camera.
[0077] Optionally, if the test area combination includes at least two; the computer device calculates the expected difference between the two expected values corresponding to the first target area and the second target area in each test area combination, and obtains at least two expected difference values corresponding to at least two test area combinations; and determines the minimum expected difference value among the at least two expected difference values as the depth measurement accuracy of the three-dimensional camera.
[0078] Exemplarily, for each test area combination, the computer device calculates the expected value of the depth value on the first target area to obtain the third expected value corresponding to the first target area, and calculates the expected value of the depth value on the second target area to obtain the fourth expected value corresponding to the second target area; calculates the absolute value of the difference between the third expected value and the fourth expected value to obtain an expected difference value corresponding to a test area combination.
[0079] Exemplarily, the at least two test area combinations include a first test area combination and a second test area combination, and deg1 corresponding to the first test area combination is the same as or different from deg2 corresponding to the second test area combination; wherein deg represents the actual depth difference between the two test blocks corresponding to the two target areas in the test area combination.
[0080] Exemplarily, the computer device determines that there are k test area combinations in at least two test areas, and the actual depth differences corresponding to the k test area combinations are all deg_min. The average value of the k expected difference values corresponding to the k test area combinations is calculated, and the average value is determined as the depth measurement accuracy of the three-dimensional camera; wherein deg_min is the minimum deg of at least two degs corresponding to at least two test area combinations, and k is a positive integer greater than 1.
[0081] In some embodiments, the computer device calculates the depth measurement accuracy of the three-dimensional camera based on at least two test board images obtained at at least two vertical distances using steps 202 to 204 above to obtain the depth measurement accuracy of the three-dimensional camera corresponding to at least two vertical distances.
[0082] For example, take the test plate as a step plate, as Figure 7 , is the depth map of the step plate obtained when the vertical distance is 30 cm; Figure 8 , is the depth map of the step plate collected when the vertical distance is 50 cm; Figure 9 , is the depth map of the step plate collected when the vertical distance is 80 cm. Figures 7 to 9 The density of vertical lines is used to indicate the change of depth value. Obviously, Figure 7 Each rectangular area can be clearly distinguished. Figure 8 The distinction between the various rectangular areas in has become very vague. Figure 9 The various rectangular areas in the image are no longer distinguishable. In other words, the depth measurement accuracy of the 3D camera varies at different vertical distances.
[0083] In summary, the method for determining the depth measurement accuracy provided by this embodiment is to capture a test board image of the test board through a three-dimensional camera under the premise that the plane where the three-dimensional camera is located is parallel to the plane where the test board is located. There are at least two test blocks on the test board, and the at least two planes where the at least two test blocks are located are parallel and do not overlap. Accordingly, there are different depth differences between the two test blocks. Therefore, in the at least two test areas corresponding to the at least two test blocks on the test board image, there are also different depth values on the pixels between the two test areas. Then, the truncated normal distribution of the depth value on each of the at least two test areas is calculated, and it is determined whether there is an overlapping part between the two truncated normal distributions to determine whether the three-dimensional camera can clearly distinguish the two test areas corresponding to the two truncated normal distributions in depth. The depth measurement accuracy of the three-dimensional camera is determined by the depth difference between the two test areas that can be clearly distinguished. This method can ensure the accuracy of the depth measurement accuracy of the obtained three-dimensional camera even when facing uneven non-planar surfaces such as step surfaces. It should be noted that in the embodiment of the present application, there are at least two areas on the non-planar surface, and the at least two areas are uneven, but each area is a planar area.
[0084] like Figure 10 , is a flow chart of a method for determining depth measurement accuracy provided by another exemplary embodiment of the present application. In this method, step 203 may include steps 2031 to 2034, as shown below:
[0085] Step 2031: determine the i-th type of undetermined area combination as the target area combination, where the target area combination includes the first test area and the second test area.
[0086] The above-mentioned truncated normal distribution includes an expected value and a standard deviation; the above-mentioned at least two test areas include n types of pending area combinations, and the actual depth difference corresponding to the i-th type of pending area combination is i×d, where d is the minimum value unit of the depth difference between any two test blocks on the test board, n is a positive integer, and i is a positive integer less than or equal to n.
[0087] Exemplarily, the computer device determines n types of pending area combinations from at least two test areas in the order of actual depth difference from small to large; and executes the test area combination judgment step starting from the first type of pending area combination to determine the test area combination from the n types of pending area combinations.
[0088] Exemplarily, each of the n types of pending area combinations includes one or at least two pending area combinations.
[0089] Step 2032: Determine whether there is any overlap between the first truncated normal distribution corresponding to the first test area and the second truncated normal distribution corresponding to the second test area.
[0090] The truncated normal distribution includes an expected value and a standard deviation; optionally, the computer device extracts the expected value and the standard deviation from the first truncated normal distribution, and extracts the expected value and the standard deviation from the second truncated normal distribution; if the expected value corresponding to the first test area is greater than the expected value corresponding to the second test area, the computer device calculates the difference between the expected value and the standard deviation corresponding to the first test area, and calculates the sum of the expected value and the standard deviation corresponding to the second test area; and compares the difference with the sum;
[0091] When the expected value corresponding to the first test area is smaller than the expected value corresponding to the second test area, the sum of the expected value corresponding to the first test area and the standard deviation is calculated, and the difference between the expected value corresponding to the second test area and the standard deviation is calculated; and the above difference is compared with the above sum.
[0092] For example, the Lth test area corresponds to the expected value E _L and standard deviation std _L , the L+1th test area corresponds to the expected value E _L+1 and standard deviation std _L+1 ; in E _L Greater than E _L+1 In the case of L, the computer device calculates the expected value E corresponding to the Lth test area _L and standard deviation std _L The difference between E _L -std _L , and calculate the expected value E corresponding to the L+1th test area _L+1 and standard deviation std _L+1 The sum E _L+1 +std _L+1 ; Compare to E _L -std _L With E _L+1 +std _L+1 .
[0093] Step 2033 : When there is no overlap between the first truncated normal distribution and the second truncated normal distribution, the target region combination is determined as a test region combination, where the test region combination includes two target regions.
[0094] When the difference is greater than the sum, the computer device determines that there is no overlapping portion between the first truncated normal distribution and the second truncated normal distribution, and determines the target area combination as the test area combination.
[0095] For example, in the above E _L -std _L Greater than the above E _L+1 +std _L+1 In the case of , it is determined that there is no overlapping part between the first truncated normal distribution and the second truncated normal distribution, and the target area combination is determined as the test area combination.
[0096] If there is no overlap between the first and second truncated normal distributions, the expected difference between the expected value corresponding to the first test area and the expected value corresponding to the second test area can be used as the depth measurement accuracy of the 3D camera, indicating that the 3D camera is capable of achieving the depth measurement accuracy of the expected difference. Since the actual depth value (i×d) corresponding to the i-th type of pending area combination is less than the actual depth value (i+1)×d corresponding to the i+1-th type of pending area combination, after determining the finest depth measurement accuracy that the 3D camera can achieve, it is no longer necessary to determine whether the 3D camera can support the depth measurement accuracy corresponding to the i+1-th type of pending area combination and subsequent types.
[0097] In step 2034, when there is an overlap between the first truncated normal distribution and the second truncated normal distribution, the i+1th type of undetermined area combination is determined as the target area combination, and the process is repeated from step 2032 until a test area combination is determined.
[0098] When the above difference is less than or equal to the above sum, the computer device determines that there is an overlapping part between the first truncated normal distribution and the second truncated normal distribution, determines the i+1th type of undetermined area combination as the target area combination, and re-executes from step 2032 until the test area combination is determined.
[0099] For example, in the above E _L -std _L Less than or equal to the above E _L+1 +std _L+1 In the case of , it is determined that there is an overlapping part between the first truncated normal distribution and the second truncated normal distribution, the i+1th type of undetermined area combination is determined as the target area combination, and the process is repeated from step 2032 until a test area combination is determined.
[0100] The computer device re-executes from step 2032 , that is, re-executes from the step of determining whether there is an overlap between the first truncated normal distribution corresponding to the first test area and the second truncated normal distribution corresponding to the second test area.
[0101] If there is an overlap between the first truncated normal distribution and the second truncated normal distribution, the expected difference between the expected value corresponding to the first test area and the expected value corresponding to the second test area cannot be used as the depth measurement accuracy of the three-dimensional camera, and the three-dimensional camera cannot achieve the depth measurement accuracy of the above-mentioned expected difference. Since the actual depth value i×d corresponding to the i-th type of pending area combination is less than the actual depth value (i+1)×d corresponding to the i+1-th type of pending area combination, when it is determined that the three-dimensional camera cannot achieve the depth measurement accuracy of the above-mentioned expected difference, the computer device can determine the i+1-th type of pending area combination as the target area combination, and continue to determine whether the three-dimensional camera can support the depth measurement accuracy corresponding to the i+1-th type of pending area combination. Exemplarily, according to Figure 3 On the test board shown in the figure, the computer equipment can determine the most accurate depth measurement accuracy that the 3D camera can support from 1mm to 7mm.
[0102] To sum up, the method for determining the depth measurement accuracy provided in this embodiment uses a truncated normal distribution to explore the finest depth measurement accuracy supported by the three-dimensional camera. In addition, the exploration is performed in order from small to large actual depth values. If the depth measurement accuracy is not equal to or greater than the maximum actual depth difference that the test board can provide, there is no need to traverse all the actual depth values, and the depth measurement accuracy of the three-dimensional camera can be determined quickly and accurately.
[0103] like Figure 11 , is a flow chart of a method for determining depth measurement accuracy provided by another exemplary embodiment of the present application. In this method, steps 205 to 208 may be included before step 202, as shown below:
[0104] Step 205 : Calculate a first expected value of the depth value of the pixel points on the left edge area, and calculate a second expected value of the depth value of the pixel points on the right edge area.
[0105] The test board includes a left edge area and a right edge area in the horizontal direction; for example, taking the test board as a step board as an example, Figure 3 , viewed from the front of the step plate, the step plate includes a left edge region 14 and a right edge region 15 in the horizontal direction. Correspondingly, the step plate image also includes a left edge region and a right edge region.
[0106] The computer device determines the left edge area and the right edge area from the test board image; obtains at least two first depth values of at least two pixel points on the left edge area, and calculates a first expected value of the at least two first depth values; and obtains at least two second depth values of at least two pixel points on the right edge area, and calculates a second expected value of the at least two second depth values.
[0107] Exemplarily, the test board includes at least two positioning points, and the at least two positioning points correspond one-to-one to at least two positioning areas on the test board image; for determining the left edge area and the right edge area, the computer device identifies at least two positioning areas in the test board image according to the positioning point template, and there is a first position mapping relationship between the at least two positioning areas and the left edge area, and a second position mapping relationship between the at least two positioning areas and the right edge area; the left edge area is determined based on the at least two positioning areas and the first position mapping relationship, and the right edge area is determined based on the at least two positioning areas and the second position mapping relationship.
[0108] Exemplarily, different vertical distances correspond to different first position mapping relationships and second position mapping relationships; therefore, before determining the left edge area and the right edge area, it is also necessary to determine the first position mapping relationship and the second position mapping relationship based on the vertical distance between the plane where the three-dimensional camera is located and the plane where the test board is located.
[0109] Step 206 , when the difference between the first expected value and the second expected value is less than or equal to the difference threshold, determining whether the parallelism between the plane where the test board is located and the plane where the three-dimensional camera is located meets the parallelism requirement.
[0110] This parallelism requirement, namely, that the difference between the first expected value and the second expected value be less than or equal to a difference threshold, is a prerequisite for accurately calculating the depth measurement accuracy of the 3D camera. The computer device determines whether the difference between the first expected value and the second expected value is less than or equal to the difference threshold. If the difference between the first expected value and the second expected value is less than or equal to the difference threshold, it determines that the parallelism between the plane of the test board and the plane of the 3D camera meets the parallelism requirement.
[0111] For example, the difference threshold is 2 mm; the computer determines whether the difference between the first expected value and the second expected value is less than or equal to 2 mm; if the difference between the first expected value and the second expected value is less than or equal to 2 mm, determining that the parallelism between the plane where the test board is located and the plane where the three-dimensional camera is located meets the parallelism requirement;
[0112] In some embodiments, if the difference between the first expected value and the second expected value is greater than a difference threshold, it is determined that the parallelism between the plane of the test board and the plane of the 3D camera does not meet the parallelism requirement, and the acquisition and processing of the test board image is re-executed. For example, if the difference between the first expected value and the second expected value is greater than 2 mm, it is determined that the parallelism between the plane of the test board and the plane of the 3D camera does not meet the parallelism requirement, and the acquisition and processing of the test board image is re-executed.
[0113] Step 207 : identifying at least two positioning areas in the test plate image according to the positioning point template, where a position mapping relationship exists between the at least two positioning areas and the at least two test areas.
[0114] The computer device is provided with a positioning point template. Provided that the parallelism between the plane of the test board and the plane of the 3D camera meets parallelism requirements, the computer device identifies at least two positioning areas in the test board image according to the positioning point template. For example, the positioning point template may be circular, and the computer device identifies the circular area in the test board image.
[0115] Step 208: Determine at least two test areas based on the at least two positioning areas and the position mapping relationship.
[0116] Optionally, before determining at least two test areas, the computer device also determines a position mapping relationship corresponding to the vertical distance between the three-dimensional camera and the test board based on the correspondence; the above correspondence includes the correspondence between the vertical distance between the three-dimensional camera and the test board and the position mapping relationship.
[0117] Take the test board as an example, which is a step board. Figure 12 , is a plan view of a step plate, which includes eight rectangular blocks (dashed lines indicate the rectangular blocks that are in the same plane as the background plate), four positioning points 13 located at the four corners, a left edge region 14, and a right edge region 15; wherein the positioning points 13 are used to locate the rectangular region, the left edge region, and the right edge region on the step plate image. Exemplarily, a test region template and an edge region template are provided in the computer device. After identifying the positioning region, the left edge region can be located based on the edge region template and the first position mapping relationship, and the right edge region can be located based on the edge region template and the second position mapping relationship. The test region can also be located based on the test region template and the position mapping relationship.
[0118] Exemplarily, in order to ensure the recognition accuracy of the positioning area, at least two test areas, and two edge areas, the computer device combines at least one of the RGB map and the infrared radiation (IR) map to identify the positioning area; wherein, R in RGB stands for red (Red), G for green (Green), and B for blue (Blue). For example, the computer device identifies at least two positioning areas on the IR map based on the positioning point template, and maps the at least two positioning areas to the depth map; determines the left edge area, the right edge area, and at least two test areas based on the at least two positioning areas on the depth map. For another example, the computer device identifies at least two positioning areas on the IR map based on the positioning point template, and determines the left edge area, the right edge area, and at least two test areas based on the at least two positioning areas on the IR map; and maps the left edge area, the right edge area, and at least two test areas to the depth map.
[0119] Take the test board as an example, which is a step board. Figure 13 , is the IR image of the step plate collected when the vertical distance is 30 cm; Figure 14 , is the IR image of the step plate collected when the vertical distance is 50 cm; Figure 15 , which is the IR image of the step plate collected when the vertical distance is 80 cm.
[0120] To summarize, the method for determining depth measurement accuracy provided in this embodiment first detects the parallelism between the plane where the three-dimensional camera is located and the plane where the test board is located before calculating the truncated normal distribution corresponding to at least two test areas, ensuring that the depth measurement accuracy is calculated under the premise of being nearly completely parallel, so as to ensure the accuracy of the obtained depth measurement accuracy.
[0121] In addition, for the identification of the positioning area corresponding to the positioning point, a positioning point template can be used for identification to avoid manual intervention, which can save human resources.
[0122] Regarding the method for determining the depth measurement accuracy, manual participation can also be involved in the process of executing the method, such as Figure 16 , is a flow chart of a method for determining depth measurement accuracy provided by another exemplary embodiment of the present application. This method takes the test plate as an example and can be applied to Figure 1 In the computer device shown, the method steps are as follows:
[0123] Step 301: read the step plate image corresponding to the target vertical distance.
[0124] Exemplarily, the computer device reads an image of the step plate corresponding to the vertical distance of the target. The image of the step plate includes a depth map and an IR map (or RGB map). The above-mentioned image of the step plate is an image captured by the 3D camera when the plane of the 3D camera is parallel to the plane of the step plate.
[0125] Step 302: Display the step plate image on the computer device.
[0126] Exemplarily, an IR map or an RGB map in the step plate image is displayed on a computer device.
[0127] Step 303: receiving a point selection operation triggered on a computer device, where the point selection operation is used to select at least two positioning points on the step plate image.
[0128] The computer device receives the point selection operation triggered by the input device and determines two manually selected positioning points on the IR image or RGB image through the point selection operation. Figure 13 , the upper left point and lower right point are selected on the IR graph through the point selection operation.
[0129] During the point selection process, if the tester believes that the selected point is inappropriate, he or she can re-trigger the point selection operation on the computer device to reselect the positioning point.
[0130] Step 304: Calculate at least two rectangular areas on the step plate image.
[0131] Exemplarily, the computer device includes a position mapping relationship between the positioning point and at least two rectangular areas, calculates at least two rectangular areas on the IR image or RGB image based on the positioning point and position mapping relationship, and maps the at least two rectangular areas to the depth map.
[0132] After obtaining at least two rectangular areas, if the tester believes that the at least two rectangular areas determined are not suitable, he or she may return to step 303 and re-trigger the point selection operation on the computer device to reselect the positioning point and reposition the at least two rectangular areas.
[0133] Step 305 : Calculate the depth measurement accuracy of the 3D camera based on at least two rectangular areas.
[0134] Exemplarily, the actual depth value between each two adjacent rectangular areas in the horizontal direction is the same; the computer device calculates the truncated normal distribution corresponding to each rectangular area. If there is no overlapping part between the two truncated normal distributions corresponding to each two adjacent rectangular areas, then the expected difference between the expected values of the two depths corresponding to the above two rectangular areas is calculated, and the expected difference is used as the depth measurement accuracy of the three-dimensional camera.
[0135] If there is an overlap between the two truncated normal distributions corresponding to each two adjacent rectangular areas, then it is determined whether there is an overlap between the two truncated normal distributions corresponding to the two alternating rectangular areas. The judgment starts from the two alternating rectangular areas with one rectangular area between them until two alternating target areas are determined. If there is no overlap between the two truncated normal distributions corresponding to the two target areas, the depth measurement accuracy of the three-dimensional camera is calculated using the two expected values corresponding to the two target areas.
[0136] Step 306 , corresponding to the output target vertical distance and the depth measurement accuracy, determines the next target vertical distance, and returns to step 301 until there is no next target vertical distance.
[0137] The target vertical distance and the depth measurement accuracy are displayed on the computer device, and then the next target vertical distance is determined, and the process returns to step 301 until the next target vertical distance does not exist. For example, if 30 cm and 1 mm are displayed on the computer device, the next target vertical distance is determined to be 50 cm.
[0138] To summarize, the method for determining the depth measurement accuracy provided in this embodiment is to collect an image of the step plate through the three-dimensional camera under the premise that the plane where the three-dimensional camera is located is parallel to the plane where the step plate is located. There are at least two rectangular blocks on the step plate, and the at least two rectangular blocks are distributed in a step-like shape. Accordingly, there are different depth differences between the two rectangular blocks. Therefore, in at least two rectangular areas corresponding to the at least two rectangular blocks on the step plate image, there are also different depth values on the pixels between the two rectangular areas; then, the truncated normal distribution of the depth values on each of the at least two rectangular areas is calculated, and it is determined whether there is an overlapping part between the two truncated normal distributions to determine whether the three-dimensional camera can clearly distinguish the two rectangular areas corresponding to the two truncated normal distributions in depth, and the depth measurement accuracy of the three-dimensional camera is determined by the depth difference between the two rectangular areas that can be clearly distinguished. This method can ensure the accuracy of the depth measurement accuracy of the three-dimensional camera even when facing uneven non-planar surfaces such as step surfaces.
[0139] Figure 17 This is a block diagram of an apparatus for determining depth measurement accuracy provided by an exemplary embodiment of the present application. The apparatus can be implemented as part or all of a computer device through software, hardware, or a combination of both. The computer device may include a server or a terminal. The apparatus includes:
[0140] An acquisition module 401 is configured to acquire an image of a test board. The image of the test board is an image captured by a 3D camera of the test board when the plane of the 3D camera is parallel to the plane of the test board. The test board includes at least two test blocks, and at least two planes on which the at least two test blocks are located are parallel and non-overlapping. The image of the test board includes at least two test areas corresponding one-to-one to the at least two test blocks.
[0141] A calculation module 402 is configured to calculate a truncated normal distribution of depth values of pixels in each of at least two test areas;
[0142] A determination module 403 is configured to determine a test area combination from at least two test areas based on the truncated normal distribution, where the test area combination includes two target areas, and there is no overlap between the two truncated normal distributions corresponding to the two target areas;
[0143] The determination module 403 is configured to determine the depth measurement accuracy of the 3D camera based on the depth difference between the two target areas.
[0144] In some embodiments, the truncated normal distribution includes an expected value and a standard deviation; the at least two test areas include n types of pending area combinations, the actual depth difference corresponding to the i-th type of pending area combination is i×d, d is the minimum unit of the depth difference between two test blocks on the test board, n is a positive integer, and i is a positive integer less than or equal to n; the determination module 403 is used to:
[0145] Determine the i-th type of undetermined area combination as the target area combination, where the target area combination includes the first test area and the second test area;
[0146] Determine whether there is an overlap between a first truncated normal distribution corresponding to the first test area and a second truncated normal distribution corresponding to the second test area;
[0147] In a case where there is no overlapping portion between the first truncated normal distribution and the second truncated normal distribution, determining the target area combination as the test area combination;
[0148] In the case that there is an overlapping part between the first truncated normal distribution and the second truncated normal distribution, the i+1th type of undetermined area combination is determined as the target area combination, and the step of determining whether there is an overlapping part between the first truncated normal distribution corresponding to the first test area and the second truncated normal distribution corresponding to the second test area is re-executed until the test area combination is determined.
[0149] In some embodiments, the determination module 403 is configured to:
[0150] When the expected value corresponding to the first test area is greater than the expected value corresponding to the second test area, calculating the difference between the expected value corresponding to the first test area and the standard deviation, and calculating the sum of the expected value corresponding to the second test area and the standard deviation;
[0151] When the difference is greater than the sum, it is determined that there is no overlapping portion between the first truncated normal distribution and the second truncated normal distribution, and the target area combination is determined as the test area combination.
[0152] In some embodiments, the test area combination includes at least two; the determination module 403 is configured to:
[0153] Calculating an expected difference between two expected values corresponding to the first target area and the second target area in each test area combination to obtain at least two expected difference values corresponding to at least two test area combinations;
[0154] A minimum expected difference value among the at least two expected differences is determined as the depth measurement accuracy of the three-dimensional camera.
[0155] In some embodiments, the test board includes a left edge area and a right edge area in the horizontal direction; the apparatus further includes: a calculation module 404;
[0156] A calculation module 404 is configured to calculate a first expected value of the depth value of the pixel points on the left edge region, and calculate a second expected value of the depth value of the pixel points on the right edge region;
[0157] The determination module 403 is configured to determine whether the parallelism between the plane where the test board is located and the plane where the 3D camera is located meets the parallelism requirement when the difference between the first expected value and the second expected value is less than a difference threshold.
[0158] In some embodiments, the test plate includes at least two positioning points, and the at least two positioning points correspond one-to-one to at least two positioning areas on the test plate image; the apparatus further includes: an identification module 405;
[0159] An identification module 405 is configured to identify at least two positioning areas in the test plate image according to the positioning point template, wherein a position mapping relationship exists between the at least two positioning areas and the at least two test areas;
[0160] The determination module 403 is configured to determine at least two test areas based on at least two positioning areas and a position mapping relationship.
[0161] In some embodiments, the determination module 403 is further configured to:
[0162] According to the corresponding relationship, a position mapping relationship corresponding to the vertical distance between the three-dimensional camera and the test board is determined;
[0163] The corresponding relationship includes the corresponding relationship between the vertical distance and position mapping relationship between the three-dimensional camera and the test board.
[0164] To summarize, the apparatus for determining depth measurement accuracy provided in this embodiment, under the premise that the plane where the three-dimensional camera is located is parallel to the plane where the test board is located, collects a test board image of the test board through the three-dimensional camera, and there are at least two test blocks on the test board, and the at least two test blocks are distributed in a step-like manner. Accordingly, there are different depth differences between each of the test blocks. Therefore, in at least two test areas corresponding to the at least two test blocks on the test board image, there are also different depth values on the pixels between each of the test areas. Then, the truncated normal distribution of the depth values on each of the at least two test areas is calculated, and it is determined whether there is an overlapping part between the two truncated normal distributions, so as to determine whether the three-dimensional camera can clearly distinguish the two test areas corresponding to the two truncated normal distributions in depth, and determine the depth measurement accuracy of the three-dimensional camera by the depth difference between the two test areas that can be clearly distinguished. This method can ensure the accuracy of the depth measurement accuracy of the three-dimensional camera even when facing uneven non-planar surfaces such as step surfaces.
[0165] Figure 18 The following is a schematic diagram showing the structure of a computer device provided by an exemplary embodiment of the present application. The computer device may be a device that performs the method for determining depth measurement accuracy provided by the present application, and the computer device may be a terminal or a server. Specifically:
[0166] Computer device 500 includes a central processing unit (CPU) 501, a system memory 504 including a random access memory (RAM) 502 and a read-only memory (ROM) 503, and a system bus 505 connecting system memory 504 and CPU 501. Computer device 500 also includes a basic input / output system (I / O system) 506 that facilitates information transfer between various components within the computer, and a mass storage device 507 for storing an operating system 513, application programs 514, and other program modules 515.
[0167] The basic input / output system 506 includes a display 508 for displaying information and an input device 509, such as a mouse and keyboard, for user input. Both the display 508 and the input device 509 are connected to the central processing unit 501 via an input / output controller 510 connected to the system bus 505. The basic input / output system 506 may also include an input / output controller 510 for receiving and processing input from a variety of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 510 also provides output to a display screen, printer, or other types of output devices.
[0168] The mass storage device 507 is connected to the central processing unit 501 through a mass storage controller (not shown) connected to the system bus 505. The mass storage device 507 and its associated computer-readable media provide non-volatile storage for the computer device 500. That is, the mass storage device 507 may include a computer-readable medium (not shown) such as a hard disk or a compact disc read-only memory (CD-ROM) drive.
[0169] Computer-readable media may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read Only Memory (EPROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash memory or other solid-state storage technologies, CD-ROM, Digital Versatile Disc (DVD) or Solid State Drive (SSD), other optical storage, cassettes, magnetic tape, disk storage or other magnetic storage devices. Among them, random access memory may include resistance random access memory (ReRAM) and dynamic random access memory (DRAM). Of course, those skilled in the art will appreciate that computer storage media are not limited to the above. The system memory 504 and the large-capacity storage device 507 mentioned above may be collectively referred to as memory.
[0170] According to various embodiments of the present application, the computer device 500 may also be connected to a remote computer on a network such as the Internet for operation. That is, the computer device 500 may be connected to the network 512 via the network interface unit 511 connected to the system bus 505, or the network interface unit 511 may be used to connect to other types of networks or remote computer systems (not shown).
[0171] The memory also includes one or more programs, which are stored in the memory and configured to be executed by the CPU.
[0172] In an optional embodiment, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement the method for determining depth measurement accuracy as described above.
[0173] In an optional embodiment, a computer-readable storage medium is provided, which stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the method for determining depth measurement accuracy as described above.
[0174] Optionally, the computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a solid-state drive (SSD), or an optical disk. Among them, the random access memory may include a resistance random access memory (ReRAM) and a dynamic random access memory (DRAM). The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0175] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0176] The present application also provides a computer-readable storage medium, which stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the method for determining the depth measurement accuracy provided in the above-mentioned method embodiments.
[0177] The present application also provides a computer program product, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the method for determining depth measurement accuracy as described above.
[0178] It should be understood that the term "plurality" used herein refers to two or more. "And / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates an "or" relationship between the associated objects.
[0179] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0180] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for determining depth measurement accuracy, characterized in that: The method comprises: Acquire a test board image, the test board image being an image captured by the three-dimensional camera of the test board when the plane of the three-dimensional camera is parallel to the plane of the test board; the test board including at least two test blocks, the at least two planes on which the at least two test blocks are located being parallel and non-overlapping, and the test board image including at least two test areas corresponding one-to-one to the at least two test blocks; Calculating a truncated normal distribution of depth values of pixels in each of the at least two test areas, where the truncated normal distribution includes an expected value and a standard deviation; the at least two test areas include n types of pending area combinations, the actual depth difference corresponding to the i-th type of pending area combination is i×d, where d is the minimum unit of the depth difference between any two test blocks on the test board, n is a positive integer, and i is a positive integer less than or equal to n; Determine the undetermined area combination of the i-th category as a target area combination, wherein the target area combination includes a first test area and a second test area; determining whether there is an overlap between a first truncated normal distribution corresponding to the first test area and a second truncated normal distribution corresponding to the second test area; In a case where there is no overlapping portion between the first truncated normal distribution and the second truncated normal distribution, determining the target area combination as a test area combination; In the case where there is an overlap between the first truncated normal distribution and the second truncated normal distribution, the undetermined area combination of the (i+1)th category is determined as the target area combination, and the step of determining whether there is an overlap between the first truncated normal distribution corresponding to the first test area and the second truncated normal distribution corresponding to the second test area is repeated until the test area combination is determined; the test area combination includes two target areas, and there is no overlap between the two truncated normal distributions corresponding to the two target areas; The depth measurement accuracy of the three-dimensional camera is determined based on the depth difference between the two target areas.
2. The method according to claim 1, characterized in that The determining whether there is an overlap between a first truncated normal distribution corresponding to the first test area and a second truncated normal distribution corresponding to the second test area includes: When the expected value corresponding to the first test area is greater than the expected value corresponding to the second test area, calculating the difference between the expected value corresponding to the first test area and the standard deviation, and calculating the sum of the expected value corresponding to the second test area and the standard deviation; The step of determining the target area combination as a test area combination when there is no overlap between the first truncated normal distribution and the second truncated normal distribution includes: When the difference is greater than the sum, it is determined that there is no overlapping portion between the first truncated normal distribution and the second truncated normal distribution, and the target area combination is determined as the test area combination.
3. The method according to claim 1 or 2, characterized in that The test area combination includes at least two; The determining the depth measurement accuracy of the three-dimensional camera based on the depth difference between the two target areas includes: Calculating an expected difference between two expected values corresponding to the first target area and the second target area in each of the test area combinations to obtain at least two expected difference values corresponding to at least two of the test area combinations; The minimum expected difference value among the at least two expected differences is determined as the depth measurement accuracy of the three-dimensional camera.
4. The method according to claim 1 or 2, characterized in that The test plate includes a left edge area and a right edge area in the horizontal direction; Before calculating the truncated normal distribution of the depth values of the pixels in each of the at least two test areas, the method includes: Calculating a first expected value of the depth value of the pixel point on the left edge area, and calculating a second expected value of the depth value of the pixel point on the right edge area; When the difference between the first expected value and the second expected value is less than a difference threshold, it is determined that the parallelism between the plane where the test board is located and the plane where the three-dimensional camera is located meets the parallelism requirement.
5. The method according to claim 1 or 2, characterized in that The test plate comprises at least two positioning points, and the at least two positioning points correspond one-to-one to at least two positioning areas on the test plate image; Before calculating the truncated normal distribution of the depth values of the pixels in each of the at least two test areas, the method includes: identifying the at least two positioning areas in the test plate image according to the positioning point template, wherein a position mapping relationship exists between the at least two positioning areas and the at least two test areas; The at least two test areas are determined based on the at least two positioning areas and the position mapping relationship.
6. The method according to claim 5, characterized in that Before determining the at least two test areas based on the at least two positioning areas and the position mapping relationship, the method further includes: Determining the position mapping relationship corresponding to the vertical distance between the three-dimensional camera and the test board according to the corresponding relationship; The corresponding relationship includes a corresponding relationship between a vertical distance and a position mapping relationship between the three-dimensional camera and the test board.
7. A device for determining depth measurement accuracy, characterized in that: The device comprises: an acquisition module, configured to acquire an image of a test board, the image of the test board being an image captured by the three-dimensional camera of the test board when the plane on which the three-dimensional camera is located is parallel to the plane on which the test board is located; the test board including at least two test blocks, the at least two planes on which the at least two test blocks are located being parallel and non-overlapping, and the image of the test board including at least two test areas corresponding one-to-one to the at least two test blocks; a calculation module, configured to calculate a truncated normal distribution of depth values of pixels in each of the at least two test areas, the truncated normal distribution including an expected value and a standard deviation; the at least two test areas including n types of pending area combinations, the actual depth difference corresponding to the i-th type of pending area combination being i×d, where d is the minimum unit of the depth difference between any two test blocks on the test board, n being a positive integer, and i being a positive integer less than or equal to n; a determination module, configured to determine the undetermined area combination of the i-th category as a target area combination, wherein the target area combination includes a first test area and a second test area; determining whether there is an overlap between a first truncated normal distribution corresponding to the first test area and a second truncated normal distribution corresponding to the second test area; In a case where there is no overlapping portion between the first truncated normal distribution and the second truncated normal distribution, determining the target area combination as a test area combination; In the case where there is an overlap between the first truncated normal distribution and the second truncated normal distribution, the undetermined area combination of the (i+1)th category is determined as the target area combination, and the step of determining whether there is an overlap between the first truncated normal distribution corresponding to the first test area and the second truncated normal distribution corresponding to the second test area is repeated until the test area combination is determined; the test area combination includes two target areas, and there is no overlap between the two truncated normal distributions corresponding to the two target areas; The determination module is configured to determine the depth measurement accuracy of the three-dimensional camera based on the depth difference between the two target areas.
8. A computer device, characterized in that: The computer device includes: a processor and a memory, wherein the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the method for determining depth measurement accuracy according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the method for determining depth measurement accuracy according to any one of claims 1 to 6.
10. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to implement the method for determining depth measurement accuracy according to any one of claims 1 to 6.
Citation Information
Patent Citations
Automatic leaf area measurement system based on multivariate normal distribution statistics and level set variation method
CN111553943A
Point target infrared radiation measurement method, equipment and readable storage medium
CN112345090A