Method and device for determining image noise, equipment and storage medium
By extracting high frequencies from the image and performing addition calculations on the high-frequency components within the calculation window, the problem of inaccurate identification of high-frequency components is solved, and more effective image noise reduction is achieved.
Patent Information
- Application Number
- CN202511171263.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-20
- Publication Date
- 2025-12-19
AI Technical Summary
Existing technologies cannot accurately determine whether high-frequency components are noise regions in image denoising, which may lead to incorrect blurring of image regions and reduce the image denoising effect.
By extracting high frequencies from the image to be processed, a calculation window for high-frequency components is obtained. The product of every two high-frequency components in the calculation window is added to obtain a response value. Based on the response value, it is determined whether the high-frequency component is noise.
Accurately determining whether high-frequency components are noise avoids erroneous blurring and improves image noise reduction.
Smart Images

Figure CN121169730A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and particularly relates to a method and device for determining image noise, equipment and storage medium. BACKGROUND
[0002] Noise reduction of an image is the most important step in image processing. At present, all pixels in the neighborhood of a current pixel are obtained, and low-pass filtering is performed on the pixel to obtain a noise-reduced pixel. However, the above method usually reduces the high-frequency part of the image, thereby making the image blurred. In addition, the image quality depends not only on the noise size of the image, but also on the edge, detail and texture information displayed on the image.
[0003] In order to solve the above problems, the related art first measures the noise standard deviation (NStd) and the size of the high-frequency component (HF) of the current image in the noise reduction processing of the image. Then, by comparing the sizes of the two, it is determined whether the current image region is noise. For example, when the high-frequency component is significantly greater than the noise standard deviation, it is determined that the current image region is not a noise region, thereby avoiding the blurring processing of the image by noise reduction. When the high-frequency component is equal to or less than the noise standard deviation, it is determined that the current image region is a noise region, and the image is subjected to strong blurring processing.
[0004] However, when the size of the high-frequency component is close to the size of the noise, the above method cannot determine whether the image region is a noise region, thereby possibly incorrectly blurring the image region, and thus reducing the effect of image noise reduction. SUMMARY
[0005] The embodiments of the present application provide a method and device for determining image noise, equipment and storage medium, which can determine whether the high-frequency component is noise when the high-frequency component is close to the size of the noise, thereby avoiding incorrect blurring of the image region, and thus improving the effect of image noise reduction. The technical solution is as follows:
[0006] According to a first aspect of the embodiments of the present application, a method for determining image noise is provided, comprising:
[0007] obtaining a to-be-processed image; the to-be-processed image comprises a plurality of original pixels;
[0008] performing high-frequency extraction on the to-be-processed image to obtain a high-frequency image; the high-frequency image comprises a plurality of high-frequency components, and the high-frequency components correspond one-to-one to the original pixels;
[0009] For each of the high frequency components, a calculation window corresponding to the high frequency component is obtained; the calculation window includes the high frequency component and a plurality of high frequency components in a neighborhood corresponding to the high frequency component;
[0010] A product of each two high frequency components in the calculation window is added to obtain a response value of the high frequency component;
[0011] Based on the response value, it is determined whether the high frequency component is noise.
[0012] In some embodiments, the high frequency extraction on the image to be processed to obtain a high frequency image comprises:
[0013] High-pass filtering on the image to be processed to obtain the high frequency image;
[0014] Or low-pass filtering on the image to be processed to obtain a low frequency image;
[0015] Difference calculation on the image to be processed and the low frequency image to obtain the high frequency image.
[0016] In some embodiments, the calculation window is centered on the corresponding high frequency component and includes a plurality of rows and a plurality of columns;
[0017] Each row includes k high frequency components; k is an odd number greater than or equal to 3;
[0018] Each column includes k high frequency components.
[0019] In some embodiments, the addition calculation on the product of each two high frequency components in the calculation window to obtain the response value of the high frequency component comprises:
[0020] Addition calculation on a plurality of high frequency components in the calculation window to obtain a first value;
[0021] Multiplication calculation on the first value to obtain a second value;
[0022] Multiplication calculation on each high frequency component in the calculation window to obtain a third value of each high frequency component;
[0023] Addition calculation on a plurality of third values to obtain a fourth value;
[0024] Subtraction calculation on the second value and the fourth value to obtain the response value of the high frequency component.
[0025] In some embodiments, the multiplication calculation on the first value to obtain a second value comprises:
[0026] square the first value to obtain the second value.
[0027] In some embodiments, the multiplication calculation on each of the high-frequency components in the calculation window to obtain a third value of each of the high-frequency components comprises:
[0028] square calculation on each of the high-frequency components in the calculation window to obtain a third value of each of the high-frequency components.
[0029] In some embodiments, the determination of whether the high-frequency component is noise based on the response value comprises:
[0030] when the response value is greater than a preset threshold, the high-frequency component is not the noise;
[0031] or when the response value is less than or equal to the preset threshold, the high-frequency component is the noise.
[0032] According to a second aspect of the embodiments of the present application, a device for determining image noise is provided, comprising:
[0033] a first obtaining module configured to obtain a to-be-processed image; the to-be-processed image comprises a plurality of original pixels;
[0034] a high-frequency extraction module configured to perform high-frequency extraction on the to-be-processed image to obtain a high-frequency image; the high-frequency image comprises a plurality of high-frequency components, and the high-frequency components correspond to the original pixels one by one;
[0035] a second obtaining module configured to, for each of the high-frequency components, obtain a calculation window corresponding to the high-frequency component; the calculation window comprises the high-frequency component and a plurality of high-frequency components in a neighborhood corresponding to the high-frequency component;
[0036] a calculation module configured to perform addition calculation on the product of each two of the high-frequency components in the calculation window to obtain a response value of the high-frequency component;
[0037] a determination module configured to determine whether the high-frequency component is noise based on the response value.
[0038] According to a third aspect of the embodiments of the present application, a computer device is provided, comprising a processor and a memory, the memory is used to store at least one program, the at least one program is loaded and executed by the processor to perform the method for determining image noise.
[0039] According to a fourth aspect of the embodiments of the present application, a computer readable storage medium is provided, the computer readable storage medium stores at least one program, the at least one program is loaded and executed by a processor to implement the method for determining image noise.
[0040] Embodiments of the present application acquire a to-be-processed image; perform high-frequency extraction on the to-be-processed image to obtain a high-frequency image; the high-frequency image comprises a plurality of high-frequency components; for each high-frequency component, a calculation window corresponding to the high-frequency component is acquired; the calculation window comprises the high-frequency component and a plurality of high-frequency components in a neighborhood corresponding to the high-frequency component; a product of each two high-frequency components in the calculation window is added to obtain a response value of the high-frequency component; and whether the high-frequency component is noise is determined based on the response value. The above technical solution performs calculation on the high-frequency component and a plurality of high-frequency components in the neighborhood of the high-frequency component to obtain a response value of the high-frequency component, and determines whether the high-frequency component is noise according to the response value, so that noise standard deviation does not need to be calculated, and noise standard deviation and the high-frequency component do not need to be compared. In this way, whether the high-frequency component is noise can be determined not only in the case where the high-frequency component and the noise are close in size, but also in the case where the high-frequency component and the noise are not close in size, thereby improving the effect of image noise reduction. BRIEF DESCRIPTION OF DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0042] Figure 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application;
[0043] Figure 2 is a flowchart of a method for a terminal to determine image noise according to an embodiment of the present application;
[0044] Figure 3 is a flowchart of a method for a terminal to determine image noise according to an embodiment of the present application;
[0045] Figure 4 is a structural diagram of a device 400 for determining image noise according to an embodiment of the present application;
[0046] Figure 5 is a structural diagram of a terminal according to an embodiment of the present application;
[0047] Figure 6 is a structural diagram of a server according to an embodiment of the present application. DETAILED DESCRIPTION
[0048] In order to make the objects, technical solutions and advantages of the present application clearer, the following will further describe the embodiments of the present application with reference to the drawings.
[0049] The exemplary embodiments will be described in detail herein below with reference to the drawings. The following description is presented in terms of the drawings, where the same numbers in different drawings represent the same or similar elements unless otherwise described. The embodiments described in the following exemplary embodiments are not meant to represent all implementations consistent with the present application.
[0050] The terms "first", "second", and the like in the present application are used to distinguish between similar or identical items or elements having substantially the same function and should be understood that there is no logical or chronological dependency between "first", "second", and "n", nor is there any limitation on the number and execution order. It should also be understood that although the following description uses the terms first, second, and the like to describe various elements, these elements should not be limited by the terms.
[0051] These terms are only used to distinguish one element from another. For example, without departing from the scope of various examples, a first action can be referred to as a second action, and similarly, a second action can be referred to as a first action. The first action and the second action can both be actions, and in some cases, can be separate and distinct actions.
[0052] Wherein, at least one refers to one or more than one, for example, at least one action can be one action, two actions, three actions, etc. any integer greater than or equal to one action. And multiple refers to two or more than two, for example, multiple actions can be two actions, three actions, etc. any integer greater than or equal to two actions.
[0053] Figure 1 is a schematic diagram of an implementation environment provided according to an embodiment of the present application, which can include a terminal 101 and a server 102.
[0054] In the terminal 101, an image signal processor (ISP) is provided; a device for determining image noise is provided in the ISP. For example, the terminal 101 can be a smart phone with a video encoder, a wearable device, a personal computer, a laptop computer, a tablet computer, a smart television, and a vehicle terminal, etc.
[0055] The server 102 can be a server, a server cluster composed of multiple servers, or a cloud processing center.
[0056] The terminal 101 is connected to the server 102 through a wired or wireless network.
[0057] In some embodiments, the wireless or wired network uses standard communications technologies and / or protocols. The network can be the Internet, but can also include local area networks (LANs), metropolitan area networks (MANs), wide area networks (WANs), peer-to-peer networks, cable networks, satellite networks, or any combination thereof. In some embodiments, the data exchanged over the network is represented using technologies and / or formats including, but not limited to, Hypertext Markup Language (HTML), Extensible Markup Language (XML), and / or the like. In addition, conventional encryption technologies such as the Secure Sockets Layer (SSL), Transport Layer Security (TLS), Virtual Private Networks (VPNs), Internet Protocol Security (IPsec), and / or the like, can be used to encrypt data exchanged over all or a subset of the links. In other embodiments, custom and / or proprietary data communications technologies can be employed in place of, or in addition to, the above-described technologies.
[0058] In the related art, in the noise reduction processing of an image, the noise standard deviation of the current image and the size of the high frequency component are first measured. Then, by comparing the sizes of the two, it is determined whether the current image region is noise. For example, when the high frequency component is significantly larger than the noise standard deviation, it is determined that the current image region is not a noise region, thereby avoiding the blurring processing of the image by noise reduction. When the high frequency component is equal to or less than the noise standard deviation, it is determined that the current image region is a noise region, and the image is subjected to strong blurring processing.
[0059] However, when the size of the high frequency component is close to the size of the noise, the above method cannot determine whether the image region is a noise region, thereby possibly erroneously blurring the image region, and further reducing the effect of image noise reduction.
[0060] To solve the above technical problems, embodiments of the present application provide a method for determining image noise, high frequency extraction is performed on an original image to obtain a high frequency image; a calculation window of each high frequency component in the high frequency image is obtained, and the product of each two high frequency components in the calculation window is added to obtain a response value of the high frequency component; and whether the high frequency component is noise is determined based on the response value. The above technical solution can accurately calculate the response value of each high frequency component, so as to determine whether the corresponding high frequency component is noise according to the response value, thereby solving the problem that in the related art, when the high frequency component is close to the size of noise, it is unable to determine whether the high frequency component is noise, and thereby improving the effect of image noise reduction.
[0061] Figure 2 is a flowchart of a method for determining image noise by a terminal according to an embodiment of the present application. In combination with Figure 2 The method for determining image noise is described in detail. The method comprises steps S201 to S205.
[0062] In step S201, the terminal obtains a to-be-processed image; the to-be-processed image comprises a plurality of original pixels.
[0063] In some examples, the terminal obtains a to-be-processed image that needs to be de-noised. The original pixels comprise high frequency components and low frequency components.
[0064] Exemplarily, the high frequency components comprise effective information and noise. The effective information comprises details, textures, edges, and the like.
[0065] In step S202, the terminal performs high frequency extraction on the to-be-processed image to obtain a high frequency image; the high frequency image comprises a plurality of high frequency components, and the high frequency components correspond one-to-one to the original pixels.
[0066] That is, the high frequency component is a part of the corresponding original pixel.
[0067] It can be understood that noise is mainly characterized by high frequency, so embodiments of the present application determine noise by calculating the high frequency component, so that it is unnecessary to calculate the noise standard deviation and compare the size of the high frequency component with the noise standard deviation, thereby avoiding the problem that when the size of the noise is close to the high frequency component, it is unable to determine whether the high frequency component is noise.
[0068] In some examples, the above step S202 can be implemented in the following two ways:
[0069] The first way: the terminal performs high-pass filtering on the to-be-processed image to obtain the high frequency image.
[0070] For example, the to-be-processed image is high-pass filtered by a Soble filter or a Laplace filter to obtain the high frequency image.
[0071] The second way is that the terminal performs low-pass filtering on the to-be-processed image to obtain a low-frequency image, and performs difference calculation on the to-be-processed image and the low-frequency image to obtain a high-frequency image.
[0072] For example, the high-frequency image = the to-be-processed image - the low-frequency image.
[0073] For example, the terminal performs low-pass filtering on the to-be-processed image by using a Gaussian filter or a bilateral filter to obtain the low-frequency image.
[0074] In some examples, after obtaining the high-frequency image, the terminal stores the high-frequency image, to provide required data for calculation of a response value of a subsequent stage.
[0075] For example, the terminal stores the high-frequency image in a storage medium such as a static random-access memory (SRAM) or a dynamic random-access memory (DRAM).
[0076] In step S203, the terminal obtains, for each high-frequency component, a calculation window corresponding to the high-frequency component; the calculation window includes the high-frequency component and a plurality of high-frequency components in a neighborhood corresponding to the high-frequency component.
[0077] In some examples, the calculation window is centered on the corresponding high-frequency component and includes a plurality of rows and a plurality of columns; each row includes k high-frequency components; k is an odd number greater than or equal to 3; and each column includes k high-frequency components. That is, each calculation window includes k x k high-frequency components.
[0078] In step S204, the terminal performs addition calculation on a product of each two high-frequency components in the calculation window to obtain a response value of the high-frequency component.
[0079] In some examples, the terminal traverses all high-frequency components in the high-frequency image, calculates a response value of each high-frequency component, and determines whether each high-frequency component is noise.
[0080] For example, for a plurality of high-frequency components in the calculation window, the terminal calculates a product of each two high-frequency components, and performs addition calculation on the product to obtain a response value of the high-frequency component.
[0081] Figure 3 FIG. 1 is a flowchart of a method for determining image noise according to an embodiment of the present application. The method is described in detail below with reference to FIG. 2. Figure 3 The method for determining image noise is described in detail. The method includes steps S301 to S305.
[0082] In step S301, the terminal performs addition calculation on a plurality of high-frequency components in a calculation window to obtain a first value.
[0083] Exemplarily, the terminal accumulates the plurality of high frequency components in the calculation window to obtain a first value.
[0084] For example, the first value = HF1+HF2+...+HF k×k .
[0085] wherein HF1 represents the first high frequency component in the calculation window; HF2 represents the second high frequency component in the calculation window; HF k×k represents the k×k high frequency component in the calculation window.
[0086] In step S302, the terminal performs multiplication calculation on the first value to obtain a second value.
[0087] Exemplarily, the terminal performs square calculation on the first value to obtain the second value.
[0088] For example,
[0089] In step S303, the terminal performs multiplication calculation on each high frequency component in the calculation window to obtain a third value of each high frequency component.
[0090] Exemplarily, the terminal performs square calculation on each high frequency component in the calculation window to obtain the third value of each high frequency component.
[0091] For example, the third value of the i-th high frequency component = (HF i ) 2 .i is an integer greater than or equal to 1 and less than or equal to k×k.
[0092] In step S304, the terminal performs addition calculation on the plurality of third values to obtain a fourth value.
[0093] In some examples, the terminal accumulates the plurality of third values to obtain the fourth value.
[0094] For example,
[0095] In step S305, the terminal performs subtraction calculation on the second value and the fourth value to obtain a response value of the high frequency component.
[0096] Exemplarily, the response value of the high frequency component is the difference between the second value and the fourth value.
[0097] For example,
[0098] That is,
[0099] Response value = 2×(HF1×HF2+HF1×HF3+...+HF k×(k-1) ×HFk×k
[0100]
[0101] In the above formula, j is an integer greater than or equal to 1 and less than or equal to k x k.
[0102] Exemplarily, on the premise that the high frequency component includes noise and valid information, the principle of determining whether the high frequency component is noise by the response value of the embodiments of the present application is explained. For the convenience of description, the embodiments of the present application use D to represent the valid information and use N to represent the noise, that is, HF = D + N.
[0103] Then the above response value can be simplified as:
[0104]
[0105] When k is large enough, the image signal satisfies the law of large numbers, and then the above response value can be simplified as:
[0106] Response value = 2E(D i x D j ) + 2E(D i x N j ) + 2E(N i x D j ) + 2E(N i x N j ).
[0107] It should be understood that "k is large enough" is relative, for example, k is an integer greater than or equal to 10, and as the value of k increases, the effect of determining whether the corresponding high frequency component is noise according to the response value is better. Using the response value obtained by the calculation window with k less than 10, the high frequency component can still be determined to be noise, but the effect is not as good as using the response value obtained by the calculation window with k greater than or equal to 10 to determine whether the high frequency component is noise.
[0108] Since N and D are independent of each other, then
[0109] Response value = 2E(D i x D j ) + 2E(D i ) x E(N j ) + 2E(N i ) x E(D j ) + 2E(N i ) x E(N j );
[0110] In the above formula, E is the expected value of the image signal, and the expected value of the noise is 0, that is, E(N i ) = 0.
[0111] Then the response value = 2E(D i ×D j ).
[0112] Through the above analysis, it can be seen that the response value is only related to the effective information and is not related to the noise. Among them, the larger D i ×D j , the larger the response value. Therefore, through calculating the response value and determining whether the high-frequency component is noise according to the size of the response value, the embodiments of the present application solve the problem that in the related art, it is difficult to determine whether the high-frequency component is noise due to the size of the high-frequency component being close to the noise.
[0113] In step S205, the terminal determines whether the high-frequency component is noise based on the response value.
[0114] In some examples, the larger the response value, the more it can be indicated that the corresponding high-frequency component is effective information, that is, the corresponding high-frequency component is not noise; or the smaller the response value, the closer to 0, the more it can be indicated that the corresponding high-frequency component is not effective information, that is, the corresponding high-frequency component is noise.
[0115] Exemplarily, when the response value is greater than a preset threshold, the high-frequency component is not noise; or when the response value is less than or equal to the preset threshold, the high-frequency component is noise.
[0116] It should be noted that the preset threshold can be preset according to actual needs, and the embodiments of the present application will not be limited hereinafter.
[0117] The embodiments of the present application obtain a to-be-processed image; perform high-frequency extraction on the to-be-processed image to obtain a high-frequency image; the high-frequency image includes a plurality of high-frequency components; for each high-frequency component, a calculation window corresponding to the high-frequency component is obtained; the calculation window includes the high-frequency component and a plurality of high-frequency components in the neighborhood corresponding to the high-frequency component; the product of each two high-frequency components in the calculation window is added to obtain a response value of the high-frequency component; and whether the high-frequency component is noise is determined based on the response value. The above technical solution calculates the response value of the high-frequency component by calculating the high-frequency component and the plurality of high-frequency components in the neighborhood of the high-frequency component, and determines whether the high-frequency component is noise according to the response value, so that the noise standard deviation does not need to be calculated, and the size of the noise standard deviation and the high-frequency component does not need to be compared. In this way, not only can it be determined whether the high-frequency component is noise in the case where the size of the high-frequency component is close to the noise, but also can it be determined whether the high-frequency component is noise in the case where the size of the high-frequency component is not close to the noise, thereby improving the effect of image noise reduction.
[0118] Figure 4 is a structural schematic diagram of a device 400 for determining image noise according to an embodiment of the present application. The device 400 is used to determine whether the high-frequency component is noise. Figure 4The device for determining image noise is described in detail. The device comprises:
[0119] The first acquisition module 401 is configured to acquire a to-be-processed image; the to-be-processed image comprises a plurality of original pixels.
[0120] The high-frequency extraction module 402 is configured to perform high-frequency extraction on the to-be-processed image to obtain a high-frequency image; the high-frequency image comprises a plurality of high-frequency components, and each high-frequency component corresponds to an original pixel.
[0121] The second acquisition module 403 is configured to, for each high-frequency component, acquire a calculation window corresponding to the high-frequency component; the calculation window comprises the high-frequency component and a plurality of high-frequency components in a neighborhood corresponding to the high-frequency component.
[0122] The calculation module 404 is configured to perform addition calculation on the product of each two high-frequency components in the calculation window to obtain a response value of the high-frequency component.
[0123] The determination module 405 is configured to determine, based on the response value, whether the high-frequency component is noise.
[0124] The first acquisition module 401, the high-frequency extraction module 402, the second acquisition module 403, the calculation module 404, and the determination module 405 can all be implemented based on a semiconductor integrated circuit.
[0125] In some embodiments, the high-frequency extraction on the to-be-processed image to obtain the high-frequency image comprises:
[0126] High-pass filtering the to-be-processed image to obtain the high-frequency image;
[0127] Or low-pass filtering the to-be-processed image to obtain a low-frequency image;
[0128] Performing difference calculation on the to-be-processed image and the low-frequency image to obtain the high-frequency image.
[0129] In some embodiments, the calculation window is centered on the corresponding high-frequency component and comprises a plurality of rows and a plurality of columns;
[0130] Each row comprises k high-frequency components; k is an odd number greater than or equal to 3;
[0131] Each column comprises k high-frequency components.
[0132] In some embodiments, the addition calculation on the product of each two high-frequency components in the calculation window to obtain the response value of the high-frequency component comprises:
[0133] Performing addition calculation on the plurality of high-frequency components in the calculation window to obtain a first value;
[0134] Performing multiplication calculation on the first value to obtain a second value;
[0135] multiplying each high frequency component in the calculation window to obtain a third value of each high frequency component;
[0136] adding the plurality of third values to obtain a fourth value;
[0137] subtracting the second value and the fourth value to obtain a response value of the high frequency component.
[0138] In some embodiments, multiplying the first value to obtain the second value comprises:
[0139] squaring the first value to obtain the second value.
[0140] In some embodiments, multiplying each high frequency component in the calculation window to obtain a third value of each high frequency component comprises:
[0141] squaring each high frequency component in the calculation window to obtain a third value of each high frequency component.
[0142] In some embodiments, determining whether the high frequency component is noise based on the response value comprises:
[0143] when the response value is greater than a preset threshold, the high frequency component is not noise.
[0144] or when the response value is less than or equal to the preset threshold, the high frequency component is noise.
[0145] It should be noted that: the device for determining image noise provided in the above embodiments is only used as an example to illustrate the division of the above functional modules when performing the corresponding steps. In actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for determining image noise and the method for determining image noise provided in the above embodiments belong to the same concept, and the specific implementation process is described in the method embodiments, which will not be repeated here.
[0146] Embodiments of the present application acquire a to-be-processed image; perform high-frequency extraction on the to-be-processed image to obtain a high-frequency image; the high-frequency image comprises a plurality of high-frequency components; for each high-frequency component, a calculation window corresponding to the high-frequency component is acquired; the calculation window comprises the high-frequency component and a plurality of high-frequency components in a neighborhood corresponding to the high-frequency component; the product of each two high-frequency components in the calculation window is added to obtain a response value of the high-frequency component; and whether the high-frequency component is noise is determined based on the response value. The above technical solution performs calculation on the high-frequency component and a plurality of high-frequency components in the neighborhood of the high-frequency component to obtain a response value of the high-frequency component, and determines whether the high-frequency component is noise according to the response value, so that it is not necessary to calculate a noise standard deviation or compare the noise standard deviation and the high-frequency component. In this way, whether the high-frequency component is noise can be determined not only in the case where the high-frequency component and the noise are close in size, but also in the case where the high-frequency component and the noise are not close in size, thereby improving the effect of image noise reduction.
[0147] Embodiments of the present application also provide a computer device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor implements the above method when executing the computer program.
[0148] Taking the computer device as an example, Figure 5 is a structural schematic diagram of a terminal provided by embodiments of the present application, referring to Figure 5 The terminal 500 can be a smart phone, a tablet computer, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a notebook computer or a desktop computer. The terminal 500 can also be referred to as a user equipment, a portable terminal, a laptop terminal, a desktop terminal or other names.
[0149] Generally, the terminal 500 comprises a processor 501 and a memory 502.
[0150] The processor 501 can include one or more processing cores, such as a 4-core processor, a 5-core processor, and the like. The processor 501 can be implemented in at least one of a hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), a PLA (Programmable Logic Array). The processor 501 can also include a main processor and a coprocessor, the main processor being a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit), and the coprocessor being a low-power processor for processing data in a standby state. In some embodiments, the processor 501 can be integrated with a GPU (Graphics Processing Unit) for rendering and drawing content required to be displayed by the display screen. In some embodiments, the processor 501 can further include an AI (Artificial Intelligence) processor for processing machine learning related computing operations.
[0151] The memory 502 can include one or more computer-readable storage media that can be non-transitory. The memory 502 can also include a high-speed random access memory, and a nonvolatile memory such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 502 is used to store at least one program code for being executed by the processor 501 to implement the processes performed by the terminal in the above-described methods according to the method embodiments of the present application.
[0152] In some embodiments, the terminal 500 can also optionally include a peripheral device interface 503 and at least one peripheral device. The processor 501, the memory 502, and the peripheral device interface 503 can be connected through a bus or a signal line. Each peripheral device can be connected to the peripheral device interface 503 through a bus, a signal line, or a circuit board. Specifically, the peripheral device includes at least one of a display screen 504, a camera assembly 505, an audio circuit 506, and a power supply 507.
[0153] The peripheral interface 503 can be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 501 and the memory 502. In some embodiments, the processor 501, the memory 502 and the peripheral interface 503 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 501, the memory 502 and the peripheral interface 503 can be implemented on a separate chip or circuit board, and the embodiments of the present application do not limit this.
[0154] The display screen 504 is used to display a UI (User Interface). The UI can include graphics, text, icons, videos and any combination thereof. When the display screen 504 is a touch display screen, the display screen 504 also has the ability to collect touch signals on or above the surface of the display screen 504. The touch signals can be input as control signals to the processor 501 for processing. At this time, the display screen 504 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 504 can be one, arranged on the front panel of the terminal 500; in some other embodiments, the display screen 504 can be at least two, arranged on different surfaces of the terminal 500 or in a folding design; in some other embodiments, the display screen 504 can be a flexible display screen, arranged on a curved surface or a folding surface of the terminal 500. Even, the display screen 504 can also be arranged in an irregular shape other than a rectangle, that is, a special-shaped screen. The display screen 504 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0155] The camera assembly 505 is used to collect images or videos. In some embodiments, the camera assembly 505 includes a front camera and a rear camera. Generally, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, the rear camera is at least two, which are any one of a main camera, a depth-of-field camera, a wide-angle camera and a long-focus camera, to realize the background blur function of the main camera and the depth-of-field camera, the panorama shooting and VR (Virtual Reality) shooting function of the main camera and the wide-angle camera, or other fusion shooting functions. In some embodiments, the camera assembly 505 can also include a flash. The flash can be a single-color-temperature flash or a dual-color-temperature flash. The dual-color-temperature flash refers to the combination of a warm light flash and a cold light flash, which can be used for light compensation under different color temperatures.
[0156] The audio circuit 506 can include a microphone and a speaker. The microphone is used to collect sound waves of a user and an environment, and convert the sound waves into an electrical signal input to the processor 501 for processing. The microphone can be multiple for the purpose of stereo sound collection or noise reduction, and is arranged at different parts of the terminal 500 respectively. The microphone can also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert an electrical signal from the processor 501 into sound waves. The speaker can be a traditional diaphragm speaker, or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, the electrical signal can be converted into not only sound waves audible to human beings, but also sound waves inaudible to human beings for the purpose of ranging, etc. In some embodiments, the audio circuit 506 can further include a headphone jack.
[0157] The power supply 507 is used to supply power to various components in the terminal 500. The power supply 507 can be alternating current, direct current, disposable batteries or rechargeable batteries. When the power supply 507 includes rechargeable batteries, the rechargeable batteries can support wired charging or wireless charging. The rechargeable batteries can also be used to support fast charging technology.
[0158] Those skilled in the art can understand that the structure shown in FIG. 6 does not constitute a limitation on the terminal 500, and can include more or fewer components than shown, or combine certain components, or use different component arrangements. Figure 5 Those skilled in the art can understand that the structure shown in FIG. 6 does not constitute a limitation on the terminal 500, and can include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0159] Taking a computer device as an example, Figure 6 FIG. 6 is a structural schematic diagram of a server provided by an embodiment of the present application. The server 600 can have great differences due to different configurations or performances, and can include one or more processors (Central Processing Units, CPU) 601 and one or more memories 602. The one or more memories 602 store at least one computer program, which is loaded and executed by the one or more processors 601 to implement the above-mentioned method for determining image noise. Of course, the server 600 can also have a wired or wireless network interface, a keyboard, an input and output interface, and other components for realizing device functions, which are not described here in detail.
[0160] The embodiments of the present application further provide a computer readable storage medium including a stored computer program, wherein the computer readable storage medium controls a device where the computer readable storage medium is located to perform the method as above when the computer program is running. Optionally, the computer readable storage medium can be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact-Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0161] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by a program instructing relevant hardware to complete, and the program can be stored in a computer readable storage medium, and the storage medium mentioned above can be a Read-Only Memory, a magnetic disk or an optical disk, etc.
[0162] The above only describes optional embodiments of the present application, and is not intended to limit the present application, and any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method of determining image noise, characterized by, The method comprises the following steps: obtaining a to-be-processed image; the to-be-processed image comprises a plurality of original pixels; performing high-frequency extraction on the to-be-processed image to obtain a high-frequency image; the high-frequency image comprises a plurality of high-frequency components, and each high-frequency component corresponds to one original pixel; for each high-frequency component, a calculation window corresponding to the high-frequency component is obtained; the calculation window comprises the high-frequency component and a plurality of high-frequency components in the neighborhood of the high-frequency component; the product of each two high-frequency components in the calculation window is added to obtain the response value of the high-frequency component; based on the response value, it is determined whether the high-frequency component is noise.
2. The method of claim 1, wherein, The high-frequency extraction on the to-be-processed image to obtain a high-frequency image comprises: performing high-pass filtering on the to-be-processed image to obtain the high-frequency image; or performing low-pass filtering on the to-be-processed image to obtain a low-frequency image; performing difference calculation on the to-be-processed image and the low-frequency image to obtain the high-frequency image.
3. The method of claim 1, wherein, The calculation window is centered on the corresponding high-frequency component and comprises a plurality of rows and a plurality of columns; each row comprises k high-frequency components; k is an odd number greater than or equal to 3; each column comprises k high-frequency components.
4. The method of claim 1, wherein, The addition calculation of the product of each two high-frequency components in the calculation window to obtain the response value of the high-frequency component comprises: performing addition calculation on a plurality of high-frequency components in the calculation window to obtain a first value; performing multiplication calculation on the first value to obtain a second value; performing multiplication calculation on each high-frequency component in the calculation window to obtain a third value of each high-frequency component; performing addition calculation on a plurality of third values to obtain a fourth value; performing subtraction calculation on the second value and the fourth value to obtain the response value of the high-frequency component.
5. The method of claim 4, wherein, The multiplication calculation on the first value to obtain a second value comprises: performing square calculation on the first value to obtain the second value.
6. The method of claim 4, wherein, The multiplication calculation on each high-frequency component in the calculation window to obtain a third value of each high-frequency component comprises: performing square calculation on each high-frequency component in the calculation window to obtain a third value of each high-frequency component.
7. The method of claim 1, wherein, Based on the response value, it is determined whether the high-frequency component is noise, comprising: when the response value is greater than a preset threshold, the high-frequency component is not the noise; or when the response value is less than or equal to the preset threshold, the high-frequency component is the noise.
8. An apparatus for determining image noise, characterized by The method comprises the following steps: a first obtaining module is configured to obtain a to-be-processed image; the to-be-processed image comprises a plurality of original pixels; a high-frequency extraction module is configured to perform high-frequency extraction on the to-be-processed image to obtain a high-frequency image; the high-frequency image comprises a plurality of high-frequency components, and each high-frequency component corresponds to one original pixel; a second obtaining module is configured to, for each high-frequency component, obtain a calculation window corresponding to the high-frequency component; the calculation window comprises the high-frequency component and a plurality of high-frequency components in the neighborhood of the high-frequency component; a calculation module is configured to perform addition calculation on the product of each two high-frequency components in the calculation window to obtain the response value of the high-frequency component; A determining module is configured to determine whether the high-frequency component is noise based on the response value.
9. A computer device, comprising: The computer device comprises a processor and a memory, and the memory is configured to store at least one program, and the at least one program is loaded and executed by the processor to perform the method for determining image noise according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores at least one program, and the at least one program is loaded and executed by the processor to perform the method for determining image noise according to any one of claims 1 to 7.