Depth image evaluation method and device of structured light module

By calculating the absolute accuracy, spatial accuracy and time accuracy of the multi-frame depth images of the 3D structured light module, the problem of lack of depth image evaluation in the existing technology is solved, and a comprehensive evaluation of the imaging performance of the structured light module is provided. Guide its design and preparation.

CN112712477BActive Publication Date: 2024-09-24DONGGUAN VISIONX-TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011519178.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-21
Publication Date
2024-09-24
Estimated Expiration
2040-12-21

AI Technical Summary

Technical Problem

The existing technology lacks a method for systematic evaluation of depth images of 3D structured light modules, which affects its performance evaluation during the production and development process.

Method used

Acquire multi-frame depth images of the target object through the structured light module, calculate the absolute accuracy, spatial accuracy and temporal accuracy of each frame of image, and evaluate the imaging performance of the structured light module based on the difference between the maximum and minimum values ​​of the sub-region.

Benefits of technology

A method for systematically evaluating the imaging performance of structured light modules is provided, which makes up for the shortcomings of the existing technology, helps users understand the accuracy and performance of the module, and thus guides design and preparation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112712477B
    Figure CN112712477B
Patent Text Reader

Abstract

A method and device for evaluating the depth image of a structured light module, and relates to the field of imaging technology. The method comprises obtaining multiple frames of depth images of a target object through a structured light module, the distance between the structured light module and the target object is a preset distance, and each frame of the depth image includes M sub-regions, where M is an integer greater than or equal to 2; obtaining the actual depth value of each pixel point of each frame of the depth image within the effective depth value interval; calculating the absolute accuracy of each frame of the depth image according to the actual depth value and the preset distance of each frame of the depth image; performing spatial plane fitting on each frame of the depth image to obtain a fitting plane, and calculating the spatial accuracy of each frame of the depth image according to the actual depth value and the fitting depth value of the fitting plane; and calculating the temporal accuracy of multiple frames of depth images according to the difference between the maximum value and the minimum value of each sub-region of each frame of the depth image. The method can evaluate the imaging performance of the structured light module.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of imaging technology, and in particular to a depth image evaluation method and device of a structured light module. Background Art

[0002] 3D depth measurement technology can collect the depth coordinate information of scene targets, providing additional data processing freedom for back-end development. With the popularization of mobile terminal devices and intelligent interactive devices, 3D depth measurement technology is increasingly becoming the core technology of the new generation of human-computer interaction, and has broad application prospects in industrial inspection, security retail, somatosensory games, mobile payments and biomedicine.

[0003] However, the prior art lacks a method for systematically evaluating the depth image of a 3D structured light module, and this depth image evaluation method has important guiding significance for the production or development process of the 3D structured light module. Therefore, it is urgent to provide a method for evaluating the depth image of a 3D structured light module to make up for the deficiencies in the prior art. Summary of the invention

[0004] The object of the present invention is to provide a depth image evaluation method and device of a structured light module, which can evaluate the imaging performance of the structured light module.

[0005] The embodiment of the present invention is achieved as follows:

[0006] In one aspect of the present invention, a depth image evaluation method of a structured light module is provided, the method comprising obtaining multiple depth images of a target object through a structured light module, the distance between the structured light module and the target object is a preset distance, each depth image frame includes M sub-regions, M is an integer greater than or equal to 2; obtaining the actual depth value of each pixel point of each depth image frame within the effective depth value interval; calculating the absolute accuracy of each depth image frame according to the actual depth value and the preset distance of each depth image frame; performing spatial plane fitting on each depth image frame to obtain a fitting plane, and calculating the spatial accuracy of each depth image frame according to the actual depth value and the fitting depth value of the fitting plane; calculating the time accuracy of multiple depth images according to the difference between the maximum value and the minimum value of each sub-region of each depth image frame. The method can evaluate the imaging performance of the structured light module.

[0007] Optionally, the absolute accuracy of each frame of the depth image is calculated based on the actual depth value and the preset distance of each frame of the depth image, including: calculating the difference between the actual depth value of each pixel and the preset distance to obtain a first depth error value for each pixel of each frame of the depth image; calculating, based on the first depth error value, a depth error average of the first depth error values ​​of each pixel of each sub-region to obtain a depth error average of M sub-regions of each frame of the depth image; calculating the sum of the depth error averages of the M sub-regions of each depth image, and dividing the sum by the number of sub-regions M of each frame of the depth image to obtain the absolute accuracy of each frame of the depth image.

[0008] Optionally, based on the first depth error value, the depth error average of the first depth error values ​​of each pixel point in each sub-region is calculated respectively to obtain the depth error average of the M sub-regions of each frame of the depth image, including: calculating the sum of the first depth error values ​​of each pixel point in each sub-region, and dividing it by the number of pixels in the corresponding sub-region to obtain the depth error average of the corresponding M sub-regions of each frame of the depth image.

[0009] Optionally, a spatial plane fitting is performed on each depth image frame to obtain a fitting plane, and the spatial accuracy of each depth image frame is calculated based on the actual depth value and the fitting depth value of the fitting plane, including: performing a spatial plane fitting on each depth image frame to obtain a fitting plane for each depth image frame; obtaining the distance value of each pixel point in a preset image area of ​​each depth image frame relative to the fitting plane of each depth image frame to obtain multiple second depth error values ​​of each depth image frame; and calculating the root mean square of each depth image frame based on the multiple second depth error values ​​of each depth image frame, where the root mean square is the spatial accuracy.

[0010] Optionally, the preset image region of the depth image is located at the center of the depth image, and a ratio of an area of ​​the preset image region to an area of ​​the depth image is between 1 / 2 and 4 / 5.

[0011] Optionally, the temporal accuracy of multiple frames of depth images is calculated based on the difference between the maximum value and the minimum value of each sub-region of each frame of depth image, including: obtaining the maximum depth value and the minimum depth value of the pixel points in each sub-region of each frame of depth image, and calculating the difference between the maximum depth value of the pixel points and the minimum depth value of the pixel points to obtain a third depth error value corresponding to each sub-region of each frame of depth image; respectively calculating the continuous error average value of each sub-region of the continuous image, wherein multiple frames of depth images constitute a continuous image, and the same sub-regions of the multiple frames of depth images constitute corresponding sub-regions of the continuous image; according to all continuous error average values ​​of the continuous image, obtaining the maximum continuous error average value of the continuous image, and calculating the total average value of all continuous error average values ​​of the continuous image, as well as the standard deviation of all continuous error average values ​​of the continuous image, the temporal accuracy includes the maximum continuous error average value, the total average value and the standard deviation of the continuous image.

[0012] Optionally, the continuous error average value of each sub-region of the continuous image is calculated separately, including: calculating the sum of the third depth error values ​​of the same sub-region of each frame of the depth image, and dividing it by the total number of frames of the continuous image to obtain the continuous error average value of each sub-region of the continuous image.

[0013] Optionally, based on all continuous error averages of the continuous image, the maximum continuous error average of the continuous image is obtained, and the grand average of all continuous error averages of the continuous image and the standard deviation of all continuous error averages of the continuous image are calculated, including: obtaining the maximum continuous error average among all continuous error averages of the continuous image; calculating the sum of all continuous error averages of the continuous image and dividing it by the number M of sub-regions of the continuous image to obtain the grand average of the continuous image; calculating the standard deviation of all continuous error averages of the continuous image.

[0014] Optionally, obtaining the actual depth value of each pixel of each depth image frame within the valid depth value interval includes: removing bad pixels of each depth image frame; removing noise points of each depth image frame; and obtaining the actual depth value of the valid pixel of each depth image frame.

[0015] Optionally, the depth image evaluation method of the structured light module also includes: calculating the bad pixel rate of each frame of the depth image; calculating the noise rate of each frame of the depth image.

[0016] Optionally, calculating the bad pixel rate of each depth image frame includes: obtaining the number of bad pixels in each depth image frame, where the bad pixels are pixels outside the working range of the structured light module; calculating the ratio of the number of bad pixels in each depth image frame to the total number of pixels in each depth image frame to obtain the bad pixel rate of each depth image frame.

[0017] Optionally, calculating the noise rate of each frame of the depth image includes: calculating the standard deviation of the actual depth values ​​of each pixel point in a preset area of ​​each frame of the depth image; obtaining the number of pixels greater than 10 times the standard deviation of each pixel point in the preset area of ​​each frame of the depth image to obtain the number of first noise points in each frame of the depth image; performing spatial plane fitting on each frame of the depth image to obtain a fitting plane for each frame of the depth image; obtaining the distance values ​​of each pixel point of each frame of the depth image relative to the fitting plane of each frame of the depth image; calculating the standard deviation between multiple distance values ​​of each frame of the depth image; obtaining the number of pixels greater than 10 times the corresponding standard deviation of each frame of the depth image to obtain the number of second noise points in each frame of the depth image; calculating the ratio of the sum of the number of first noise points and the number of second noise points to the total number of pixels in the preset area of ​​each frame of the depth image to obtain the noise rate of each frame of the depth image.

[0018] In another aspect of the present invention, a depth image evaluation device of a structured light module is provided, the device comprising a first acquisition module, used to acquire multiple depth images of a target object through a structured light module, the distance between the structured light module and the target object is a preset distance, and each depth image frame includes M sub-regions, where M is an integer greater than or equal to 2; a second acquisition module, used to acquire the actual depth value of each pixel point of each depth image frame within a valid depth value interval; a first calculation module, used to calculate the absolute accuracy of each depth image frame according to the actual depth value of each depth image frame and the preset distance; a fitting module, used to perform spatial plane fitting on each depth image frame to obtain a fitting plane, and calculate the spatial accuracy of each depth image frame according to the actual depth value and the fitting depth value of the fitting plane; a second calculation module, used to calculate the temporal accuracy of multiple depth images according to the difference between the maximum value and the minimum value of each sub-region of each depth image frame.

[0019] The beneficial effects of the present invention include:

[0020] The present embodiment provides a depth image evaluation method of a structured light module, the evaluation method comprising: obtaining multiple depth images of a target object through a structured light module, the distance between the structured light module and the target object is a preset distance, each depth image frame includes M sub-regions, M is an integer greater than or equal to 2; obtaining the actual depth value of each pixel point of each depth image frame within the effective depth value interval; calculating the absolute accuracy of each depth image frame according to the actual depth value and the preset distance of each depth image frame; performing spatial plane fitting on each depth image frame to obtain a fitting plane, and calculating the spatial accuracy of each depth image frame according to the actual depth value and the fitting depth value of the fitting plane; calculating the time accuracy of multiple depth images according to the difference between the maximum value and the minimum value of each sub-region of each depth image frame. In this way, the present embodiment can make up for the defects of the prior art, obtain the absolute accuracy, spatial accuracy and time progress according to the evaluation method, and then systematically evaluate the imaging accuracy of the structured light module according to the absolute accuracy, spatial accuracy and time accuracy, so that users can easily grasp the imaging performance of the structured light module. In this way, data support can also be provided for the design and development of structured light modules, thereby providing important guidance for the design and preparation of structured light modules. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 One of the flow charts of the depth image evaluation method of the structured light module provided in the embodiment of the present invention;

[0023] Figure 2 A schematic diagram of a method for dividing sub-regions of a depth image provided by an embodiment of the present invention;

[0024] Figure 3 A second flow chart of a depth image evaluation method for a structured light module provided by an embodiment of the present invention;

[0025] Figure 4 A third flow chart of a depth image evaluation method for a structured light module provided in an embodiment of the present invention;

[0026] Figure 5 A fourth flowchart of a depth image evaluation method for a structured light module provided by an embodiment of the present invention;

[0027] Figure 6A fifth flow chart of a depth image evaluation method for a structured light module provided in an embodiment of the present invention;

[0028] Figure 7 A sixth flow chart of a depth image evaluation method for a structured light module provided in an embodiment of the present invention;

[0029] Figure 8 A seventh flowchart of a depth image evaluation method for a structured light module provided by an embodiment of the present invention;

[0030] Fig. 9 FIG8 is a flow chart of a depth image evaluation method for a structured light module provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0032] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0033] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0034] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, or the positions or positional relationships in which the product of the invention is usually placed when in use. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific position, be constructed and operated in a specific position, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.

[0035] In addition, the terms "horizontal", "vertical" and the like do not mean that the components are required to be absolutely horizontal or suspended, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", and does not mean that the structure must be completely horizontal, but can be slightly tilted.

[0036] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0037] Please refer to Figure 1 This embodiment provides a depth image evaluation method for a structured light module, the method comprising:

[0038] S100, acquiring multiple frames of depth images of a target object through a structured light module, where the distance between the structured light module and the target object is a preset distance, and each frame of the depth image includes M sub-areas, where M is an integer greater than or equal to 2.

[0039] It should be noted that the above preset distance can be determined by a person skilled in the art according to the equipment specifications of the structured light module. For example, the preset distance can be 300mm, 400mm, 500mm, 600mm, 700mm, 800mm, 900mm, 1000mm, 1100mm, 1200mm, 1300mm, 1400mm or 1500mm, etc.

[0040] In addition, the depth image evaluation method of the structured light module provided in this embodiment can evaluate the depth image only for one of the preset distances, or can evaluate the depth image for multiple preset distances respectively. Among them, when evaluating the depth images at multiple preset distances, the evaluation method is the same as the evaluation method for evaluating the depth image at one preset distance, and the only difference is that the evaluation method for evaluating the depth image at one preset distance is executed multiple times according to the corresponding preset distance. Since the evaluation principle of the depth image at multiple preset distances is the same as the evaluation principle of the depth image at one preset distance, the specific method of evaluating the depth image at one preset distance will be illustrated below.

[0041] In addition, each depth image frame includes M sub-regions. For example, each depth image frame may include 2 sub-regions, 3 sub-regions, 4 sub-regions, 6 sub-regions, 9 sub-regions, etc., which are not listed here one by one. It should be noted that in this embodiment, the number of sub-regions in each depth image frame and the sub-region division standard are the same. That is, the positions of the sub-regions in each depth image frame are the same. For example, see Figure 2 , if each depth image frame includes 4 sub-areas (first sub-area, second sub-area, third sub-area and fourth sub-area), the first sub-area of ​​each depth image frame can be located at the upper left corner of the respective depth image, the second sub-area of ​​each depth image frame can be located at the upper right corner of the respective depth image, the third sub-area of ​​each depth image frame can be located at the lower right corner of the respective depth image, and the fourth sub-area of ​​each depth image frame can be located at the lower left corner of the respective depth image. Of course, Figure 2 This is only a schematic diagram of a method for dividing each frame of depth image into sub-regions provided in this embodiment. In other embodiments, other division methods may be adopted or other numbers of sub-regions may be selected.

[0042] The target object may be a whiteboard. In addition, in this embodiment, the whiteboard may be fixed to the fixed end of the motor, the structured light module may be connected to the driving end of the motor, and the motor is used to drive the structured light module to approach or move away from the whiteboard, thereby controlling the distance of the structured light module relative to the whiteboard through the motor, thereby achieving the regulation of the preset distance. The motor may be electrically connected to the controller, so that the user can control the motor through the controller to regulate the preset distance.

[0043] S200: Obtaining an actual depth value of each pixel of each frame of the depth image within a valid depth value interval.

[0044] Among them, the above-mentioned effective depth value interval refers to the depth value interval after removing the bad pixels and noise points of each frame of the depth image after the depth image is captured by the structured light module. The bad pixel is a pixel outside the working range of the structured light module (for example, when the depth value range of the depth image that can be captured by the structured light module is between 250mm and 1600mm, the depth value of the pixel point of the depth image acquired by the structured light module is outside 250mm to 1600mm. The pixel point is a pixel point with random changes in brightness or color information in the image (the photographed object itself does not have it), which is usually a manifestation of electronic noise. Whether it is a bad pixel or a noise point, it is an invalid pixel point. Because it is meaningless to evaluate the depth data of noise and bad points, it will affect the evaluation of the depth image. Therefore, after removing the bad pixels and noise points, this embodiment performs an overall evaluation of each frame of the depth image within the effective depth value area of ​​the depth image.

[0045] S300: Calculate the absolute accuracy of each frame of the depth image according to the actual depth value of each frame of the depth image and a preset distance.

[0046] S400 , performing spatial plane fitting on each frame of the depth image to obtain a fitting plane, and calculating the spatial accuracy of each frame of the depth image according to an actual depth value and a fitting depth value of the fitting plane.

[0047] S500, calculating the time accuracy of multiple frames of depth images according to the difference between the maximum value and the minimum value of each sub-region of each frame of depth image. This method can evaluate the imaging performance of the structured light module.

[0048] It should be understood that each frame of depth image will have varying degrees of pixel depth loss, and there will be differences in depth values ​​between each pixel. Absolute accuracy can be used to evaluate the depth value differences between each sub-region between each frame of depth image; spatial accuracy can be used to perform depth evaluation based on the difference between the depth values ​​of each pixel relative to the fitting plane after fitting the spatial plane of each frame of depth image; temporal accuracy can be used to evaluate the depth value differences between depth images of different frames at the same position (i.e., the same sub-region).

[0049] In summary, the present embodiment provides a depth image evaluation method for a structured light module, the evaluation method comprising: obtaining multiple depth images of a target object through a structured light module, the distance between the structured light module and the target object is a preset distance, each depth image frame includes M sub-regions, M is an integer greater than or equal to 2; obtaining the actual depth value of each pixel point of each depth image frame within the effective depth value interval; calculating the absolute accuracy of each depth image frame according to the actual depth value and the preset distance of each depth image frame; performing spatial plane fitting on each depth image frame to obtain a fitting plane, and calculating the spatial accuracy of each depth image frame according to the actual depth value and the fitting depth value of the fitting plane; calculating the time accuracy of multiple depth images according to the difference between the maximum value and the minimum value of each sub-region of each depth image frame. In this way, the present embodiment can make up for the defects of the prior art, obtain the absolute accuracy, spatial accuracy and time progress according to the evaluation method, and then systematically evaluate the imaging accuracy of the structured light module according to the absolute accuracy, spatial accuracy and time accuracy, so that users can easily grasp the imaging performance of the structured light module. In this way, data support can also be provided for the design and development of structured light modules, thereby providing important guidance for the design and preparation of structured light modules.

[0050] Please refer to Figure 3 Optionally, the above step S300, calculating the absolute accuracy of each frame of the depth image according to the actual depth value of each frame of the depth image and the preset distance, includes the following steps:

[0051] S310: Calculate the difference between the actual depth value of each pixel and the preset distance to obtain a first depth error value of each pixel of each frame of the depth image.

[0052] Calculating the difference between the actual depth value of each pixel and the preset distance means subtracting the actual depth value of each pixel from the preset distance to obtain a first depth error value for each pixel. For example, when the preset distance is 500 mm, the depth value of each pixel is subtracted from 500 mm to obtain multiple first depth error values.

[0053] S320 . Calculate, according to the first depth error value, a depth error average of the first depth error values ​​of each pixel point in each sub-region, so as to obtain the depth error averages of the M sub-regions in each frame of the depth image.

[0054] Optionally, the above step S320, respectively calculating the depth error average of the first depth error value of each pixel point in each sub-region according to the first depth error value to obtain the depth error average of the M sub-regions of each frame of the depth image, may include:

[0055] The sum of the first depth error values ​​of each pixel point in each sub-region is calculated and divided by the number of pixels in the corresponding sub-region to obtain the average depth error value of the M sub-regions corresponding to each frame of the depth image.

[0056] In this way, the average depth error of each sub-region of each depth image frame can be obtained. For example, when there are three depth images in total, the average depth error of M sub-regions can be obtained for each depth image frame, and the average depth error of 3M sub-regions can be obtained for three depth images.

[0057] S330 , calculating the sum of the average depth errors of the M sub-regions of each depth image, and dividing the sum by the number M of sub-regions of each depth image frame to obtain the absolute accuracy of each depth image frame.

[0058] That is, the absolute accuracy of each depth image frame is obtained by summing the average depth errors of the M sub-areas of each depth image frame and dividing it by M. Three sets of absolute accuracy can be obtained for three depth image frames, and each set of absolute accuracy is used to evaluate the performance of the corresponding depth image.

[0059] For ease of understanding, the following will illustrate the method of calculating the absolute accuracy of each frame of depth image by way of example. For example, if the structured light module acquires a total of 3 frames of depth images (respectively, the first frame depth image, the second frame depth image, and the third frame depth image), and each frame of depth image includes 4 sub-regions (respectively, the first sub-region, the second sub-region, the third sub-region, and the fourth sub-region). For the first frame of depth image: first calculate the sum of the first depth error values ​​of each pixel point contained in the first sub-region of the first frame depth image, and then divide the sum value by the total number of pixels in the first sub-region of the first frame depth image, so as to obtain the depth error average value of the first sub-region of the first frame depth image. Then, the depth error average value of the second sub-region of the first frame depth image, the depth error average value of the third sub-region of the first frame depth image, and the depth error average value of the fourth sub-region of the first frame depth image are obtained in the same way. Then, the depth error average values ​​of each of the four sub-regions of the first frame depth image are summed again and divided by the total number of sub-regions (i.e., 4), so that the absolute accuracy of the first frame depth image can be obtained. Similarly, the absolute accuracy of the second frame depth image and the absolute accuracy of the third frame depth image are obtained by the same method.

[0060] Please refer to Figure 4 In this embodiment, optionally, the above step S400, performing spatial plane fitting on each frame of the depth image to obtain a fitting plane, and calculating the spatial accuracy of each frame of the depth image according to the actual depth value and the fitting depth value of the fitting plane, includes:

[0061] S410 , performing spatial plane fitting on each frame of the depth image to obtain a fitting plane of each frame of the depth image.

[0062] When performing spatial plane fitting on each frame of depth image, the plane equation (ie, ax+by+cz=d) can be used to fit the depth image, thereby obtaining a fitting plane. In addition, each parameter in the plane equation can be obtained by using the least square method.

[0063] S420: Obtain a distance value between each pixel point in a preset image area of ​​each frame of the depth image and a fitting plane of each frame of the depth image to obtain a plurality of second depth error values ​​of each frame of the depth image.

[0064] It should be noted that, for example, if the structured light module acquires three frames of depth images, then this step can acquire three sets of second depth error values. Among them, the number of each set of second depth error values ​​should be the same as the number of pixels in the preset image area of ​​each set of depth images. For example, if there are 10 pixels in the preset image area of ​​each frame of depth image, then 10 distance values ​​can be obtained for each frame of depth image, that is, 10 second depth error values ​​can be obtained for each frame of depth image.

[0065] In addition, the distance value of each pixel point is the distance between the pixel point and the fitting plane, which can be calculated by the point-to-plane distance formula. The point-to-plane distance formula is as follows:

[0066]

[0067] d is the distance from the pixel point P to the fitting plane, and the coordinates of the pixel point are (x1, y1, z1). Since the point-to-plane distance formula, standard deviation formula, and root mean square formula are all well known, the formula should be well known in the art. This application is only an application of the formula, so the formula will not be repeated here.

[0068] S430 . Calculate a root mean square of each depth image frame according to the multiple second depth error values ​​of each depth image frame, where the root mean square is the spatial accuracy.

[0069] For example, if there are 10 pixels in the preset image area of ​​each frame of the depth image, 10 distance values ​​can be obtained for each frame of the depth image. When calculating the root mean square, these 10 distance values ​​can be substituted into the root mean square calculation formula for calculation. The root mean square formula is as follows:

[0070]

[0071] Wherein, N is the number of distance values ​​of each frame of depth image; X i is the ith distance value in each frame of the depth image. When calculating, just substitute the above 10 distance values ​​into the above RMS formula for calculation.

[0072] Optionally, in this embodiment, the preset image area of ​​the depth image is located at the center of the depth image, and the ratio of the area of ​​the preset image area to the area of ​​the depth image is between 1 / 2 and 4 / 5. For example, the ratio of the area of ​​the preset image area to the area of ​​the depth image can be 3 / 4, that is, 75% of the area in the center of each frame of the depth image is selected as the preset image area. Alternatively, the preset image area can be a square preset image area, and its width is 3 / 4 of the width of the depth image, and its length is also 3 / 4 of the depth image.

[0073] Please refer to Figure 5 Optionally, the above step S500, calculating the time accuracy of multiple frames of depth images according to the difference between the maximum value and the minimum value of each sub-region of each frame of depth image, includes the following steps:

[0074] S510: Obtain a maximum depth value and a minimum depth value of pixels in each sub-region of each depth image frame, and calculate a difference between the maximum depth value of the pixels and the minimum depth value of the pixels to obtain a third depth error value corresponding to each sub-region of each depth image frame.

[0075] For ease of understanding, an example is used for explanation. If there are a total of 3 depth image frames (respectively, the first depth image, the second depth image, and the third depth image), and each depth image frame has 4 sub-regions (respectively, the first sub-region, the second sub-region, the third sub-region, and the fourth sub-region). When calculating the third depth error value of the first sub-region of the first frame depth image, the maximum depth value and the minimum depth value of each pixel in the first sub-region of the first frame depth image can be obtained first; then the difference between the maximum depth value and the minimum depth value is calculated to obtain the third depth error value of the first sub-region of the first frame depth image, ... and so on, calculate the third depth error values ​​of other sub-regions of the first frame depth image. Similarly, calculate the third depth error value of each sub-region of other frame depth images.

[0076] S520 , respectively calculating a continuous error average value of each sub-region of the continuous image, wherein a plurality of frames of depth images constitute a continuous image, and the same sub-regions of the plurality of frames of depth images constitute corresponding sub-regions of the continuous image.

[0077] Optionally, the above step S520 of respectively calculating the continuous error average of each sub-region of the continuous image includes:

[0078] The sum of the third depth error values ​​of the same sub-region of each frame of the depth image is calculated and divided by the total number of frames of the continuous images to obtain a continuous error average value of each sub-region of the continuous images.

[0079] It should be noted that a continuous image is an image composed of depth images of multiple frames. The sub-region of a continuous image is the sum of the same sub-regions of each depth image. For example, when there are three depth images in total, and each depth image includes 4 sub-regions (such as Figure 2 As shown in the figure, they are the first sub-region, the second sub-region, the third sub-region and the fourth sub-region respectively), then the continuous image also includes 4 sub-regions, among which the first sub-region of the continuous image includes the first sub-region of the first frame depth image, the first sub-region of the second frame depth image, and the first sub-region of the third frame depth image. The other sub-regions of the continuous image are similar and will not be described here.

[0080] This step can obtain M continuous error average values, where M is the number of sub-regions of the continuous image, which is also equal to the number of sub-regions of each frame of the depth image.

[0081] S530. According to all continuous error averages of continuous images, obtain the maximum continuous error average of continuous images, and calculate the total average of all continuous error averages of continuous images and the standard deviation of all continuous error averages of continuous images. The time accuracy includes the maximum continuous error average, the total average and the standard deviation of continuous images.

[0082] Please refer to Figure 6 Optionally, the above step S530, based on all continuous error averages of the continuous images, obtains the maximum continuous error average of the continuous images, and calculates the total average of all continuous error averages of the continuous images, and the standard deviation of all continuous error averages of the continuous images, includes:

[0083] S531 , obtaining the maximum continuous error average value among all continuous error average values ​​of continuous images.

[0084] S532: Calculate the sum of all continuous error averages of the continuous image, and divide it by the number M of sub-regions of the continuous image to obtain a total average of the continuous image.

[0085] S533, calculating the standard deviation of all continuous error averages of continuous images.

[0086] The maximum continuous error average value can be directly obtained from step S520. The total average value of all continuous error average values ​​of the continuous image can be obtained by summing the above M continuous error average values ​​and dividing by M. The standard deviation of all continuous error average values ​​of the continuous image can be obtained by the standard deviation formula, which is as follows:

[0087]

[0088] Where N is the number of consecutive error averages, x i is the i-th continuous error average, μ is the average of all continuous error averages. By substituting various data, the standard deviation of the continuous image can be obtained.

[0089] The maximum continuous error average value, total average value, and standard deviation of continuous images obtained in the above steps can be used to evaluate the time accuracy of the structured light module.

[0090] Please refer to Figure 6 In this embodiment, the above step S200, obtaining the actual depth value of each pixel of each frame of the depth image within the valid depth value interval, includes:

[0091] S210: Remove bad pixels from each frame of the depth image.

[0092] S220: Remove noise from each frame of the depth image.

[0093] S230 , obtaining actual depth values ​​of valid pixels of each frame of the depth image.

[0094] The effective pixel points of each frame of the depth image are the pixel points after bad pixels and noise points are removed from all the pixel points of each frame of the depth image acquired by the structured light module.

[0095] In order to make the evaluation parameters of the depth image evaluation method of the structured light module provided in this embodiment more complete, in this embodiment, please refer to Figure 7 Optionally, the depth image evaluation method of the structured light module further includes:

[0096] S600: Calculate the bad pixel rate of each frame of the depth image.

[0097] S700: Calculate the noise rate of each frame of the depth image.

[0098] In this way, the depth image evaluation method of the structured light module provided by this embodiment can obtain more comprehensive and complete depth data, thereby improving the evaluation integrity and comprehensiveness of the depth data of the structured light module, and making the evaluation data obtained by the depth image evaluation method of the structured light module provided by this embodiment have better reference value and practical effect.

[0099] Please refer to Figure 8 Specifically, in this embodiment, the above step S600, calculating the bad pixel rate of each frame of the depth image, includes:

[0100] S610: Obtain the number of bad pixels in each frame of the depth image, where the bad pixels are pixels outside the working range of the structured light module.

[0101] Bad pixels are pixels outside the working range of the structured light module. For example, when the depth value range of the depth image that can be captured by the structured light module is between 250mm and 1600mm (250mm to 1600mm is the working range of the structured light module), the pixel points of the depth image acquired by the structured light module with depth values ​​outside 250mm to 1600mm are bad pixels.

[0102] S620: Calculate the ratio of the number of bad pixels in each frame of the depth image to the total number of pixels in each frame of the depth image to obtain a bad pixel rate of each frame of the depth image.

[0103] The bad pixel rate can also be used to evaluate the depth data of the structured light module, thereby providing data reference for the design or preparation of the structured light module, and acting reversely on the structured light module to facilitate the improvement of the performance of the structured light module.

[0104] Optionally, see Fig. 9 The above step S700, calculating the noise rate of each frame of the depth image, includes:

[0105] S710: Calculate the standard deviation of the actual depth values ​​of each pixel in a preset area of ​​each depth image frame.

[0106] In this embodiment, the preset area of ​​each depth image is located at the center of each depth image, and the ratio of the area of ​​the preset area to the area of ​​the depth image can be 9 / 10, that is, 90% of the area in the center of each depth image is selected as the preset area. Alternatively, the preset area can also be a square preset area, and its width is 9 / 10 of the width of the depth image, and its length is also 9 / 10 of the depth image.

[0107] The standard deviation of each pixel of each frame of the depth image can be calculated using the standard deviation formula, which will not be described in detail here.

[0108] S720: Obtain the number of pixels that is greater than 10 times the standard deviation of each pixel in a preset area of ​​each frame of the depth image to obtain the number of first noise points in each frame of the depth image.

[0109] That is, the pixel points that are greater than 10 times the standard deviation of each pixel point in the preset area of ​​each frame of the depth image are the first noise points.

[0110] S730 . Perform spatial plane fitting on each depth image frame to obtain a fitting plane of each depth image frame.

[0111] The principle of the spatial plane fitting here is the same as that of the spatial plane fitting in the previous article. Please refer to the description of plane fitting in the previous article, and no repetition will be given here.

[0112] S740: Obtain a distance value between each pixel point of each frame of the depth image and a fitting plane of each frame of the depth image.

[0113] The distance value is the distance from each pixel to the fitting plane, which can be calculated using the point-to-plane distance formula.

[0114] S750: Calculate the standard deviation between multiple distance values ​​of each frame of the depth image.

[0115] The calculation formula of the standard deviation requires the use of an average of multiple distance values ​​of each frame of the depth image. Here, the average may be obtained by summing the multiple distance values ​​of each frame of the depth image and dividing the sum by the number of distance values.

[0116] S760: Obtain the number of pixels in each frame of the depth image that is greater than 10 times the corresponding standard deviation, so as to obtain the number of second noise points in each frame of the depth image.

[0117] That is, the pixel points that are greater than 10 times the standard deviation between the multiple distance values ​​of each frame of the depth image are the second noise points. It should be noted that this standard deviation is the standard deviation calculated in the aforementioned step S750, which is calculated by the distance of each pixel point relative to the fitting plane; while the standard deviation in step S720 is the standard deviation obtained in step S710, which is directly calculated using the actual depth value of each pixel point. It should be noted that the two should be distinguished.

[0118] S770, calculating the ratio of the sum of the number of the first noise points and the number of the second noise points to the total number of pixels in the preset area of ​​each frame of the depth image to obtain the noise rate of each frame of the depth image. Evaluating the noise rate of the structured light module can further improve the evaluation integrity of the structured light module.

[0119] In another aspect of the present invention, a depth image evaluation device of a structured light module is provided, the device comprising a first acquisition module, a first acquisition module, a second acquisition module, a first calculation module and a second calculation module. The first acquisition module is used to acquire multiple frames of depth images of a target object through a structured light module, the distance between the structured light module and the target object is a preset distance, and each frame of the depth image includes M sub-regions, where M is an integer greater than or equal to 2. The second acquisition module is used to acquire the actual depth value of each pixel point of each frame of the depth image within the effective depth value interval. The first calculation module is used to calculate the absolute accuracy of each frame of the depth image according to the actual depth value and the preset distance of each frame of the depth image. The fitting module is used to perform spatial plane fitting on each frame of the depth image to obtain a fitting plane, and calculate the spatial accuracy of each frame of the depth image according to the actual depth value and the fitting depth value of the fitting plane. The second calculation module is used to calculate the temporal accuracy of multiple frames of depth images according to the difference between the maximum value and the minimum value of each sub-region of each frame of the depth image.

[0120] Among them, the above-mentioned device is used to execute the depth image evaluation method of the structured light module provided in the above-mentioned embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0121] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

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

[0123] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0124] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0125] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated as: ROM), random access memory (English: Random Access Memory, abbreviated as: RAM), disk or optical disk and other media that can store program code.

[0126] The above description is only an optional embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

[0127] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present invention will not further describe various possible combinations.

Claims

1. A depth image evaluation method for a structured light module, characterized in that: include: Acquire multiple frames of depth images of the target object through a structured light module, the distance between the structured light module and the target object is a preset distance, and each frame of the depth image includes M sub-areas, where M is an integer greater than or equal to 2; Obtaining the actual depth value of each pixel of each frame of the depth image within a valid depth value interval; Calculating the absolute accuracy of the depth image of each frame according to the actual depth value of the depth image of each frame and the preset distance; Performing spatial plane fitting on each frame of the depth image to obtain a fitting plane, and calculating the spatial accuracy of each frame of the depth image according to the actual depth value and the fitting depth value of the fitting plane; Calculating the time accuracy of the depth images of multiple frames according to the difference between the maximum value and the minimum value of each sub-region of each frame of the depth image; The calculating the absolute accuracy of each frame of the depth image according to the actual depth value of each frame of the depth image and the preset distance includes: calculating the difference between the actual depth value of each pixel and the preset distance to obtain a first depth error value of each pixel of each frame of the depth image; calculating the depth error average of the first depth error value of each pixel of each sub-region according to the first depth error value to obtain the depth error average of M sub-regions of each frame of the depth image; calculating the sum of the depth error averages of the M sub-regions of each depth image, and dividing the sum by the number of sub-regions M of each frame of the depth image to obtain the absolute accuracy of each frame of the depth image; The performing spatial plane fitting on each frame of the depth image to obtain a fitting plane, and calculating the spatial accuracy of each frame of the depth image according to the actual depth value and the fitting depth value of the fitting plane, includes: performing spatial plane fitting on each frame of the depth image to obtain a fitting plane of each frame of the depth image; obtaining a distance value of each pixel point in a preset image area of ​​each frame of the depth image relative to the fitting plane of each frame of the depth image to obtain a plurality of second depth error values ​​of each frame of the depth image; calculating a root mean square of each frame of the depth image according to the plurality of second depth error values ​​of each frame of the depth image, wherein the root mean square is the spatial accuracy; The calculating the time accuracy of the depth images of multiple frames according to the difference between the maximum value and the minimum value of each sub-region of the depth image of each frame includes: obtaining the maximum depth value and the minimum depth value of the pixel points of each sub-region of the depth image of each frame, and calculating the difference between the maximum depth value of the pixel points and the minimum depth value of the pixel points to obtain the third depth error value corresponding to each sub-region of the depth image of each frame; respectively calculating the continuous error average value of each sub-region of the continuous image, wherein the depth images of multiple frames constitute the continuous image, and the same sub-regions of the depth images of multiple frames constitute the corresponding sub-regions of the continuous image; according to all the continuous error average values ​​of the continuous image, obtaining the maximum continuous error average value of the continuous image, and calculating the total average value of all the continuous error average values ​​of the continuous image, and the standard deviation of all the continuous error average values ​​of the continuous image, the time accuracy includes the maximum continuous error average value, the total average value and the standard deviation of the continuous image.

2. The depth image evaluation method of the structured light module according to claim 1, characterized in that: The step of calculating the depth error average of the first depth error values ​​of each pixel point in each sub-region according to the first depth error value to obtain the depth error average of the M sub-regions in each frame of the depth image includes: The sum of the first depth error values ​​of each pixel point in each of the sub-regions is calculated, and the sum is divided by the number of pixels corresponding to the sub-region to obtain an average depth error value of the M sub-regions corresponding to each frame of the depth image.

3. The depth image evaluation method of the structured light module according to claim 1, characterized in that: The preset image region of the depth image is located at the center of the depth image, and a ratio of an area of ​​the preset image region to an area of ​​the depth image is between 1 / 2 and 4 / 5.

4. The depth image evaluation method of the structured light module according to claim 1, characterized in that: The step of respectively calculating the continuous error average of each sub-region of the continuous image comprises: The sum of the third depth error values ​​of the same sub-region of each frame of the depth image is calculated and divided by the total number of frames of the continuous images to obtain a continuous error average value of each sub-region of the continuous images.

5. The depth image evaluation method of the structured light module according to claim 4, characterized in that: The step of obtaining the maximum continuous error average value of the continuous images according to all continuous error average values ​​of the continuous images, and calculating the total average value of all continuous error average values ​​of the continuous images and the standard deviation of all continuous error average values ​​of the continuous images includes: Obtaining the maximum continuous error average value among all continuous error average values ​​of the continuous images; Calculating the sum of all continuous error averages of the continuous image and dividing the sum by the number M of sub-regions of the continuous image to obtain a total average of the continuous image; The standard deviation of all consecutive error means for the consecutive images is calculated.

6. The depth image evaluation method of the structured light module according to claim 1, characterized in that: The obtaining of the actual depth value of each pixel of each frame of the depth image within the valid depth value interval includes: Removing bad pixels from each frame of the depth image; Removing noise from each frame of the depth image; Get the actual depth value of the valid pixel point of each frame of the depth image.

7. The depth image evaluation method of the structured light module according to claim 1, characterized in that: The depth image evaluation method of the structured light module also includes: Calculating the bad pixel rate of each frame of the depth image; The noise rate of each frame of the depth image is calculated.

8. The depth image evaluation method of the structured light module according to claim 7, characterized in that: The calculating the bad pixel rate of each frame of the depth image includes: Obtaining the number of bad pixels of each frame of the depth image, where the bad pixels are pixels outside the working range of the structured light module; The ratio of the number of bad pixels in each frame of the depth image to the total number of pixels in each frame of the depth image is calculated to obtain the bad pixel rate of each frame of the depth image.

9. The depth image evaluation method of the structured light module according to claim 7, characterized in that: The calculating the noise rate of each frame of the depth image includes: Calculate the standard deviation of the actual depth value of each pixel point in the preset area of ​​each frame of the depth image; Obtaining the number of pixels that is greater than 10 times the standard deviation of each pixel in the preset area of ​​each frame of the depth image to obtain the number of first noise points in each frame of the depth image; Performing spatial plane fitting on each frame of the depth image to obtain a fitting plane of each frame of the depth image; Obtaining a distance value between each pixel point of each frame of the depth image and a fitting plane of each frame of the depth image; Calculating a standard deviation between a plurality of the distance values ​​of each frame of the depth image; Obtain the number of pixels of each frame of the depth image that is greater than 10 times the corresponding standard deviation thereof, so as to obtain the number of second noise points of each frame of the depth image; The ratio of the sum of the number of the first noise points and the number of the second noise points to the total number of each pixel point in the preset area of ​​each frame of the depth image is calculated to obtain the noise rate of each frame of the depth image.

10. A depth image evaluation device for a structured light module, characterized in that: include: A first acquisition module, used for acquiring multiple frames of depth images of a target object through a structured light module, wherein the distance between the structured light module and the target object is a preset distance, and each frame of the depth image includes M sub-areas, where M is an integer greater than or equal to 2; A second acquisition module is used to acquire the actual depth value of each pixel point of each frame of the depth image within a valid depth value interval; A first calculation module, used for calculating the absolute accuracy of each frame of the depth image according to the actual depth value of each frame of the depth image and the preset distance; The calculating the absolute accuracy of each frame of the depth image according to the actual depth value of each frame of the depth image and the preset distance includes: calculating the difference between the actual depth value of each pixel and the preset distance to obtain a first depth error value of each pixel of each frame of the depth image; calculating the depth error average of the first depth error value of each pixel of each sub-region according to the first depth error value to obtain the depth error average of M sub-regions of each frame of the depth image; calculating the sum of the depth error averages of the M sub-regions of each depth image, and dividing the sum by the number of sub-regions M of each frame of the depth image to obtain the absolute accuracy of each frame of the depth image; A fitting module, used for performing spatial plane fitting on each frame of the depth image to obtain a fitting plane, and calculating the spatial accuracy of each frame of the depth image according to the actual depth value and the fitting depth value of the fitting plane; performing spatial plane fitting on each frame of the depth image to obtain a fitting plane, and calculating the spatial accuracy of each frame of the depth image according to the actual depth value and the fitting depth value of the fitting plane, including: performing spatial plane fitting on each frame of the depth image to obtain a fitting plane for each frame of the depth image; obtaining the distance value of each pixel point in a preset image area of ​​each frame of the depth image relative to the fitting plane of each frame of the depth image to obtain a plurality of second depth error values ​​of each frame of the depth image; calculating the root mean square of each frame of the depth image according to the plurality of second depth error values ​​of each frame of the depth image, wherein the root mean square is the spatial accuracy; The second calculation module is used to calculate the time accuracy of the multiple frames of the depth images according to the difference between the maximum value and the minimum value of each sub-region of each frame of the depth image; the calculation of the time accuracy of the multiple frames of the depth images according to the difference between the maximum value and the minimum value of each sub-region of each frame of the depth image includes: obtaining the maximum depth value and the minimum depth value of the pixel points of each sub-region of each frame of the depth image, and calculating the difference between the maximum depth value of the pixel points and the minimum depth value of the pixel points to obtain a third depth error value corresponding to each sub-region of each frame of the depth image; respectively calculating the continuous error average value of each sub-region of the continuous image, wherein the multiple frames of the depth images constitute the continuous image, and the same sub-regions of the multiple frames of the depth images constitute the corresponding sub-regions of the continuous image; according to all the continuous error average values ​​of the continuous image, obtaining the maximum continuous error average value of the continuous image, and calculating the total average value of all the continuous error average values ​​of the continuous image, and the standard deviation of all the continuous error average values ​​of the continuous image, the time accuracy includes the maximum continuous error average value, the total average value and the standard deviation of the continuous image.