Depth image flying spot noise denoising method and system and image processing device
By projecting the point cloud data of the depth image to the xz and yz planes for sparsity detection, the problem of long time consumption and information loss of the depth image flying point noise removal method is solved, and fast and accurate noise removal is achieved, meeting real-time performance and accuracy. needs.
Patent Information
- Application Number
- CN202410812904.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-12-01
- Filing Date
- 2024-06-22
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-22
AI Technical Summary
In the existing technology, the depth image flying point noise removal method is time-consuming and easy to lose effective information, and it is difficult to meet the real-time and accuracy requirements.
By projecting the point cloud data of the depth image to the xz and yz planes, sparsity detection is performed. If the sparsity condition is met, it will be flying point noise, and the back projection is transformed back to the depth image, retaining the same value to remove the noise.
It effectively avoids the shortcomings of traditional edge detection methods that mistakenly eliminate valid pixels and the disadvantage that point cloud domain denoising requires a large amount of computing resources, improves the detection rate and accuracy, and meets real-time and reliability requirements.
Smart Images

Figure CN118552437A
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method and system for denoising flying point noise in a depth image, and an image processing device. Background Art
[0002] Depth images have become an important data source in the field of computer vision and are widely used in 3D reconstruction, industrial measurement, target tracking, face recognition and other fields. However, in practical applications, depth images are often interfered by various noises, such as flying points and bad points, which will have a serious impact on subsequent processing. Therefore, removing noise from depth images is crucial to improve the quality and practicality of depth images.
[0003] However, due to the constraints of depth camera principles and hardware, the quality of depth images collected is low and easily interfered by noise. Among them, flying spot noise is mainly due to the fact that each pixel on the image sensor has a certain physical size. When measuring the edge of an object, a single pixel will receive light reflected from the foreground and background at the same time. The energy generated by the two is superimposed, causing the sensor to obtain an erroneous depth value, which is visually manifested as an invalid point flying in the air. Flying spot noise will seriously interfere with the depth information at the edge of the object, making it impossible for the depth camera to obtain effective depth edge information, which seriously limits the further development and application of depth images.
[0004] At present, there are two main methods for removing flying point noise in depth images: traditional methods and deep learning methods. Deep learning methods often have high requirements for data sets and corresponding high algorithm complexity, and also have certain requirements for hardware. Traditional algorithms mainly include edge detection methods and point cloud domain filtering methods. Although the edge detection method is simple to calculate, it is easy to mistakenly remove valid pixels and lose more edge information. Although point cloud domain filtering can effectively remove flying point noise, it usually consumes a lot of computing resources, runs slowly, and is difficult to meet real-time requirements. Therefore, how to effectively and conveniently remove flying point noise in depth images is a technical problem that needs to be solved urgently. Summary of the invention
[0005] The present application provides a method, system and image processing device for denoising flying point noise in a depth image, which solves the problem that the flying point denoising method in the prior art is time-consuming and easy to lose effective information.
[0006] In order to achieve the above-mentioned purpose, in a first aspect, an embodiment of the present application provides a method for denoising flying point noise of a depth image, characterized in that it comprises the following steps:
[0007] Step 1: Collect image data of depth image;
[0008] Step 2: Project the point cloud data calculated from the depth image onto the xz and yz planes;
[0009] Step 3: Perform sparsity detection on each point in the xz and yz planes;
[0010] Step 4: If the sparsity test is satisfied, the point is a flying point noise;
[0011] Step 5: Back-project the projection data of the xz and yz planes after removing the flying point noise back into the depth image, and retain the same values in the depth images of the xz and yz plane back-projection transformation as the depth image after removing the flying point noise;
[0012] Optionally, the projection to the xz plane is to normalize the x coordinate of the point cloud data to the height of 0 to the depth image, the z coordinate to the width of 0 to the depth image, and the y coordinate remains unchanged. At this time, the x coordinate of the point cloud data is the x coordinate of the projected image, the z coordinate of the point cloud data is the y coordinate of the projected image, and the y coordinate of the point cloud data is the pixel value of the projected image. The same is true for projection to the yz plane.
[0013] Optionally, the number of pixel values 0 in the current pixel and its adjacent pixels is sparse.
[0014] Optionally, a sparsity threshold is preset, and the sparsity is compared with the sparsity threshold to determine whether the pixel satisfies the sparsity.
[0015] Optionally, the threshold is set by the number of adjacent pixels of the pixel and the number of adjacent pixels whose values are 0.
[0016] Optionally, the removing of flying point noise is to set the pixel value of the point to 0 on the xz plane or the yz plane.
[0017] Optionally, the depth image after removing the flying point noise by retaining the same values in the depth images transformed by back projection of the xz and yz planes is to compare the depth image transformed by back projection of the xz plane and the depth image transformed by back projection of the yz plane. If the pixel values at the same position are the same, the pixel is retained, otherwise it is regarded as flying point noise removal.
[0018] In a second aspect, an embodiment of the present application provides a depth image flying spot noise processing system, characterized in that the depth image flying spot noise processing system includes an image acquisition module, a calculation module, a judgment module and an image output module, and the calculation module and the judgment module use the depth image flying spot noise denoising method described in the first aspect.
[0019] In a third aspect, an embodiment of the present application provides an image processing device, characterized in that the image processing device includes: a collector, a memory and a processor, the collector is used to collect depth images, the memory is used to store the depth images collected by the collector, and the processor is used to execute the denoising method of flying point noise in the depth image described in the first aspect.
[0020] The present application provides a method, system and image processing device for denoising flying point noise of a depth image, and relates to the field of image processing technology, wherein the method for denoising flying point noise of a depth image projects the point cloud data obtained by calculating the depth image onto the xz plane and the yz plane, and performs sparsity detection on the point cloud projection data. If the sparsity condition is met, the point is a flying point noise, and the same value in the depth image of the inverse transformation of the xz and yz planes is retained as the depth image after the flying point noise is removed. The present invention avoids the disadvantage that the traditional edge detection to remove flying point noise is easy to mistakenly remove valid pixel points, and avoids the disadvantage that the removal of flying point noise in the point cloud domain requires a large amount of computing resources, and can improve the detection rate and accuracy while retaining valid pixel points. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 A schematic diagram of a flow chart of a method for denoising a flying point in a depth image provided by an embodiment of the present application;
[0022] Figure 2 A schematic diagram of a process of projecting onto an xz plane and a yz plane provided in an embodiment of the present application;
[0023] Figure 3 A schematic diagram of a process flow of a sparsity detection method provided in an embodiment of the present application;
[0024] Figure 4 A schematic diagram of a depth image flying point noise processing system provided in an embodiment of the present application;
[0025] Figure 5 A schematic diagram of an implementation of a depth image flying spot noise image processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of the working principles of well-known image acquisition methods, image filtering methods, and image processing methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0027] The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to be limiting of the present application. As used in the specification and appended claims of the present application, the singular expressions "a", "said", "above", and "the" are intended to also include expressions such as "one or more", unless the context clearly indicates otherwise.
[0028] With the widespread application of 3D image processing technology in 3D reconstruction, industrial measurement, and autonomous driving, the acquisition and quality improvement of depth images have become increasingly important. At present, the main ways to acquire depth images are tof cameras, binocular cameras, structured light cameras, lidar, etc. However, due to the influence of imaging principles, shooting environment, hardware and other conditions, the imaging quality of depth images is even low and easily interfered by noise. Among them, flying point noise seriously affects the extraction of object edge information by depth cameras, making it difficult to meet the needs of actual applications. Therefore, it is of great significance to remove flying point noise and improve the quality of depth images. In addition, considering the real-time requirements in actual application scenarios, there are corresponding requirements for the complexity of the algorithm for removing flying point noise from depth images.
[0029] Therefore, the embodiment of the present application proposes a method for denoising flying point noise in a depth image by transforming the depth image into a point cloud domain and projecting it into the xz and yz planes, performing sparsity detection in the xz and yz planes, and finally back-projecting the transformation back to the depth image. The method for denoising flying point noise in a depth image avoids the disadvantage that the traditional edge detection method for removing flying point noise easily mistakenly removes valid pixel points, can effectively retain the edge information in the depth image, and avoids the disadvantage that the point cloud domain needs to consume a lot of computing resources to remove flying point noise, and can meet the requirements of real-time performance and reliability in practical applications.
[0030] The following is a detailed introduction to the denoising method for flying point noise in depth images.
[0031] See also Figure 1 , Figure 1 A flowchart of a depth image denoising method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the process of the deep image denoising method includes the following steps:.
[0032] S10: Obtain image data of a depth image of a real scene.
[0033] S20, see Figure 2 , project the point cloud data calculated based on the depth image onto the xz plane and yz plane.
[0034] Figure 2 A schematic diagram of a process for obtaining projection data of the xz plane and the yz plane provided in an embodiment of the present application. Figure 2As shown, obtaining projection data of the xz plane and the yz plane includes the following steps:
[0035] At the beginning of the process, the depth image data is read first. It should be noted that the depth data read is the depth image collected by the depth camera.
[0036] The read depth data is then converted into a point cloud. It should be noted that the depth data can be converted into a point cloud according to formula (1):
[0037]
[0038] In formula (1), , represents any coordinate point in the image coordinate system, and Represents the center coordinates of the image. , , Represents a three-dimensional coordinate point in the world coordinate system. Represents the depth value of the depth image. , , is the camera parameter.
[0039] After conversion to point cloud data, for projection on the xz plane, the x-axis data in the point cloud data must first be normalized to the image height. It should be noted that the image height refers to the height of the read depth image.
[0040] Next, the z-axis data in the point cloud data is normalized to the image width. It should be noted that the normalization in the above steps is only to make the projection data and the depth image data maintain the same size to facilitate subsequent processing.
[0041] Finally, the y-axis data is used as the projection image pixel value. It should be noted that the x-axis and y-axis coordinates of the projection image are respectively the x-axis coordinate and the z-axis coordinate in the point cloud data after the above normalization processing.
[0042] The projection on the yz plane is similar to the projection on the xz plane. The difference is that the projection on the yz plane requires the y-axis data in the point cloud data to be normalized to the image height, and the x-axis data is used as the projected image pixel value.
[0043] S30, see Figure 3 , perform sparsity detection on each point on the xz plane and the yz plane.
[0044] Figure 3A schematic diagram of a process for performing sparsity detection on each point on the xz plane and the yz plane provided in an embodiment of the present application. Figure 3 As shown, the sparsity detection is performed on each point on the xz plane and the yz plane, including the following steps:
[0045] S301 , reading projection data of the xz plane and the yz plane.
[0046] S302 , loop through each point in the projection data of the xz plane and the yz plane.
[0047] S303, determine the neighboring pixels of the current pixel. It should be noted that the neighboring pixels generally refer to all pixels within a 3*3 neighborhood of the current pixel. The neighboring pixels of the current pixel can also be determined according to actual needs, and this application does not make any specific restrictions.
[0048] S304: Count the number of non-zero values in the pixel and its adjacent pixels, and use it as the sparsity value.
[0049] S40, determine whether the pixel satisfies the sparsity test. If so, the pixel is a flying point noise. In this step, a sparsity threshold is preset. If the sparsity of the pixel is less than the preset threshold, the pixel is considered to meet the sparsity test, otherwise the pixel is considered not to meet the sparsity test. The threshold can be set according to the number of the pixel and its adjacent pixels. Generally speaking, the threshold needs to be less than half of the number of the pixel and its adjacent pixels.
[0050] S50, reversely transforming the projection data after removing the flying spot noise back into the depth image. It should be noted that after removing the flying spot noise, the projection data on the xz plane and the yz plane are reversely transformed back into the depth image, and then the same pixels in the two depth images are retained as the depth image after removing the flying spot noise.
[0051] See also Figure 4 , Figure 4 A schematic diagram of an image processing system provided in an embodiment of the present application is shown in FIG. Figure 4The image processing system shown includes: an image acquisition module 401, a first calculation module 402, a second calculation module 403, a third calculation module 404, a first judgment module 405, a second judgment module 406 and an image output module 407. The image acquisition module is for acquiring a depth image, and its acquisition methods mainly include TOF camera, binocular camera, structured light camera, laser radar, etc., which are not specifically limited in this application. The image acquisition module 401 inputs the acquired image to the first calculation module 402, and the first calculation module 402 performs point cloud conversion and projection on the acquired depth image to the xz plane and the yz plane. After that, the projection data of the xz plane and the yz plane are respectively input to the second calculation module 403 and the third calculation module 404, and the second calculation module 403 and the third calculation module 404 respectively perform sparsity detection on the projection data of the xz plane and the yz plane. The first judgment module 405 and the second judgment module 406 respectively judge whether the sparsity values output by the second calculation module 403 and the third calculation module 404 meet the sparsity detection. The image output module 407 is used to inversely transform the projection data after the flying spot noise is removed back into a depth image, and retain the same pixels in the two depth images as the depth image after the flying spot noise is removed.
[0052] See also Figure 5 , Figure 5 A schematic diagram of an implementation of a depth image flying point noise processing device provided in an embodiment of the present application is shown in FIG. Figure 5 The system shown includes a collector 501, a memory 502 and a processor 503. The collector 501 is used to collect depth images, the memory 502 is used to store the depth images collected by the collector 501, and the processor 503 is used to execute an algorithm or computer program for processing flying point noise of the depth image.
[0053] The denoising device for flying point noise in a depth image of an embodiment of the present invention collects image data of a depth image, converts the depth image data into point cloud data, and then projects the point cloud data to the xz plane and the yz plane respectively. Then, a sparsity test is performed on each point of the projection data of the xz plane and the yz plane according to a preset threshold. If the point satisfies the sparsity test, the point is a flying point noise. Finally, the projection data of the xz plane and the yz plane after the flying point noise is removed are back-projected back to the depth image, and the same pixels in the two depth images are retained as the depth image after the flying point noise is removed. It effectively avoids the shortcomings of the traditional edge detection algorithm in removing flying point noise, which is easy to mistakenly remove valid pixel points, and the shortcomings of removing flying point noise in the point cloud domain that a large amount of computing resources are required, and can improve the detection rate and accuracy while retaining valid pixel points.
[0054] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0055] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0056] In the embodiments provided in the present application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are merely schematic, for example, the division of the modules or units is only a logical function division, and 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.
[0057] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0058] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0059] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0060] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0061] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for denoising flying point noise in a depth image, characterized in that: Includes the following steps: Step 1: Collect image data of depth image; Step 2: Calculate point cloud data based on the image data and project it onto xz and yz planes; Step 3: According to the point cloud projection data of the xz and yz planes, perform sparsity detection on each point thereon; Step 4: If the sparsity test is satisfied, the point is determined to be a flying point noise; Step 5: Based on the point cloud projection data after removing the flying spot noise, back-projection is performed to transform the depth image, and the same values in the depth image transformed by back-projection in the xz and yz planes are retained as the depth image after removing the flying spot noise.
2. The method for denoising flying point noise of a depth image according to claim 1, characterized in that: The projection to the xz plane is to normalize the x coordinate of the point cloud data to the height of 0 to the depth image, the z coordinate to the width of 0 to the depth image, and the y coordinate remains unchanged. At this time, the x coordinate of the point cloud data is the x coordinate of the projected image, the z coordinate of the point cloud data is the y coordinate of the projected image, and the y coordinate of the point cloud data is the pixel value of the projected image. The same is true for projection to the yz plane.
3. The method for denoising flying point noise of a depth image according to claim 2, characterized in that: The sparsity is the number of pixels whose values are 0 among the neighboring pixels of the pixel.
4. The method for denoising flying point noise of a depth image according to claim 3, characterized in that: A sparsity threshold is preset, and the sparsity is compared with the sparsity threshold to determine whether the pixel satisfies the sparsity.
5. The method for denoising flying point noise of a depth image according to claim 4, characterized in that: The threshold is set by the number of neighboring pixels of the pixel and the number of neighboring pixels with values of 0.
6. The method for denoising flying point noise of a depth image according to claim 5, characterized in that: The flying point noise removal is to set the pixel value of the point to 0 on the xz plane or the yz plane, that is, to set the x value or y value of the original point cloud data to 0, and then back-project and transform it back to the depth image.
7. The method for denoising flying point noise of a depth image according to claim 6, characterized in that: The retaining of the same values in the depth images transformed by back-projection of the xz and yz planes is the depth image after removing the flying point noise. The depth image is a comparison of the depth image transformed by back-projection of the xz plane and the depth image transformed by back-projection of the yz plane. If the pixel values at the same position are the same, the pixel is retained, otherwise it is regarded as flying point noise removal.
8. An image processing system, characterized in that: The image processing system comprises an image acquisition module, a calculation module, a judgment module and an image output module. The calculation module and the judgment module use the method for denoising flying point noise of a depth image as described in any one of claims 1 to 7.
9. An image processing device, characterized in that: The image processing device includes: a collector, a memory and a processor, the collector is used to collect depth images, the memory is used to store the depth images collected by the collector, and the processor is used to execute the denoising method for flying point noise in depth images as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Point cloud data de-noising method and system
CN106548520A
Flight pixel filtering method and system
CN111833370A
Three-dimensional reconstruction method and device for multi-stage unsupervised learning, and electronic equipment
CN113066165A
Depth map denoising method and device, medium and equipment
CN115115535A
Method and device for determining interference point, storage medium and multi-channel laser radar
CN116413701A
