Depth image denoising method and device, computer device and storage medium

By performing planar fitting and denoising on the region of interest in the depth image, the problem of noise affecting the accuracy of planar fitting in traditional methods is solved, and a higher precision denoising effect is achieved.

CN117058022BActive Publication Date: 2026-01-09SHENZHEN SMARTMORE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310960485.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-01
Publication Date
2026-01-09
Estimated Expiration
2043-08-01

AI Technical Summary

Technical Problem

In traditional depth image denoising methods, the accuracy of plane fitting is low because the target pixels contain a lot of noise.

Method used

By performing planar fitting on multiple regions of interest in the depth image, the vertical distance from each pixel to the reference fitting plane is calculated, the distance interval is determined, and the pixels located in the interval are taken as the pixels to be fitted. Planar fitting and denoising are then performed, and the target fitting plane and the distance interval are used for denoising to filter out most of the noise.

Benefits of technology

It improves the precision and accuracy of depth image denoising, resulting in a target image that is closer to the actual plane and reduces the impact of noise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117058022B_ABST
    Figure CN117058022B_ABST
Patent Text Reader

Abstract

The application relates to a depth image denoising method and device, computer equipment and a storage medium. The method comprises the following steps: obtaining a plurality of regions of interest in a to-be-processed depth image, performing plane fitting on the plurality of regions of interest to obtain a reference fitting plane; determining the vertical distance from each pixel point in each region of interest to the reference fitting plane; for each region of interest, based on the vertical distances corresponding to the pixel points in the region of interest, determining the distance interval corresponding to the region of interest, and determining the pixel points with the vertical distances in the distance interval as the to-be-fitted pixel points corresponding to the region of interest; performing plane fitting on the to-be-fitted pixel points corresponding to the plurality of regions of interest to obtain a target fitting plane; and based on the target fitting plane and the distance intervals corresponding to the regions of interest, performing denoising processing on the to-be-processed depth image to obtain a target image. The method can improve the denoising precision of the depth image.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the computer technical field, in particular to a depth image denoising method and device, computer equipment and storage medium. BACKGROUND

[0002] With the development of computer technology, the demand for high-precision measurement is increasing, and high-precision measurement often accompanies a large number of flatness, gap measurement and other measurement requirements that need to fit a plane. In order to improve the accuracy of the fitted plane, the depth image needs to be denoised before plane fitting.

[0003] In the traditional technology, the depth image is denoised by using the idea of statistics based on the nearby area, and then the target pixel points obtained after denoising are fitted to obtain the target plane. Since the target pixel points contain a large number of noise points, the accuracy of the target plane is low. SUMMARY

[0004] Therefore, it is necessary to provide a depth image denoising method, device, computer equipment, computer readable storage medium and computer program product to improve the denoising accuracy of the depth image.

[0005] In a first aspect, the present application provides a depth image denoising method, comprising:

[0006] Obtaining a plurality of regions of interest in a to-be-processed depth image, fitting a plane to the plurality of regions of interest, and obtaining a reference fitting plane;

[0007] Determining the perpendicular distance from each pixel point in each region of interest to the reference fitting plane;

[0008] For each region of interest, based on the perpendicular distance corresponding to each pixel point in the region of interest, determining the distance interval corresponding to the region of interest, and determining the pixel points with a perpendicular distance in the distance interval as the to-be-fitted pixel points corresponding to the region of interest;

[0009] Fitting a plane to the to-be-fitted pixel points corresponding to the plurality of regions of interest, and obtaining a target fitting plane;

[0010] Based on the target fitting plane and the distance interval corresponding to each region of interest, denoising the to-be-processed depth image to obtain a target image.

[0011] In a second aspect, the present application further provides a depth image denoising device, comprising:

[0012] An acquisition module is configured to obtain a plurality of regions of interest in a to-be-processed depth image, fit a plane to the plurality of regions of interest, and obtain a reference fitting plane.

[0013] a calculation module, configured to determine a vertical distance from each pixel point in each region of interest to a reference fitting plane respectively;

[0014] a determination module, configured to determine, for each region of interest, a distance interval corresponding to the region of interest based on the vertical distances corresponding to the pixel points in the region of interest, and determine, as fitting pixel points corresponding to the region of interest, the pixel points whose vertical distances are located in the distance interval;

[0015] a fitting module, configured to perform plane fitting on the fitting pixel points corresponding to the multiple regions of interest to obtain a target fitting plane;

[0016] a denoising module, configured to perform denoising processing on the to-be-processed depth image based on the target fitting plane and the distance intervals corresponding to the regions of interest, to obtain a target image.

[0017] In a third aspect, a computer device is provided, which includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps of the depth image denoising method are implemented.

[0018] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the steps of the depth image denoising method are implemented.

[0019] In a fifth aspect, a computer program product is provided, which includes a computer program. When the computer program is executed by a processor, the steps of the depth image denoising method are implemented.

[0020] The depth image denoising method, device, computer device and storage medium, by fitting a plane to a plurality of regions of interest in the to-be-processed depth image, a reference fitting plane is obtained, the regions of interest contain a large number of pixel points in a target plane and a large number of noise points, the reference fitting plane is close to the target plane, the vertical distance of each pixel point in the region of interest to the reference fitting plane is calculated, the distance interval corresponding to the region of interest is determined according to the vertical distance corresponding to the pixel point in the region of interest, the pixel point with the vertical distance in the distance interval is determined as the to-be-fitted pixel point corresponding to the region of interest, it can be understood that the vertical distance corresponding to the pixel point in the target plane and a small amount of noise points is in the distance interval, and the vertical distance corresponding to most noise points is out of the distance interval, the pixel points in the region of interest are denoised using the distance interval, most noise points are filtered out, that is, the obtained to-be-fitted pixel points only contain a small amount of noise points, the to-be-fitted pixel points corresponding to a plurality of regions of interest are fitted to obtain a target fitting plane, since the to-be-fitted pixel points contain a large number of pixel points in the target plane and a small amount of noise points, the target fitting plane is closer to the target plane than the reference fitting plane, and the to-be-processed depth image is denoised using the target fitting plane closer to the target plane and the distance interval corresponding to each region of interest, it can be understood that the to-be-processed depth image is denoised using a denoising condition with higher accuracy, the precision of depth image denoising is improved, and the accuracy of the target image is improved. BRIEF DESCRIPTION OF DRAWINGS

[0021] Figure 1 An application environment of a depth image denoising method provided by an embodiment of the present application;

[0022] Figure 2 A flowchart of a depth image denoising method provided by an embodiment of the present application;

[0023] Figure 3 A flowchart of a distance interval determination step provided by an embodiment of the present application;

[0024] Figure 4 A flowchart of a target compression parameter determination step provided by an embodiment of the present application;

[0025] Figure 5 A flowchart of a target image acquisition step provided by an embodiment of the present application;

[0026] Figure 6 A flowchart of a region of interest denoising step provided by an embodiment of the present application;

[0027] Figure 7 A schematic diagram of a depth image and a target image provided by an embodiment of the present application;

[0028] Figure 8 A flowchart of a target fitting plane determination step provided by an embodiment of the present application is shown in the figure;

[0029] Figure 9 Another depth image and target image diagram provided by an embodiment of the present application is shown in the figure;

[0030] Figure 10 A structural block diagram of a depth image denoising device provided by an embodiment of the present application is shown in the figure;

[0031] Figure 11 An internal structure diagram of a computer device provided by an embodiment of the present application is shown in the figure;

[0032] Figure 12 An internal structure diagram of a computer readable storage medium provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in combination with the figures and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.

[0034] The depth image denoising method provided by the embodiments of the present application can be applied in an application environment as shown in the figure. Figure 1 The terminal 102 communicates with the server 104 through a network. The data storage system can store data required to be processed by the server 104. The data storage system can be integrated on the server 104, or placed on a cloud or other network server. The terminal and the server can be used alone to execute the depth image denoising method provided in the embodiments of the present application. The terminal and the server can also be used cooperatively to execute the depth image denoising method provided in the embodiments of the present application. The terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.

[0035] In some embodiments, as shown in the figure, Figure 2 A depth image denoising method is provided, and the present embodiment takes the method applied to a computer device as an example for description, which includes steps 202 to 210.

[0036] In step 202, a plurality of regions of interest in a to-be-processed depth image are acquired, and plane fitting is performed on the plurality of regions of interest to obtain a reference fitting plane.

[0037] The depth image is a two-dimensional image, and a pixel value of each pixel point in the depth image is a distance from an object to a shooting device. The region of interest (ROI) is a region of interest in the image, and the region of interest includes a large number of pixel points of a certain plane and a small number of pixel points of other planes. The certain plane is a plane of interest or a plane to be fitted. The small number of pixel points of other planes are noise points. The region of interest can be automatically selected by a preset method or manually selected by an operator. The number, size and shape of the region of interest can be set according to actual needs. For example, the region of interest can be a rectangle, a circle, a polygon or other shapes. The multiple regions of interest are multiple image blocks corresponding to a certain plane in the depth image. It can be understood that, in a case where an image of a certain plane is needed to be obtained from the depth image, multiple image blocks are obtained in the image of the certain plane and around the image of the certain plane. Each image block is a region of interest. By processing the multiple regions of interest, basic data for denoising processing of the depth image to be processed can be obtained. The plane fitting is a process of finding an optimal plane model to approximate a plane where a group of data points are located. The plane fitting can use a least square method or a principal component analysis method, which is not limited herein. The reference fitting plane can be represented by a plane function, for example, Ax+By+Cz+D=0, where A, B and C are components of a normal vector of the reference fitting plane, and D is a constant of the reference fitting plane.

[0038] In step 204, a vertical distance of each pixel point in each region of interest to the reference fitting plane is determined respectively.

[0039] The pixel point can be represented by a pixel point coordinate or pixel point information. The vertical distance is a distance perpendicular to the reference fitting plane. The vertical distance can be positive, negative or zero, that is, the vertical distance can be greater than zero, less than zero or equal to zero. The positive vertical distance indicates that the pixel point is above the reference fitting plane, the negative vertical distance indicates that the pixel point is below the reference fitting plane, and the zero vertical distance indicates that the pixel point is on the reference fitting plane.

[0040] For example, the computer device calculates the vertical distance of the pixel point to the reference fitting plane according to the pixel point information of the pixel point and the plane function of the reference fitting plane.

[0041] In step 206, for each region of interest, a distance interval corresponding to the region of interest is determined based on the vertical distances of the pixel points in the region of interest, and a pixel point with a vertical distance in the distance interval is determined as a pixel point to be fitted corresponding to the region of interest.

[0042] The distance interval refers to a value range of the vertical distance, and is composed of a minimum distance threshold and a maximum distance threshold. The distance interval is used to remove noise points in the region of interest. The distance interval is related to the discrete degree of the vertical distance corresponding to the pixel points in the region of interest. For example, the distance interval corresponding to the region of interest is [-0.5, 0.6].

[0043] For each region of interest, the computer device determines a distance interval corresponding to the region of interest according to the discrete degree of the vertical distance corresponding to the pixel points in the region of interest.

[0044] In step 208, the computer device performs plane fitting on the to-be-fitted pixel points corresponding to the plurality of regions of interest to obtain a target fitting plane.

[0045] The target fitting plane refers to a plane obtained by performing plane fitting on the to-be-fitted pixel points in the plurality of regions of interest.

[0046] In some embodiments, the computer device performs plane fitting on the to-be-fitted pixel points corresponding to the plurality of regions of interest to obtain an initial fitting plane, takes the initial fitting plane as an updated reference fitting plane, repeatedly performs steps 204-208 until a loop stopping condition is reached, and obtains the target fitting plane. The loop stopping condition can be that the number of loops reaches a preset number of loops.

[0047] In step 210, the computer device performs denoising processing on the to-be-processed depth image based on the target fitting plane and the distance interval corresponding to each region of interest to obtain a target image.

[0048] The denoising processing refers to a process of removing noise points in the to-be-processed depth image, and can also be understood as a process of selecting target pixel points from the to-be-processed depth image. The noise points refer to pixel points in the to-be-processed depth image other than the target pixel points.

[0049] For example, the computer device calculates a target vertical distance of each pixel point in the to-be-processed depth image to the target fitting plane, determines a target distance interval corresponding to the to-be-processed depth image based on the distance interval corresponding to each region of interest, determines pixel points with the target vertical distance located in the target distance interval as target pixel points corresponding to the to-be-processed depth image, and obtains a target image based on the target pixel points.

[0050] In the depth image denoising method, the reference fitting plane is obtained by plane fitting on a plurality of regions of interest in the to-be-processed depth image. The regions of interest contain a large number of pixel points in a target plane and a large number of noise points. The reference fitting plane is close to the target plane. The vertical distance of each pixel point in the region of interest to the reference fitting plane is calculated. The distance interval corresponding to the region of interest is determined according to the vertical distance corresponding to the pixel point in the region of interest. The pixel point with the vertical distance in the distance interval is determined as the to-be-fitted pixel point corresponding to the region of interest. It can be understood that the vertical distance corresponding to the pixel point in the target plane and a small amount of noise points is in the distance interval, and the vertical distance corresponding to most noise points is outside the distance interval. The pixel points in the region of interest are denoised using the distance interval, and most noise points are filtered out, that is, the obtained to-be-fitted pixel points only contain a small amount of noise points. The target fitting plane is obtained by plane fitting on the to-be-fitted pixel points corresponding to a plurality of regions of interest. Since the to-be-fitted pixel points contain a large number of pixel points in the target plane and a small amount of noise points, the target fitting plane is closer to the target plane than the reference fitting plane. The to-be-processed depth image is denoised using the target fitting plane closer to the target plane and the distance interval corresponding to each region of interest. It can be understood that the to-be-processed depth image is denoised using a denoising condition with higher accuracy, the precision of the depth image denoising is improved, and the accuracy of the target image is improved.

[0051] In some embodiments, as shown in FIG. 3, Figure 3 The distance interval corresponding to the region of interest is determined based on the vertical distance corresponding to each pixel point in the region of interest, including:

[0052] In step 302, the target compression parameter corresponding to the region of interest, and the first proportion parameter and the second proportion parameter are obtained.

[0053] The target compression parameter refers to the compression coefficient corresponding to the region of interest. The target compression parameter is negatively correlated with the discrete degree of the vertical distance corresponding to the pixel point in the region of interest. The target compression parameters corresponding to different regions of interest of the to-be-processed depth image can be different. The first proportion coefficient refers to the percentage coefficient related to the number of pixel points in the region of interest under the reference fitting plane. The second proportion coefficient refers to the percentage coefficient related to the number of pixel points in the region of interest on the reference fitting plane. The first proportion coefficients corresponding to different regions of interest of the to-be-processed depth image can be the same, and the second proportion coefficients corresponding to different regions of interest can also be the same. The first proportion parameter and the second proportion parameter can be pre-set parameters.

[0054] Exemplarily, the computer device obtains the first proportion parameter and the second proportion parameter, and then determines a discrete degree corresponding to the region of interest based on the vertical distances corresponding to the pixel points in the region of interest, and determines a target compression parameter corresponding to the region of interest based on the discrete degree.

[0055] In step 304, the computer device counts the pixel points corresponding to the vertical distances less than zero to obtain a first number, and counts the pixel points corresponding to the vertical distances greater than zero to obtain a second number.

[0056] In step 306, the computer device fuses the target compression parameter, the first proportion parameter and the first number to obtain a first arrangement order, and fuses the target compression parameter, the second proportion parameter and the second number to obtain a second arrangement order.

[0057] The first arrangement order refers to the arrangement order of the determined minimum distance threshold, which can be understood as the number of the pixel points with the vertical distance less than zero. For example, the first number of the region of interest is 100, the first proportion parameter is 0.8, and the target compression parameter is 0.5, and then the first arrangement order is 40, that is, 40 pixel points with the vertical distance less than zero in the region of interest are reserved, and the minimum distance threshold corresponding to the region of interest can be determined according to the arrangement order. The second arrangement order refers to the arrangement order of the determined maximum distance threshold, which can be understood as the number of the pixel points with the vertical distance greater than zero.

[0058] Exemplarily, the computer device performs multiplication operation on the target compression parameter, the first proportion parameter and the first number to obtain a first result, performs integer operation on the first result to obtain the first arrangement order, and then performs multiplication operation on the target compression parameter, the second proportion parameter and the second number to obtain a second result, and performs integer operation on the second result to obtain the second arrangement order.

[0059] In step 308, the computer device determines a distance interval corresponding to the region of interest based on the first arrangement order, the second arrangement order and the vertical distances corresponding to the pixel points in the region of interest.

[0060] Exemplarily, the computer device determines a minimum distance threshold based on the first arrangement order and the vertical distances less than zero in the region of interest, determines a maximum distance threshold based on the second arrangement order and the vertical distances greater than zero in the region of interest, and composes the minimum distance threshold and the maximum distance threshold to obtain the distance interval corresponding to the region of interest.

[0061] In this embodiment, the target compression parameter is related to the dispersion degree of the vertical distance corresponding to the pixel points in the region of interest; the higher the dispersion degree, the less consistent the vertical distance of the pixel points in the region of interest, and the fewer the number of pixel points that need to be retained in the region of interest; the lower the dispersion degree, the more consistent the vertical distance of the pixel points in the region of interest, and the more the number of pixel points that need to be retained in the region of interest. According to the first arrangement order, the second arrangement order and the vertical distance corresponding to each pixel point in the region of interest, the distance interval corresponding to the region of interest is determined, and the accuracy of the distance interval is improved.

[0062] In some embodiments, as shown in Figure 4 the target compression parameter corresponding to the region of interest is obtained, including:

[0063] Step 402, obtaining a compression parameter sequence.

[0064] The compression parameter sequence refers to a sequence composed of a plurality of compression parameters. The number of compression parameters in the compression parameter sequence can be the same as the number of regions of interest, and the compression parameter sequence can be pre-set by a setting person.

[0065] Step 404, for each region of interest, calculating the dispersion degree of the vertical distance corresponding to the plurality of pixel points in the region of interest, to obtain the standard deviation corresponding to the region of interest.

[0066] The dispersion degree refers to the dispersion degree, which describes the interval or difference degree between the vertical distances corresponding to the plurality of pixel points; the smaller the dispersion degree, the smaller the difference between the vertical distances corresponding to the plurality of pixel points; the greater the dispersion degree, the greater the difference between the vertical distances corresponding to the plurality of pixel points. The dispersion degree can be represented by parameters such as variance, standard deviation and range.

[0067] Step 406, based on the standard deviation corresponding to each region of interest, sorting the plurality of regions of interest to obtain a region arrangement sequence; the arrangement order of the region arrangement sequence is opposite to that of the compression parameter sequence.

[0068] The regions of interest in the region arrangement sequence are sorted according to the size of the standard deviation corresponding to the region of interest.

[0069] For example, the computer device obtains the arrangement order of the compression parameter sequence. If the arrangement order of the compression parameter sequence is from small to large, the standard deviations corresponding to the plurality of regions of interest are arranged from large to small to obtain the region arrangement order; if the arrangement order of the compression parameter sequence is from large to small, the standard deviations corresponding to the plurality of regions of interest are arranged from small to large to obtain the region arrangement order.

[0070] Step 408: Based on the region arrangement sequence, determine the target arrangement order corresponding to the region of interest; determine the compression parameters corresponding to the target arrangement order in the compression parameter sequence as the target compression parameters corresponding to the region of interest.

[0071] The target arrangement order refers to the order in which the region of interest is arranged in the region arrangement sequence.

[0072] In this embodiment, the target compression parameters corresponding to the region of interest are determined based on the compression parameter sequence and the target arrangement order of the region of interest in the region arrangement sequence. The larger the target arrangement order corresponding to the region of interest, the more inconsistent the vertical distances of the pixels in the region of interest are, and the fewer pixels need to be retained in the region of interest. The smaller the target compression parameters corresponding to the region of interest, the smaller the distance interval is. Using a smaller distance interval removes more noise in the region of interest, thus improving the accuracy of noise reduction of the region of interest.

[0073] In some embodiments, determining a distance interval corresponding to the region of interest based on a first arrangement order, a second arrangement order, and the vertical distances corresponding to each pixel in the region of interest includes:

[0074] For each region of interest, the vertical distances less than zero are sorted from largest to smallest, and the vertical distances in the first sorted order are determined as the minimum distance threshold corresponding to the region of interest.

[0075] Sort the vertical distances that are greater than zero in ascending order, and determine the vertical distances that are in the second order of the sorted order as the maximum distance threshold corresponding to the region of interest.

[0076] Based on the minimum and maximum distance thresholds, the distance intervals corresponding to the region of interest are obtained.

[0077] The minimum distance threshold refers to the minimum vertical distance between the retained pixels. The maximum distance threshold refers to the maximum vertical distance between the retained pixels.

[0078] In this embodiment, the distance interval corresponding to the region of interest is determined according to the first and second arrangement orders, providing basic data for subsequent denoising of the region of interest.

[0079] In some embodiments, such as Figure 5 As shown, based on the target fitting plane and the distance intervals corresponding to each region of interest, the depth image to be processed is denoised to obtain the target image, including:

[0080] Step 502: Calculate the vertical distance from each pixel in the depth image to the target fitting plane.

[0081] The target vertical distance refers to the distance between a pixel in the depth image to be processed and the target fitting plane.

[0082] Step 504: Determine the maximum value among the minimum distance thresholds in multiple distance intervals as the target minimum distance threshold; determine the minimum value among the maximum distance thresholds in multiple distance intervals as the target maximum distance threshold.

[0083] The minimum target distance threshold refers to the minimum vertical distance between pixels in the depth image to be processed. The maximum target distance threshold refers to the maximum vertical distance between pixels in the depth image to be processed.

[0084] For example, the computer device obtains the minimum distance threshold and the maximum distance threshold from the distance intervals corresponding to each region of interest, determines the maximum value among the multiple minimum distance thresholds as the target minimum distance threshold, and determines the minimum value among the multiple maximum distance thresholds as the target maximum distance threshold.

[0085] Step 506: Determine the target distance interval corresponding to the depth image to be processed based on the target minimum distance threshold and the target maximum distance threshold.

[0086] For example, the computer device uses the interval consisting of the minimum target distance threshold and the maximum target distance threshold as the target distance interval corresponding to the depth image to be processed.

[0087] Step 508: Obtain the target image based on the pixels whose vertical distance to the target is within the target distance range.

[0088] For example, the computer device compares the target vertical distance corresponding to each pixel in the depth image to be processed with the target distance range. If the target vertical distance is within the target distance range, the pixel corresponding to the target vertical distance is determined as the target pixel. If the target vertical distance is not within the target distance range, the pixel corresponding to the target vertical distance is discarded, and the target pixels are combined to form the corresponding target image.

[0089] In this embodiment, non-target image pixels in the depth image to be processed are removed using a target distance interval to obtain pixels located within the target distance interval, i.e., pixels located on or near the target fitting plane. The target image is generated based on the pixels located within the target distance interval, which reduces noise in the target image and thus improves the accuracy of depth image denoising.

[0090] In some embodiments, planar fitting is performed on multiple regions of interest to obtain a reference fitting plane, including:

[0091] Obtain pixel information corresponding to each pixel in multiple regions of interest;

[0092] Based on the pixel point information corresponding to each pixel point in the multiple regions of interest, a reference fitting plane is obtained by performing plane fitting on the pixel points in the multiple regions of interest.

[0093] The pixel point information refers to data representing a pixel point. The pixel point information can be represented by three-dimensional coordinates, two dimensions of which represent the position of the pixel point, and the other dimension represents the height corresponding to the pixel point, for example, the pixel point information of a pixel point is represented by (x, y, z), x and y represent the position of the pixel point in the image, and z represents the height corresponding to the pixel point.

[0094] In this embodiment, by performing plane fitting on the pixel point information corresponding to each pixel point in the multiple regions of interest, a reference fitting plane is obtained. The regions of interest contain a large number of pixel points of the target plane and part of the noise, and the reference fitting plane is close to the plane represented by the target plane, which provides basic data for subsequent denoising processing of the region of interest.

[0095] In some embodiments, as shown in Figure 6 performing plane fitting on the multiple regions of interest to obtain a reference fitting plane further includes:

[0096] In step 602, a preset depth threshold and a preset gradient threshold are obtained.

[0097] The preset depth threshold refers to a preset depth. The preset gradient threshold refers to a preset gradient.

[0098] In step 604, for each region of interest, based on the preset depth threshold and the depth of each pixel point in the region of interest, a first mask corresponding to the region of interest is determined.

[0099] The mask refers to a binary image or a matrix with the same size as the region of interest, which is used to specify a specific region or pixel to be processed or operated.

[0100] For example, for each region of interest, the computer device compares the depth corresponding to each pixel point with the preset depth threshold in sequence. If the depth of the pixel point is equal to the preset depth threshold, the value corresponding to the pixel point is determined as a first identifier; if the depth of the pixel point is not equal to the preset depth threshold, the value corresponding to the pixel point is determined as a second identifier; based on the value corresponding to each pixel point, a first mask corresponding to the region of interest is obtained. The first identifier can be 1, and the second identifier can be 0.

[0101] In step 606, the gradient of each pixel point in the region of interest is calculated, and based on the preset gradient threshold and the gradient of each pixel point in the region of interest, a second mask corresponding to the region of interest is determined.

[0102] wherein, the gradient refers to the depth change rate of the position of the pixel point, which can be understood as the depth change intensity and direction between the pixel point and the adjacent pixel point.

[0103] Exemplarily, for each region of interest, the computer device calculates the gradient of each pixel point using a preset method, compares the gradient of each pixel point with the preset gradient threshold in turn, if the gradient of the pixel point is greater than the preset gradient threshold, the value corresponding to the pixel point is determined as the second identifier; if the gradient of the pixel point is less than or equal to the preset gradient threshold, the value corresponding to the pixel point is determined as the first identifier, and based on the value corresponding to each pixel point, the second mask corresponding to the region of interest is obtained.

[0104] Step 608, based on the first mask and the second mask, the region of interest is denoised to obtain the target region of interest.

[0105] Exemplarily, the computer device performs AND operation on the first mask, the second mask and the region of interest to obtain the target region of interest.

[0106] Step 610, based on the pixel point information corresponding to each pixel point in the plurality of regions of interest, the pixel points in the plurality of regions of interest are planar fitted to obtain a reference fitting plane, including: based on the pixel point information corresponding to each pixel point in the plurality of target regions of interest, the pixel points in the plurality of target regions of interest are planar fitted to obtain a reference fitting plane.

[0107] In this embodiment, the first mask and the second mask are used to denoise the region of interest to obtain the target region of interest, which can be understood as removing the pixel points in the region of interest that do not meet the preset depth threshold and the preset gradient threshold, thereby reducing the noise points in the region of interest, and the reference fitting plane obtained by planar fitting the pixel points in the plurality of target regions of interest is closer to the target plane.

[0108] In one exemplary embodiment, the first depth image denoising method is used for a depth image with scattered noise points, including the following steps:

[0109] The computer device obtains a to-be-processed depth image, a preset depth threshold and a preset gradient threshold, compares the depth corresponding to each pixel point in the to-be-processed depth image with the preset depth threshold in turn, if the depth of the pixel point is equal to the preset depth threshold, the value corresponding to the pixel point is determined as 1; if the depth of the pixel point is not equal to the preset depth threshold, the value corresponding to the pixel point is determined as 0; based on the value corresponding to each pixel point, a first mask corresponding to the region of interest is obtained.

[0110] The computer device calculates the gradient of each pixel point using a preset method, compares the gradient of each pixel point with a preset gradient threshold in sequence, if the gradient of the pixel point is greater than the preset gradient threshold, the value corresponding to the pixel point is determined as 0; if the gradient of the pixel point is less than or equal to the preset gradient threshold, the value corresponding to the pixel point is determined as 1; based on the value corresponding to each pixel point, the second mask corresponding to the region of interest is obtained.

[0111] The computer device performs an AND operation on the first mask, the second mask and the region of interest to obtain the target image. For example, as shown in Figure 7 , (a) is a to-be-processed depth image, 702, 704, 706 and 708 in the to-be-processed depth image represent planar regions of different depths, 704 is a target image, (b) is a planar region composed of pixel points with a depth threshold in (a), it can be seen that there are noise points with the depth threshold in the to-be-processed depth image, that is, the pixel points other than 704 in (b) are noise points, the noise points are relatively scattered, the first depth image denoising method is used to perform denoising processing on (a) to obtain the target image (c).

[0112] For the depth image in the noise point set, the second depth image denoising method is used, first, the flowchart as shown in Figure 8 is used to determine the target fitting plane corresponding to the to-be-processed depth image, including the following steps:

[0113] The computer device obtains the to-be-processed depth image and n regions of interest {ROI_1, …, ROI_n} in the to-be-processed depth image, obtains a compression parameter sequence {adapt_ratio_1, …, adapt_ratio_n}, a first proportion parameter low_ratio and a second proportion parameter hight_ratio, puts each pixel point in all regions of interest into a target set valid_points, performs plane fitting using the target set valid_points to obtain a reference fitting plane. For each pixel point in each region of interest, the computer device calculates the vertical distance of the pixel point to the reference fitting plane.

[0114] For each region of interest, the computer device calculates the standard deviation of the vertical distances corresponding to the multiple pixel points in the region of interest to obtain a set {d_1, …, d_n} composed of n standard deviations, the computer device determines that the arrangement order of the compression parameter sequence is from large to small, then the standard deviations corresponding to the multiple regions of interest are arranged in ascending order from small to large to obtain a region arrangement order; based on the region arrangement order, the target arrangement order corresponding to the regions of interest is determined, the compression parameter corresponding to the target arrangement order in the compression parameter sequence is determined as the target compression parameter corresponding to the regions of interest. The target set valid_points is emptied.

[0115] For each region of interest, based on the vertical distance corresponding to each pixel point in the region of interest, the pixel points corresponding to the vertical distance less than zero are counted to obtain a first number, and the pixel points corresponding to the vertical distance greater than zero are counted to obtain a second number. The computer device performs multiplication operation on the target compression parameter corresponding to the region of interest, the first proportion parameter and the first number to obtain a first arrangement order, and then performs multiplication operation on the target compression parameter corresponding to the region of interest, the second proportion parameter and the second number to obtain a second arrangement order. The vertical distances less than zero are sorted from large to small, and the vertical distance with the arrangement order located in the first arrangement order is determined as the minimum distance threshold value corresponding to the region of interest; the vertical distances greater than zero are sorted from small to large, and the vertical distance with the arrangement order located in the second arrangement order is determined as the maximum distance threshold value corresponding to the region of interest; based on the minimum distance threshold value and the maximum distance threshold value, the distance interval corresponding to the region of interest is obtained.

[0116] For each region of interest, the computer device compares the vertical distance corresponding to each pixel point in the region of interest with the distance interval respectively, if the vertical distance corresponding to the pixel point is located in the distance interval, the pixel point is determined as the to-be-fitted pixel point corresponding to the region of interest, and the to-be-fitted pixel point is put into the target set valid_points. After traversing all the regions of interest, the target set valid_points is plane-fitted to obtain a target fitting plane.

[0117] After obtaining the target fitting plane, the computer device obtains the minimum distance threshold value and the maximum distance threshold value from the distance interval corresponding to each region of interest respectively, determines the maximum value in the multiple minimum distance threshold values as a target minimum distance threshold value, determines the minimum value in the multiple maximum distance threshold values as a target maximum distance threshold value, and takes the interval composed of the target minimum distance threshold value and the target maximum distance threshold value as a target distance interval corresponding to the to-be-processed depth image. Then, the target vertical distance of each pixel point in the to-be-processed depth image to the target fitting plane is calculated, the pixel point with the target vertical distance located in the target distance interval is determined as a target pixel point corresponding to the to-be-processed depth image, and the corresponding target image is obtained based on the target pixel point. For example, as shown in Figure 9 (a) is a to-be-processed depth image, and the noise points in (a) are more and more concentrated. The second depth image denoising method is used to denoise (a) to obtain a target image (b).

[0118] In the second depth image denoising method, a plurality of interest regions in the to-be-processed depth image are subjected to plane fitting to obtain a reference fitting plane, the interest regions contain a large number of pixel points in a target plane and a large number of noise points, the reference fitting plane is close to the target plane, a vertical distance of each pixel point in the interest region to the reference fitting plane is calculated, a distance interval corresponding to the interest region is determined according to the vertical distance corresponding to the pixel point in the interest region, a pixel point with a vertical distance in the distance interval is determined as a to-be-fitted pixel point corresponding to the interest region, it can be understood that the vertical distances corresponding to the pixel points in the target plane and a small amount of noise points are in the distance interval, and the vertical distances corresponding to most noise points are out of the distance interval, the pixel points in the interest region are denoised by using the distance interval, most noise points are filtered out, that is, the obtained to-be-fitted pixel points only contain a small amount of noise points, the to-be-fitted pixel points corresponding to a plurality of interest regions are subjected to plane fitting to obtain a target fitting plane, since the to-be-fitted pixel points contain a large number of pixel points in the target plane and a small amount of noise points, the target fitting plane is closer to the target plane than the reference fitting plane, and the to-be-processed depth image is denoised by using the target fitting plane closer to the target plane and the distance intervals corresponding to the interest regions, it can be understood that the to-be-processed depth image is denoised by using a denoising condition with higher accuracy, the precision of depth image denoising is improved, and the accuracy of the target image is improved.

[0119] It should be understood that, although each step in the flowchart involved in each of the above embodiments is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each of the above embodiments can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least part of other steps or stages.

[0120] Based on the same inventive concept, the embodiments of the present application also provide a depth image denoising device for implementing the above-mentioned depth image denoising method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more depth image denoising device embodiments provided below can refer to the limitations of the depth image denoising method in the above text, which will not be repeated here.

[0121] In some embodiments, as shown in Figure 10 a depth image denoising device is provided, comprising:

[0122] The acquisition module 1002 is configured to acquire a plurality of regions of interest in a to-be-processed depth image, perform plane fitting on the plurality of regions of interest, and obtain a reference fitting plane.

[0123] The calculation module 1004 is configured to respectively determine a vertical distance from each pixel point in each region of interest to the reference fitting plane.

[0124] The determination module 1006 is configured to, for each region of interest, determine a distance interval corresponding to the region of interest based on the vertical distances corresponding to the respective pixel points in the region of interest, and determine, as to-be-fitted pixel points corresponding to the region of interest, the pixel points whose vertical distances are located in the distance interval.

[0125] The fitting module 1008 is configured to perform plane fitting on the to-be-fitted pixel points corresponding to the plurality of regions of interest, and obtain a target fitting plane.

[0126] The denoising module 1010 is configured to perform denoising processing on the to-be-processed depth image based on the target fitting plane and the distance intervals corresponding to the respective regions of interest, and obtain a target image.

[0127] In some embodiments, in the process of determining the distance interval corresponding to the region of interest based on the vertical distances corresponding to the respective pixel points in the region of interest, the determination module 1006 is specifically configured to:

[0128] acquire a target compression parameter corresponding to the region of interest, and a first proportion parameter and a second proportion parameter;

[0129] count the pixel points corresponding to the vertical distances less than zero based on the vertical distances corresponding to the respective pixel points in the region of interest, and obtain a first quantity; count the pixel points corresponding to the vertical distances greater than zero, and obtain a second quantity;

[0130] fuse the target compression parameter, the first proportion parameter, and the first quantity, and obtain a first arrangement order; fuse the target compression parameter, the second proportion parameter, and the second quantity, and obtain a second arrangement order;

[0131] determine the distance interval corresponding to the region of interest based on the first arrangement order, the second arrangement order, and the vertical distances corresponding to the respective pixel points in the region of interest.

[0132] In some embodiments, in the process of acquiring the target compression parameter corresponding to the region of interest, the determination module 1006 is specifically configured to:

[0133] acquire a compression parameter sequence;

[0134] For each region of interest, calculate the dispersion degree of the vertical distances corresponding to the plurality of pixels in the region of interest, to obtain a standard deviation corresponding to the region of interest;

[0135] Based on the standard deviation corresponding to each region of interest, sort the plurality of regions of interest to obtain a region arrangement sequence; the arrangement order of the region arrangement sequence is opposite to that of the compression parameter sequence;

[0136] Based on the region arrangement sequence, determine a target arrangement order corresponding to the region of interest; determine the compression parameter corresponding to the target arrangement order in the compression parameter sequence as the target compression parameter corresponding to the region of interest.

[0137] In some embodiments, in determining the distance interval corresponding to the region of interest based on the first arrangement order, the second arrangement order, and the vertical distance corresponding to each pixel in the region of interest, the determining module 1006 is specifically configured to:

[0138] For each region of interest, sort the vertical distances less than zero from large to small, and determine the vertical distance with the arrangement order located in the first arrangement order as the minimum distance threshold value corresponding to the region of interest;

[0139] Sort the vertical distances greater than zero from small to large, and determine the vertical distance with the arrangement order located in the second arrangement order as the maximum distance threshold value corresponding to the region of interest;

[0140] Based on the minimum distance threshold value and the maximum distance threshold value, obtain the distance interval corresponding to the region of interest.

[0141] In some embodiments, in performing denoising processing on the to-be-processed depth image based on the target fitting plane and the distance interval corresponding to each region of interest to obtain a target image, the denoising module 1010 is specifically configured to:

[0142] Calculate the target vertical distance from each pixel in the to-be-processed depth image to the target fitting plane;

[0143] Determine the maximum value in the minimum distance threshold values in the plurality of distance intervals as a target minimum distance threshold value; determine the minimum value in the maximum distance threshold values in the plurality of distance intervals as a target maximum distance threshold value;

[0144] Based on the target minimum distance threshold value and the target maximum distance threshold value, determine a target distance interval corresponding to the to-be-processed depth image;

[0145] Based on the pixel points with the target vertical distance located in the target distance interval, obtain the target image.

[0146] In some embodiments, in performing plane fitting on the plurality of regions of interest to obtain a reference fitting plane, the obtaining module 1002 is specifically configured to:

[0147] obtain pixel point information corresponding to each pixel point in the plurality of regions of interest;

[0148] fit a plane to the pixel points in the plurality of regions of interest based on the pixel point information corresponding to each pixel point in the plurality of regions of interest, to obtain a reference fitting plane.

[0149] In some embodiments, in the aspect of fitting a plane to the plurality of regions of interest to obtain the reference fitting plane, the obtaining module 1002 is specifically configured to:

[0150] obtain a preset depth threshold and a preset gradient threshold;

[0151] For each region of interest, determine a first mask corresponding to the region of interest based on the preset depth threshold and the depth of each pixel point in the region of interest;

[0152] calculate the gradient of each pixel point in the region of interest, and determine a second mask corresponding to the region of interest based on the preset gradient threshold and the gradient of each pixel point in the region of interest;

[0153] perform denoising processing on the region of interest based on the first mask and the second mask, to obtain a target region of interest;

[0154] fit a plane to the pixel points in the plurality of regions of interest based on the pixel point information corresponding to each pixel point in the plurality of regions of interest, to obtain a reference fitting plane, including fitting a plane to the pixel points in the plurality of target regions of interest based on the pixel point information corresponding to each pixel point in the plurality of target regions of interest, to obtain the reference fitting plane.

[0155] Each of the above depth image denoising apparatuses can be implemented in whole or in part by software, hardware, and combinations thereof. Each of the above modules can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in a computer device in software form, so as to be called and executed by a processor to perform the operations corresponding to each of the above modules.

[0156] In some embodiments, a computer device is provided, which can be a terminal, and an internal structure diagram of the computer device can be as shown in Figure 11As shown in the figure. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through the system bus, the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control ability. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with the external terminal in a wired or wireless manner. The wireless manner can be realized through WIFI, mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by the processor to realize the steps of the above-mentioned depth image denoising method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.

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

[0158] In some embodiments, a computer device is also provided, which includes a memory and a processor, the memory stores a computer program, and the processor executes the computer program to realize the steps in the above-mentioned method embodiments.

[0159] In some embodiments, a computer readable storage medium 1200 is provided, which stores a computer program 1202, the computer program 1202 is executed by a processor to realize the steps in the above-mentioned method embodiments, and its internal structure diagram can be as Figure 12 shown.

[0160] In some embodiments, a computer program product is provided, which includes a computer program, the computer program is executed by a processor to realize the steps in the above-mentioned method embodiments.

[0161] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of the country and region.

[0162] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of each method can be included. Any reference to a memory, database or other medium used in the embodiments provided by the present application can include at least one of a non-volatile and volatile memory. The non-volatile memory can include a read-only memory (Read-Only Memory, ROM), a magnetic tape, a floppy disk, a flash memory, an optical storage, a high-density embedded non-volatile memory, a resistive memory (ReRAM), a magnetoresistive random access memory (Magnetoresistive Random Access Memory, MRAM), a ferroelectric memory (Ferroelectric Random Access Memory, FRAM), a phase change memory (Phase Change Memory, PCM), a graphene memory, etc. The volatile memory can include a random access memory (Random Access Memory, RAM) or an external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0163] The technical features of the above embodiments can be combined in any way. To make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not exist contradictory, they should be considered as the scope of the present disclosure.

[0164] The above embodiments only express several implementation ways of the present application, and the description is specific and detailed, but it should not be understood as a limitation to the patent scope of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A method of denoising a depth image, the method comprising: The method comprises the following steps: obtaining a plurality of regions of interest in a to-be-processed depth image, performing plane fitting on the plurality of regions of interest to obtain a reference fitting plane; determining the vertical distance from each pixel point in each region of interest to the reference fitting plane respectively; for each region of interest, obtaining a target compression parameter corresponding to the region of interest, a first proportion parameter and a second proportion parameter; based on the vertical distance corresponding to each pixel point in the region of interest, counting the pixel points corresponding to the vertical distance less than zero to obtain a first quantity; counting the pixel points corresponding to the vertical distance greater than zero to obtain a second quantity; fusing the target compression parameter, the first proportion parameter and the first quantity to obtain a first arrangement order; fusing the target compression parameter, the second proportion parameter and the second quantity to obtain a second arrangement order; based on the first arrangement order, the second arrangement order and the vertical distance corresponding to each pixel point in the region of interest, determining a distance interval corresponding to the region of interest, and determining the pixel points whose vertical distance is located in the distance interval as the to-be-fitted pixel points corresponding to the region of interest; the first proportion parameter refers to a percentage coefficient related to the number of pixel points in the region of interest below the reference fitting plane; the second proportion parameter refers to a percentage coefficient related to the number of pixel points in the region of interest on the reference fitting plane; performing plane fitting on the to-be-fitted pixel points corresponding to the plurality of regions of interest to obtain a target fitting plane; based on the target fitting plane and the distance interval corresponding to each region of interest, performing denoising processing on the to-be-processed depth image to obtain a target image.

2. The method of claim 1, wherein, The fusing of the target compression parameter, the first proportion parameter and the first quantity to obtain a first arrangement order comprises: performing multiplication operation on the target compression parameter, the first proportion parameter and the first quantity to obtain a first result; performing integer operation on the first result to obtain a first arrangement order. The fusing of the target compression parameter, the second proportion parameter and the second quantity to obtain a second arrangement order comprises: performing multiplication operation on the target compression parameter, the second proportion parameter and the second quantity to obtain a second result; performing integer operation on the second result to obtain a second arrangement order.

3. The method of claim 1, wherein, The obtaining of the target compression parameter corresponding to the region of interest comprises: obtaining a compression parameter sequence; for each region of interest, calculating the dispersion degree of the vertical distance corresponding to a plurality of pixel points in the region of interest to obtain a standard deviation corresponding to the region of interest; based on the standard deviation corresponding to each region of interest, sorting the plurality of regions of interest to obtain a region arrangement sequence; the arrangement order of the region arrangement sequence is opposite to that of the compression parameter sequence. Based on the region arrangement sequence, a target arrangement order corresponding to the region of interest is determined; and a compression parameter corresponding to the target arrangement order in the compression parameter sequence is determined as a target compression parameter corresponding to the region of interest.

4. The method of claim 1, wherein, The determining of the distance interval corresponding to the region of interest based on the first arrangement order, the second arrangement order, and the vertical distance corresponding to each pixel point in the region of interest comprises: For each region of interest, the vertical distances less than zero are sorted from large to small, and a vertical distance with an arrangement order located in the first arrangement order is determined as a minimum distance threshold value corresponding to the region of interest; The vertical distances greater than zero are sorted from small to large, and a vertical distance with an arrangement order located in the second arrangement order is determined as a maximum distance threshold value corresponding to the region of interest; The distance interval corresponding to the region of interest is obtained based on the minimum distance threshold value and the maximum distance threshold value.

5. The method of claim 1, wherein, The denoising processing of the to-be-processed depth image based on the target fitting plane and the distance interval corresponding to each region of interest to obtain a target image comprises: A target vertical distance of each pixel point in the to-be-processed depth image to the target fitting plane is calculated respectively; A maximum value in the minimum distance threshold values in the plurality of distance intervals is determined as a target minimum distance threshold value; and a minimum value in the maximum distance threshold values in the plurality of distance intervals is determined as a target maximum distance threshold value; A target distance interval corresponding to the to-be-processed depth image is determined based on the target minimum distance threshold value and the target maximum distance threshold value; A target image is obtained based on the pixel points with the target vertical distance located in the target distance interval.

6. The method of claim 1, wherein, The plane fitting of the plurality of regions of interest to obtain a reference fitting plane comprises: Pixel point information corresponding to each pixel point in the plurality of regions of interest is obtained; The pixel points in the plurality of regions of interest are subjected to plane fitting based on the pixel point information corresponding to each pixel point in the plurality of regions of interest to obtain a reference fitting plane.

7. The method of claim 6, wherein, The method further comprises: A preset depth threshold value and a preset gradient threshold value are obtained; For each region of interest, a first mask corresponding to the region of interest is determined based on the preset depth threshold value and the depth of each pixel point in the region of interest; A gradient of each pixel point in the region of interest is calculated, and a second mask corresponding to the region of interest is determined based on the preset gradient threshold value and the gradient of each pixel point in the region of interest; The region of interest is subjected to denoising processing based on the first mask and the second mask to obtain a target region of interest; The plane fitting of the plurality of regions of interest to obtain a reference fitting plane comprises: The pixel points in the plurality of target regions of interest are subjected to plane fitting based on the pixel point information corresponding to each pixel point in the plurality of target regions of interest to obtain a reference fitting plane.

8. An apparatus for denoising a depth image, the apparatus comprising: It comprises: An acquisition module is configured to acquire a plurality of regions of interest in a to-be-processed depth image, perform plane fitting on the plurality of regions of interest, and obtain a reference fitting plane; A calculation module is configured to determine a vertical distance from each pixel in each region of interest to the reference fitting plane; A determination module is configured to, for each region of interest, acquire a target compression parameter corresponding to the region of interest, a first proportion parameter, and a second proportion parameter; Based on the vertical distances corresponding to the pixels in the region of interest, count the pixels corresponding to the vertical distances less than zero to obtain a first quantity; Count the pixels corresponding to the vertical distances greater than zero to obtain a second quantity; Fuse the target compression parameter, the first proportion parameter, and the first quantity to obtain a first arrangement order; Fuse the target compression parameter, the second proportion parameter, and the second quantity to obtain a second arrangement order; Based on the first arrangement order, the second arrangement order, and the vertical distances corresponding to the pixels in the region of interest, determine a distance interval corresponding to the region of interest, and determine the pixels with the vertical distances in the distance interval as to-be-fitted pixels corresponding to the region of interest; the first proportion parameter refers to a percentage coefficient related to the number of pixels in the region of interest below the reference fitting plane; the second proportion parameter refers to a percentage coefficient related to the number of pixels in the region of interest on the reference fitting plane; A fitting module is configured to perform plane fitting on the to-be-fitted pixels corresponding to the plurality of regions of interest to obtain a target fitting plane; A denoising module is configured to perform denoising processing on the to-be-processed depth image based on the target fitting plane and the distance intervals corresponding to the regions of interest to obtain a target image. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is characterized in that, The processor executes the computer program to implement the steps of the method in any one of claims 1 to 7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Volume measurement method, device and system

    CN112254635A

  • Image generation method and device, electronic equipment and storage medium

    CN116128770A