Depth map plane detection method based on mean filtering
By employing mean filtering and principal component analysis, planar regions in depth maps are screened and validated, addressing the issues of high complexity and parameter dependence in existing depth map planar detection methods, and achieving real-time and universal planar detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU YILAN TECH CO LTD
- Filing Date
- 2022-08-02
- Publication Date
- 2026-04-17
AI Technical Summary
Existing depth map plane detection methods have high algorithm complexity in 3D space and require parameter adjustment to adapt to different scenarios, which cannot meet the requirements of real-time performance and universality.
The depth map is preprocessed using a mean filter. Through kernel filtering, interpolation, connected component analysis, and principal component analysis, planar regions are selected and their planar characteristics in three-dimensional space are verified, enabling real-time detection.
It improves the efficiency of depth map plane detection, enabling real-time detection of various types of planes in different scenarios without parameter adjustment, thus meeting the requirements of real-time performance and universality.
Smart Images

Figure CN115272583B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, and in particular to a depth map plane detection method based on mean filtering. Background Technology
[0002] Planes are a ubiquitous structure in our daily lives, such as building walls, furniture, and even books and computers. With the gradual development of computer vision technology, planes, due to their simple structural characteristics, are playing an increasingly important role in vision-related fields. Current plane detection techniques mainly fall into two categories: one extracts planes from ordinary RGB images through pixel clustering or homography transformation estimation; the other uses depth information from depth maps to reconstruct 3D point clouds and then extracts planes from these 3D point clouds.
[0003] Plane extraction methods on ordinary RGB images are greatly affected by the scene; excessively sparse or complex scene textures can lead to errors in plane extraction. In contrast, plane extraction methods on depth maps do not depend on scene textures, but because they extract planes in three-dimensional space, they cannot meet real-time requirements.
[0004] The advent of depth cameras has provided a new research direction for plane detection. Depth maps can be used to detect planes with complex patterns and textures. However, existing depth map plane detection methods ignore the continuity of depth values in planar regions and perform plane detection directly on 3D point clouds, resulting in a sharp increase in algorithm complexity compared to 2D plane detection methods. Secondly, although some methods can achieve real-time depth map plane detection, these methods require adjusting algorithm parameters to adapt to different scenarios, which greatly limits the application of depth map plane detection methods in real-world scenarios. Summary of the Invention
[0005] This invention provides a depth map plane detection method based on mean filtering. It utilizes the characteristic that depth values are continuous in planar regions to filter planar regions on a two-dimensional depth map, and then verifies whether the planar conditions are met in three-dimensional space. This achieves a real-time depth map plane detection method, and the algorithm parameters are not dependent on the scene.
[0006] This invention provides a depth map plane detection method based on mean filtering, comprising:
[0007] The raw depth map is obtained using a depth camera;
[0008] The original depth map is subjected to mean filtering using two preset kernels to obtain two first depth maps;
[0009] The difference between the two first depth maps is taken pixel by pixel to obtain the planar region mask map;
[0010] The original depth map is converted into a 3D point cloud using the intrinsic parameters of the depth camera, and stored according to pixel position;
[0011] Connectivity analysis is performed on the Mask graph of the planar region to obtain 3D point sets of multiple connected regions;
[0012] One of the connected components is extracted as the target connected component, and principal component analysis is used to perform plane fitting on the 3D point set of the target connected component to obtain the mean square error.
[0013] Determine whether the mean square error is less than a set value;
[0014] If the mean square error is less than a set value, the target connected region is identified as a plane, and the 3D points in the target connected region that belong to the planar region on the original depth map are verified.
[0015] If the mean square error is greater than or equal to a set value, then return to the step of using principal component analysis to perform plane fitting on the 3D point set of one of the connected components to obtain the mean square error of the plane, until all the 3D point sets of the connected components have been traversed to obtain the planar region corresponding to the original depth map.
[0016] Furthermore, the step of acquiring the original depth map using a depth camera includes:
[0017] Receives image data captured by a depth camera via a USB interface;
[0018] The original depth map is obtained by performing distortion correction on the image data.
[0019] Furthermore, the step of obtaining a planar region mask image by taking the pixel-by-pixel difference between the two first depth maps includes:
[0020] Determine the first depth of the two images Figure 1 Is the difference between each pixel less than 1 / 300 of the original depth value of that pixel?
[0021] If two first depths Figure 1 If the difference between a pixel and the original depth value of the pixel is less than 1 / 300, then the pixel is marked as a planar region on the planar region mask map.
[0022] If two first depths Figure 1 If the difference between pixels is greater than or equal to 1 / 300 of the original depth value of the pixel, then the pixel is marked as a non-planar region on the planar region mask map;
[0023] Return to determine the first depth of the two images Figure 1The process of checking if the difference between pixels is less than 1 / 300 of the original depth value of that pixel continues until all pixels in the two first depth maps have been traversed, resulting in a planar region mask map.
[0024] Further, the step of performing connected component analysis on the planar region Mask graph to obtain multiple 3D point sets of connected components includes:
[0025] Calculate the distance from each pixel in the planar region mask image to the boundary of the planar region;
[0026] 3D points in each connected component whose distance is greater than a threshold are stored separately according to the connected component label, resulting in 3D point sets for multiple connected components.
[0027] Further, the step of identifying the target connected region as a plane and verifying the 3D points in the original depth map belonging to the planar region within the target connected region includes:
[0028] Extract the target region in the planar region Mask graph that is equal to the connected component label;
[0029] Perform a set number of expansion operations on the target region to obtain the target expanded region;
[0030] On the target expansion region, the 3D points corresponding to the pixels belonging to the planar region on the original depth map are verified using the plane normal and the coordinates of the plane center point to obtain the target plane mask map;
[0031] Set the plane ID for the target plane mask image.
[0032] Furthermore, the two preset cores are cores of two sizes, 7×7 and 17×17.
[0033] Furthermore, the set value is ,in, The standard uncertainty of the estimated unit average depth. This is the tolerance coefficient.
[0034] The present invention also provides a depth map plane detection device based on mean filtering, comprising:
[0035] The acquisition module is used to acquire raw depth maps using a depth camera;
[0036] The mean filtering module is used to perform mean filtering on the original depth map using two preset kernels to obtain two first depth maps;
[0037] The difference module is used to take the difference pixel by pixel between the two first depth maps to obtain the planar region mask map;
[0038] The conversion module is used to convert the original depth map into a 3D point cloud using the intrinsic parameters of the depth camera, and store it according to the pixel position;
[0039] The analysis module is used to perform connected component analysis on the planar region Mask graph to obtain 3D point sets of multiple connected components;
[0040] The fitting module is used to extract one of the connected components as the target connected component, and to perform plane fitting on the 3D point set of the target connected component using principal component analysis to obtain the mean square error.
[0041] The judgment module is used to determine whether the mean square error is less than a set value;
[0042] The verification module is used to determine that the target connected region is a plane when the mean square error is less than a set value, and to verify the 3D points in the target connected region that belong to the planar region on the original depth map.
[0043] The traversal module is used to return the step of performing plane fitting on the 3D point set of one of the connected components using principal component analysis when the mean square error is greater than or equal to a set value, so as to obtain the mean square error of the plane, until all the 3D point sets of the connected components have been traversed and the planar region corresponding to the original depth map is obtained.
[0044] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.
[0045] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-described method.
[0046] The beneficial effects of this invention are as follows:
[0047] Two mean filters with different kernel sizes are used to filter the original depth map, resulting in two new depth maps. Then, the depth values of each pixel in the two new depth maps are subtracted, and the difference at each pixel is used to determine whether it belongs to a plane, thus obtaining a planar region mask of the original depth map. Finally, connected component analysis is performed on the planar region mask to group 3D points belonging to the same connected component in the 3D point cloud corresponding to the original depth map together. Principal component analysis (PCA) is then used to fit the planes within each connected component. Therefore, planar regions of the original depth map can be obtained through two simple mean filtering operations, greatly improving the efficiency of plane detection in depth maps and enabling real-time application to different scenes without adjusting any parameters. In the experimental environment, it can detect various types of planes in a scene in real time. Attached Figure Description
[0048] Figure 1 This is a schematic diagram of a method flow according to an embodiment of the present invention.
[0049] Figure 2 This is a schematic diagram of the device structure according to an embodiment of the present invention.
[0050] Figure 3 This is a schematic diagram of the internal structure of a computer device according to an embodiment of the present invention.
[0051] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0052] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0053] Planes are the most common structures in man-made environments, so accurate plane detection can aid in computer vision tasks such as image registration, 3D reconstruction, and augmented reality (AR). The advent of depth cameras has provided a new research direction for plane detection, using depth maps to detect planes with complex patterns and textures. However, existing depth map plane detection methods ignore the continuity of depth values within planar regions, performing plane detection directly on 3D point clouds, resulting in a significantly increased algorithm complexity compared to 2D plane detection methods. Furthermore, while some methods can achieve real-time depth map plane detection, these methods require adjusting algorithm parameters to adapt to different scenarios, greatly limiting the practical application of depth map plane detection methods.
[0054] In response to the above problems, such as Figure 1 As shown, this invention provides a depth map plane detection method based on mean filtering, comprising the following steps:
[0055] S1. Use a depth camera to obtain the original depth map.
[0056] As described in step S1 above, before obtaining the original depth map, a platform needs to be set up, i.e., the depth camera is set up at the test site, approximately 1.2m above the ground. The data captured by the depth camera is transmitted to the host computer via a USB interface. The host computer receives the image data captured by the depth camera via a USB interface, and then performs distortion correction on the image data to obtain the original depth map.
[0057] S2. The original depth map is subjected to mean filtering using two preset kernels to obtain two first depth maps; the two preset kernels are 7×7 and 17×17 kernels respectively.
[0058] As described in step S2 above, mean filtering is performed on the original depth map using kernels of 7×7 and 17×17 sizes to obtain two new depth maps, namely the first depth map. The 7×7 kernel is used for mean filtering to remove planar noise points, while the 17×17 kernel is more effective at filtering planar regions. Experimental comparisons show that 7×7 and 17×17 kernel sizes are optimal.
[0059] S3. Take the difference pixel by pixel between the two first depth maps to obtain the planar region mask map.
[0060] As described in step S3 above, if the difference at a certain pixel is less than 1 / 300 of the original depth value of that pixel, then that pixel is marked as a planar region on the planar region mask map; otherwise, it is marked as a non-planar region. Therefore, step S3 specifically includes:
[0061] S31. Determine the first depth of the two images. Figure 1 Is the difference between each pixel less than 1 / 300 of the original depth value of that pixel?
[0062] S32, If two images have the first depth Figure 1 If the difference between a pixel and the original depth value of the pixel is less than 1 / 300, then the pixel is marked as a planar region on the planar region mask map.
[0063] S33, If two images are of the first depth Figure 1 If the difference between pixels is greater than or equal to 1 / 300 of the original depth value of the pixel, then the pixel is marked as a non-planar region on the planar region mask map;
[0064] S34, Return to determine the first depth of the two images. Figure 1 The process of checking if the difference between pixels is less than 1 / 300 of the original depth value of that pixel continues until all pixels in the two first depth maps have been traversed, resulting in a planar region mask map.
[0065] S4. Use the intrinsic parameters of the depth camera to convert the original depth map into a 3D point cloud and store it according to the pixel position.
[0066] S5. Perform connected component analysis on the planar region Mask graph to obtain multiple 3D point sets of connected components.
[0067] As described in step S5 above, a connected component analysis is performed on the planar region Mask graph, and 3D points in each connected component whose distance is greater than a threshold λ are stored separately according to the connected component label. Experimental comparisons show that a threshold λ of 10 yields the best results. Therefore, step S5 specifically includes:
[0068] S51. Calculate the distance from each pixel in the planar region Mask image to the boundary of the planar region, i.e., distance; calculate the distance from each pixel in the planar region to the boundary of the planar region, using the L1 norm as the distance metric. Store the distance values according to pixel position. The larger the distance value of a pixel, the larger the planar region in which that pixel is located and the closer it is to the center of the planar region.
[0069] S52. Store the 3D points in each connected component whose distance is greater than the threshold separately according to the connected component label to obtain a set of 3D points for multiple connected components.
[0070] S6. Extract one of the connected components as the target connected component, and use principal component analysis to perform plane fitting on the 3D point set of the target connected component to obtain the mean square error.
[0071] S7. Determine whether the mean square error is less than a set value; the set value is... ,in, The standard uncertainty of the estimated unit average depth. This is the tolerance coefficient.
[0072] As described in steps S6-S7 above, based on the connected component analysis results of the planar region mask map, regions that truly belong to the plane after PCA verification are extracted. Then, a dilation operation is performed on these regions. On the dilated regions, the plane normal and the coordinates of the plane's center point are used to verify which pixels correspond to which 3D points belong to that plane. After verifying all planar regions, all planes in the entire depth map are obtained. That is, plane fitting is performed on the set of 3D points selected based on distance for each connected component using Principal Component Analysis (PCA). The plane normal is given by the eigenvector with the smallest eigenvalue, and the mean squared error (MSE) of the plane is given by this eigenvalue. If the MSE is less than... If a given value T is set, then the connected component is divided into a plane, where... It is the standard uncertainty of the estimated unit average depth. This is the tolerance coefficient. Afterwards, to efficiently merge planes, each plane only needs to store the first and second primitive moments of the 3D point set, since the covariance matrix can be easily retrieved using a formula.
[0073] S8. If the mean square error is less than the set value, the target connected region is identified as a plane, and the 3D points in the target connected region that belong to the plane region on the original depth map are verified.
[0074] As described in step S8 above, if the 3D point set corresponding to a certain label in the connected component analysis result of the planar region mask graph conforms to planar features after PCA fitting, then the region in the planar region mask graph that is equal to that label is extracted, and a dilation operation is performed on this region (dilated 8 times, one pixel each time). On the dilated region, the plane normal and the coordinates of the plane center point are used to verify which pixels on the original depth map correspond to 3D points belonging to this planar region, and a plane ID is set for the final planar mask. Therefore, step S8 specifically includes:
[0075] S81. Extract the target region in the planar region Mask graph that is equal to the connected component label;
[0076] S82. Perform an expansion operation on the target region a set number of times (e.g., 8 times) to obtain the target expansion region;
[0077] S83. On the target expansion region, use the plane normal and the plane center coordinates to verify the 3D points corresponding to the pixels belonging to the plane region on the original depth map, and obtain the target plane Mask map.
[0078] S84. Set the plane ID for the target plane Mask image.
[0079] S9. If the mean square error is greater than or equal to the set value, return to the step of using principal component analysis to perform plane fitting on the 3D point set of one of the connected components to obtain the mean square error of the plane, until all the 3D point sets of the connected components have been traversed to obtain the planar region corresponding to the original depth map.
[0080] As described in step S9 above, after traversing all the 3D point sets corresponding to the labels in the connected component analysis results of the planar region Mask graph, the planar region corresponding to the original depth map can be obtained.
[0081] like Figure 2 As shown, the present invention also provides a depth map plane detection device based on mean filtering, comprising:
[0082] Module 1 is used to acquire the raw depth map using a depth camera;
[0083] Mean filtering module 2 is used to perform mean filtering on the original depth map using two preset kernels to obtain two first depth maps;
[0084] Difference module 3 is used to take the difference pixel by pixel between the two first depth maps to obtain a planar region mask map;
[0085] The conversion module 4 is used to convert the original depth map into a 3D point cloud using the intrinsic parameters of the depth camera, and store it according to the pixel position;
[0086] Analysis module 5 is used to perform connected component analysis on the planar region Mask graph to obtain 3D point sets of multiple connected components;
[0087] Fitting module 6 is used to extract one of the connected components as the target connected component, and to perform plane fitting on the 3D point set of the target connected component using principal component analysis to obtain the mean square error.
[0088] The judgment module 7 is used to determine whether the mean square error is less than a set value;
[0089] The verification module 8 is used to identify the target connected region as a plane when the mean square error is less than a set value, and to verify the 3D points in the target connected region that belong to the planar region on the original depth map.
[0090] Traversal module 9 is used to return to the step of performing plane fitting on the 3D point set of one of the connected components using principal component analysis when the mean square error is greater than or equal to a set value, so as to obtain the mean square error of the plane, until all the 3D point sets of the connected components have been traversed and the planar region corresponding to the original depth map is obtained.
[0091] In one embodiment, obtaining module 1 includes:
[0092] A capture unit is used to receive image data captured by a depth camera via a USB interface;
[0093] An operation unit is used to perform distortion removal operations on the image data to obtain the original depth map.
[0094] In one embodiment, the interpolation module 3 includes:
[0095] The judgment unit is used to determine the first depth of the two images. Figure 1 Is the difference between each pixel less than 1 / 300 of the original depth value of that pixel?
[0096] The first marker unit is used to mark two images at the first depth. Figure 1 When the difference between pixels is less than 1 / 300 of the original depth value of the pixel, the pixel is marked as a planar region on the planar region mask map;
[0097] The second marking unit is used to mark two images at the first depth. Figure 1 When the difference between pixels is greater than or equal to 1 / 300 of the original depth value of the pixel, the pixel is marked as a non-planar region on the planar region mask map;
[0098] The return unit is used to return the results of determining the first depth of the two images. Figure 1The process of checking if the difference between pixels is less than 1 / 300 of the original depth value of that pixel continues until all pixels in the two first depth maps have been traversed, resulting in a planar region mask map.
[0099] In one embodiment, analysis module 5 includes:
[0100] A calculation unit is used to calculate the distance from each pixel in the planar region Mask image to the boundary of the planar region;
[0101] The storage unit is used to store 3D points in each connected component whose distance is greater than a threshold separately according to the connected component label, so as to obtain a set of 3D points of multiple connected components.
[0102] In one embodiment, verification module 8 includes:
[0103] The extraction unit is used to extract the target region in the planar region Mask graph that is equal to the connected component label;
[0104] An expansion unit is used to perform a set number of expansion operations on the target region to obtain the target expanded region;
[0105] The verification unit is used to verify the 3D points corresponding to the pixels belonging to the planar region on the original depth map using the plane normal and the coordinates of the plane center point on the target expansion region, so as to obtain the target plane mask map.
[0106] The setting unit is used to set the plane ID for the target plane mask image.
[0107] In one embodiment, in the mean filtering module 2, the two preset kernels are 7×7 and 17×17 kernels, respectively.
[0108] In one embodiment, there are 7 types of judgment modules, and the set value is... ,in, The standard uncertainty of the estimated unit average depth. This is the tolerance coefficient.
[0109] Each of the above modules and units is used to perform the respective steps in the depth map plane detection method based on mean filtering. The specific implementation method is as described in the above method embodiment, and will not be repeated here.
[0110] like Figure 3 As shown, the present invention also provides a computer device, which may be a server, and its internal structure may be as follows: Figure 3As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores all data required for the process of the depth map plane detection method based on mean filtering. The network interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements the depth map plane detection method based on mean filtering.
[0111] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer equipment on which the present application is applied.
[0112] An embodiment of this application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements any of the above-described depth map plane detection methods based on mean filtering.
[0113] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in this application and in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0114] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.
[0115] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for depth map plane detection based on mean filtering, characterized in that, include: The raw depth map is obtained using a depth camera; The original depth map is subjected to mean filtering using two preset kernels to obtain two first depth maps; The difference between the two first depth maps is taken pixel by pixel to obtain the planar region mask map; The original depth map is converted into a 3D point cloud using the intrinsic parameters of the depth camera, and stored according to pixel position; Connectivity analysis is performed on the Mask graph of the planar region to obtain 3D point sets of multiple connected regions; One of the connected components is extracted as the target connected component, and principal component analysis is used to perform plane fitting on the 3D point set of the target connected component to obtain the mean square error. Determine whether the mean square error is less than a set value; If the mean square error is less than a set value, the target connected region is identified as a plane, and the 3D points in the target connected region that belong to the planar region on the original depth map are verified. If the mean square error is greater than or equal to a set value, then return to the step of using principal component analysis to perform plane fitting on the 3D point set of one of the connected components to obtain the mean square error of the plane, until all the 3D point sets of the connected components have been traversed to obtain the planar region corresponding to the original depth map.
2. The mean filter based depth map plane detection method of claim 1, wherein, The step of acquiring the original depth map using a depth camera includes: Receives image data captured by a depth camera via a USB interface; The original depth map is obtained by performing distortion correction on the image data.
3. The mean filter based depth map plane detection method of claim 1, wherein, The step of obtaining a planar region mask image by taking the pixel-by-pixel difference between the two first depth images includes: Determine whether the difference of a pixel between two first depth maps is less than 1 / 300 of the original depth value of that pixel; If the difference between two first depth maps at a pixel is less than 1 / 300 of the original depth value of that pixel, then that pixel is marked as a planar region on the planar region mask map; If the difference between two first depth maps at a pixel is greater than or equal to 1 / 300 of the original depth value of that pixel, then that pixel is marked as a non-planar region on the planar region mask map; Return to the step of determining whether the difference of a pixel in the two first depth maps is less than 1 / 300 of the original depth value of that pixel, until all pixels in the two first depth maps have been traversed to obtain the planar region Mask map.
4. The depth map plane detection method based on mean filtering according to claim 1, characterized in that, The step of performing connected component analysis on the planar region Mask graph to obtain multiple 3D point sets of connected components includes: Calculate the distance from each pixel in the planar region mask image to the boundary of the planar region; 3D points in each connected component whose distance is greater than a threshold are stored separately according to the connected component label, resulting in 3D point sets for multiple connected components.
5. The depth map plane detection method based on mean filtering according to claim 4, characterized in that, The step of identifying the target connected region as a plane and verifying the 3D points in the original depth map belonging to the planar region within the target connected region includes: Extract the target region in the planar region Mask graph that is equal to the connected component label; Perform a set number of expansion operations on the target region to obtain the target expanded region; On the target expansion region, the 3D points corresponding to the pixels belonging to the planar region on the original depth map are verified using the plane normal and the coordinates of the plane center point to obtain the target plane mask map; Set the plane ID for the target plane mask image.
6. The depth map plane detection method based on mean filtering according to claim 1, characterized in that, The two preset cores are 7×7 and 17×17 cores, respectively.
7. The depth map plane detection method based on mean filtering according to claim 1, characterized in that, The set value is ,in, The standard uncertainty of the estimated unit average depth. This is the tolerance coefficient.
8. A depth map plane detection device based on mean filtering, characterized in that, include: The acquisition module is used to acquire raw depth maps using a depth camera; The mean filtering module is used to perform mean filtering on the original depth map using two preset kernels to obtain two first depth maps; The difference module is used to take the difference pixel by pixel between the two first depth maps to obtain the planar region mask map; The conversion module is used to convert the original depth map into a 3D point cloud using the intrinsic parameters of the depth camera, and store it according to the pixel position; The analysis module is used to perform connected component analysis on the planar region Mask graph to obtain 3D point sets of multiple connected components; The fitting module is used to extract one of the connected components as the target connected component, and to perform plane fitting on the 3D point set of the target connected component using principal component analysis to obtain the mean square error. The judgment module is used to determine whether the mean square error is less than a set value; The verification module is used to determine that the target connected region is a plane when the mean square error is less than a set value, and to verify the 3D points in the target connected region that belong to the planar region on the original depth map. The traversal module is used to return the step of performing plane fitting on the 3D point set of one of the connected components using principal component analysis when the mean square error is greater than or equal to a set value, so as to obtain the mean square error of the plane, until all the 3D point sets of the connected components have been traversed and the planar region corresponding to the original depth map is obtained.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Flatness detection method and device, computer equipment and storage medium
CN111145167A
Surface defect detection method, device and equipment
CN113781424A