Image noise reduction method, system and device based on distribution standardization alignment and medium
By standardizing the noise and texture in the image and using a pre-trained noise reduction model for processing, the problem of poor image noise reduction in the prior art is solved, and a more efficient image noise reduction effect is achieved.
Patent Information
- Application Number
- CN202411572984.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-02-11
AI Technical Summary
Existing image noise reduction methods fail to achieve expectations when processing images containing different intensities and types of noise.
By calculating the total number of pixels in the image to be processed, performing linear transformation of the standard normal distribution, obtaining a normal grayscale distribution, building a lookup table and mapping table, normalizing the image, and using a pre-trained noise reduction model for noise reduction processing , and finally perform grayscale distribution inverse mapping to obtain the final output image.
It effectively solves the problem of denoising images with different intensities and types, and improves the effect and efficiency of image noise reduction.
Smart Images

Figure CN119417724A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image denoising, and in particular to an image denoising method, system, device and medium based on distribution standardization alignment. Background Art
[0002] In modern medicine, medical images play a vital role in modern clinical diagnosis and treatment. They provide doctors with intuitive and visual information about in vivo tissues and are an important basis for disease diagnosis, clinical treatment, and teaching and scientific research. Among them, medical image denoising is an important step to ensure diagnostic accuracy and image quality.
[0003] However, since medical images are usually accompanied by noise from different sources (such as equipment noise, motion artifacts, etc.), the noise intensity is uneven and the distribution is complex. The existing image denoising methods cannot achieve the expected denoising effect when processing images containing noise of different intensities and types. Summary of the invention
[0004] The present invention provides an image denoising method, system, device and medium based on distribution standardization alignment, the main purpose of which is to solve the problem that the existing image denoising method cannot achieve the expected denoising effect when processing images containing noise of different intensities and types by standardizing the noise and texture in the aligned images.
[0005] To achieve the above object, the present invention provides an image denoising method based on distribution normalization alignment, comprising:
[0006] Calculate the total number of pixels of the image to be processed;
[0007] Linearly transforming the pre-acquired standard normal distribution and the total number of pixels to obtain a normal grayscale distribution;
[0008] Calculating the initial grayscale distribution of the image to be processed, and constructing a lookup table and a mapping table within the value range of each pixel according to the initial grayscale distribution and the normal grayscale distribution;
[0009] Using the lookup table to perform standardization adjustment on the pixel values of the image to be processed to obtain a standardized image;
[0010] Performing denoising processing on the standardized image using a pre-trained denoising model to obtain a denoised image;
[0011] The grayscale distribution of the de-noised image is inversely mapped to obtain a final output image.
[0012] Optionally, calculating the total number of pixels of the image to be processed includes:
[0013] Converting the image to be processed into a floating point data format to obtain a floating point format image;
[0014] Obtaining size data of the floating point format image;
[0015] The total number of pixels of the floating point image is calculated according to the size data.
[0016] Optionally, the calculating the initial grayscale distribution of the image to be processed includes:
[0017] Performing grayscale processing on the floating-point format image to obtain a grayscale image;
[0018] Calculating the grayscale image histogram;
[0019] The histogram is normalized to obtain an initial grayscale distribution.
[0020] Optionally, constructing a lookup table and a mapping table within each pixel value range according to the initial grayscale distribution and the normal grayscale distribution includes:
[0021] Construct a matrix of preset size to obtain the mapping matrix;
[0022] Mapping the normal grayscale distribution and the initial grayscale distribution into the mapping matrix to obtain a mapping table;
[0023] The normal grayscale distribution is used as an input value and the initial grayscale distribution is used as an output value to fill the mapping matrix to obtain a lookup table.
[0024] Optionally, the step of using the lookup table to perform standardization adjustment on the pixel values of the image to be processed to obtain a standardized image includes:
[0025] Reading the pixel value of each pixel point of the image to be processed in sequence to obtain a pixel value set;
[0026] Obtaining the input value corresponding to each pixel value in the pixel value set in the mapping table to obtain an input value set;
[0027] Each input value in the input value set is used to replace a pixel point in the image to be processed to obtain a standardized image.
[0028] Optionally, before performing denoising processing on the standardized image using a pre-trained denoising model to obtain a denoised image, the method further includes:
[0029] Convert the pre-acquired training sample images into floating point data format to obtain floating point training samples;
[0030] Adding random noise to the floating-point training samples to obtain floating-point noise samples;
[0031] De-noising the floating point noise sample using a pre-built model to obtain a sample de-noised image;
[0032] Calculating the gradient value between the sample denoised image and the training sample image;
[0033] If the gradient value is greater than a preset gradient threshold, after optimizing the hyperparameters of the model according to the gradient value using a back propagation algorithm, return to the step of denoising the floating point noise sample using a pre-built model to obtain a sample denoised image;
[0034] If the gradient value is less than the preset gradient threshold, the model training is confirmed to be completed and the denoising model is obtained.
[0035] Optionally, performing grayscale distribution inverse mapping on the denoised image to obtain a final output image includes:
[0036] Reading the pixel value of each pixel point of the denoised image in sequence to obtain a denoised pixel value set;
[0037] Find the output value corresponding to each pixel value in the denoised pixel value set in the lookup table to obtain an output value set;
[0038] Each pixel in the denoised image is replaced by each output value in the output value set to obtain a final output image.
[0039] In order to solve the above problem, the present invention also provides an image denoising system based on distribution normalization alignment, the system comprising:
[0040] A data calculation module is used to calculate the total number of pixels of the image to be processed, and to perform a linear transformation between the pre-acquired standard normal distribution and the total number of pixels to obtain a normal grayscale distribution;
[0041] A dual table construction module, used for linearly transforming the pre-acquired standard normal distribution and the total number of pixels to obtain a normal grayscale distribution;
[0042] A data adjustment module, used for calculating the initial grayscale distribution of the image to be processed, and constructing a lookup table and a mapping table within the value range of each pixel according to the initial grayscale distribution and the normal grayscale distribution;
[0043] The image denoising module is used to perform denoising on the standardized image using a pre-trained denoising model to obtain a denoised image, and to perform grayscale distribution inverse mapping on the denoised image to obtain a final output image.
[0044] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0045] at least one processor;
[0046] and, a memory communicatively coupled to the at least one processor;
[0047] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the above-mentioned image denoising method based on distribution normalization alignment.
[0048] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned image denoising method based on distribution normalization alignment.
[0049] The embodiment of the present invention calculates the total number of pixels of the image to be processed, linearly transforms the pre-acquired standard normal distribution and the total number of pixels to obtain a normal grayscale distribution, calculates the initial grayscale distribution of the image to be processed, constructs a lookup table and a mapping table in each pixel value domain according to the initial grayscale distribution and the normal grayscale distribution, uses the lookup table to standardize the pixel values of the image to be processed to obtain a standardized image, uses a pre-trained denoising model to perform denoising on the standardized image to obtain a denoised image, and performs grayscale distribution inverse mapping on the denoised image to obtain a final output image. Therefore, the image denoising method, system, electronic device and computer-readable storage medium based on distribution standardization alignment proposed by the present invention can solve the problem that the existing image denoising method cannot achieve the expected denoising effect when processing images containing noise of different intensities and types by standardizing the noise and texture in the aligned image. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A schematic diagram of a process of an image denoising method based on distribution normalization alignment provided by an embodiment of the present invention;
[0051] Figure 2 A schematic diagram of a process for calculating an initial grayscale distribution provided by an embodiment of the present invention;
[0052] Figure 3 A schematic diagram of a grayscale distribution inverse mapping process provided by an embodiment of the present invention;
[0053] Figure 4 A functional module diagram of an image denoising system based on distribution normalization alignment provided by an embodiment of the present invention;
[0054] Figure 5 A schematic diagram of the structure of an electronic device for implementing the image denoising method based on distribution normalization alignment provided by an embodiment of the present invention;
[0055] Figure 6 An algorithm flow chart of a distribution standardization alignment is provided for an embodiment of the present invention;
[0056] Figure 7 A comparison diagram of the effects before and after the distribution standardization alignment is provided for an embodiment of the present invention;
[0057] Figure 8 Provide a distribution standardization alignment noise reduction effect diagram for an embodiment of the present invention;
[0058] Fig. 9 Provide a noise reduction effect diagram for an embodiment of the present invention;
[0059] Fig.10 A comparison diagram of the effect of local noise reduction in an embodiment of the present invention;
[0060] Fig.11 This is another comparison diagram of the local noise reduction effect in an embodiment of the present invention.
[0061] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0062] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0063] The embodiment of the present application provides an image denoising method based on distribution standardization alignment. The execution subject of the image denoising method based on distribution standardization alignment includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the image denoising method based on distribution standardization alignment can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
[0064] Reference Figure 1 FIG. 1 is a flow chart of an image denoising method based on distribution standardization alignment provided by an embodiment of the present invention. In this embodiment, the image denoising method based on distribution standardization alignment includes:
[0065] S1. Calculate the total number of pixels of the image to be processed.
[0066] In the embodiment of the present invention, the calculation of the total number of pixels of the image to be processed requires first converting the image to be processed into a floating point format, obtaining the size data of the converted image, and calculating the total number of pixels based on the size data.
[0067] In the embodiment of the present invention, the image to be processed is an image containing noise, wherein the noise of the image to be processed is non-uniformly distributed, and the texture of the image to be processed is also non-uniformly distributed.
[0068] In the embodiment of the present invention, the step of calculating the total number of pixels of the image to be processed includes:
[0069] Converting the image to be processed into a floating point data format to obtain a floating point format image;
[0070] Obtaining size data of the floating point format image;
[0071] The total number of pixels of the floating point image is calculated according to the size data.
[0072] In the embodiment of the present invention, converting the image to be processed into a floating-point data format to obtain a floating-point image means converting the pixel value of each pixel of the image to be processed into a 32-bit floating-point number, which can provide a higher dynamic range and precision, and improve the accuracy of subsequent calculations.
[0073] In the embodiment of the present invention, the size data of the floating point format image refers to the number of horizontal pixels and the number of vertical pixels of the floating point format image.
[0074] In detail, calculating the total number of pixels of the floating-point image according to the size data refers to multiplying the number of horizontal pixels by the number of vertical pixels to obtain the total number of pixels.
[0075] In the embodiment of the present invention, the efficiency of subsequently obtaining a normal grayscale distribution is improved by calculating the total number of pixels of the image to be processed.
[0076] S2. Linearly transform the pre-acquired standard normal distribution and the total number of pixels to obtain a normal grayscale distribution.
[0077] In the embodiment of the present invention, the standard normal distribution is also called Z distribution, which is a special normal distribution. It is characterized by a mean of 0 and a standard deviation of 1. In statistics, the standard normal distribution is often used as a benchmark for comparing and standardizing other normal distribution data.
[0078] In the embodiment of the present invention, before performing a linear transformation on the pre-acquired standard normal distribution and the total number of pixels to obtain a normal grayscale distribution, the method further includes:
[0079] The standard normal distribution is expressed by the following formula:
[0080]
[0081] Wherein, f(x) is the functional expression of the standard normal distribution, e is the base of the natural logarithm, and x is a random variable that can take any value within the range of real numbers. Figure 6 As shown, an algorithm flow chart of a distribution standardization alignment is provided according to an embodiment of the present invention.
[0082] In the embodiment of the present invention, performing a linear transformation on the pre-acquired standard normal distribution and the total number of pixels refers to multiplying the standard normal distribution by the total number of pixels to obtain the normal grayscale distribution.
[0083] In the embodiment of the present invention, a normal grayscale distribution is obtained by linearly transforming the pre-acquired standard normal distribution and the total number of pixels, thereby improving the accuracy of the subsequent construction of the lookup table and the mapping table.
[0084] S3. Calculate the initial grayscale distribution of the image to be processed, and construct a lookup table and a mapping table within each pixel value range according to the initial grayscale distribution and the normal grayscale distribution.
[0085] In the embodiment of the present invention, the initial grayscale distribution of the image to be processed refers to the distribution of pixels of different grayscale levels in the image to be processed in the entire image, which reflects the brightness and contrast characteristics of the image and is of great significance for image analysis and processing.
[0086] In the embodiment of the present invention, referring to Figure 2 As shown, a schematic diagram of a process for calculating an initial grayscale distribution is provided in an embodiment of the present invention, wherein the process of calculating the initial grayscale distribution of the image to be processed includes:
[0087] S21, performing grayscale processing on the floating point format image to obtain a grayscale image;
[0088] S22, calculating the grayscale image histogram;
[0089] S23, normalizing the histogram to obtain an initial grayscale distribution.
[0090] In the embodiment of the present invention, the grayscale image histogram is calculated.
[0091] In detail, the grayscale processing of the floating point format image is a process of converting the floating point format image into a grayscale image, and the average value of the RGB value of each pixel can be taken as the grayscale value.
[0092] In detail, the histogram is a statistical chart describing the number of pixels at each gray level in an image.
[0093] In detail, the calculation of the grayscale image histogram may be achieved by creating an array to store the count of each gray level.
[0094] In the embodiment of the present invention, the normalization process for the histogram to obtain the initial grayscale distribution is performed by dividing each grayscale count in the histogram by the total number of pixels to obtain the relative frequency of each grayscale.
[0095] In the embodiment of the present invention, the lookup table is a table that maps input grayscale values to output grayscale values, and the mapping table is a table used to describe the corresponding relationship between two set elements.
[0096] In an embodiment of the present invention, the step of constructing a lookup table and a mapping table within the value range of each pixel according to the initial grayscale distribution and the normal grayscale distribution includes:
[0097] Construct a matrix of preset size to obtain the mapping matrix;
[0098] Mapping the normal grayscale distribution and the initial grayscale distribution into the mapping matrix to obtain a mapping table;
[0099] The normal grayscale distribution is used as an input value and the initial grayscale distribution is used as an output value to fill the mapping matrix to obtain a lookup table.
[0100] In detail, the matrix of the preset size may be a matrix of 2*65535 size.
[0101] In detail, the mapping of the normal grayscale distribution and the initial grayscale distribution into the mapping matrix is performed in sequence according to the subscript construction of the normal grayscale distribution and the initial grayscale distribution.
[0102] In an embodiment of the present invention, by calculating the initial grayscale distribution of the image to be processed, the efficiency of constructing a mapping table and a lookup table is improved. By constructing a lookup table and a mapping table within each pixel value domain based on the initial grayscale distribution and the normal grayscale distribution, the efficiency of standardizing the image to be processed is improved.
[0103] S4. Standardize and adjust the pixel values of the image to be processed using the lookup table to obtain a standardized image.
[0104] In the embodiment of the present invention, the use of the lookup table to perform standardization adjustment on the pixel values of the image to be processed refers to calculating the pixel value of each pixel value of the image to be processed after being mapped in the mapping table.
[0105] In the embodiment of the present invention, the step of using the lookup table to perform standardization adjustment on the pixel values of the image to be processed to obtain a standardized image includes:
[0106] Reading the pixel value of each pixel point of the image to be processed in sequence to obtain a pixel value set;
[0107] Obtaining the input value corresponding to each pixel value in the pixel value set in the mapping table to obtain an input value set;
[0108] Each input value in the input value set is used to replace a pixel point in the image to be processed to obtain a standardized image.
[0109] In the embodiment of the present invention, the pixel values of the image to be processed are standardized by using the lookup table to obtain a standardized image, thereby improving the efficiency of subsequent noise reduction processing.
[0110] S5. Perform denoising on the standardized image using a pre-trained denoising model to obtain a denoised image.
[0111] In the embodiment of the present invention, the noise reduction model may be a dense link model.
[0112] In detail, the denoising model includes 4 densely linked blocks, each of which includes 4 convolutional units, each of which includes 1 convolutional layer with a convolution kernel of 3x3, 1 BN layer, and 1 ReLU activation function layer.
[0113] In an embodiment of the present invention, the pre-trained denoising model is obtained by converting pre-acquired training samples into a 32-bit floating-point data format, adding random noise to the training samples to obtain noise training samples, denoising the noise training samples using the denoising model, comparing the obtained denoised image with the original training samples, and continuously optimizing the model parameters according to the comparison results until a preset number of iterations is reached, confirming that the denoising model training is completed.
[0114] In the embodiment of the present invention, before the denoising process is performed on the standardized image using the pre-trained denoising model to obtain the denoised image, the method further includes:
[0115] Convert the pre-acquired training sample images into floating point data format to obtain floating point training samples;
[0116] Adding random noise to the floating-point training samples to obtain floating-point noise samples;
[0117] De-noising the floating point noise sample using a pre-built model to obtain a sample de-noised image;
[0118] Calculating the gradient value between the sample denoised image and the training sample image;
[0119] If the gradient value is greater than a preset gradient threshold, after optimizing the hyperparameters of the model according to the gradient value using a back propagation algorithm, return to the step of denoising the floating point noise sample using a pre-built model to obtain a sample denoised image;
[0120] If the gradient value is less than the preset gradient threshold, the model training is confirmed to be completed and the denoising model is obtained.
[0121] In the embodiment of the present invention, the denoising process is performed on the standardized image by using a pre-trained denoising model to obtain a denoised image, thereby improving the efficiency of subsequent grayscale distribution inverse mapping.
[0122] S6. Perform grayscale distribution inverse mapping on the denoised image to obtain a final output image.
[0123] In the embodiment of the present invention, the performing grayscale distribution inverse mapping on the denoised image refers to restoring the grayscale distribution of the denoised image from a standard normal distribution to an initial state.
[0124] In the embodiment of the present invention, referring to Figure 3 As shown, a schematic diagram of a grayscale distribution inverse mapping process is provided in an embodiment of the present invention, wherein the grayscale distribution inverse mapping is performed on the denoised image to obtain a final output image, including:
[0125] S31, sequentially reading the pixel value of each pixel point of the denoised image to obtain a denoised pixel value set;
[0126] S32, searching the lookup table for the output value corresponding to each pixel value in the denoised pixel value set to obtain an output value set;
[0127] S33. Replace each pixel in the denoised image with each output value in the output value set to obtain a final output image.
[0128] Reference Figure 7 As shown, a comparison diagram of the effects before and after a distribution standardization alignment is provided in an embodiment of the present invention.
[0129] Reference Figure 8 As shown, a noise reduction effect diagram of distribution standardization alignment is provided in an embodiment of the present invention.
[0130] Reference Fig. 9 As shown, an embodiment of the present invention provides a noise reduction effect diagram, through Figure 8 contrast, Fig. 9 There is obviously a problem of uneven noise reduction.
[0131] Reference Fig.10 , which is a comparison diagram of the effect of local noise reduction in an embodiment of the present invention.
[0132] Reference Fig.11 , which is another comparison diagram of the local noise reduction effect in the embodiment of the present invention. In the embodiment of the present invention, the final output image is obtained by performing grayscale distribution inverse mapping on the noise reduction image, thereby improving the noise reduction effect on the image to be processed.
[0133] like Figure 4 , which is a functional module diagram of an image denoising system based on distribution normalization alignment provided by an embodiment of the present invention.
[0134] The image denoising system 100 based on distribution standardization alignment of the present invention can be installed in an electronic device. According to the functions to be implemented, the image denoising system 100 based on distribution standardization alignment can include a data calculation module 101, a dual table construction module 102, a data adjustment module 103 and an image denoising module 104. The module of the present invention can also be referred to as a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0135] In this embodiment, the functions of each module / unit are as follows:
[0136] The data calculation module 101 is used to calculate the total number of pixels of the image to be processed, and to perform a linear transformation between the pre-acquired standard normal distribution and the total number of pixels to obtain a normal grayscale distribution;
[0137] The dual table construction module 102 is used to perform a linear transformation on the pre-acquired standard normal distribution and the total number of pixels to obtain a normal grayscale distribution;
[0138] The data adjustment module 103 is used to calculate the initial grayscale distribution of the image to be processed, and to construct a lookup table and a mapping table within each pixel value domain according to the initial grayscale distribution and the normal grayscale distribution;
[0139] The image denoising module 104 is used to perform denoising on the standardized image using a pre-trained denoising model to obtain a denoised image, and perform grayscale distribution inverse mapping on the denoised image to obtain a final output image.
[0140] In detail, each module described in the image denoising system 100 based on distribution normalization alignment in the embodiment of the present invention is used in the same manner as described above. Figures 1 to 3 The image denoising method based on distribution normalization alignment described in the invention has the same technical means and can produce the same technical effect, so it will not be repeated here.
[0141] like Figure 5 , which is a schematic diagram of the structure of an electronic device of an image denoising method based on distribution normalization alignment provided by an embodiment of the present invention.
[0142] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as an image denoising program based on distribution normalization alignment.
[0143] In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (such as image denoising programs based on distribution standardization alignment, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device and process data.
[0144] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device, such as the code of an image denoising program based on distribution standardization alignment, but also can be used to temporarily store data that has been output or is to be output.
[0145] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0146] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in this embodiment, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.
[0147] The figure only shows an electronic device with components. Those skilled in the art will understand that the structure shown in the figure does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0148] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0149] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0150] The image denoising program based on distribution standardization alignment stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:
[0151] Calculate the total number of pixels of the image to be processed;
[0152] Linearly transforming the pre-acquired standard normal distribution and the total number of pixels to obtain a normal grayscale distribution;
[0153] Calculating the initial grayscale distribution of the image to be processed, and constructing a lookup table and a mapping table within the value range of each pixel according to the initial grayscale distribution and the normal grayscale distribution;
[0154] Using the lookup table to perform standardization adjustment on the pixel values of the image to be processed to obtain a standardized image;
[0155] Performing denoising processing on the standardized image using a pre-trained denoising model to obtain a denoised image;
[0156] The grayscale distribution of the de-noised image is inversely mapped to obtain a final output image.
[0157] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.
[0158] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0159] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:
[0160] Calculate the total number of pixels of the image to be processed;
[0161] Linearly transforming the pre-acquired standard normal distribution and the total number of pixels to obtain a normal grayscale distribution;
[0162] Calculating the initial grayscale distribution of the image to be processed, and constructing a lookup table and a mapping table within the value range of each pixel according to the initial grayscale distribution and the normal grayscale distribution;
[0163] Using the lookup table to perform standardization adjustment on the pixel values of the image to be processed to obtain a standardized image;
[0164] Performing denoising processing on the standardized image using a pre-trained denoising model to obtain a denoised image;
[0165] The grayscale distribution of the de-noised image is inversely mapped to obtain a final output image.
[0166] In the embodiments provided by the present invention, it should be understood that the disclosed devices, systems and methods can be implemented in other ways. For example, the system embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0167] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0168] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0169] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0170] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0171] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0172] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
[0173] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. An image denoising method based on distribution normalization alignment, characterized in that: The method comprises: Calculate the total number of pixels of the image to be processed; Linearly transforming the pre-acquired standard normal distribution and the total number of pixels to obtain a normal grayscale distribution; Calculating the initial grayscale distribution of the image to be processed, and constructing a lookup table and a mapping table within the value range of each pixel according to the initial grayscale distribution and the normal grayscale distribution; Using the lookup table to perform standardization adjustment on the pixel values of the image to be processed to obtain a standardized image; Performing denoising processing on the standardized image using a pre-trained denoising model to obtain a denoised image; The grayscale distribution of the de-noised image is inversely mapped to obtain a final output image.
2. The image denoising method based on distribution normalization alignment according to claim 1, characterized in that: The calculating the total number of pixels of the image to be processed comprises: Converting the image to be processed into a floating point data format to obtain a floating point format image; Obtaining size data of the floating point format image; The total number of pixels of the floating point image is calculated according to the size data.
3. The image denoising method based on distribution normalization alignment as claimed in claim 2, characterized in that: The calculating the initial grayscale distribution of the image to be processed comprises: Performing grayscale processing on the floating-point format image to obtain a grayscale image; Calculating the grayscale image histogram; The histogram is normalized to obtain an initial grayscale distribution.
4. The image denoising method based on distribution normalization alignment according to claim 1, characterized in that: The step of constructing a lookup table and a mapping table within each pixel value range according to the initial grayscale distribution and the normal grayscale distribution includes: Construct a matrix of preset size to obtain the mapping matrix; Mapping the normal grayscale distribution and the initial grayscale distribution into the mapping matrix to obtain a mapping table; The normal grayscale distribution is used as an input value and the initial grayscale distribution is used as an output value to fill the mapping matrix to obtain a lookup table.
5. The image denoising method based on distribution normalization alignment according to claim 1, characterized in that: The step of using the lookup table to perform standardization adjustment on the pixel values of the image to be processed to obtain a standardized image includes: Reading the pixel value of each pixel point of the image to be processed in sequence to obtain a pixel value set; Obtaining the input value corresponding to each pixel value in the pixel value set in the mapping table to obtain an input value set; Each input value in the input value set is used to replace a pixel point in the image to be processed to obtain a standardized image.
6. The image denoising method based on distribution normalization alignment according to claim 1, characterized in that: Before performing denoising processing on the standardized image using the pre-trained denoising model to obtain the denoised image, the method further includes: Convert the pre-acquired training sample images into floating point data format to obtain floating point training samples; Adding random noise to the floating-point training samples to obtain floating-point noise samples; De-noising the floating point noise sample using a pre-built model to obtain a sample de-noised image; Calculating the gradient value between the sample denoised image and the training sample image; If the gradient value is greater than a preset gradient threshold, after optimizing the hyperparameters of the model according to the gradient value using a back propagation algorithm, return to the step of denoising the floating point noise sample using a pre-built model to obtain a sample denoised image; If the gradient value is less than the preset gradient threshold, the model training is confirmed to be completed and the denoising model is obtained.
7. The image denoising method based on distribution normalization alignment according to claim 1, characterized in that: The performing grayscale distribution inverse mapping on the denoised image to obtain a final output image comprises: Reading the pixel value of each pixel point of the denoised image in sequence to obtain a denoised pixel value set; Find the output value corresponding to each pixel value in the denoised pixel value set in the lookup table to obtain an output value set; Each pixel in the denoised image is replaced by each output value in the output value set to obtain a final output image.
8. An image denoising system based on distribution normalization alignment, characterized in that: The system comprises: A data calculation module is used to calculate the total number of pixels of the image to be processed, and to perform a linear transformation between the pre-acquired standard normal distribution and the total number of pixels to obtain a normal grayscale distribution; A dual table construction module, used for linearly transforming the pre-acquired standard normal distribution and the total number of pixels to obtain a normal grayscale distribution; A data adjustment module, used for calculating the initial grayscale distribution of the image to be processed, and constructing a lookup table and a mapping table within the value range of each pixel according to the initial grayscale distribution and the normal grayscale distribution; The image denoising module is used to perform denoising on the standardized image using a pre-trained denoising model to obtain a denoised image, and to perform grayscale distribution inverse mapping on the denoised image to obtain a final output image.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the image denoising method based on distribution normalization alignment as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the image denoising method based on distribution normalization alignment as claimed in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Training system and training method of video noise reduction model, and related products
CN122265073A