Image denoising method, system, device and storage medium
By setting the number of segments in the value domain filtering algorithm, the spatial domain and value domain filters are equivalent to a single filter, which solves the problem of high hardware resource consumption in bilateral filtering and achieves a balance between image denoising effect and hardware cost.
Patent Information
- Application Number
- CN202311323055.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-12
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-10-12
AI Technical Summary
In existing technologies, bilateral filtering consumes a large amount of multiplier resources in hardware implementation, especially when the filtering window is increased, which leads to an increase in hardware overhead and implementation cost of image denoising.
By setting different numbers of range filtering segments in the spatial domain filtering algorithm, the spatial domain filter and the range filter are equivalent to a single filter. By using a reasonable number of range segments and segment thresholds, the number of operations of the multiplier is reduced, achieving an approximate bilateral filtering effect.
While maintaining image denoising performance, the computational resource requirements have been significantly reduced, achieving a balance between image denoising performance and hardware implementation costs.
Smart Images

Figure CN117333392B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image processing technology, and more specifically, to an image denoising method, system, device, and storage medium. Background Technology
[0002] During the acquisition, transmission, and reception of image resources, various forms of noise are inevitably introduced. The presence of noise can greatly affect the viewer's visual experience of the image resources. Therefore, in the field of image processing technology, noise reduction technology is one of the key links to improve the presentation quality of image resources.
[0003] In existing technologies, spatial domain filtering methods are commonly used as a hardware implementation for image resource denoising. Spatial domain filtering methods are characterized by their simple algorithm implementation, with Gaussian filtering and bilateral filtering being two common methods.
[0004] Gaussian filtering uses a weighted average of pixels near the current pixel during the processing of the current pixel. The weights depend on the distance between the current pixel and its surrounding pixels; the farther the distance, the smaller the weight. In other words, Gaussian filtering essentially performs a weighted average of pixels within the neighborhood of the anchor point. This filtering method tends to smooth objects at edges, but it loses the original sharp texture information.
[0005] Bilateral filtering, in addition to considering distance, also takes into account the color difference between the current pixel and its surrounding pixels. Pixels that are close but have a large color difference are assigned a small weight, thus preventing the boundaries from being blurred and achieving edge-preserving filtering. In other words, compared to Gaussian filtering, bilateral filtering can better preserve image edges. Its principle is the multiplication of a Gaussian function related to spatial distance and a Gaussian function related to grayscale distance.
[0006] However, bilateral filtering requires a large amount of multiplier resources in its hardware implementation. In particular, as the filtering window increases, the consumption of these multiplier resources will increase dramatically, which increases the hardware overhead and implementation cost of image denoising. Summary of the Invention
[0007] In view of the problems in the prior art, the purpose of this disclosure is to provide an image denoising method, system, device and storage medium that can reduce the required computing resources while achieving near-denoising effect.
[0008] Specifically, the first aspect of this disclosure provides an image denoising method, which may include the following steps:
[0009] Acquire the image to be denoised, and the pre-defined filtering window;
[0010] Determine the number of value range segments corresponding to each pixel within the filter window based on the current position of the filter window;
[0011] Based on the number of segments in the value range of each pixel and the pixel value, obtain the bilateral filter coefficients corresponding to each pixel;
[0012] The filtering calculation is performed on all pixels in the filtering window based on the bilateral filter coefficients to obtain the filtered pixel value corresponding to the center pixel of the filtering window.
[0013] By traversing the image to be denoised through the filtering window, the filtering pixel value corresponding to each pixel is obtained, so as to achieve the denoising process of the image to be denoised.
[0014] Wherein: within the filtering window, the number of value range segments corresponding to a pixel is inversely proportional to the distance of the pixel from the center pixel of the filtering window.
[0015] In one possible implementation of the first aspect described above, the image denoising method further includes:
[0016] Based on the size of the filtering window, the edge pixels of the image to be denoised are extended to enable filtering calculations to be performed on the edge pixels.
[0017] In one possible implementation of the first aspect above, the process of obtaining the bilateral filter coefficients corresponding to each pixel based on the number of segments in the value range of each pixel and the pixel value includes:
[0018] The corresponding segmentation pattern is obtained based on the number of segments in the value range, where:
[0019] Set the number of value range segments corresponding to the segmented mode to M, where M is a positive integer greater than 1.
[0020] The number of thresholds corresponding to the segmentation mode is M-1;
[0021] The segment thresholds for each segment, from smallest to largest, are Th0, Th1, ..., Th... M-1 ;
[0022] The segment weights corresponding to each segment are W0, W1, ..., W... M-1 0, where the segment weight value W0 to the segment weight value W M-1 Monotonically decreasing.
[0023] In one possible implementation of the first aspect described above, W0, W1, ..., W M-1 The numbers 0 and 0 form a decreasing sequence.
[0024] In one possible implementation of the first aspect above, different segmentation modes correspond to different numbers of thresholds; and
[0025] The larger the number of thresholds corresponding to the segmented mode, the larger the segment weight value corresponding to the same segment.
[0026] In one possible implementation of the first aspect above, the process of obtaining the bilateral filter coefficients corresponding to each pixel based on the number of segments in the value range of each pixel and the pixel value further includes:
[0027] Obtain the absolute value of the difference between the pixel value of the current pixel and the pixel value of the center pixel;
[0028] The segment in which a pixel is located is determined based on the absolute value of the difference, and the segment weight value corresponding to the segment is used as the coefficient of the bilateral filter.
[0029] In one possible implementation of the first aspect above, filtering calculations are performed on all pixels within the filtering window based on the bilateral filter coefficients, using the following formula:
[0030] P out =ΣP(i,j)*W(i,j) / sum(W(i,j))
[0031] Where: P out P(i,j) represents the filtered pixel value corresponding to the center pixel of the filtering window; P(i,j) represents the pixel value of the pixel at coordinate (i,j) within the filtering window; and W(i,j) represents the bilateral filter coefficients corresponding to the pixel at coordinate (i,j) within the filtering window.
[0032] A second aspect of this disclosure provides an image denoising system for implementing the image denoising method provided in the first aspect, specifically including:
[0033] The acquisition unit is used to acquire the image to be denoised and a pre-defined filtering window;
[0034] The value range segmentation unit is used to determine the number of value range segments corresponding to each pixel in the filtering window based on the current position of the filtering window.
[0035] The filter coefficient acquisition unit is used to obtain the bilateral filter coefficients corresponding to each pixel based on the number of segments in the value range of each pixel and the pixel value.
[0036] The filtering calculation unit is used to perform filtering calculations on all pixels within the filtering window based on the bilateral filter coefficients, so as to obtain the filtered pixel value corresponding to the center pixel of the filtering window.
[0037] The image denoising unit is used to traverse all pixels in the image to be denoised through the filtering window in order to achieve denoising processing of the image.
[0038] Wherein: within the filtering window, the number of value range segments corresponding to a pixel is inversely proportional to the distance of the pixel from the center pixel of the filtering window.
[0039] A third aspect of this disclosure provides an electronic device comprising:
[0040] processor;
[0041] Memory, which stores the processor's executable instructions;
[0042] The processor is configured to execute the steps of the image denoising method provided in the first aspect by executing executable instructions.
[0043] A fourth aspect of this disclosure provides a computer-readable storage medium for storing a program that, when executed, implements the steps of the image denoising method provided in the first aspect.
[0044] Compared with the prior art, this disclosure has the following beneficial effects:
[0045] The technical solution disclosed herein, in the process of image denoising using spatial domain filtering algorithms, by setting different numbers of value domain filtering segments in the spatial domain, transforms the original spatial domain filter and value domain filter into a single filter. By setting reasonable value domain segments and segment thresholds, it can achieve an image denoising effect similar to bilateral filtering while significantly reducing the required computational resources, thereby achieving a balance between image denoising effect and hardware implementation cost, and has potential for widespread application. Attached Figure Description
[0046] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings.
[0047] Figure 1 According to an embodiment of this disclosure, a flowchart of an image denoising method is provided.
[0048] Figure 2 According to existing technology, a schematic diagram of setting a filtering window in an image is provided.
[0049] Figure 3 According to an embodiment of this disclosure, a schematic diagram is provided for assigning the number of value range segments in a 7*7 filtering window.
[0050] Figure 4a According to an embodiment of this disclosure, a schematic diagram is provided corresponding to the segmentation mode when the number of value range segments is 6.
[0051] Figure 4b According to an embodiment of this disclosure, a schematic diagram is provided corresponding to the segmentation mode when the number of value range segments is 4.
[0052] Figure 4c According to an embodiment of this disclosure, a schematic diagram is provided corresponding to the segmentation mode when the number of value range segments is 2.
[0053] Figure 5 According to an embodiment of this disclosure, a schematic diagram of the structure of an image denoising system is provided.
[0054] Figure 6 According to an embodiment of this disclosure, a schematic diagram of the structure of an electronic device is provided.
[0055] Figure 7 According to an embodiment of this disclosure, a schematic diagram of the structure of a computer-readable storage medium is provided. Detailed Implementation
[0056] The following specific examples illustrate the implementation of this disclosure. Those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed herein. This disclosure can also be implemented or applied to systems through other different specific embodiments, and various details in this disclosure can also be modified or changed according to different viewpoints and application systems without departing from the spirit of this disclosure. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this disclosure can be combined with each other.
[0057] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings, so that those skilled in the art to which this disclosure pertains can readily implement it. This disclosure may be embodied in many different forms and is not limited to the embodiments described herein.
[0058] In this disclosure, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic represented in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. Furthermore, the specific features, structures, materials, or characteristics represented may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples represented in this disclosure, as well as the features of those different embodiments or examples.
[0059] Furthermore, the terms "first" and "second" are used for illustrative purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the representation of this disclosure, "a plurality of" means two or more, unless otherwise expressly and specifically defined.
[0060] For the purpose of clarity, devices unrelated to the description are omitted, and the same or similar components throughout the specification are given the same reference numerals.
[0061] Throughout this specification, when it is said that a device is "connected" to another device, this includes not only "direct connection" but also "indirect connection" by placing other components in between. Furthermore, when it is said that a device "comprises" a certain constituent element, unless otherwise stated otherwise, this does not exclude other constituent elements, but rather implies that other constituent elements may be included.
[0062] When we say that a device is "above" another device, this can mean that it is directly above the other device, or it can mean that other devices are present in between. Conversely, when we say that a device is "directly" "above" another device, there are no other devices present in between.
[0063] Although the terms first, second, etc., are used in some instances herein to refer to various elements, these elements should not be limited by these terms. These terms are used only to distinguish one element from another. For example, first interface and second interface, etc., are used. Furthermore, as used herein, the singular forms “a,” “an,” and “the” are intended to also include the plural forms unless the context indicates otherwise. It should be further understood that the terms “comprising,” “including,” indicate the presence of features, steps, operations, elements, components, items, kinds, and / or groups, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups. The terms “or” and “and / or” as used herein are interpreted as inclusive, or mean any one or any combination thereof. Thus, “A, B, or C” or “A, B, and / or C” means “any one of: A; B; C; A and B; A and C; B and C; A, B, and C.” Exceptions to this definition will only occur if the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way.
[0064] The technical terms used herein are for reference only to specific embodiments and are not intended to limit the scope of this disclosure. The singular form used herein includes the plural form unless the statement explicitly indicates otherwise. The word "comprising" as used in this specification means to specify a particular characteristic, region, integer, step, operation, element, and / or component, and does not exclude the presence or addition of other characteristics, regions, integers, steps, operations, elements, and / or components.
[0065] Although not explicitly defined, all terms, including technical and scientific terms used herein, shall have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains. Terms defined in commonly used dictionaries shall be further interpreted as having a meaning consistent with the relevant technical literature and the content of this present disclosure, and shall not be over-interpreted as having an ideal or overly formulaic meaning unless otherwise defined.
[0066] Based on the relevant descriptions in the existing technology, bilateral filtering requires a large amount of multiplier resources in specific hardware implementations, especially increasing the hardware overhead and implementation cost of image denoising when the filtering window is enlarged. The following will explain in detail the causes of the above-mentioned problems in the existing technology:
[0067] Specifically, Figure 2 A schematic diagram illustrating how to set a filtering window in an image is shown, such as... Figure 2 As shown in image 200, a 5x5 filtering window 201 is set up, where each square 202 in the filtering window 201 represents a pixel, (i,j) represents the pixel at coordinates (i,j) within the filtering window, and (k,l) represents the center pixel within the filtering window. It can be understood that the prototype of the bilateral filtering algorithm is as follows:
[0068]
[0069]
[0070] Where g(i,j) represents the pixel value of the filtered image, and w(i,j,k,l) represents the template weights of the bilateral filter, which includes two parts: one is the spatial domain filtering part, where the weights are related to the distance from the pixel to the center pixel; the other is the value domain filtering part, where the weights are related to the absolute value of the difference between the pixel value of the pixel and the pixel value of the center pixel.
[0071] In the specific calculation process, the range filtering coefficient W0(i,j) needs to be calculated first based on the absolute value of the difference between the pixel value of the pixel point and the pixel value of the center pixel. Then, the range filtering coefficient W0(i,j) is multiplied by the fixed spatial domain weight W1(i,j) to obtain W2(i,j). Finally, spatial domain filtering calculation is performed using W2(i,j).
[0072] It is understandable that in the specific implementation steps of the traditional bilateral filtering method described above, the value domain filtering coefficients need to be calculated first, and then multiplied with fixed spatial domain filtering coefficients. This process requires M*N multiplication calculations, where M and N are the width and height of the filtering window, respectively (equivalent to the number of pixels the filtering window can accommodate horizontally and vertically). This does not include the hardware resources consumed by the filtering calculation itself. As the filtering window increases, the demand for these hardware resources increases dramatically, thereby increasing the hardware overhead and implementation cost of image denoising. To overcome the above practical application problems, in some embodiments of this disclosure, Figure 1 A flowchart illustrating an image denoising method is shown, such as... Figure 1 As shown, the specific steps may include the following:
[0073] Step 101: Obtain the image to be denoised and the pre-set filtering window.
[0074] Step 102: Determine the number of value range segments corresponding to each pixel within the filtering window, based on the current position of the filtering window. Specifically, the number of value range segments for each pixel within the filtering window is inversely proportional to the distance between the pixel and the center pixel of the filtering window. The detailed process for determining the number of value range segments will be explained later.
[0075] Step 103: Based on the number of segments in the value range of each pixel and the pixel value, obtain the bilateral filter coefficients corresponding to each pixel. The specific process for obtaining the bilateral filter coefficients will be explained in detail later.
[0076] Step 104: Perform filtering calculations on all pixels within the filtering window based on the bilateral filter coefficients to obtain the filtered pixel value corresponding to the center pixel of the filtering window.
[0077] Step 105: Traverse all pixels in the image to be denoised through the filter window to achieve denoising processing of the image.
[0078] Through steps 101 to 105 above, the two-step calculation of the bilateral filter coefficients can be simplified, achieving an approximation of the traditional bilateral filter while reducing the number of M*N multiplier operations, thus significantly reducing computational resources. Specifically, Figure 3A schematic diagram illustrating the assignment of value range segmentation numbers within a 7x7 filtering window is shown. It can be seen that in the 7x7 filtering window, the coordinates of the center pixel are (4,4). The value range segmentation number of the pixels surrounding the center pixel is set to 7, the value range segmentation number of the pixels in the second ring extending outwards from the center is set to 5, and the value range segmentation number of the pixels in the ring furthest from the center pixel is set to 3. That is, the value range segmentation number corresponding to a pixel is inversely proportional to the distance of the pixel from the center pixel of the filtering window. Those skilled in the art can set the specific value range segmentation number according to actual needs, and it is not limited here. The specific implementation of steps 101 to 104 above will be further explained and illustrated below:
[0079] In the above embodiments, before determining the number of value range segments corresponding to each pixel in the filtering window in step 102, it is necessary to perform boundary expansion on the edge pixels of the image to be denoised in advance according to the size of the filtering window, so that the edge pixels located at the edge of the image to be denoised can also be filtered normally. Those skilled in the art can select the size of the filtering window and perform targeted boundary expansion according to actual needs, which is not limited here.
[0080] In the above embodiments, further, in step 103, during the process of obtaining the bilateral filter coefficients corresponding to each pixel based on the number of value range segments and the pixel value, it is first necessary to set reasonable segmentation thresholds and segmentation weights based on the set number of value range segments. Here, the number of value range segments, segmentation thresholds, and segmentation weights are uniformly categorized into the segmentation mode description. Therefore, it is necessary to obtain the corresponding segmentation mode based on the determined value range segmentation formula. Specifically, Figures 4a to 4c The diagrams show the segmentation patterns for value range segments of 6, 4, and 2, respectively. The horizontal axis |P(i,j)-P(k,l)| represents the absolute difference between the pixel value at coordinate (i,j) and the pixel value of the center pixel within the filter window, while the vertical axis W(i,j) represents the weight value corresponding to the pixel at coordinate (i,j) within the filter window. Combined with... Figures 4a to 4c It can be concluded that if the number of value range segments corresponding to the segmentation mode is set to M, where M is a positive integer greater than 1, then the number of thresholds corresponding to the segmentation mode is M-1; the segment thresholds corresponding to each segment, from smallest to largest, are Th0, Th1, ..., Th... M-1 The segment weights corresponding to each segment are W0, W1, ..., W, respectively. M-1 0, and the segment weight value W0 to the segment weight value W M-1 Monotonically decreasing. Figures 4a to 4c In the segmentation pattern diagram shown, the segmentation weight values W0, W1, ..., W M-1Both 0 and 0 form a decreasing sequence. Those skilled in the art can also set the segment weight values according to actual needs, which is not limited here.
[0081] And comparison Figures 4a to 4c It can be observed that different segmentation patterns have different numbers of value segments, corresponding to different numbers of thresholds. Furthermore, the larger the number of thresholds for a segmentation pattern, the larger the segment weight value for the same segment. For example... Figures 4a to 4c As shown, comparison Figure 4a and Figure 4b It can be seen that, Figure 4a The corresponding number of thresholds is greater than Figure 4b The corresponding number of thresholds, where the segment weight value W0 corresponding to segment 0 to Th0 is also... Figure 4a Larger in the middle, compared to Figure 4b and Figure 4c The same conclusion can be reached.
[0082] In the above embodiments, further, in step 103, after determining the number of value domain segments and the corresponding segmentation mode, it is necessary to obtain the absolute value of the difference between the pixel value of the pixel point and the pixel value of the center pixel point, and then determine the segment where the pixel point is located based on the absolute value of the difference, and use the segment weight value corresponding to the segment as the coefficient of the bilateral filter. Through the above steps, by setting different numbers of value domain filter segments, the spatial domain filter and the value domain filter are equivalent to a single filter, reducing the hardware implementation resources of the M*N multiplier, and achieving the beneficial effects of this disclosure.
[0083] In the above embodiments, further, in step 104, filtering calculations are performed on all pixels within the filtering window based on the bilateral filter coefficients, which can be specifically implemented based on the following formula:
[0084] P out =ΣP(i,j)*W(i,j) / sum(W(i,j))
[0085] Where: P out P(i,j) represents the filtered pixel value corresponding to the center pixel of the filtering window; P(i,j) represents the pixel value of the pixel at coordinate (i,j) within the filtering window; and W(i,j) represents the bilateral filter coefficient corresponding to the pixel at coordinate (i,j) within the filtering window. It is understood that, based on the bilateral filter coefficients obtained in the aforementioned embodiment, the filtered pixel value of the center pixel can be output according to the correlation filtering algorithm in the prior art, which will not be elaborated upon here.
[0086] In some embodiments of this disclosure, Figure 5 A schematic diagram of an image denoising system is disclosed. This image denoising system is used to implement the image denoising method provided in the foregoing embodiments, such as... Figure 5As shown, it can specifically include the following functional modules:
[0087] The acquisition unit 501 is used to acquire the image to be denoised and a pre-set filtering window.
[0088] The value range segmentation unit 502 is used to determine the number of value range segments corresponding to each pixel in the filtering window based on the current position of the filtering window.
[0089] The filter coefficient acquisition unit 503 is used to acquire the bilateral filter coefficients corresponding to each pixel based on the number of segments in the value range of each pixel and the pixel value.
[0090] The filtering calculation unit 504 is used to perform filtering calculations on all pixels in the filtering window based on the bilateral filter coefficients to obtain the filtered pixel value corresponding to the center pixel of the filtering window.
[0091] The image denoising unit 505 is used to traverse all pixels in the image to be denoised through a filtering window to achieve denoising processing of the image.
[0092] Specifically, for the value range segmentation unit 502, the number of value range segments corresponding to a pixel in the filtering window is inversely proportional to the distance between the pixel and the center pixel of the filtering window.
[0093] It is understood that the functions performed by the acquisition unit 501 to the image denoising unit 505 in the above functional modules correspond one-to-one with the actions performed by steps 101 to 105 in the aforementioned embodiments, and will not be elaborated here.
[0094] In some embodiments of this disclosure, an electronic device is also provided, including a processor and a memory, wherein the memory stores executable instructions of the processor, and the processor is configured to perform the steps of the image denoising method provided in the foregoing embodiments by executing the executable instructions.
[0095] Based on the foregoing embodiments, the electronic device provided by this disclosure can convert the spatial filter and the value domain filter in the bilateral filtering algorithm into a single filter by setting different number of value domain filtering segments in the spatial domain. While achieving an approximate effect of traditional bilateral filtering, it reduces the investment of computational resources such as multipliers, and can achieve a balance between image denoising effect and hardware implementation cost, thus having promotional value.
[0096] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "platform."
[0097] Specifically, Figure 6 A schematic diagram of the structure of an electronic device is shown according to an embodiment of this disclosure. Referring below... Figure 6 To describe an electronic device 600 according to such an embodiment of the present disclosure. Figure 6 The electronic device 600 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0098] like Figure 6 As shown, the electronic device 600 is presented in the form of a general-purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including storage unit 620 and processing unit 610), a display unit 640, etc.
[0099] The storage unit stores program code, which can be executed by the processing unit 610 to perform the steps described in the image denoising method section of this specification according to various exemplary embodiments of the present disclosure. For example, the processing unit 610 can perform actions such as... Figure 1 The relevant steps of the image denoising method shown are illustrated.
[0100] Storage unit 620 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 6201 and / or cache memory 6202, and may further include a read-only memory (ROM) 6203.
[0101] Storage unit 620 may also include a program / utility 6204 having a set (at least one) program module 6205, such program module 6205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0102] Bus 630 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the multiple bus structures.
[0103] Electronic device 600 can also communicate with one or more external devices 700 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 600, and / or with any device that enables electronic device 600 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 650. Furthermore, electronic device 600 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 660. Network adapter 660 can communicate with other modules of electronic device 600 via bus 630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.
[0104] This disclosure also provides a computer-readable storage medium for storing a program that, when executed, implements the relevant steps of the image denoising method provided in the foregoing embodiments. In some possible implementations, various aspects of this disclosure can also be implemented as a program product including program code. When the program product is run on a terminal device, the program code causes the terminal device to perform the steps described in the above-described electronic prescription transfer processing method section of this specification according to various exemplary embodiments of this disclosure.
[0105] Specifically, Figure 7 According to embodiments of this disclosure, a schematic diagram of the structure of a computer-readable storage medium is shown. It will be understood that... Figure 7 A program product 800 for implementing the image denoising method described herein is described. This product may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of this disclosure is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0106] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0107] Computer-readable storage media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, or any suitable combination thereof.
[0108] Program code for performing the operations of this disclosure can be written using any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0109] In summary, the technical solution provided in this disclosure, when using spatial filtering algorithms for image denoising, involves setting different numbers of value domain filtering segments in the spatial domain. This transforms the original spatial filter and value domain filter into a single filter. By setting reasonable numbers of value domain segments and segment thresholds, it is possible to achieve image denoising effects similar to bilateral filtering while significantly reducing the required computational resources. This achieves a balance between image denoising performance and hardware implementation costs, and has potential for widespread application.
[0110] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of this disclosure and should not be construed as limiting the specific implementation of this disclosure to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of this disclosure, and all such modifications and substitutions should be considered within the scope of protection of this disclosure.
Claims
1. An image denoising method, characterized in that, include: Acquire the image to be denoised, and the pre-defined filtering window; Based on the current position of the filtering window, determine the number of value range segments corresponding to each pixel within the filtering window, wherein: within the filtering window, the number of value range segments corresponding to each pixel is inversely proportional to the distance between the pixel and the center pixel of the filtering window; Obtaining the corresponding segmentation pattern based on the number of value range segments includes: setting the number of value range segments corresponding to the segmentation pattern to M, where M is a positive integer greater than 1; then the number of thresholds corresponding to the segmentation pattern is M-1; the segmentation thresholds corresponding to each segment are ordered from smallest to largest as follows: , … The segment weight values corresponding to each segment after segmentation according to the segmentation threshold are as follows: , … 0, where the segment weight value is... Up to the segment Monotonically decreasing, , … The numbers 0 and 0 form a decreasing sequence, and the number of thresholds corresponding to different segmentation modes is different; the larger the number of thresholds corresponding to the segmentation mode, the larger the segment weight value corresponding to the same segment; after determining the number of value range segments and the corresponding segmentation mode, the absolute value of the difference between the pixel value of the pixel point and the pixel value of the center pixel point is obtained; by comparing the absolute value of the difference with the size of the segmentation threshold, the segment in which the pixel point is located is determined, and the segment weight value corresponding to the segment is used as the bilateral filter coefficient corresponding to the pixel point; The filtering calculation is performed on all pixels in the filtering window based on the bilateral filter coefficients to obtain the filtered pixel value corresponding to the center pixel of the filtering window. The filtering window is used to traverse the image to be denoised, and the filtered pixel value corresponding to each pixel is obtained to achieve the denoising process of the image to be denoised.
2. The image denoising method according to claim 1, characterized in that, Also includes: Based on the size of the filtering window, the edge pixels of the image to be denoised are extended to enable the filtering calculation to be performed on the edge pixels.
3. The image denoising method according to claim 1, characterized in that, The filtering calculation for all pixels within the filtering window based on the bilateral filter coefficients is implemented using the following formula: = ΣP(i,j) W(i,j) / sum(W(i,j)) in: P(i,j) is the filtered pixel value corresponding to the center pixel of the filtering window; P(i,j) is the pixel value of the pixel at coordinate (i,j) within the filtering window; W(i,j) is the bilateral filter coefficient corresponding to the pixel at coordinate (i,j) within the filtering window.
4. An image denoising system for implementing the image denoising method according to any one of claims 1 to 3, characterized in that, include: The acquisition unit is used to acquire the image to be denoised and a pre-defined filtering window; The value range segmentation unit is used to determine the number of value range segments corresponding to each pixel in the filtering window based on the current position of the filtering window, wherein: in the filtering window, the number of value range segments corresponding to the pixel is inversely proportional to the distance of the pixel from the center pixel of the filtering window; The filter coefficient acquisition unit obtains the corresponding segmentation pattern based on the number of value range segments, including: setting the number of value range segments corresponding to the segmentation pattern to M, where M is a positive integer greater than 1, then the number of thresholds corresponding to the segmentation pattern is M-1; the segmentation thresholds corresponding to each segment are ordered from smallest to largest as follows: , … The segment weight values corresponding to each segment after segmentation according to the segmentation threshold are as follows: , … 0, where the segment weight value is... Up to the segment Monotonically decreasing, , … The numbers 0 and 0 form a decreasing sequence, and the number of thresholds corresponding to different segmentation modes is different; the larger the number of thresholds corresponding to the segmentation mode, the larger the segment weight value corresponding to the same segment; after determining the number of value range segments and the corresponding segmentation mode, the absolute value of the difference between the pixel value of the pixel point and the pixel value of the center pixel point is obtained; by comparing the absolute value of the difference with the size of the segmentation threshold, the segment in which the pixel point is located is determined, and the segment weight value corresponding to the segment is used as the bilateral filter coefficient corresponding to the pixel point; The filtering calculation unit is used to perform filtering calculations on all pixels in the filtering window based on the bilateral filter coefficients to obtain the filtered pixel value corresponding to the center pixel of the filtering window. The image denoising unit is used to traverse all pixels in the image to be denoised through the filtering window to achieve denoising processing of the image to be denoised.
5. An image denoising device, characterized in that, include: processor; A memory in which executable instructions of the processor are stored; The processor is configured to perform the steps of the image denoising method according to any one of claims 1 to 3 by executing the executable instructions.
6. A computer-readable storage medium for storing a program, characterized in that, When the program is executed by the processor, it implements the steps of the image denoising method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Hardware architecture system of bilateral filter and weight optimization method thereof
CN114359116A
