A controllable recursive global bilateral filtering method

By dividing the image into a tree structure and calculating the node similarity weights, and combining bilateral filtering and recursive filtering techniques, the problem that local filtering cannot remove large-scale noise and non-local filtering has high computational complexity in existing technologies is solved, thereby improving image quality and information transmission.

CN121903875BActive Publication Date: 2026-05-22XI'AN PETROLEUM UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XI'AN PETROLEUM UNIVERSITY
Filing Date
2026-03-19
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

In existing image processing techniques, local filtering methods cannot effectively remove large-scale structural noise, while nonlocal filtering methods have high computational complexity and are prone to generating false stripes, making it difficult to achieve sufficient propagation of effective information and noise removal in images.

Method used

An adjustable recursive global bilateral filtering method is adopted to divide the image into a tree structure. The similarity weight is determined by calculating the color distance and spatial distance between nodes. Image information is transmitted along the tree structure and local one-dimensional filtering and normalization are performed. By combining bilateral filtering and recursive filtering techniques, boundary-preserving filtering is achieved.

Benefits of technology

It effectively filters out discrete noise while preserving image details and structure, possesses long-distance information transmission capabilities, and can efficiently remove structural noise, thereby improving image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121903875B_ABST
    Figure CN121903875B_ABST
Patent Text Reader

Abstract

The application discloses a controllable recursive global bilateral filtering method, and belongs to the technical field of image processing, which comprises the following steps: dividing a guide image into a tree structure; determining the connection relationship of each node, and calculating the similarity weight of adjacent nodes based on the mapped color distance and spatial distance; setting a local one-dimensional filtering window according to the image information transmission direction, and implementing boundary preservation filtering; multiplying the filtering output and the similarity weight, and taking the product as the image information transmitted by the current node along the tree structure; traversing all nodes to make them obtain the weighted sum of color values of all nodes of the whole tree; setting all node color values as 1.0, and repeating the above process to obtain a normalization coefficient; dividing the weighted sum of color values by the normalization coefficient to obtain a normalized filtering result of filtering along a single tree structure; if multiple tree structures are contained, then fusing the results of the tree structures to obtain the output of the final image filtering, so that the discrete noise is filtered out while the detail structure is kept by using local information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to an adjustable recursive global bilateral filtering method. Background Technology

[0002] Complex lighting conditions at the image acquisition site and noise introduced by camera components during optical signal processing significantly degrade image quality, posing a serious challenge to downstream image processing tasks such as image segmentation, target recognition, and 3D measurement. Boundary-preserving filtering is an effective measure to improve image quality. Furthermore, boundary-preserving filtering is fundamental to extracting effective information or ensuring the transmission of feature information within the effective region in image processing operations such as image detail enhancement, tone mapping, and grayscale colorization.

[0003] Currently, traditional spatial domain boundary-preserving image filtering methods mainly include local filtering methods and non-local filtering methods. Local filtering methods utilize image information within a local window to remove noise, such as bilateral filtering, guided filtering, and their improvements. These local filtering methods can only remove discrete noise in the image and cannot remove structures commensurate with the size of the filtering window. The computational complexity of bilateral filtering increases significantly with the size of the filtering window, and it can produce gradient flipping effects near the boundaries in tasks such as image detail enhancement and tone mapping. Guided filtering has linear complexity and can effectively avoid gradient flipping effects. However, guided filtering cannot effectively remove noise near significant boundaries. Furthermore, in grayscale image colorization tasks, local filtering methods cannot ensure that color information is fully propagated throughout the entire structure.

[0004] Nonlocal filtering methods mainly include recursive filtering methods and global optimization methods based on anisotropic diffusion. Recursive filtering methods perform multiple one-dimensional filters sequentially along the row and column directions, or divide the entire image into a tree structure and filter recursively along the tree structure, ensuring the full propagation of effective information throughout the image. However, these methods are prone to producing false stripes in the output image, reducing the quality of the filtered image. Global optimization methods based on anisotropic diffusion treat denoising as optimizing a global energy function. Minimizing the energy function requires inverting a matrix of size equal to the image resolution, which requires significant memory and time for filtering high-resolution images.

[0005] In general, local filtering algorithms cannot fully propagate effective information throughout the entire image and can only filter out discrete noise; while among non-local filtering methods, recursive filtering methods are prone to generating false stripes along the filtering direction, and global optimization methods based on anisotropic diffusion have relatively large memory requirements and computational costs. Summary of the Invention

[0006] To address the problems of existing technologies, this invention provides an adjustable recursive global bilateral filtering method, the method comprising:

[0007] S1: Divide the guide image into one or more tree structures to obtain the input image;

[0008] S2: Determine the connection relationship between each node in the input image, and map the color distance between connected nodes. Calculate the similarity weight of adjacent nodes by using the mapped color distance and the image space distance between nodes.

[0009] S3: Determine the local one-dimensional filtering window based on the direction in which the current node in the input image transmits image information along the tree structure, and perform boundary-preserving filtering on the nodes within the local one-dimensional filtering window;

[0010] S4: Multiply the output of the local one-dimensional filtering window by the similarity weight of the adjacent nodes to obtain the image information transmitted by the current node along the tree structure, and then transmit it along the tree structure.

[0011] S5: Perform S3 and S4 along the tree structure for all nodes in the input image. Each node can obtain the weighted sum of the color values ​​of all nodes in the tree structure.

[0012] S6: Set the color value of all nodes in the input image to 1.0, and repeat S3 and S4 to obtain the normalization coefficient of each node;

[0013] S7: Divide the weighted sum of the color values ​​by the corresponding normalization coefficient to obtain the normalized filtering result. If it is a single tree structure, the normalized filtering result is the final image processing result.

[0014] If there are multiple tree structures, the normalized filtering results of the multiple tree structures are fused to obtain the final image processing result.

[0015] Furthermore, in S1, the tree structure is a minimum expansion tree or a spatial tree structure;

[0016] The minimum expansion tree includes a single minimum expansion tree, multiple minimum expansion trees, or complementary minimum expansion trees;

[0017] When the guide image is divided into a single minimum expansion tree, each pixel in the guide image is connected to the pixel with the most similar color in its neighborhood and cannot form a loop.

[0018] When dividing the guide image into multiple minimum expansion trees, all boundaries in the guide image are sorted in ascending order of color distance. Minimum expansion trees are then divided for different boundary sorting methods to obtain multiple minimum expansion trees.

[0019] When dividing the guide image into two complementary minimum expansion trees, all boundaries of the guide image are sorted in ascending order of color distance and then divided into minimum expansion trees to obtain the first minimum expansion tree in the complementary minimum expansion tree. The edges already used in the first minimum expansion tree are removed from all boundaries of the guide image, and the remaining edges are further divided into minimum expansion trees to obtain the second minimum expansion tree in the complementary minimum expansion tree. If the remaining boundaries cannot be used to divide the entire guide image into connected minimum expansion trees, the boundaries in the first minimum expansion tree are sorted in ascending order of color distance, and the entire tree structure is connected according to the principle of prioritizing the boundary with smaller color distance.

[0020] Among them, spatial tree structures include: row- and column-dominated spatial tree structures, diagonal-dominated spatial tree structures, or complementary spatial tree structures;

[0021] The row- and column-dominated space tree structure consists of subtrees in four directions: top, bottom, left, and right. The diagonal-dominated space tree structure consists of subtrees in four directions: top left, bottom left, top right, and bottom right. The complementary space tree structure consists of both the row- and column-dominated space tree structure and the diagonal-dominated space tree structure.

[0022] Furthermore, in S2, when mapping the color distance between connected nodes, a step function or a sigmoid function is used to map color distances less than a threshold to a value of 0 or close to 0.

[0023] Furthermore, if the tree structure is a single minimum expansion tree, the transmission of image information includes transmitting image information from leaf nodes to root nodes along the minimum expansion tree, and transmitting image information from root nodes to leaf nodes;

[0024] When transmitting image information from leaf nodes to root nodes along the minimum expansion tree, the coordinates of the parent node of the current node are read, and the difference vector between the coordinates of the parent node and the coordinates of the current node is calculated. The difference vector is the direction of transmission of image information at this time. The orthogonal direction orthogonal to the difference vector is calculated. With the current node as the center, the nodes distributed within a certain radius of the orthogonal direction are the local one-dimensional filtering window for the current node to perform boundary-preserving filtering.

[0025] After performing boundary-preserving filtering on the nodes within the local one-dimensional filtering window, the similarity weight between the current node and its parent node is calculated. The product of this similarity weight and the output of the current node within the local one-dimensional filtering window is used as the image information propagated by the current node along the minimum expansion tree. When the parent node has multiple child nodes, the sum of the image information transmitted by all child nodes along the minimum expansion tree is the image information obtained by the parent node.

[0026] When transmitting image information from the root node to the leaf node along the minimum expansion tree, the coordinates of the parent node of the current node are read, and the difference vector between the coordinates of the current node and its parent node is calculated. The difference vector is the direction of transmission of image information at this time. The orthogonal direction orthogonal to the difference vector is calculated. With the parent node as the center, the nodes distributed within a certain radius of the orthogonal direction are the local one-dimensional filtering window for applying boundary-preserving filtering to the parent node of that node.

[0027] After performing boundary-preserving filtering on the nodes within the local one-dimensional filtering window, the similarity weight between the current node and its parent node is calculated. The product of the similarity weight between the current node and its parent node and the output of its parent node within the local one-dimensional filtering window is used as the image information propagated by the parent node of the current node from the root node to the leaf node along the minimum expansion tree. When the parent node of the current node has multiple child nodes, the image information transmitted by the parent node of the current node to each child node is calculated in turn.

[0028] After completing the above image message passing process along the minimum expansion tree from leaf nodes to root nodes and from root nodes to each leaf node, each node can obtain the weighted sum of the color values ​​of all nodes in the minimum expansion tree.

[0029] Furthermore, when transmitting image information from leaf nodes to root nodes and from root nodes to leaf nodes along the minimum expansion tree, bilateral filtering or recursive filtering is used when performing boundary-preserving filtering on nodes within the local one-dimensional filtering window;

[0030] During bilateral filtering, the filtering weights between two nodes are constructed based on the image space distance and the mapped color distance between each node in the local one-dimensional filtering window and the current node. Finally, the color values ​​of the nodes in the local one-dimensional filtering window are multiplied by the corresponding filtering weights and then weighted to obtain the output of the current node in the local one-dimensional window filtering.

[0031] During recursive filtering, starting from the two boundary endpoints of the local one-dimensional filtering window, the process recursively moves towards the center node of the local one-dimensional filtering window. At each step, the similarity weight between adjacent nodes is calculated based on the image spatial distance and the mapped color distance between adjacent nodes. The weight is then accumulated recursively to obtain the support of all nodes in the local one-dimensional filtering window to the center node.

[0032] Set the color value of all nodes within the local one-dimensional filtering window to 1.0. Repeat the recursive process from both ends of the local one-dimensional filtering window toward the center to obtain the normalization coefficient. Divide the support of all nodes to the center node by the normalization coefficient. The normalization result is the output of the current node within the local one-dimensional filtering window.

[0033] Furthermore, if the tree structure consists of multiple minimum expansion trees, for each minimum expansion tree, the same S3~S6 steps as for a single minimum expansion tree are performed to obtain the weighted sum and normalization coefficient of the color values ​​corresponding to each minimum expansion tree. The weighted sum of the color values ​​corresponding to each minimum expansion tree is divided by the normalization coefficient to obtain the normalized filtering result of each minimum expansion tree. Then, the average value is taken to obtain the final image processing result; or, the sum of the weighted sum of the color values ​​of multiple minimum expansion trees is divided by the sum of the normalization coefficients to obtain the final image processing result.

[0034] Furthermore, if the tree structure is a complementary minimum expansion tree, for each minimum expansion tree, the same S3~S6 steps as for a single minimum expansion tree are performed to obtain the weighted sum and normalization coefficient of the color values ​​corresponding to each minimum expansion tree. The weighted sum of the color values ​​corresponding to each minimum expansion tree is divided by the normalization coefficient to obtain the normalized filtering result of each minimum expansion tree. Then, the average value is taken to obtain the final image processing result. Alternatively, the sum of the weighted sums of the color values ​​is divided by the sum of the normalization coefficients to obtain the final image processing result.

[0035] Furthermore, if the tree structure is a diagonally dominant spatial tree structure, then S3~S7 specifically include:

[0036] A1: First, before each node transmits image information along the row and column directions from top to bottom, from bottom to top, from left to right, and from right to left, boundary-preserving filtering is performed on the nodes within the local one-dimensional filtering window. The nodes within a certain radius on a straight line perpendicular to the direction of image information transmission with the current node as the center are the local one-dimensional filtering window for the current node's boundary preservation filtering.

[0037] B1: Calculate the similarity weight between two nodes based on the mapped color distance and image space distance between the current node and its neighboring nodes. At this time, the image space distance is always 1. The product of the similarity weight and the output of the current node in the local one-dimensional filtering window is the transmitted image information. For each node, the transmitted image information in the four directions of row and column is obtained respectively.

[0038] C1: Perform A1 and B1 operations on all nodes in the input image along the four directions of row and column, and each node can obtain the weighted sum of the color values ​​of all nodes in the four directions;

[0039] Set the color value of all nodes in the input image to 1.0, and repeat the operations of A1 and B1 to obtain the normalization coefficients of each node in four directions;

[0040] D1: Add the weighted sums of the color values ​​obtained from C1 in the two directions from left to right and from top to bottom, then add the image information from the top left corner of the current node and the color value of the current node. Then multiply the similarity weight between the current node and its bottom right corner node with the superposition result. This is the image information transmitted by the current node from the top left to the bottom right along the main diagonal. After performing this process on all nodes, the weighted sum of the color values ​​of each node in the top left subtree is obtained.

[0041] E1: Add the weighted sums of the color values ​​obtained from C1 in the two directions from right to left and from bottom to top, then add the image information from the bottom right corner of the current node and the color value of the current node. Then multiply the similarity weight between the current node and its top left corner node with the superposition result. This is the image information transmitted by the current node from the bottom right to the top left along the main diagonal. After performing this process on all nodes, the weighted sum of the color values ​​of each node in the bottom right subtree is obtained.

[0042] F1: Add the weighted sums of the color values ​​obtained from C1 in the two directions from right to left and from top to bottom, then add the image information from the top right corner of the current node and the color value of the current node, and then multiply the similarity weight between the current node and its bottom left corner node with the superposition result. This is the image information transmitted by the current node from the top right to the bottom left along the secondary diagonal. After performing this process on all nodes, the weighted sum of the color values ​​of each node in the top right subtree is obtained.

[0043] G1: Add the weighted sums of the color values ​​obtained from C1 in the two directions from left to right and from bottom to top, then add the image information from the bottom left corner of the current node and the color value of the current node. Then multiply the similarity weight between the current node and its top right corner node with the superposition result. This is the image information transmitted by the current node from the bottom left to the top right along the secondary diagonal. After performing this process on all nodes, the weighted sum of the color values ​​of each node in the bottom left subtree is obtained.

[0044] H1: By repeating the operations from D1 to G1 on the normalization coefficients obtained in C1 for the four directions, the normalization coefficients of each node in the bottom right, top right, bottom left, and top left subtrees can be obtained. By dividing the weighted sum of the color values ​​by the corresponding normalization coefficient, the normalized filtering results of each subtree along the diagonal direction can be obtained. The average value of the normalized filtering results of the four subtrees can be used as the final image processing result of the diagonal-dominant space tree structure. Alternatively, the weighted sum of the color values ​​of the four subtrees can be divided by the sum of the normalization coefficients of the four subtrees as the final image processing result of the diagonal-dominant space tree structure.

[0045] Furthermore, if the tree structure is a row- and column-dominated space tree structure, S3~S7 specifically include:

[0046] A2: First, before each node transmits image information along the four diagonal directions from top left to bottom right, from bottom right to top left, from top right to bottom left, and from bottom left to top right, boundary-preserving filtering is performed on the nodes within the local one-dimensional filtering window. The nodes within a certain radius on a straight line perpendicular to the direction of image information transmission, with the current node as the center, are the local one-dimensional filtering window for the current node's boundary-preserving filtering.

[0047] B2: Calculate the similarity weight between two nodes based on the mapped color distance and image space distance between the current node and its adjacent nodes on the diagonal. At this time, the image space distance is constant. The product of the similarity weight and the output of the current node in the local one-dimensional filtering window is the transmitted image information. For each node, the transmitted image information in the four directions of the diagonal direction is obtained respectively.

[0048] C2: Perform operations A2 and B2 on all nodes in the input image along the four diagonal directions. Each node can obtain the weighted sum of the color values ​​of all nodes in the four diagonal directions.

[0049] Set the color value of all nodes in the input image to 1.0, and repeat operations A2 and B2 to obtain the normalization coefficients in the four directions diagonally for each node;

[0050] D2: Add the weighted sums of the color values ​​obtained from C2 in the two directions from top left to bottom right and from bottom left to top right, then add the image information from the left side of the current node and the color value of the current node, and then multiply the similarity weight between the current node and the node to its right with the superposition result. This is the image information passed from left to right by the current node. After performing this process on all nodes, the weighted sum of the color values ​​of each node in the left subtree is obtained.

[0051] E2: Add the weighted sums of the color values ​​obtained from C2 in the two directions from top right to bottom left and from bottom right to top left, then add the image information from the right side of the current node and the color value of the current node, and then multiply the similarity weight between the current node and the node to its left with the superposition result. This is the image information passed from right to left by the current node. After performing this process on all nodes, the weighted sum of the color values ​​of each node in the right subtree is obtained.

[0052] F2: Add the weighted sums of the color values ​​obtained from C2 in the two directions from top left to bottom right and from top right to bottom left, then add the image information transmitted from above the current node and the color value of the current node, and then multiply the similarity weight between the current node and the node below it with the superposition result. This is the image information transmitted from top to bottom by the current node. After performing this process on all nodes, the weighted sum of the color values ​​of each node in the upper subtree is obtained.

[0053] G2: Add the weighted sums of the color values ​​obtained from C2 in the two directions from bottom left to top right and from bottom right to top left, then add the image information transmitted from below the current node and the color value of the current node, and then multiply the similarity weight between the current node and the node above it with the superposition result. This is the image information transmitted from bottom to top by the current node. After performing this process on all nodes, the weighted sum of the color values ​​of each node in the lower subtree is obtained.

[0054] H2: By repeating the operations of D2~G2 on the normalization coefficients obtained in C2 for the four directions, the normalization coefficients of each node in the left subtree, right subtree, top subtree, and bottom subtree can be obtained. By dividing the weighted sum of the color values ​​by the corresponding normalization coefficient, the normalized filtering result of each subtree along the row and column directions can be obtained. The average of the normalized filtering results of the four subtrees is the final image processing result of the row-column dominant space tree structure. Alternatively, the final image processing result of the row-column dominant space tree structure can be obtained by dividing the weighted sum of the color values ​​of the four subtrees by the sum of the normalization coefficients of the four subtrees.

[0055] Furthermore, if the tree structure is a complementary spatial tree structure, the average of the final image processing result of the row- and column-dominant spatial tree structure and the final image processing result of the diagonal-dominant spatial tree structure is the final image processing result.

[0056] Alternatively, using the normalized coefficients of the four subtrees of the row- and column-dominant spatial tree structure and the four subtrees of the diagonal-dominant spatial tree structure as weights, the weighted sum of the color values ​​corresponding to the eight subtrees is divided by the sum of the normalized coefficients of the eight subtrees to obtain the final image processing result of the complementary spatial tree structure.

[0057] The beneficial effects of the technical solution provided by the embodiments of the present invention are: the method in the present invention can effectively utilize local information to filter out discrete noise while maintaining detailed structure, and has the ability to transmit image information over long distances, thereby effectively utilizing long-distance dependency to filter out structural noise. Attached Figure Description

[0058] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0059] Figure 1 This is a flowchart of an adjustable recursive global bilateral filtering method provided by the present invention;

[0060] Figure 2 This is a diagram illustrating an adjustable recursive global bilateral filtering method provided by the present invention;

[0061] Figure 3 This invention provides an explanation of a filtering process along a minimum expansion tree;

[0062] Figure 4 This is an example diagram of a sigmoid color distance mapping function provided by the present invention;

[0063] Figure 5 This is an example diagram of a minimum expansion tree partitioned by different boundary sorting methods provided by the present invention;

[0064] Figure 6 This is an example diagram of a complementary minimum expansion tree provided by the present invention;

[0065] Figure 7 This is an example diagram of a complementary spatial tree structure provided by the present invention;

[0066] Figure 8 This is an illustration of a filtering process using a diagonally dominant spatial tree structure provided by the present invention;

[0067] Figure 9 This is an illustration of a filtering process along a row- and column-dominant spatial tree structure provided by the present invention. Detailed Implementation

[0068] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0069] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.

[0070] Example 1: An adjustable recursive global bilateral filtering method, see [link to example]. Figure 1 and Figure 2 The steps include: Step (101): Divide the guide image into a single minimal expansion tree.

[0071] It should be noted that in the process of partitioning the tree structure, the guide image is regarded as an undirected graph containing H*W vertices, where H and W are the height and width of the guide image, respectively. When partitioning the minimum expansion tree, the guide image is regarded as a four-linked undirected graph, and an acyclic tree structure is constructed. Each pixel in the guide image is connected to the pixel with the most similar color in its neighborhood and cannot form a loop.

[0072] Step (102): Determine the connection relationship between each node in the input image, and map the color distance between connected nodes (pixels). Calculate the similarity weight of adjacent nodes by using the mapped color distance and the image space distance between nodes.

[0073] It should be noted that during mapping, the sigmoid function is used to map color distances less than a certain threshold to values ​​close to 0, thus smoothing out such boundaries during the filtering process. The mapped color distance is denoted as... Specifically, it can be expressed as:

[0074]

[0075] in, For two adjacent nodes that form an edge, and To adjust the parameters of the shape of the mapping function, This is the average of the color distances of all edges in the guided image. The sigmoid function graphs under different parameters are shown below. Figure 4 As shown, the horizontal and vertical coordinates of the image represent the values ​​before and after the mapping, respectively. The left image illustrates... The larger the value, the narrower the transition region of the sigmoid function, which is more conducive to maintaining the gradient value near the boundary of the transition region, as illustrated in the right figure. The value can adjust the range of color distance mapping. The larger the value, the more edge color distances are mapped to near 0, and such boundaries will be smoothed out during the boundary preservation filtering process.

[0076] Alternatively, a step function can be used to map color distances less than a threshold to 0, thereby smoothing out such boundaries during the filtering process.

[0077] In addition, the Gaussian function is used to calculate the similarity of the distance between two nodes in the color space and the image space, denoted as... and Let the similarity between two nodes be in the color space and the image space, respectively. Specifically, this can be expressed as:

[0078]

[0079] in, and The variances of the distances in the color space and image space, respectively, determine the support range of each space. For color space distance, This represents the spatial distance between the images.

[0080] Alternatively, an exponential function can be used to calculate the similarity between two nodes in the color space and the image space, which can be specifically expressed as:

[0081] in, and They determine the support range of the color space and the image space, respectively.

[0082] The product of the similarity in the color space and the similarity in the image space is the similarity weight between two nodes.

[0083] Step (103): Determine the local one-dimensional filtering window based on the direction in which the current node in the input image transmits image information along the tree structure, and perform boundary-preserving filtering on the nodes within the local one-dimensional filtering window.

[0084] It should be noted that, see Figure 3 If the tree structure is a single minimum expansion tree, the transmission of image information is divided into two steps: transmitting image information from leaf nodes to root nodes along the minimum expansion tree, and transmitting image information from root nodes to leaf nodes.

[0085] Passing image information from leaf nodes to root nodes along the minimum expansion tree allows each node to obtain the support of all nodes in its subtree for that node. Let the current node be denoted as . Its parent node coordinates are The direction of image information transmission at the current node can be represented as follows: The unit vector orthogonal to the direction of image information transmission is denoted as , Let be the row and column coordinates of the node, respectively. The nodes distributed within a certain radius in the orthogonal direction, centered on the current node, constitute the local one-dimensional filtering window for the current node to be used for boundary-preserving filtering. Therefore, the nodes within the local one-dimensional filtering window of the current node are: , Let be the radius of the local one-dimensional filtering window at each node.

[0086] Then, boundary-preserving filtering needs to be performed on the nodes within the local one-dimensional filtering window, which can be done using bilateral filtering or recursive filtering.

[0087] When using bilateral filtering to filter nodes within the aforementioned local one-dimensional filtering window in the input image, filtering weights between two nodes are constructed based on the image spatial distance and the mapped color distance between each node within the local one-dimensional filtering window and the current node. The color value of each node within the local one-dimensional filtering window is multiplied by the corresponding filtering weight and then weighted and averaged to obtain the output of the current node in the local one-dimensional window filtering.

[0088] When using recursive filtering to filter pixels within the aforementioned local one-dimensional filtering window in the input image, the process starts from the two boundary endpoints of the local one-dimensional filtering window and proceeds recursively towards the center node of the local one-dimensional filtering window. At each step, the similarity weight between adjacent nodes is calculated based on the spatial distance between adjacent nodes and the mapped color distance (the calculation method is the same as in step (102) above). Through recursive accumulation, the support of all nodes within the local one-dimensional filtering window to the center node is obtained. The color value of all nodes within the local one-dimensional filtering window is set to 1.0, and the recursive process from both ends of the local one-dimensional filtering window to the center is repeated to obtain the normalization coefficient. The support of all nodes to the center node is divided by the normalization coefficient, and the resulting normalization result is the output of the current node within the local one-dimensional filtering window.

[0089] After obtaining the boundary-preserving filtering result of the current node within the local one-dimensional filtering window, the image information transmitted by the current node along the minimum expansion tree from the leaf node to the root node can be calculated. The similarity weight between the current node and its parent node is calculated, and the product of this similarity weight and the output of the current node within the local one-dimensional filtering window is taken as the image information propagated by the current node along the minimum expansion tree. When the parent node has multiple child nodes, the sum of the image information transmitted by all child nodes along the minimum expansion tree is the image information obtained by the parent node.

[0090] After completing the filtering process along the entire minimum expansion tree from the leaf node to the root node, the output of the root node is the weighted sum of the color values ​​of all nodes in the input image relative to the root node. For other nodes in the minimum expansion tree, information still needs to be passed from the root node to each child node along the minimum expansion tree to obtain the weighted sum of the color values ​​of all nodes in the input image relative to that node.

[0091] The specific operation of passing image information from the root node to the leaf node along the minimum expansion tree is as follows: starting from the child node of the root node, recursively calculate the image information passed from the parent node to each node along the minimum expansion tree, and sum this sum with the image information passed from all the child nodes of that node to that node. For a node... At this time, the direction of image information transmission is Let the unit vector orthogonal to the direction of image information transmission be denoted as . Then the nodes within the local one-dimensional filtering window where its parent node is located can be represented as , The radius of the local one-dimensional filtering window of the parent node.

[0092] Then, boundary-preserving filtering needs to be performed on the nodes within the local one-dimensional filtering window, which can be done using bilateral filtering or recursive filtering.

[0093] During bilateral filtering, the filtering weights between two nodes are constructed based on the image spatial distance and the mapped color distance between each node in the local one-dimensional filtering window and the current node. The color value of the node in the local one-dimensional filtering window is multiplied by the corresponding filtering weight and then weighted and averaged to obtain the output of the current node in the local one-dimensional window filtering.

[0094] During recursive filtering, starting from the two boundary endpoints of the local one-dimensional filtering window, the process recursively moves towards the center node of the local one-dimensional filtering window. At each step, the similarity weight between adjacent nodes is calculated based on the spatial distance between adjacent nodes and the color distance after mapping. The weight is then accumulated recursively to obtain the support of all nodes in the local one-dimensional filtering window to the center node.

[0095] Set the color value of all nodes within the local one-dimensional filtering window to 1.0, repeat the recursive process from both ends of the local one-dimensional filtering window toward the center to obtain the normalization coefficient. Divide the support of all nodes to the center node by the normalization coefficient, and the normalization result is the output of the current node within the local one-dimensional filtering window.

[0096] After obtaining the boundary-preserving filtering result of the parent node within its local one-dimensional filtering window, the image information transmitted by the parent node along the minimum expansion tree from the root node to each child node can be calculated. The similarity weight between the current node and its parent node is calculated, and the product of this similarity weight and the output of the parent node within its local one-dimensional filtering window is taken as the image information propagated by the parent node along the minimum expansion tree from the root node to the leaf nodes. If the current node's parent node has multiple child nodes, the image information transmitted by the parent node to each child node is calculated sequentially.

[0097] After completing the above image message passing process along the minimum expansion tree from leaf nodes to root nodes and from root nodes to each leaf node, each node can obtain the weighted sum of the color values ​​of all nodes in the minimum expansion tree.

[0098] Step (104): Set the color value of all nodes in the input image to 1.0, repeat step (103), and obtain the normalization coefficient of each node.

[0099] Step (105): Divide the weighted sum of the color values ​​by the corresponding normalization coefficient to obtain the normalized filtering result, which is the final image processing result of filtering along a single minimum expansion tree.

[0100] It is worth noting that dividing the guiding image into a minimum expansion tree and calculating the color space distance and image space distance between pixels along the minimum expansion tree can efficiently approximate the color similarity between each pixel and other pixels in the image, thereby encouraging information transfer between pixels with similar colors during the boundary-preserving filtering process.

[0101] Example 2

[0102] An adjustable recursive global bilateral filtering method includes the following steps:

[0103] Step (201): Divide the guide image into multiple minimum expansion trees to obtain the input image.

[0104] It should be noted that, see Figure 5 During the partitioning process, different methods are used to sort the boundaries in the image from smallest to largest. For example, sorting can start from the top left corner, top right corner, bottom left corner, and bottom right corner of the guiding image. Minimum expansion trees are then partitioned for the boundaries of different sorting methods to obtain multiple minimum expansion trees.

[0105] Step (202): Perform steps (102) to (104) in Example 1 on each minimum expansion tree to obtain the weighted sum and normalization coefficient of the color value corresponding to each minimum expansion tree. Divide the weighted sum of the color value corresponding to each minimum expansion tree by the normalization coefficient to obtain the normalized filtering result along each minimum expansion tree. Then take the average value to obtain the final image processing result; or divide the sum of the weighted sum of the color values ​​of multiple minimum expansion trees by the sum of the normalization coefficients to obtain the final image processing result.

[0106] It is worth noting that dividing the guide image into multiple minimum expansion trees according to different boundary sorting methods, filtering along multiple minimum expansion trees and fusing the results can effectively reduce the false boundaries between different subtrees when filtering along the boundary of a single minimum expansion tree.

[0107] Example 3

[0108] An adjustable recursive global bilateral filtering method includes the following steps:

[0109] Step (301): Divide the guiding image into a complementary minimum expansion tree to obtain the input image.

[0110] It should be noted that during the partitioning process, all boundaries of the guide image are first sorted in ascending order of color distance using any method, and then partitioned into minimum expansion trees. This yields the first minimum expansion tree in the complementary minimum expansion tree. The edges already used in the first minimum expansion tree are then removed from all boundaries of the guide image. The remaining edges are then further partitioned into minimum expansion trees to obtain the second minimum expansion tree in the complementary minimum expansion tree, as shown below. Figure 6 As shown; if the remaining boundaries cannot divide the entire guiding image into a connected minimum expansion tree, the boundaries in the first minimum expansion tree are sorted in ascending order of color distance, and the entire tree structure is connected according to the principle of prioritizing the boundary with smaller color distance.

[0111] Step (302): Perform steps (102) to (104) in Example 1 on each minimum expansion tree to obtain the weighted sum and normalization coefficient of the color values ​​corresponding to each minimum expansion tree. Divide the weighted sum of the color values ​​corresponding to each minimum expansion tree by the normalization coefficient to obtain the normalized filtering result along each minimum expansion tree. Then take the average value to obtain the final image processing result. Alternatively, divide the sum of the weighted sums of the color values ​​by the sum of the normalization coefficients to obtain the final image processing result.

[0112] It is worth noting that dividing the guiding image into complementary minimum expansion trees and filtering along these two minimum expansion trees allows image information to be transmitted along more directions and boundaries in weak texture regions, which is beneficial for filtering out structural noise in weak texture regions.

[0113] Example 4

[0114] An adjustable recursive global bilateral filtering method includes the following steps:

[0115] Step (401): See Figure 9 The guide image is divided into a row- and column-dominated spatial tree structure to obtain the input image.

[0116] It should be noted that, see Figure 7 In a spatial tree structure, each pixel serves as the root node of its corresponding tree structure and is connected to its eight neighboring pixels. Based on the primary direction of image information transmission, spatial tree structures are divided into row- and column-dominated spatial tree structures and diagonal-dominated spatial tree structures. In a row- and column-dominated spatial tree structure, image information primarily propagates along the subtrees in the row and column directions; while in a diagonal-dominated spatial tree structure, image information primarily propagates along the subtrees in the main and secondary diagonal directions. For each pixel, the row- and column-dominated spatial tree structure consists of subtrees in the top, bottom, left, and right directions, while the diagonal-dominated spatial tree structure consists of subtrees in the top-left, bottom-left, top-right, and bottom-right directions.

[0117] Step (402): Determine the connection relationship between each node in the input image and map the color distance between connected nodes (pixels), which is the same as in Example 1 and will not be described here.

[0118] Step (403): When filtering along the row-column dominant space tree structure, before each node transmits image information along the diagonal direction from the top left to the bottom right, from the bottom right to the top left, from the top right to the bottom left, and from the bottom left to the top right, a local one-dimensional boundary-preserving filtering window is first constructed with the current node as the center. The nodes within a certain radius on the straight line perpendicular to the direction of image information transmission are the effective nodes for local one-dimensional boundary-preserving filtering of the current node. Boundary-preserving filtering is performed on the nodes within the local one-dimensional filtering window, which is the same as in Example 1 and will not be described here.

[0119] Step (404): Calculate the similarity weight between two nodes based on the mapped color distance and image spatial distance between the current node on the diagonal and its adjacent nodes. At this point, the image spatial distance is always 0. The product of the similarity weight and the output of the current node in the local one-dimensional filtering window is the transmitted image information. For each node, the transmitted image information in the four diagonal directions is obtained respectively.

[0120] Step (405): Perform the operations of steps (403) and (404) on all nodes in the input image along the four directions of the diagonal. Each node can obtain the weighted sum of the color values ​​of all nodes in the four directions of the diagonal.

[0121] Step (406): Set the color value of all nodes in the input image to 1.0, and repeat steps (403) and (404) to obtain the normalization coefficients corresponding to the four directions of the diagonal of each node.

[0122] Step (407): Add the weighted sums of the color values ​​obtained in step (405) from the top left to the bottom right and from the bottom left to the top right, and then superimpose them with the image information transmitted from the left side of the current node. Then multiply the similarity weight between two adjacent nodes in the row direction with the superimposed result, which is the image information transmitted by the current node along the subtree from left to right. After performing this process on all nodes, the weighted sum of the color values ​​of each node on the left subtree is obtained.

[0123] Step (408): Add the weighted sums of the color values ​​obtained in step (405) from the top right to the bottom left and from the bottom right to the top left, and then superimpose them with the image information transmitted from the right side of the current node. Then multiply the similarity weight between two adjacent nodes in the row direction with the superimposed result, which is the image information transmitted by the current node along the subtree from right to left. After performing this process on all nodes, the weighted sum of the color values ​​of each node on the right subtree is obtained.

[0124] Step (409): Add the weighted sums of the color values ​​obtained in step (405) from the top left to the bottom right and from the top right to the bottom left, and then superimpose them with the image information transmitted from above the current node. Then multiply the similarity weight between two adjacent nodes in the column direction with the superimposed result. This is the image information transmitted by the current node along the subtree from top to bottom. After performing this process on all nodes, the weighted sum of the color values ​​of each node on the upper subtree is obtained.

[0125] Step (4010): Add the weighted sums of the color values ​​obtained in step (405) from the bottom left to the top right and from the bottom right to the top left, and then superimpose them with the image information transmitted from below the current node. Then multiply the similarity weight between two adjacent nodes in the column direction with the superimposed result. This is the image information transmitted by the current node along the subtree from bottom to top. After performing this process on all nodes, the weighted sum of the color values ​​of each node on the lower subtree is obtained.

[0126] Step (4011): Repeat steps (407) to (4010) for the normalization coefficients of the four directions obtained in step (406) to obtain the normalization coefficients of each node in the left subtree, right subtree, upper subtree, and lower subtree. By dividing the weighted sum of the color values ​​by the corresponding normalization coefficient, the normalized filtering result along each subtree is obtained. The average value of the normalized filtering results of the four subtrees in the row and column directions is calculated to obtain the final image processing result of the row and column dominant space tree structure. Alternatively, the normalization coefficients of the four subtrees are used as weights, and the sum of the weighted sum of the color values ​​of the four subtrees in the row and column directions is divided by the sum of the normalization coefficients of the four subtrees to obtain the final image processing result of the row and column dominant space tree structure.

[0127] It should be noted that when recursively calculating the weighted sum of color values ​​between the current node and the nodes in the four subtrees along the row and column directions, the nodes on the main and secondary diagonals of the current node are all taken into account. In this case, the support of the diagonal nodes for the current node is used twice during the recursive filtering process along the row and column directions. When calculating the output of the filter along the row- and column-dominant space tree structure, the weighted sum of color values ​​used twice along the diagonal directions must be subtracted.

[0128] It is worth noting that dividing the guiding image into a row- and column-dominated spatial tree structure and calculating the color space distance and image space distance between pixels along the row- and column-dominated spatial tree structure can efficiently approximate the spatial proximity between each pixel and other pixels in the image, thereby encouraging information transfer between pixels with similar spatial distances in the image during the boundary-preserving filtering process.

[0129] Example 5

[0130] An adjustable recursive global bilateral filtering method includes the following steps:

[0131] Step (501): See Figure 8 The guiding image is divided into a diagonally dominant space tree structure to obtain the input image.

[0132] Step (502): Determine the connection relationship between each node in the input image and map the color distance between connected nodes (pixels), which is the same as in Example 1 and will not be described here.

[0133] Step (503): When filtering along the diagonally dominant space tree structure, before each node transmits image information along the four directions of row and column from top to bottom, from bottom to top, from left to right, and from right to left, a local one-dimensional boundary-preserving filtering window is first constructed with the current node as the center. The nodes within a certain radius on the straight line perpendicular to the direction of image information transmission are the effective nodes for local one-dimensional boundary-preserving filtering of the current node. Boundary-preserving filtering is performed on the nodes within the local one-dimensional filtering window, which is the same as in Example 1 and will not be described here.

[0134] Step (504): Calculate the similarity weight between two nodes based on the mapped color distance and image space distance between the current node and its neighboring nodes in the row and column. At this time, the image space distance is always 1. The product of the similarity weight and the output of the current node in the local one-dimensional filtering window is the transmitted image information. For each node, the transmitted image information in the four directions of row and column is obtained respectively.

[0135] Step (505): Perform the operations of steps (503) and (504) on all nodes in the input image along the four directions of rows and columns. Each node can obtain the weighted sum of the color values ​​of all nodes in the four directions of rows and columns.

[0136] Step (506): Set the color value of all nodes in the input image to 1.0, and repeat steps (503) and (504) to obtain the normalization coefficients of each node in the four directions.

[0137] Step (507): Add the weighted sum of the color values ​​obtained in step (505) from left to right and from top to bottom, and then superimpose it with the image information transmitted from the upper left corner of the current node. Then multiply the similarity weight between two adjacent nodes on the diagonal with the superimposed result. This is the image information transmitted by the current node through the subtree filtering along the diagonal direction from the upper left to the lower right. After performing this process on all nodes, the weighted sum of the color values ​​of each node in the upper left subtree is obtained.

[0138] Step (508): Add the weighted sums of the color values ​​obtained in step (505) from right to left and from bottom to top, and then superimpose them with the image information transmitted from the lower right corner of the current node. Then multiply the similarity weight between two adjacent nodes on the diagonal with the superimposed result. This is the image information transmitted by the current node through the subtree filtering along the diagonal direction from the lower right to the upper left. After performing this process on all nodes, the weighted sum of the color values ​​of each node in the lower right subtree is obtained.

[0139] Step (509): Add the weighted sum of the color values ​​obtained in step (505) from right to left and from top to bottom, and then superimpose it with the image information transmitted from the upper right corner of the current node. Then multiply the similarity weight between two adjacent nodes on the diagonal with the superposition result. This is the image information transmitted by the current node through the subtree filtering along the diagonal direction from the upper right to the lower left. After performing this process on all nodes, the weighted sum of the color values ​​of each node in the upper right subtree is obtained.

[0140] Step (5010): Add the weighted sum of the color values ​​obtained in step (505) from left to right and from bottom to top, and then superimpose it with the image information transmitted from the lower left corner of the current node. Then multiply the similarity weight between two adjacent nodes on the diagonal with the superimposed result. This is the image information transmitted from the current node along the subtree from the lower left to the upper right diagonal direction. After performing this process on all nodes, the weighted sum of the color values ​​of each node in the lower left subtree is obtained.

[0141] Step (5011): Repeat steps (507) to (5010) for the normalization coefficients of the four directions obtained in step (506) to obtain the normalization coefficients of each node in the lower right subtree, upper right subtree, lower left subtree, and upper left subtree. By dividing the weighted sum of the color values ​​by the corresponding normalization coefficient, the normalized filtering result along each subtree is obtained. The average value of the normalized filtering results of the four subtrees in the diagonal direction is calculated to obtain the final image processing result of the diagonal-dominant space tree structure. Alternatively, the normalization coefficients of the four subtrees are used as weights, and the sum of the weighted sum of the color values ​​of the four subtrees in the diagonal direction is divided by the sum of the normalization coefficients of the four subtrees to obtain the final image processing result of the diagonal-dominant space tree structure.

[0142] It should be noted that when recursively calculating the weighted sum of color values ​​between the current node and nodes in the four diagonal subtrees, the nodes in the current node's row and column are taken into account. In this case, the support of the current node from the row and column nodes is used twice during the recursive filtering along the diagonal. When calculating the output of the filter along the diagonally dominant space tree structure, the weighted sum of the color values ​​used in the additional row and column directions must be subtracted.

[0143] It is worth noting that dividing the guiding image into a diagonally dominant spatial tree structure and calculating the color space distance and image space distance between pixels along the diagonally dominant spatial tree structure can efficiently approximate the spatial proximity between each pixel and other pixels in the image, thereby encouraging information transfer between pixels with similar spatial distances in the image during the boundary-preserving filtering process.

[0144] Example 6

[0145] An adjustable recursive global bilateral filtering method includes the following steps:

[0146] Step (601): Divide the guide image into a complementary spatial tree structure, see [link to relevant documentation]. Figure 7 The complementary spatial tree structure consists of a row- and column-dominated spatial tree structure and a diagonal-dominated spatial tree structure.

[0147] Step (602): Perform the steps of Example 4 and Example 5 on the row- and column-dominant spatial tree structure and the diagonal-dominant spatial tree structure in the complementary spatial tree structure, respectively, to obtain the final image processing results of the row- and column-dominant spatial tree structure and the final image processing results of the diagonal-dominant spatial tree structure, respectively.

[0148] Step (603): Take the average of the final image processing results of the row- and column-dominant spatial tree structure and the final image processing results of the diagonal-dominant spatial tree structure as the final image processing result, or take the normalization coefficients of the four subtrees of the row- and column-dominant spatial tree structure and the normalization coefficients of the four subtrees of the diagonal-dominant spatial tree structure as weights, divide the weighted sum of the color values ​​of the eight subtrees by the sum of the normalization coefficients of the eight subtrees, and obtain the final image processing result of the complementary spatial tree structure.

[0149] It is worth noting that dividing the guiding image into complementary spatial tree structures and fusing the filtering results along two complementary spatial tree structures effectively reduces the false boundaries along the row, column, or diagonal directions generated when filtering along a single spatial tree structure during the boundary-preserving filtering process.

[0150] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0151] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. An adjustable recursive global bilateral filtering method, characterized in that, The method includes: S1: Divide the guiding image into a single or multiple tree structures to obtain the input image; the tree structure is a minimum expansion tree or a spatial tree structure; The minimum expansion tree includes a single minimum expansion tree, multiple minimum expansion trees, or complementary minimum expansion trees; When the guide image is divided into a single minimum expansion tree, each pixel in the guide image is connected to the pixel with the most similar color in its neighborhood and cannot form a loop. When dividing the guide image into multiple minimum expansion trees, all boundaries in the guide image are sorted in ascending order of color distance. Minimum expansion trees are then divided for different boundary sorting methods to obtain multiple minimum expansion trees. When dividing the guide image into two complementary minimum expansion trees, all boundaries of the guide image are sorted in ascending order of color distance and then divided into minimum expansion trees to obtain the first minimum expansion tree in the complementary minimum expansion tree. The edges already used in the first minimum expansion tree are removed from all boundaries of the guide image, and the remaining edges are further divided into minimum expansion trees to obtain the second minimum expansion tree in the complementary minimum expansion tree. If the remaining boundaries cannot be used to divide the entire guide image into connected minimum expansion trees, the boundaries in the first minimum expansion tree are sorted in ascending order of color distance, and the entire tree structure is connected according to the principle of prioritizing the boundary with smaller color distance. Among them, spatial tree structures include: row- and column-dominated spatial tree structures, diagonal-dominated spatial tree structures, or complementary spatial tree structures; The row- and column-dominant spatial tree structure consists of subtrees in four directions: top, bottom, left, and right. The diagonal-dominant spatial tree structure consists of subtrees in four directions: top left, bottom left, top right, and bottom right. The complementary spatial tree structure consists of both the row- and column-dominant spatial tree structure and the diagonal-dominant spatial tree structure. S2: Determine the connection relationship between each node in the input image, and map the color distance between connected nodes. Calculate the similarity weight of adjacent nodes by using the mapped color distance and the image space distance between nodes. S3: Determine the local one-dimensional filtering window based on the direction in which the current node in the input image transmits image information along the tree structure, and perform boundary-preserving filtering on the nodes within the local one-dimensional filtering window; S4: Multiply the output of the local one-dimensional filtering window by the similarity weight of the adjacent nodes to obtain the image information transmitted by the current node along the tree structure, and then transmit it along the tree structure. S5: Perform S3 and S4 along the tree structure for all nodes in the input image. Each node can obtain the weighted sum of the color values ​​of all nodes in the tree structure. S6: Set the color value of all nodes in the input image to 1.0, and repeat S3 and S4 to obtain the normalization coefficient of each node; S7: Divide the weighted sum of the color values ​​by the corresponding normalization coefficient to obtain the normalized filtering result. If it is a single tree structure, the normalized filtering result is the final image processing result. If there are multiple tree structures, the normalized filtering results of the multiple tree structures are fused to obtain the final image processing result.

2. The adjustable recursive global bilateral filtering method according to claim 1, characterized in that, In step S2, when mapping the color distance between connected nodes, a step function or a sigmoid function is used to map color distances less than a threshold to a value of 0 or close to 0.

3. The adjustable recursive global bilateral filtering method according to claim 2, characterized in that, If the tree structure is a single minimum expansion tree, the transmission of image information includes transmitting image information from leaf nodes to root nodes along the minimum expansion tree, and transmitting image information from root nodes to leaf nodes; When transmitting image information from leaf nodes to root nodes along the minimum expansion tree, the coordinates of the parent node of the current node are read, and the difference vector between the coordinates of the parent node and the coordinates of the current node is calculated. The difference vector is the direction of transmission of image information at this time. The orthogonal direction orthogonal to the difference vector is calculated. With the current node as the center, the nodes distributed within a certain radius of the orthogonal direction are the local one-dimensional filtering window for the current node to perform boundary-preserving filtering. After performing boundary-preserving filtering on the nodes within the local one-dimensional filtering window, the similarity weight between the current node and its parent node is calculated. The product of this similarity weight and the output of the current node within the local one-dimensional filtering window is used as the image information propagated by the current node along the minimum expansion tree. When the parent node has multiple child nodes, the sum of the image information transmitted by all child nodes along the minimum expansion tree is the image information obtained by the parent node. When transmitting image information from the root node to the leaf node along the minimum expansion tree, the coordinates of the parent node of the current node are read, and the difference vector between the coordinates of the current node and its parent node is calculated. The difference vector is the direction of transmission of image information at this time. The orthogonal direction orthogonal to the difference vector is calculated. With the parent node as the center, the nodes distributed within a certain radius of the orthogonal direction are the local one-dimensional filtering window for applying boundary-preserving filtering to the parent node of that node. After performing boundary-preserving filtering on the nodes within the local one-dimensional filtering window, the similarity weight between the current node and its parent node is calculated. The product of the similarity weight between the current node and its parent node and the output of its parent node within the local one-dimensional filtering window is used as the image information propagated by the parent node of the current node from the root node to the leaf node along the minimum expansion tree. When the parent node of the current node has multiple child nodes, the image information transmitted by the parent node of the current node to each child node is calculated in turn. After completing the above image message passing process along the minimum expansion tree from leaf nodes to root nodes and from root nodes to each leaf node, each node can obtain the weighted sum of the color values ​​of all nodes in the minimum expansion tree.

4. The adjustable recursive global bilateral filtering method according to claim 3, characterized in that, In the process of transmitting image information from leaf nodes to root nodes and from root nodes to leaf nodes along the minimum expansion tree, bilateral filtering or recursive filtering is used when performing boundary-preserving filtering on nodes within the local one-dimensional filtering window. During bilateral filtering, the filtering weights between two nodes are constructed based on the image space distance and the mapped color distance between each node in the local one-dimensional filtering window and the current node. Finally, the color values ​​of the nodes in the local one-dimensional filtering window are multiplied by the corresponding filtering weights and then weighted to obtain the output of the current node in the local one-dimensional window filtering. During recursive filtering, starting from the two boundary endpoints of the local one-dimensional filtering window, the process recursively moves towards the center node of the local one-dimensional filtering window. At each step, the similarity weight between adjacent nodes is calculated based on the image spatial distance and the mapped color distance between adjacent nodes. The weight is then accumulated recursively to obtain the support of all nodes in the local one-dimensional filtering window to the center node. Set the color value of all nodes within the local one-dimensional filtering window to 1.

0. Repeat the recursive process from both ends of the local one-dimensional filtering window toward the center to obtain the normalization coefficient. Divide the support of all nodes to the center node by the normalization coefficient. The normalization result is the output of the current node within the local one-dimensional filtering window.

5. The adjustable recursive global bilateral filtering method according to claim 4, characterized in that, If the tree structure consists of multiple minimum expansion trees, for each minimum expansion tree, the same S3~S6 steps as for a single minimum expansion tree are performed to obtain the weighted sum of the color values ​​corresponding to each minimum expansion tree and the normalization coefficient. The weighted sum of the color values ​​corresponding to each minimum expansion tree is divided by the normalization coefficient to obtain the normalized filtering result of each minimum expansion tree. Then, the average value is taken to obtain the final image processing result. Alternatively, the sum of the weighted sum of the color values ​​of multiple minimum expansion trees is divided by the sum of the normalization coefficients to obtain the final image processing result.

6. The adjustable recursive global bilateral filtering method according to claim 5, characterized in that, If the tree structure is a complementary minimum expansion tree, for each minimum expansion tree, the same S3~S6 steps as for a single minimum expansion tree are performed to obtain the weighted sum and normalization coefficient of the color values ​​corresponding to each minimum expansion tree. The weighted sum of the color values ​​corresponding to each minimum expansion tree is divided by the normalization coefficient to obtain the normalized filtering result of each minimum expansion tree. Then, the average value is taken to obtain the final image processing result. Alternatively, the sum of the weighted sums of the color values ​​is divided by the sum of the normalization coefficients to obtain the final image processing result.

7. The adjustable recursive global bilateral filtering method according to claim 6, characterized in that, If the tree structure is a diagonally dominant space tree structure, then S3~S7 specifically include: A1: First, before each node transmits image information along the row and column directions from top to bottom, from bottom to top, from left to right, and from right to left, boundary-preserving filtering is performed on the nodes within the local one-dimensional filtering window. The nodes within a certain radius on a straight line perpendicular to the direction of image information transmission with the current node as the center are the local one-dimensional filtering window for the current node's boundary preservation filtering. B1: Calculate the similarity weight between two nodes based on the mapped color distance and image space distance between the current node and its neighboring nodes. At this time, the image space distance is always 1. The product of the similarity weight and the output of the current node in the local one-dimensional filtering window is the transmitted image information. For each node, the transmitted image information in the four directions of row and column is obtained respectively. C1: Perform A1 and B1 operations on all nodes in the input image along the four directions of row and column, and each node can obtain the weighted sum of the color values ​​of all nodes in the four directions; Set the color value of all nodes in the input image to 1.0, and repeat the operations of A1 and B1 to obtain the normalization coefficients of each node in four directions; D1: Add the weighted sums of the color values ​​obtained from C1 in the two directions from left to right and from top to bottom, then add the image information from the top left corner of the current node and the color value of the current node. Then multiply the similarity weight between the current node and its bottom right corner node with the superposition result. This is the image information transmitted by the current node from the top left to the bottom right along the main diagonal. After performing this process on all nodes, the weighted sum of the color values ​​of each node in the top left subtree is obtained. E1: Add the weighted sums of the color values ​​obtained from C1 in the two directions from right to left and from bottom to top, then add the image information from the bottom right corner of the current node and the color value of the current node. Then multiply the similarity weight between the current node and its top left corner node with the superposition result. This is the image information transmitted by the current node from the bottom right to the top left along the main diagonal. After performing this process on all nodes, the weighted sum of the color values ​​of each node in the bottom right subtree is obtained. F1: Add the weighted sums of the color values ​​obtained from C1 in the two directions from right to left and from top to bottom, then add the image information from the top right corner of the current node and the color value of the current node, and then multiply the similarity weight between the current node and its bottom left corner node with the superposition result. This is the image information transmitted by the current node from the top right to the bottom left along the secondary diagonal. After performing this process on all nodes, the weighted sum of the color values ​​of each node in the top right subtree is obtained. G1: Add the weighted sums of the color values ​​obtained from C1 in the two directions from left to right and from bottom to top, then add the image information from the bottom left corner of the current node and the color value of the current node. Then multiply the similarity weight between the current node and its top right corner node with the superposition result. This is the image information transmitted by the current node from the bottom left to the top right along the secondary diagonal. After performing this process on all nodes, the weighted sum of the color values ​​of each node in the bottom left subtree is obtained. H1: By repeating the operations from D1 to G1 on the normalization coefficients obtained in C1 for the four directions, the normalization coefficients of each node in the bottom right, top right, bottom left, and top left subtrees can be obtained. By dividing the weighted sum of the color values ​​by the corresponding normalization coefficient, the normalized filtering results of each subtree along the diagonal direction can be obtained. The average value of the normalized filtering results of the four subtrees can be used as the final image processing result of the diagonal-dominant space tree structure. Alternatively, the weighted sum of the color values ​​of the four subtrees can be divided by the sum of the normalization coefficients of the four subtrees as the final image processing result of the diagonal-dominant space tree structure.

8. The adjustable recursive global bilateral filtering method according to claim 7, characterized in that, If the tree structure is a row- and column-dominated space tree structure, then S3~S7 specifically include: A2: First, before each node transmits image information along the four diagonal directions from top left to bottom right, from bottom right to top left, from top right to bottom left, and from bottom left to top right, boundary-preserving filtering is performed on the nodes within the local one-dimensional filtering window. The nodes within a certain radius on a straight line perpendicular to the direction of image information transmission, with the current node as the center, are the local one-dimensional filtering window for the current node's boundary-preserving filtering. B2: Calculate the similarity weight between two nodes based on the mapped color distance and image spatial distance between the current node on the diagonal and its adjacent nodes. At this point, the image spatial distance is always constant. The product of the similarity weight and the output of the current node in the local one-dimensional filtering window is the transmitted image information. For each node, the transmitted image information in the four diagonal directions is obtained respectively. C2: Perform operations A2 and B2 on all nodes in the input image along the four diagonal directions. Each node can obtain the weighted sum of the color values ​​of all nodes in the four diagonal directions. Set the color value of all nodes in the input image to 1.0, and repeat operations A2 and B2 to obtain the normalization coefficients in the four directions diagonally for each node; D2: Add the weighted sums of the color values ​​obtained from C2 in the two directions from top left to bottom right and from bottom left to top right, then add the image information from the left side of the current node and the color value of the current node, and then multiply the similarity weight between the current node and the node to its right with the superposition result. This is the image information passed from left to right by the current node. After performing this process on all nodes, the weighted sum of the color values ​​of each node in the left subtree is obtained. E2: Add the weighted sums of the color values ​​obtained from C2 in the two directions from top right to bottom left and from bottom right to top left, then add the image information from the right side of the current node and the color value of the current node, and then multiply the similarity weight between the current node and the node to its left with the superposition result. This is the image information passed from right to left by the current node. After performing this process on all nodes, the weighted sum of the color values ​​of each node in the right subtree is obtained. F2: Add the weighted sums of the color values ​​obtained from C2 in the two directions from top left to bottom right and from top right to bottom left, then add the image information transmitted from above the current node and the color value of the current node, and then multiply the similarity weight between the current node and the node below it with the superposition result. This is the image information transmitted from top to bottom by the current node. After performing this process on all nodes, the weighted sum of the color values ​​of each node in the upper subtree is obtained. G2: Add the weighted sums of the color values ​​obtained from C2 in the two directions from bottom left to top right and from bottom right to top left, then add the image information transmitted from below the current node and the color value of the current node, and then multiply the similarity weight between the current node and the node above it with the superposition result. This is the image information transmitted from bottom to top by the current node. After performing this process on all nodes, the weighted sum of the color values ​​of each node in the lower subtree is obtained. H2: By repeating the operations of D2~G2 on the normalization coefficients obtained in C2 for the four directions, the normalization coefficients of each node in the left subtree, right subtree, top subtree, and bottom subtree can be obtained. By dividing the weighted sum of the color values ​​by the corresponding normalization coefficient, the normalized filtering result of each subtree along the row and column directions can be obtained. The average of the normalized filtering results of the four subtrees is the final image processing result of the row-column dominant space tree structure. Alternatively, the final image processing result of the row-column dominant space tree structure can be obtained by dividing the weighted sum of the color values ​​of the four subtrees by the sum of the normalization coefficients of the four subtrees.

9. The adjustable recursive global bilateral filtering method according to claim 8, characterized in that, If the tree structure is a complementary spatial tree structure, the average of the final image processing result of the row- and column-dominant spatial tree structure and the final image processing result of the diagonal-dominant spatial tree structure is the final image processing result. Alternatively, using the normalized coefficients of the four subtrees of the row- and column-dominant spatial tree structure and the four subtrees of the diagonal-dominant spatial tree structure as weights, the weighted sum of the color values ​​corresponding to the eight subtrees is divided by the sum of the normalized coefficients of the eight subtrees to obtain the final image processing result of the complementary spatial tree structure.