Noise parameter determination method and device, electronic equipment and storage medium
By acquiring and fitting the color reference tool data of the image sensor, the noise parameters are automatically obtained, which solves the problems of low efficiency and insufficient accuracy in noise parameter acquisition in traditional methods, and achieves efficient and accurate noise parameter acquisition and training data construction.
Patent Information
- Application Number
- CN202410692454.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2024-10-11
AI Technical Summary
Traditional methods require a lot of manual operations in noise reduction tasks in image and video processing, which are inefficient and costly. How to obtain noise parameters efficiently and accurately to construct training data is an urgent problem that needs to be solved.
By obtaining the original image data collected by the target sensor based on the color reference tool under set conditions, converting it into a standard image, obtaining the pixel mean and variance of the specific color area, and obtaining the Poisson noise parameters and Gaussian noise parameters through linear regression fitting , automatically obtain the noise parameters, and adjust the exposure time and simulation gain in sequence to determine the target noise parameters with the smallest fitting error.
It realizes the automatic acquisition of noise parameters, improves the accuracy of noise parameter acquisition, reduces the need for manual operations, and improves the quality and efficiency of training data.
Smart Images

Figure CN118764730A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a noise parameter determination method, device, electronic device and storage medium. Background Art
[0002] In image and video processing, especially in noise reduction tasks, obtaining a large number of pairs of noisy images and corresponding noise-free images as training data is the key to improving the performance of noise reduction models. However, traditional data collection methods require a lot of manual operations, which is inefficient and costly. To solve this problem, a common method is to simulate and generate noisy images through the noise parameters of CMOS (Complementary Metal Oxide Semiconductor) image sensors, thereby constructing a large amount of training data. The accuracy of noise parameters in this common method is particularly important. Therefore, how to efficiently and accurately obtain noise parameters has become a problem to be solved. Summary of the invention
[0003] Embodiments of the present application provide a noise parameter determination method, device, electronic device, and storage medium.
[0004] According to the first aspect of the present application, a noise parameter determination method is provided, the method comprising: obtaining raw image data collected by a target sensor under set conditions based on a color reference tool, the set conditions comprising simulation conditions, initial simulation gain and initial exposure time; converting the raw image data into a standard image of a set format, and obtaining multiple specific color areas of the standard image and coordinate data of the specific color areas; obtaining a pixel mean and variance of each specific color area based on the coordinate data of the specific color area; fitting the pixel mean and variance of each specific color area to obtain a fitting result, the fitting result comprising noise parameters, and the noise parameters comprising Poisson noise parameters and Gaussian noise parameters.
[0005] According to one embodiment of the present application, the method also includes: determining the remaining multiple exposure times to be adjusted based on the exposure time adjustment range, the initial exposure time and the set time step; sequentially obtaining the candidate noise parameters under each exposure time to be adjusted; based on the fitting results of the noise parameters and each candidate noise parameter, calculating the fitting errors of the noise parameters and each candidate noise parameter; and determining the target noise parameter with the smallest fitting error from the noise parameters and each candidate noise parameter.
[0006] According to an embodiment of the present application, the method further includes: determining a plurality of remaining analog gains to be adjusted based on the gain adjustment range, the initial analog gain and the set gain step; and sequentially acquiring target noise parameters under each analog gain to be adjusted.
[0007] According to one embodiment of the present application, the original image data includes multiple original images; accordingly, the original image data is converted into a standard image of a set format, and multiple specific color areas of the standard image and coordinate data of the specific color areas are obtained, including: performing multi-frame averaging processing on the multiple original images to obtain images to be converted; converting the images to be converted into a standard image of a set format; and obtaining multiple specific color areas of the standard image and coordinate data of the specific color areas based on the color positioning method corresponding to the color reference tool.
[0008] According to one embodiment of the present application, obtaining the pixel mean and variance of each specific color area based on the coordinate data of the specific color area includes: determining the length and width of each specific color area based on the coordinate data of the specific color area; determining the pixel mean of each specific color area based on the length and width of each specific color area; determining the variance of each specific color area based on the length, width and pixel mean of each specific color area.
[0009] According to one embodiment of the present application, the pixel mean and variance of each specific color area are fitted, including: determining the pixel mean and variance corresponding to each specific color area as a discrete point to obtain a discrete point set; and fitting the discrete point set using a linear regression method.
[0010] According to one embodiment of the present application, the use of a linear regression method to fit the discrete point set includes: removing discrete points in the discrete point set whose pixel means are greater than a set pixel mean to obtain a target discrete point set; and fitting the target discrete point set using a linear regression method.
[0011] According to a second aspect of the present application, a noise parameter determination device is provided, which includes: a first acquisition module, used to acquire original image data collected by a target sensor based on a color reference tool under set conditions, wherein the set conditions include simulation conditions, initial simulation gain and initial exposure time; a second acquisition module, used to convert the original image data into a standard image of a set format, and acquire multiple specific color areas of the standard image and coordinate data of the specific color areas; a third acquisition module, used to acquire a pixel mean and variance of each specific color area based on the coordinate data of the specific color area; a fitting module, used to fit the pixel mean and variance of each specific color area to obtain a fitting result, wherein the fitting result includes noise parameters, and the noise parameters include Poisson noise parameters and Gaussian noise parameters.
[0012] According to a third aspect of the present application, an electronic device is provided, including:
[0013] at least one processor; and
[0014] a memory communicatively connected to the at least one processor; wherein,
[0015] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the present application.
[0016] According to a fourth aspect of the present application, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the present application.
[0017] The method of the embodiment of the present application can realize automatic acquisition of noise parameters by acquiring a specific color area corresponding to the original image data, determining the pixel mean and variance of the specific color area, and fitting the pixel mean and variance of multiple specific color areas based on linear regression to obtain noise parameters. Thereafter, the noise parameters under multiple exposure times that need to be adjusted are sequentially acquired, and the target noise parameters with the smallest fitting error are determined, thereby further improving the accuracy of acquiring the target noise parameters.
[0018] It should be understood that the teachings of the present application are not required to achieve all of the beneficial effects described above, but specific technical solutions can achieve specific technical effects, and other embodiments of the present application can also achieve beneficial effects not mentioned above. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become readily understood. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, wherein:
[0020] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.
[0021] Figure 1 The following is a schematic diagram showing the implementation process of the noise parameter determination method provided in the embodiment of the present application. Figure 1 ;
[0022] Figure 2 The following is a schematic diagram showing the implementation process of the noise parameter determination method provided in the embodiment of the present application. Figure 2 ;
[0023] Figure 3 A schematic diagram showing the structure of a noise parameter determination device provided in an embodiment of the present application is shown;
[0024] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0025] In order to make the purpose, features, and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0026] First, the application scenario of the present application is explained. The CMOS image sensor mainly involves photon shot noise, readout noise, row noise and quantization noise in the imaging process. Since the image noise of CMOS conforms to the Poisson-Gaussian distribution, the above noise can usually be counted as Poisson noise representing photon shot noise and Gaussian noise representing readout noise and other random noise. The noise simulation based on noise parameters is usually a simulation based on Poisson noise parameters and Gaussian noise parameters. The noisy image generation simulation based on noise parameters can usually be understood as a Poisson-Gaussian noise model constructed based on noise parameters to perform a noisy image generation simulation. Generally, the image noise of a CMOS image sensor can be simplified to a Poisson-Gaussian noise model based on Poisson noise parameters and Gaussian noise parameters:
[0027]
[0028] in, represents the Poisson distribution, represents Gaussian distribution, x * is an image not contaminated by noise, x is a noisy image, K and B are noise parameters, K represents the Poisson noise parameter corresponding to Poisson noise, and B represents the Gaussian noise parameter corresponding to Gaussian noise.
[0029] In this way, when the Poisson noise parameters and Gaussian noise parameters are obtained, the generation simulation of the noisy image can be completed based on the Poisson-Gaussian noise model constructed by the Poisson noise parameters and Gaussian noise parameters. Further, when the image noise of CMOS conforms to the Poisson-Gaussian distribution, the Poisson noise parameters and Gaussian noise parameters conform to the following relationship:
[0030] Var(x)=Kx+B
[0031] Among them, Var(x) represents variance, and x represents pixel mean. Therefore, the problem of obtaining Poisson noise parameters and Gaussian noise parameters can be transformed into a linear regression problem based on Var(x)=Kx+B. Therefore, the process of obtaining Poisson noise parameters and Gaussian noise parameters can be understood as the process of obtaining Poisson noise parameters and Gaussian noise parameters by obtaining variance and pixel mean. Therefore, the present application provides a noise parameter determination method, which determines Poisson noise parameters and Gaussian noise parameters by automatically obtaining variance and pixel mean, providing a basis for the subsequent Poisson-Gaussian noise model based on Poisson noise parameters and Gaussian noise parameters to obtain noisy images for training data.
[0032] Figure 1 A schematic diagram of the implementation flow of the noise parameter determination method provided in an embodiment of the present application is shown.
[0033] refer to Figure 1 , the present application provides a method for determining noise parameters, the method comprising:
[0034] Operation 101 is to obtain raw image data collected by a target sensor based on a color reference tool under set conditions, where the set conditions include simulation conditions, initial simulation gain, and initial exposure time.
[0035] In one embodiment of the present application, the target sensor is an image or video imaging sensor, and specifically may be a CMOS image sensor.
[0036] The noise parameters of the target sensor need to be obtained by analyzing the image it has captured. First, the original image data collected by the target sensor under set conditions based on the color reference tool needs to be obtained. The original image data is usually a RAW (RAW Image Format, unprocessed) image. In order to ensure the quality of the original image data and the acquisition of noise parameters under different analog gains and different exposure times, it is necessary to configure the setting conditions, and the quality is guaranteed by configuring the simulation conditions in the setting conditions. The initial analog gain and initial exposure time in the setting conditions are configured to ensure that all noise parameters under different analog gains and different exposure times are fully acquired.
[0037] Furthermore, in order to facilitate the subsequent analysis of the original image data, a color reference tool can be used during the acquisition. The color reference tool is usually a reference card with smooth features such as a grayscale card or a standard color card. The acquisition based on the color reference tool can be regarded as obtaining the original image data of the color reference tool.
[0038] In one embodiment of the present application, in order to avoid the influence of light on the original image data, the simulation condition is usually collected in a dark room. The target sensor usually has an adjustable analog gain range, and the initial analog gain is usually configured as the minimum value of the adjustable analog gain range of the target sensor. The target sensor usually has an exposure time adjustment range to ensure image quality based on experience, and the initial exposure time is usually the minimum value, such as 1 millisecond.
[0039] For example, acquiring the original image data collected by the target sensor based on the color reference tool under set conditions can be regarded as acquiring the original image data of the color reference tool collected by the target sensor in a dark room at an initial analog gain and an initial exposure time.
[0040] In operation 102, the original image data is converted into a standard image of a set format, and a plurality of specific color regions of the standard image and coordinate data of the specific color regions are obtained.
[0041] In one embodiment of the present application, the original image data includes multiple original images, and based on the original image data, multiple specific color areas and coordinate data of the specific color areas are obtained, including: performing multi-frame averaging processing on the multiple original images to obtain images to be converted; converting the images to be converted into standard images of a set format; and obtaining multiple specific color areas of the standard image and coordinate data of the specific color areas based on the color positioning method corresponding to the color reference tool.
[0042] The original image data usually includes multiple original images, that is, multiple unprocessed RAW images. However, since the RAW images have more data, poorer quality and poorer versatility, the multiple RAW images need to be converted into standard images of a set format for subsequent processing. The set format can be a RGB image with strong versatility. The RGB image is an image composed of three basic colors: red, green and blue. Each pixel in the RGB image is represented by the values of three color channels, namely the red channel, the green channel and the blue channel.
[0043] In one embodiment of the present application, the image to be converted is converted into a standard image of a set format, including: extracting pixels of the same filter color in sequence according to the pixel arrangement order of the image to be converted, and sequentially constructing a four-channel image with half the resolution, and then performing mean merging on the images of the same channel to obtain an RGB image with half the resolution, that is, a standard image.
[0044] Furthermore, each color reference tool has a corresponding color positioning method. For example, when the color reference tool is a standard color card, there is a corresponding color positioning method provided by the standard color card positioning program that comes with the open source software package OpenCV. The color positioning method provided by the standard color card positioning program that comes with the open source software package OpenCV can be used to locate each color card color block in the standard image and obtain the coordinate data of each color card color block. The color card color block is a specific color area.
[0045] Operation 103 : acquiring a pixel mean and variance of each specific color region according to the coordinate data of the specific color region.
[0046] In one embodiment of the present application, the pixel mean and variance of each specific color area are obtained based on the coordinate data of the specific color area, including: determining the length and width of each specific color area based on the coordinate data of the specific color area; determining the pixel mean of each specific color area based on the length and width of each specific color area; determining the variance of each specific color area based on the length, width and pixel mean of each specific color area.
[0047] Based on the coordinate data of the specific color area, the bounding box or outline of the specific color area can be determined, and then the length and width of each specific color area can be calculated based on the coordinates of the boundary or outline. Finally, based on the length and width of the specific color area, the pixel value of each pixel within the length and width of the specific color area is traversed, and the pixel value of each pixel is added and divided by the total number of pixels to calculate the pixel mean of each specific color area. Among them, the pixel value can be configured as a gray value or a color value according to the actual situation. When the color reference tool is a gray card, the pixel value is a gray value, and when the color reference tool is a standard color card, the pixel value is a color value.
[0048] In one embodiment of the present application, the pixel mean value of each specific color area can be determined by the following pixel mean value determination formula:
[0049]
[0050] Among them, AvgSmooth e represents the mean pixel value at each exposure time, e represents the exposure time, M represents the length of the specific color area, that is, the number of pixels in the length direction, N represents the width of the specific color area, that is, the number of pixels in the width direction, i and j represent the coordinate index of the pixel in the length direction and the width direction, and f(i,j) represents the pixel value of the pixel located at the i-th pixel in the length direction and the j-th pixel in the width direction.
[0051] After determining the pixel mean of each specific color area, each pixel in the specific pixel area is traversed according to the length and width of the specific color area, and the sum of the squares of the differences between the pixel value of each pixel and the pixel mean of the corresponding specific color area is calculated, and then divided by the number of pixels to obtain the variance of the specific color area.
[0052] In one embodiment of the present application, the variance of each specific color region may be determined by the following variance determination formula:
[0053]
[0054] Among them, arSmooth e represents the variance at each exposure time, e represents the exposure time, M represents the length of the specific color area, that is, the number of pixels in the length direction, N represents the width of the specific color area, that is, the number of pixels in the width direction, i and j represent the coordinate index of the pixel in the length direction and the width direction, f(i,j) represents the pixel value of the pixel located at the i-th pixel in the length direction and the j-th pixel in the width direction, AvgSmooth e Represents the mean value of pixels in a specific color area.
[0055] In operation 104, the pixel mean and variance of each specific color region are fitted to obtain a fitting result, where the fitting result includes noise parameters, and the noise parameters include Poisson noise parameters and Gaussian noise parameters.
[0056] Since the Poisson noise parameter and the Gaussian noise parameter conform to Var(x)=Kx+B, the corresponding Poisson noise parameter K and Gaussian noise parameter B can be obtained by fitting the pixel mean and variance of each specific color area based on Var(x)=Kx+B.
[0057] In one embodiment of the present application, the pixel mean and variance of each specific color area are fitted, including: determining the pixel mean and variance corresponding to each specific color area as a discrete point to obtain a discrete point set; and fitting the discrete point set using a linear regression method.
[0058] The discrete points of each specific color area are constructed in the form of (pixel mean, variance) to obtain a discrete point set, and then the discrete points in the discrete point set are fitted using linear regression to obtain a fitting result, in which the noise parameters are shown.
[0059] In one embodiment of the present application, a linear regression method is used to fit a discrete point set, including: removing discrete points in the discrete point set whose pixel means are greater than a set pixel mean to obtain a target discrete point set; and fitting the target discrete point set using a linear regression method.
[0060] The error of the noise parameter fitted by using discrete points whose pixel mean is close to saturation is large. Therefore, it is necessary to remove discrete points whose pixel mean is greater than the set pixel mean to remove discrete points close to saturation and obtain the target discrete point set. The pixel mean is set as the pixel value saturation value, which is usually obtained based on experience. As an example, the empirical value of the pixel value saturation value can be 0.9.
[0061] In one embodiment of the present application, the linear regression method is used to fit the target discrete point set, including: taking the pixel mean as the independent variable, the variance as the dependent variable, based on the fitting equation Var(x)=Kx+B, and using the least squares method based univariate linear regression to calculate the Poisson noise parameter K and the Gaussian noise parameter B.
[0062] In this way, the embodiment of the present application uses a color reference tool to obtain the original image data, convert the original image data into a standard image, and automatically obtain the specific color area and the coordinates of the specific color area based on the color positioning method corresponding to the color reference tool, so that the pixel mean and variance used to calculate the noise parameters can be automatically obtained, thereby improving the efficiency of obtaining the noise parameters, and then improving the efficiency of generating noisy images based on the Poisson-Gaussian noise model, and further improving the accuracy of training data acquisition.
[0063] Figure 2 The following is a schematic diagram showing the implementation process of the noise parameter determination method provided in the embodiment of the present application. Figure 2 .
[0064] refer to Figure 2 In one embodiment of the present application, in order to obtain the optimal noise parameter under the initial analog gain, that is, the target noise parameter, the following operations are also performed:
[0065] Operation 201, determining a plurality of exposure times remaining to be adjusted according to an exposure time adjustment range, an initial exposure time and a set time step;
[0066] Operation 202, sequentially obtaining a noise parameter to be selected at each exposure time to be adjusted;
[0067] Operation 203, calculating a fitting error between the noise parameter and each of the candidate noise parameters based on the fitting results between the noise parameter and each of the candidate noise parameters;
[0068] In operation 204, a target noise parameter with a minimum fitting error is determined from the noise parameter and each of the candidate noise parameters.
[0069] The exposure time of the target sensor usually has a set adjustment range, that is, the exposure time adjustment range. By taking data from the initial exposure time within the exposure time adjustment range according to the set time step, a plurality of exposure times to be adjusted other than the initial exposure time can be obtained. After obtaining a plurality of exposure times to be adjusted, the initial exposure time in operation 101 is adjusted to the corresponding exposure time to be adjusted in sequence, and the adjusted operations 101 to 104 are performed in sequence to obtain the noise parameters to be selected corresponding to each exposure time to be adjusted in sequence.
[0070] In one embodiment of the present application, the fitting result also includes a fitting straight line, which shows the predicted value corresponding to each discrete point. Based on the predicted value and the true value of each discrete point, the fitting error at the initial exposure time and each selected exposure time can be calculated.
[0071] In one embodiment of the present application, the fitting error at each exposure time can be calculated by the following fitting error calculation formula:
[0072]
[0073] Among them, MSE is the fitting error, e is the exposure time, n is the number of discrete points, i represents the i-th discrete point, VarSmoothSelect i represents the true variance of the i-th discrete point, that is, the variance shown in the discrete point set, represents the predicted variance of the ith discrete point, that is, the variance shown by the fitted straight line.
[0074] After determining the fitting error at each exposure time, when the fitting error is minimum, it proves that the fitting is better. The noise parameter at this time is selected as the target noise parameter, that is, the optimal target noise parameter under the current initial analog gain is obtained.
[0075] For example, taking the target sensor as a CMOS image sensor, the analog gain setting of the CMOS image sensor remains unchanged, and multiple candidate exposure times are determined according to a certain set time step. For each candidate exposure time, after replacing the initial exposure time, operations 101 to 104 are performed in sequence to obtain the candidate noise parameter of each candidate exposure time, and the fitting error corresponding to each candidate exposure time and the initial exposure time is calculated. The noise parameter with the smallest fitting error is the target noise parameter, that is, the optimal noise parameter.
[0076] Therefore, the embodiment of the present application avoids the fluctuation of the noise parameters at each exposure time affected by time by automatically and sequentially acquiring the noise parameters of all exposure times configurable for the target sensor in real time, improves the accuracy of noise parameter acquisition, and further selects the target noise parameters by fitting the error, so that the accuracy of noise parameter acquisition is further improved.
[0077] In one embodiment of the present application, in addition to obtaining the target noise parameters under the initial analog gain, the target noise parameters under other adjustable analog gains of the target sensor are also obtained, specifically including the following operations: determining the remaining multiple analog gains to be adjusted based on the gain adjustment range, the initial analog gain and the set gain step; and obtaining the target noise parameters under each analog gain to be adjusted in turn.
[0078] The remaining analog gains to be adjusted can be determined by the gain adjustment range and the set gain step size, and the target noise parameters under each analog gain to be adjusted are obtained according to operations 101 to 104 and operations 201 to 204, that is, the target noise parameters under all analog gains supported by the target sensor are obtained.
[0079] In order to further understand the technical solution of the present application, a specific application example is provided below for illustration.
[0080] This specific application example of the present application is also referred to as a noise parameter acquisition method based on a Poisson-Gaussian noise model, specifically comprising: based on the Poisson-Gaussian noise model Determine the linear regression problem Var(x)=Kx+B, and obtain the Poisson noise parameter K and the Gaussian noise parameter B. The process of obtaining the Poisson noise parameter K and the Gaussian noise parameter B based on Var(x)=Kx+B includes: 1) determining all analog gains supported by the target sensor and all exposure times supported by the target sensor under each analog gain; 2) in order from small to large, based on Var(x)=Kx+B, successively obtain the noise parameters corresponding to each exposure time under each analog gain, and determine the target noise parameter with the smallest fitting error under each analog gain, and obtain the Poisson noise parameter K and the Gaussian noise parameter B under each analog gain.
[0081] It should be noted that this specific application example of the embodiment of the present application is similar to the description of the above method embodiment and has similar beneficial effects as the above method embodiment, so it will not be described in detail. Figure 1-2 The present invention can be understood by referring to the description of any one of the accompanying drawings.
[0082] Figure 3 A schematic diagram of the structure of a noise parameter determination device provided in an embodiment of the present application is shown.
[0083] refer to Figure 3 Based on the above noise parameter determination method, an embodiment of the present application further provides a noise parameter determination device, which includes: a first acquisition module 301, used to acquire the original image data collected by the target sensor based on the color reference tool under set conditions, and the set conditions include simulation conditions, initial simulation gain and initial exposure time; a second acquisition module 302, used to acquire multiple specific color areas and coordinate data of specific color areas according to the original image data; a third acquisition module 303, used to convert the original image data into a standard image of a set format, and acquire multiple specific color areas and coordinate data of specific color areas of the standard image; a fitting module 304, used to fit the pixel mean and variance of each specific color area to obtain a fitting result, and the fitting result includes noise parameters, and the noise parameters include Poisson noise parameters and Gaussian noise parameters.
[0084] In one embodiment of the present application, the device also includes: a first determination module, used to determine the remaining multiple exposure times to be adjusted according to the exposure time adjustment range, the initial exposure time and the set time step; a fourth acquisition module, used to sequentially acquire the candidate noise parameters under each exposure time to be adjusted; a calculation module, used to calculate the fitting error of the noise parameter and each candidate noise parameter based on the fitting results of the noise parameter and each candidate noise parameter; a second determination module, used to determine the target noise parameter with the smallest fitting error from the noise parameter and each candidate noise parameter.
[0085] In one embodiment of the present application, the device also includes: a third determination module, used to determine the remaining multiple analog gains to be adjusted based on the gain adjustment range, the initial analog gain and the set gain step; a fifth acquisition module, used to sequentially acquire the target noise parameters under each analog gain to be adjusted.
[0086] In one embodiment of the present application, the original image data includes multiple original images; the second acquisition module 302 includes: a processing submodule, used to perform multi-frame averaging processing on the multiple original images to obtain an image to be converted; a conversion submodule, used to convert the image to be converted into a standard image of a set format; a first acquisition submodule, used to obtain multiple specific color areas of the standard image and coordinate data of the specific color areas based on the color positioning method corresponding to the color reference tool.
[0087] In one embodiment of the present application, the third acquisition module 303 includes: a second determination submodule, used to determine the length and width of each specific color area based on the coordinate data of the specific color area; a third determination submodule, used to determine the pixel mean of each specific color area based on the length and width of each specific color area; and a fourth determination submodule, used to determine the variance of each specific color area based on the length, width and pixel mean of each specific color area.
[0088] In one embodiment of the present application, the fitting module 304 includes: a fifth determination submodule, used to determine the pixel mean and variance corresponding to each specific color area as a discrete point to obtain a discrete point set; a fitting submodule, used to fit the discrete point set using a linear regression method.
[0089] In one embodiment of the present application, the fitting submodule includes: a removal unit, used to remove discrete points in the discrete point set whose pixel mean is greater than the set pixel mean, to obtain a target discrete point set; a fitting unit, used to fit the target discrete point set using a linear regression method.
[0090] It should be noted that the description of the device in the embodiment of the present application is similar to the description of the method embodiment described above, and has similar beneficial effects as the method embodiment, so it will not be repeated. Figure 1 to Figure 2 The present invention can be understood by referring to the description of any one of the accompanying drawings.
[0091] According to an embodiment of the present application, the present application also provides an electronic device and a non-transitory computer-readable storage medium.
[0092] Figure 4A schematic block diagram of an example electronic device 40 that can be used to implement an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0093] like Figure 4 As shown, the electronic device 40 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 40 can also be stored. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0094] A number of components in the electronic device 40 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0095] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 401 performs the various methods and processes described above, such as the noise parameter determination method. For example, in some embodiments, the noise parameter determination method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 40 via the ROM 402 and / or the communication unit 409. When the computer program is loaded into the RAM 403 and executed by the computing unit 401, one or more steps of the noise parameter determination method described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to perform the noise parameter determination method in any other appropriate manner (e.g., by means of firmware).
[0096] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0097] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0098] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0099] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0100] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0101] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0102] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.
[0103] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for determining noise parameters, characterized in that: The method comprises: Acquire raw image data collected by the target sensor based on a color reference tool under set conditions, wherein the set conditions include simulation conditions, initial simulation gain, and initial exposure time; Converting the original image data into a standard image of a set format, and acquiring a plurality of specific color areas of the standard image and coordinate data of the specific color areas; According to the coordinate data of the specific color area, obtaining the pixel mean and variance of each specific color area; The pixel mean and variance of each specific color region are fitted to obtain a fitting result, wherein the fitting result includes noise parameters, and the noise parameters include Poisson noise parameters and Gaussian noise parameters.
2. The method according to claim 1, characterized in that The method further comprises: Determine a plurality of remaining exposure times to be adjusted according to the exposure time adjustment range, the initial exposure time, and the set time step; Sequentially obtain the noise parameters to be selected under each exposure time to be adjusted; Calculating the fitting errors of the noise parameter and each of the noise parameters to be selected based on the fitting results of the noise parameter and each of the noise parameters to be selected; A target noise parameter with the smallest fitting error is determined from the noise parameter and each of the candidate noise parameters.
3. The method according to claim 2, characterized in that The method further comprises: Determining a plurality of remaining analog gains to be adjusted according to the gain adjustment range, the initial analog gain and the set gain step size; The target noise parameter under each analog gain to be adjusted is obtained in turn.
4. The method according to claim 1, characterized in that: The original image data includes a plurality of original images; accordingly, Converting the original image data into a standard image of a set format, and acquiring a plurality of specific color areas of the standard image and coordinate data of the specific color areas, including: Performing multi-frame averaging processing on the multiple original images to obtain an image to be converted; Converting the image to be converted into a standard image of a set format; A plurality of specific color areas of the standard image and coordinate data of the specific color areas are acquired based on a color positioning method corresponding to the color reference tool.
5. The method according to claim 1, characterized in that The step of obtaining the pixel mean and variance of each specific color area according to the coordinate data of the specific color area includes: Determine the length and width of each specific color area according to the coordinate data of the specific color area; Determine the pixel mean of each specific color region according to the length and width of each specific color region; Based on the length, width, and pixel mean of each specific color region, the variance of each specific color region is determined.
6. The method according to claim 1, characterized in that Fitting the pixel mean and variance of each specific color region includes: Determine the pixel mean and variance corresponding to each specific color area as a discrete point to obtain a discrete point set; The discrete point set is fitted using a linear regression method.
7. The method according to claim 6, characterized in that The step of fitting the discrete point set using a linear regression method comprises: Remove the discrete points whose pixel mean is greater than the set pixel mean in the discrete point set to obtain a target discrete point set; The target discrete point set is fitted using a linear regression method.
8. A noise parameter determination device, characterized in that: The device comprises: A first acquisition module, used to acquire raw image data collected by a target sensor based on a color reference tool under set conditions, wherein the set conditions include simulation conditions, initial simulation gain, and initial exposure time; A second acquisition module, used for converting the original image data into a standard image of a set format, and acquiring a plurality of specific color areas of the standard image and coordinate data of the specific color areas; A third acquisition module, used for acquiring a pixel mean and variance of each specific color area according to the coordinate data of the specific color area; The fitting module is used to fit the pixel mean and variance of each specific color area to obtain a fitting result, wherein the fitting result includes noise parameters, and the noise parameters include Poisson noise parameters and Gaussian noise parameters.
9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.
Citation Information
Cited By
Noise calibration method, device and equipment for multicolor X-ray surface detector and medium
CN120807455A
