A bilateral filtering image processing method based on granularity block approximation calculation

Through the granularity block approximate calculation method, the local range weight calculation of bilateral filtering is simplified, which solves the problems of large computational complexity and high resource consumption of bilateral filtering and realizes efficient image processing.

CN117058046BActive Publication Date: 2025-10-24INST OF IND INTERNET CHONGQING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311243146.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-25
Publication Date
2025-10-24
Estimated Expiration
2043-09-25

AI Technical Summary

Technical Problem

The bilateral filtering method has huge computational complexity, low efficiency and excessive consumption of hardware logic resources in image processing.

Method used

The granularity block approximate calculation method is adopted to divide the image into coarse and fine granularity blocks. Through key pixel points and fitting pixel points processing, the local range weight calculation is simplified, and the computational complexity and resource consumption are reduced.

Benefits of technology

The computational complexity is reduced, storage resources and arithmetic logic of filter weights are saved, and processing efficiency is improved while maintaining edge-preserving performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117058046B_ABST
    Figure CN117058046B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image processing, and relates to a kind of bilateral filtering image processing method based on granularity block approximation calculation.The method includes determining filter window by the resolution size of input current frame image, and determining spatial standard deviation and gray value standard deviation;First, the image is divided into regions according to coarse granularity, then divided into fine granularity blocks, according to the change rate of the range weight function of the original image and the brightness difference between each block pixel and the center pixel to determine the key pixel point, dynamically determine the number of fitting pixel points needed near the key pixel point, obtain the fitting curve of each block by least square method using fitting pixel points and key pixel points, and obtain the range weight of other pixel points in the block.Spatial weight calculated in advance and the range weight obtained by fitting are brought into the bilateral filtering formula, so as to obtain the filtering result of the entire picture.Through simplifying the calculation of range weight in bilateral filtering, the calculation complexity can be sufficiently reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, and particularly relates to a bilateral filtering image processing method based on granular block approximate calculation. BACKGROUND

[0002] Bilateral filtering is a very effective nonlinear filtering method, which can filter in both spatial domain and range domain, and has good noise removal ability and edge protection ability.

[0003] Bilateral filtering uses a Gaussian window for smoothing in the spatial domain, which can effectively remove Gaussian noise. Since the similarity of the spatial domain and the range domain is considered at the same time, the weight of a pixel is higher when it and its surrounding pixels are similar in both spatial distance and luminosity value, which can well protect the image edges.

[0004] However, the bilateral filtering method needs to perform weighted averaging on each pixel point in the window, and the weight of each pixel point needs to be calculated according to the difference between the distance and the pixel value of the surrounding pixels, which has a huge amount of calculation and low efficiency, and consumes too much hardware logic resources. SUMMARY

[0005] In order to solve the above technical problems, the embodiments of the present application focus on reducing the calculation amount of the gray scale kernel weight to improve the efficiency of the hardware implementation, and provide a bilateral filtering image processing method based on granular block approximate calculation. The embodiments of the present application provide a bilateral filtering based image processing method, which comprises:

[0006] Obtaining a current frame image, and determining a global filtering window according to the resolution of the current frame image;

[0007] Determining the spatial standard deviation and the gray value standard deviation of each pixel point according to the size of the global filtering window, and obtaining a global spatial weight according to the spatial standard deviation;

[0008] Dividing the current frame image into non-overlapping coarse-grained blocks according to a coarse-grained size;

[0009] Continuing to divide the coarse-grained blocks of the current frame image into non-overlapping fine-grained blocks according to a fine-grained size;

[0010] Determining key pixel points of each fine-grained block of the current frame image according to the brightness difference of the pixel points of the fine-grained block;

[0011] Determining the number of fitting pixel points of each fine-grained block of the current frame image according to the brightness difference of the pixel points of the fine-grained block, and determining the corresponding fitting pixel points according to the number of fitting pixel points;

[0012] According to the key pixel points and the fitting pixel points of each fine granularity block of the current frame image, the local range weight corresponding to each key pixel point and the fitting pixel point in each fine granularity block is calculated in combination with the gray value standard deviation;

[0013] According to the key pixel points and the fitting pixel points of each fine granularity block of the current frame image, the local range weight corresponding to each key pixel point and the fitting pixel point in each fine granularity block is calculated in combination with the gray value standard deviation;

[0014] According to the key pixel points and the fitting pixel points of each fine granularity block of the current frame image, the local range weight corresponding to each key pixel point and the fitting pixel point in each fine granularity block is calculated in combination with the gray value standard deviation;

[0015] The beneficial effects of the present application are as follows:

[0016] The present application can reduce the calculation complexity, save the storage resources and arithmetic logic of the filter weight, and obtain the edge preservation performance equivalent to the standard bilateral filtering by simplifying the local range weight calculation in the bilateral filtering; the present application adopts the combination of coarse granularity and fine granularity, divides the frame image into appropriate granularity blocks, processes the key pixel points and the fitting pixel points of the corresponding granularity blocks, avoids the traversal of the local range weight calculation of all pixel points, thereby reduces the calculation amount, improves the efficiency, and reduces the hardware resource consumption. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation to the protection scope of the present application. In each drawing, similar components are marked with similar reference numerals.

[0018] Figure 1 The present application shows the flow chart of the bilateral filtering image processing method based on the granularity block approximate calculation;

[0019] Figure 2 The present application shows the example diagram of determining the block threshold σ1' and σ2' through the array Var;

[0020] Figure 3 The present application shows the fitting curve diagram obtained by the known fitting pixel points and the range weight values thereof;

[0021] Figure 4 The present application shows the diagram of the position of the center pixel point after the merging of the minimum fine granularity block. DETAILED DESCRIPTION

[0022] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments.

[0023] The components of the embodiments of the present application generally described and illustrated in the drawings herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed application, but rather merely represents selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative effort are within the scope of protection of the present application.

[0024] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present application, are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or the possibility of adding one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.

[0025] Furthermore, the terms “first,” “second,” “third,” etc., are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.

[0026] Unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meaning as in the context of the relevant technical field and will not be interpreted as having an idealized meaning or an overly formal meaning unless clearly defined in the various embodiments of the present application.

[0027] Example 1

[0028] The embodiment of the present application provides a bilateral filtering image processing method based on granularity block approximate calculation, which has relatively less computing resources and good filtering effect.

[0029] The bilateral filtering image processing method based on granularity block approximation calculation includes the following steps, specifically Figure 1 , the following is a detailed description of each step:

[0030] 101. Obtain a current frame image and determine a global filtering window according to the resolution of the current frame image;

[0031] In the embodiment, the current frame image is an original image collected by an image collection device. The embodiment takes the original image currently to be processed as an example to perform bilateral filtering on the current frame image. The bilateral filtering formula is as follows:

[0032]

[0033] wherein F(x, y) is a new gray value of the pixel (x, y) after bilateral filtering, I(x', y') is a gray value of a neighborhood point (x', y') of the pixel (x, y) in the original image, σ s represents a spatial standard deviation, controls a spatial weight, σ r represents a gray value standard deviation, controls a range weight, and C is a normalization constant determined by Gaussian function is a spatial weight considering a spatial distance of the pixel, and Gaussian function is a range weight considering a gray difference of the pixel. The weight of the bilateral filter is obtained by multiplying the two weights.

[0034] In the embodiment, if the current frame image is a low-resolution image, the global filtering window is determined as a small filtering window; if the current frame image is a medium-resolution image, the global filtering window is determined as a medium filtering window; and if the current frame image is a high-resolution image, the global filtering window is determined as a large filtering window.

[0035] For example, for a low-resolution image with a resolution size of 640x480-320x240, the global filtering window size is 5x5. The low-resolution image has fewer pixels, and a small window size is enough to effectively smooth noise. For a medium-resolution image with a resolution size of 800x600-1024x768, the global filtering window size is 9x9. The medium-resolution image is relatively clear, and a slightly larger window is needed to effectively smooth. For a high-resolution image with a resolution size of 1280x720-1920x1080, the global filtering window size is 21x21. This is because a larger window is needed to effectively smooth noise of the high-resolution image while still retaining edges and details.

[0036] 102. According to the size of the global filtering window, the spatial standard deviation and the gray value standard deviation of each pixel point are determined, and the global spatial weight is obtained according to the spatial standard deviation;

[0037] In the embodiment, the size of the global filtering window is determined according to the resolution size of the input current frame image, so as to determine the spatial standard deviation σ s and the gray value standard deviation σ r, the spatial weight of each pixel point is calculated by a global filtering window. In the embodiment, the spatial standard deviation σ s and the gray value standard deviation σ r The method is as follows: the global filtering window is set as N i , i = 1, 2, 3, which represent the global filtering windows corresponding to the low-resolution image, the medium-resolution image and the high-resolution image respectively.

[0038] For the low-resolution image with the resolution size of 640x480~320x240 of the current frame image, the value of a single pixel changes greatly, and a larger σ r is needed to effectively filter out noise, and σ s is taken as N1 / 3, and σ r is taken as 4N1.

[0039] For the medium-resolution image with the resolution size of 800x600~1024x768 of the current frame image, σ s is taken as 5N2 / 12, and σ r is taken as 2N2.

[0040] For the current frame image with the resolution size of 1280x720~1920x1080, the image pixel is dense, and the value of a single pixel changes relatively small, so a smaller σ r value can be used, σ s is taken as N3 / 2, and σ r is taken as a smaller value 0.5N3 to retain more image details.

[0041] 103. According to the coarse granularity size, the current frame image is divided into non-overlapping coarse granularity blocks;

[0042] In the embodiment of the application, the original image of the current frame is first divided into non-overlapping coarse granularity blocks. The coarse granularity is a relative concept relative to the fine granularity. The coarse granularity can divide the frame image into larger image blocks, and the fine granularity can divide the larger image blocks into smaller image blocks. In the embodiment, the image can be first divided into non-overlapping 75x75 blocks according to the coarse granularity. The coarse granularity here refers to the size of 75x75. Of course, in actual operation, a person skilled in the art can select a proper coarse granularity size according to the actual situation, such as 100x100, 125x125, 150x150, etc., which is not limited in the application.

[0043] 104. According to the fine granularity size, the coarse granularity blocks of the current frame image are further divided into non-overlapping fine granularity blocks;

[0044] In the embodiment of the present application, the variance in each coarse-grained block is calculated as a block feature value, and the fine-grained blocks are divided according to the variance. The threshold is determined by determining the maximum and minimum luminance difference in each fine-grained block, and the luminance square difference between the pixel in each block and the center point in the block, so as to determine the key pixel point.

[0045] Specifically, the variance value of the luminance of the pixels in each 75x75 coarse-grained block is calculated, and each variance value is stored as an element in the array Var. Assuming that there are M elements in total, the M elements in the array Var are sorted from small to large, and the variance value of the 70% quantile in the index array Var value is taken as the first block threshold σ1', and the formula is: σ1'=Index(Round(70% M-1)), which means that the block value is taken as the element with the index number ranking the 70% M-1 (after rounding) in the array Var; the variance value of the 90% quantile in the index array Var value is taken as the second block threshold σ2', and the formula is: σ2'=Index(Round(90% M-1)), which means that the block threshold value is taken as the element with the index number ranking the 90% M-1 (after rounding) in the array Var, where N represents the length of the array, and Index represents the index number of the array.

[0046] As shown in Figure 2 , taking a 10-size array Var as an example, the array elements are the variances in each block, then Var[6] is the first block threshold σ1', and Var[8] is the second block threshold σ2'.

[0047] If the variance of the luminance of the pixels in a block is less than the first block threshold σ1', it means that it is a low-variance block, and the luminance variation range is small, so it is divided into 25x25 fine-grained blocks. If the variance of the luminance of the pixels in a block is greater than the first block threshold σ1' and less than the second block threshold σ2', it is a medium-variance block, and the luminance variation range is moderate, so it is divided into 15x15 fine-grained blocks. If the variance of the luminance of the pixels in a block is greater than the second block threshold σ2', it is a high-variance block, and the luminance variation range is large, and the texture is complex, so it needs to be further divided into fine-grained blocks, that is, the 75x75 coarse-grained block is finely divided into 5x5 minimum fine-grained blocks.

[0048] In the preferred embodiment of the present application, for blocks at the edge of the image, coarse-grained blocks of 75x75 cannot be used, and they can be divided into 5x5 or rectangular small blocks with a height of 5.

[0049] 105、According to the luminance difference of the pixels in each fine-grained block of the current frame image, the key pixel point of each fine-grained block is determined;

[0050] In the embodiment of the present application, first, the maximum luminance difference and the minimum luminance difference of the pixel points in each fine-grained block are calculated; second, the luminance difference between each pixel point in each fine-grained block and the center pixel point of the corresponding fine-grained block is calculated; third, the average value and the standard deviation of the luminance difference of each fine-grained block are calculated according to the luminance difference between each pixel point in each fine-grained block and the center pixel point of the corresponding fine-grained block; then, the threshold adjustment parameter is calculated according to the ratio of the standard deviation to the average value of the luminance difference of each fine-grained block; finally, the fitting pixel point threshold is calculated according to the maximum luminance difference and the minimum luminance difference of the pixel points in the fine-grained block and the corresponding threshold adjustment parameter.

[0051] Specifically, the maximum luminance difference diff max and the minimum luminance difference diff min of the pixel points in each fine-grained block are calculated.

[0052] Next, the fitting pixel point threshold is set as threshold = diff min + a (diff max -diff min ).

[0053] Wherein, a is determined by the luminance difference ΔI between each pixel in each block and the center pixel point in the block. The average value ΔI avg and the standard deviation ΔI std of the luminance difference ΔI in each block are calculated. The threshold adjustment parameter a is determined according to the value of ΔI .

[0054] If ΔI indicates that the luminance distribution of the block is single. A larger a is taken, such as 0.7.

[0055] If ΔI indicates that the luminance distribution is always intermediate, and an intermediate a value is taken, such as 0.5.

[0056] If ΔI indicates that the luminance distribution is complex. A smaller a is taken, such as 0.3.

[0057] If the luminance difference ΔI between a certain pixel point in a certain fine-grained block and the center pixel point exceeds the fitting pixel point threshold threshold, the pixel point is determined as a key pixel point; if the luminance difference ΔI between multiple pixel points in a certain fine-grained block and the center pixel point all exceeds the fitting pixel point threshold threshold, the pixel point closest to the fitting pixel point threshold threshold is determined as a key pixel point.

[0058] 106. Determine the number of fitting pixels of each fine-grained block according to the brightness difference of the pixels of each fine-grained block of the current frame image, and determine the corresponding fitting pixel points according to the number of fitting pixels;

[0059] In an embodiment of the present invention, after determining the key pixel point in the block, the number of fitting pixel points required near the key pixel point is dynamically determined based on calculation, and the specific fitting pixel point is determined through a difference list based on the number of fitting pixel points.

[0060] In this embodiment, the brightness difference ΔI between the pixel point in each fine-grained block and the pixel center point in the block and the average value ΔI of the brightness difference ΔI calculated in the above steps are used. avg and standard deviation ΔI std According to the average brightness difference ΔI of each fine-grained block avg and standard deviation ΔI std The ratio of , calculate the fitting pixel control parameters This determines the extent to which the fitting pixels need to be increased:

[0061] If the control parameter of the fitting pixel points of a fine-grained block is less than the first threshold, the number of fitting pixel points will not be increased; When , the brightness distribution of the block is single, and no fitting pixels are added. The first threshold here is 1.

[0062] If the control parameter of the fitting pixel points of a fine-grained block is greater than the first threshold and less than the second threshold, a small number of fitting pixel points are linearly increased; assuming that When the pixel points are linearly increased by 20%, N increase =0.2*N default , where the first threshold is 1 and the second threshold is 1.5.

[0063] If the control parameter of the fitting pixel of a fine-grained block is greater than the second threshold, most of the fitting pixels are linearly increased. When the pixel points are linearly increased by 50%, N increase =0.5*N default , the first threshold here is 1.5.

[0064] Among them, N increase Indicates the number of additional fitting pixels. N default The default number of fitting pixels is 6. Then the final number of fitting pixels is N: N = Round (N default +N increase ), Round represents the rounding function.

[0065] In this way: parameters are controlled according to the fitting pixels The value determines the degree of fitting pixel points that need to be increased, the number of fitting pixel points that need to be increased is calculated according to the degree of increase, that is, the relationship with the first threshold and the second threshold, and the final number of fitting pixel points is the sum of the default value and the increase value. In this way, the threshold is calculated according to the brightness difference in each block, rather than a fixed value. It is more adaptive.

[0066] 107、According to the key pixel points and the fitting pixel points of each fine-grained block of the current frame image, the local range weight corresponding to each key pixel point and fitting pixel point in each fine-grained block is calculated by combining the gray value standard deviation;

[0067] In the embodiment of the application, according to the difference list T constructed by the above steps, the key pixel points in each fine-grained block and the number of fitting pixel points of each block are taken as points at equal distances, and the range kernel plays a dominant role after the key pixel points, so the number of fitting pixel points after the key pixel points should be greater than or equal to the number of fitting pixel points before the key pixel points.

[0068] In the embodiment, the gray value standard deviation σ r of each pixel point has been determined by the foregoing steps 101 and 102. Therefore, at this time, only the coordinates of the key pixel points and the fitting pixel points of each fine-grained block need to be brought into the Gaussian function r , and the corresponding local range weight ω can be obtained.

[0069] 108、According to the fitting function, the key pixel points and the fitting pixel points of each fine-grained block of the current frame image are processed, and the local range weight of the non-fitting pixel points in each fine-grained block of the current frame image is determined by the fitting curve;

[0070] Specifically, the local range weight corresponding to all key pixel points and fitting pixel points in the fine-grained block is calculated, the key pixel points and the fitting pixel points in the block are used, the Gaussian function is selected as the fitting function, the curve is fitted by the nonlinear least square method, and the range weight of the remaining non-fitting pixel points in the block is obtained by using the fitting curve.

[0071] In the embodiment of the application, the fitting method comprises: taking the brightness difference between each pixel point in each fine-grained block of the current frame image and the center pixel point of the corresponding fine-grained block as the horizontal axis, and taking the local range weight corresponding to each pixel point of the current frame image as the vertical axis, to construct a Gaussian function model; fitting the pixel points by the Gaussian function model, fitting the fitting curve corresponding to the Gaussian function model by the least square method, to determine the optimal fitting curve, and determining the local range weight corresponding to all non-fitting pixel points of the current frame image in the optimal fitting curve.

[0072] Specifically, the horizontal axis is the luminance difference ΔI of each pixel point in each fine-grained block in the difference list T and the center pixel point in the block. The vertical axis ω r (x, y) is the range weight value corresponding to the current pixel (x, y) in the standard bilateral filtering formula. A Gaussian function model is established by using the fitting pixel points and the key pixel points in the block to fit the data points, and the least square method is used to minimize the residual sum of squares by repeatedly calculating the residual sum of squares and optimizing the values of the three parameters A, B and C, so as to determine the optimal fitting curve; the kernel approximate value in the corresponding range on the fitting curve is taken to replace the original formula for direct calculation, thereby reducing the calculation amount, as shown in Figure 3 After determining the seven fitting pixel points, the fitting curve obtained by the Gaussian function according to the luminance difference ΔI of each pixel point and the center point of the block and the corresponding range weight value, and then the weight of other pixel points in the block can be obtained from the curve according to ΔI.

[0073] In some embodiments of the present application, for the minimum fine-grained block, the adjacent block regions above, below, left and right of the block are merged into a new block region, all the fitting pixel points in the new region are counted, and a region curve is obtained by fitting again. By combining the single block curve and the region curve to smooth the curve obtained by the single block, the fitting problem of the overall edge part of the image can be better solved.

[0074] In the preferred embodiments of the present application, for the 5*5 fine-grained block, because the edge changes obviously, the adjacent block regions above, below, left and right of the block are merged into a new block region, all the fitting pixel points in the new region are counted as a new fitting pixel point set, the least square method is used for the new fitting pixel point set, and a curve is obtained by fitting again, a second fitting curve is obtained, and the weight function f'(ΔI) = β*f(ΔI) + (1-β)*g(ΔI) is used to combine the single block curve and the region curve to smooth the curve obtained by the single block, so that the fitting problem of the overall edge part of the image can be better solved.

[0075] wherein f(ΔI) is the fitting curve in the small block calculated in step 108, g(ΔI) is the fitting curve in the merged region, is a weight coefficient, d is the distance of the pixel point to the center of the merged region block, and D is half of the width of the merged region block, as shown in Figure 4 The center element of the middle region is taken as the center element of the merged region block, which is taken as the coordinate origin, and the target element is taken as an example, so that the coordinates are (3, 1), and the values of d and D can be calculated.

[0076] In the preferred embodiment of the present application, if the most marginal fine-grained block does not have a neighborhood block, it is determined whether the missing neighborhood block is in other fine-grained blocks, if it is in other fine-grained blocks, it is accepted as its own block to be included in the neighborhood block for calculation; if it does not exist, the missing neighborhood block is filled with the value of its opposite neighborhood block, for example, if the upper neighborhood block is missing, the lower neighborhood block is filled in the upper one, and so on.

[0077] In step 109, the current frame image after bilateral filtering is obtained according to the global spatial weight and the local range weight of each pixel point of the current frame image.

[0078] In the embodiment of the present application, the global spatial weight ω s and the local range weight ω r are substituted into the bilateral filtering formula, and the gray value of the pixel point after filtering is obtained, and the same processing is performed on each point to obtain the image of the current frame after bilateral filtering.

[0079] The above embodiments further illustrate the purpose, technical scheme and advantages of the present application, and it should be understood that the above embodiments are only preferred embodiments of the present application, and are not intended to limit the present application, and any modification, equivalent replacement, improvement, etc. made to the present application within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A bilateral filtering image processing method based on a granular block approximation calculation, characterized in that, The method comprises: acquiring a current frame image, and determining a global filter window according to a resolution of the current frame image; determining a spatial standard deviation and a gray value standard deviation of each pixel point according to a size of the global filter window, and obtaining a global spatial weight according to the spatial standard deviation; dividing the current frame image into non-overlapping coarse-grained blocks according to a coarse-grained size; continuing to divide the coarse-grained blocks of the current frame image into non-overlapping fine-grained blocks according to a fine-grained size; determining key pixel points of each fine-grained block of the current frame image according to a brightness difference of the pixel points of the fine-grained block; determining a number of fitting pixel points of each fine-grained block of the current frame image according to the brightness difference of the pixel points of the fine-grained block, and determining corresponding fitting pixel points according to the number of fitting pixel points; According to the key pixel points and the fitting pixel points of each fine-grained block of the current frame image, the local range weight corresponding to each key pixel point and fitting pixel point in each fine-grained block is calculated in combination with the gray value standard deviation. Specifically, the coordinates of the key pixel points and the fitting pixel points of each fine-grained block are brought into a Gaussian function , The gray value standard deviation of each pixel point is represented by , The coordinates of the key pixel points and the fitting pixel points are represented by , and e represents the natural base number. The corresponding local range weight is obtained processing the key pixel points and the fitting pixel points of each fine-grained block of the current frame image according to a fitting function, and determining a local range weight of a non-fitting pixel point in each fine-grained block of the current frame image through a fitting curve; specifically, calculating the local range weight of the key pixel points and the fitting pixel points in the fine-grained block, selecting a Gaussian function as the fitting function by using the key pixel points and the fitting pixel points in the block, fitting a curve through a nonlinear least square method, and obtaining the local range weight of the remaining non-fitting pixel points in the block through the fitting curve; obtaining a current frame image after bilateral filtering according to the global spatial weight and the local range weight of each pixel point of the current frame image.

2. The bilateral filtering image processing method based on the granular block approximation calculation according to claim 1, characterized in that, The acquiring of the current frame image and the determination of the global filter window according to the resolution of the current frame image comprises: if the current frame image is a low-resolution image, determining that the global filter window is a small filter window; if the current frame image is a medium-resolution image, determining that the global filter window is a medium filter window; and if the current frame image is a high-resolution image, determining that the global filter window is a large filter window.

3. The bilateral filtering image processing method based on the granular block approximation calculation according to claim 1, characterized in that, The determining the spatial standard deviation and the gray value standard deviation of each pixel point according to the size of the global filtering window comprises determining that the size of the global filtering window is N i , i = 1, 2, 3; if the current frame image is a low-resolution image, the spatial standard deviation is determined as N1 / 3 and the gray value standard deviation is determined as 4N1; if the current frame image is a medium-resolution image, the spatial standard deviation is determined as 5N2 / 12 and the gray value standard deviation is determined as 2N2; if the current frame image is a high-resolution image, the spatial standard deviation is determined as N3 / 2 and the gray value standard deviation is determined as 0.5N3.

4. The bilateral filtering image processing method based on the granular block approximation calculation according to claim 1, characterized in that, The continuing to divide of the coarse-grained blocks of the current frame image into non-overlapping fine-grained blocks according to the fine-grained size comprises: calculating a variance value of the brightness of the pixels in each coarse-grained block, sorting the variance values of the brightness of the pixels in each coarse-grained block, and determining a first block threshold and a second block threshold according to the sorting result; if the variance value of the brightness of the pixels in a coarse-grained block is less than the first block threshold, dividing the coarse-grained block according to a fine-grained corresponding to a low-variance block; if the variance value of the brightness of the pixels in a coarse-grained block is greater than the first block threshold and less than the second block threshold, dividing the coarse-grained block according to a fine-grained corresponding to a medium-variance block; if the variance value of the brightness of the pixels in a coarse-grained block is greater than the second block threshold, dividing the coarse-grained block according to a fine-grained corresponding to a high-variance block.

5. The bilateral filtering image processing method based on the granular block approximation calculation according to claim 1, characterized in that, The determining of the key pixel points of each fine-grained block according to the brightness difference of the pixel points of each fine-grained block of the current frame image comprises: calculating the maximum brightness difference and the minimum brightness difference of the pixel points in each fine-grained block; calculating the brightness difference between each pixel point in each fine-grained block and the center pixel point of the corresponding fine-grained block; calculating the average value and the standard deviation of the brightness difference of each fine-grained block according to the brightness difference between each pixel point in each fine-grained block and the center pixel point of the corresponding fine-grained block; and calculating the threshold adjustment parameter according to the ratio of the standard deviation to the average value of the brightness difference of each fine-grained block. The fitting pixel point threshold is calculated according to the maximum brightness difference and the minimum brightness difference of the pixel points in each fine-grained block and the corresponding threshold adjustment parameter. If the brightness difference between a certain pixel point in a certain fine-grained block and the center pixel point exceeds the fitting pixel point threshold, the pixel point is determined as a key pixel point; if the brightness difference between multiple pixel points in a certain fine-grained block and the center pixel point all exceed the fitting pixel point threshold, the pixel point closest to the fitting pixel point threshold is determined as a key pixel point.

6. The bilateral filtering image processing method based on the granular block approximation calculation according to claim 5, characterized in that, The calculation formula of the fitting pixel point threshold is: wherein, represents a fit pixel point threshold value, represents a minimum luminance difference of pixel points within a fine-grained patch, represents a maximum luminance difference of pixel points within a fine-grained patch, represents a threshold adjustment parameter.

7. The bilateral filtering image processing method based on the granular block approximation calculation according to claim 1, characterized in that, The determining of the number of fitting pixel points of each fine-grained block according to the brightness difference of the pixel points of each fine-grained block of the current frame image comprises: calculating the brightness difference between each pixel point in each fine-grained block and the center pixel point of the corresponding fine-grained block; calculating the average value and the standard deviation of the brightness difference of each fine-grained block according to the brightness difference between each pixel point in each fine-grained block and the center pixel point of the corresponding fine-grained block; and calculating the fitting pixel point control parameter according to the ratio of the average value to the standard deviation of the brightness difference of each fine-grained block. If the fitting pixel point control parameter of a certain fine-grained block is less than a first threshold, the number of fitting pixel points is not increased. If the fitting pixel point control parameter of a certain fine-grained block is greater than the first threshold and less than a second threshold, a small part of fitting pixel points is linearly increased; if the fitting pixel point control parameter of a certain fine-grained block is greater than the second threshold, a large part of fitting pixel points is linearly increased.

8. The bilateral filtering image processing method based on the granular block approximation calculation of claim 1, wherein, The processing of the key pixel points and the fitting pixel points of each fine-grained block of the current frame image according to the fitting function, and the determination of the local range weight of the non-fitting pixel points in each fine-grained block of the current frame image through the fitting curve, comprises: taking the brightness difference between each pixel point in each fine-grained block of the current frame image and the center pixel point of the corresponding fine-grained block as the horizontal axis, and taking the local range weight corresponding to each pixel point of the current frame image as the vertical axis, to construct a Gaussian function model; fitting the pixel points through the Gaussian function model, fitting the fitting curve corresponding to the Gaussian function model through the least square method, so as to determine the optimal fitting curve, and determining the local range weight corresponding to all non-fitting pixel points of the current frame image in the optimal fitting curve.

9. The bilateral filtering image processing method based on the particle size block approximation calculation according to claim 1 or 8, characterized in that, The method further comprises judging whether the current fine-grained block is a block of the smallest fine granularity or a block at the edge, and if so, obtaining neighboring fine-grained blocks of the current fine-grained block, and constructing the neighboring fine-grained blocks into a new block; All key pixel points and fitting pixel points in the new block are counted, and a local range weight corresponding to each key pixel point and fitting pixel point in the new block is calculated in combination with a gray value standard deviation; the key pixel points and fitting pixel points of the new block are processed according to a fitting function; A weight function is used to smooth the fitting curve of the current fine-grained block and the fitting curve of the new block, so as to obtain a local range weight of a non-fitting pixel point of the current fine-grained block.

Citation Information

Patent Citations

  • Intelligent control method and system for high-speed braiding machine

    CN116385416A

  • Smart infrared image scene enhancement method

    WO2019144581A1