Noise reduction parameter configuration method and device, electronic equipment and storage medium
By determining the first fit model and the second fit model, combining the original image parameter value, determining the target image parameter value and configuring the noise reduction parameters, the applicability and efficiency of the noise reduction parameter configuration in the prior art are solved, and the image quality of the electronic camera equipment is improved.
Patent Information
- Application Number
- CN202311330361.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-13
- Publication Date
- 2025-04-15
AI Technical Summary
In the prior art, the noise reduction parameter configuration method has problems such as insufficient applicability and accuracy and low configuration efficiency, resulting in poor image quality of electronic camera equipment.
By determining the first fit model and the second fit model of the continuous type, the target image parameter value in the first shooting mode is determined based on the original image parameter values of the models and the second shooting mode, and the noise reduction parameters of the second shooting mode are determined based on the target image parameter values and preset configuration information.
The determination of the noise reduction parameters of the second shooting mode is achieved, the accuracy of the configuration results and the configuration efficiency are improved, and the image quality of the electronic camera equipment is ensured.
Smart Images

Figure CN119835522A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing, and in particular to a noise reduction parameter configuration method, device, electronic device and storage medium. Background Art
[0002] In recent years, with the rapid development of image acquisition and image processing technology, electronic camera equipment has been increasingly widely used in various fields, and people have higher and higher requirements for image clarity and noise performance. In the production process of electronic camera equipment, it is usually necessary to optimize the parameters of the electronic camera equipment, such as noise reduction parameters, to ensure that the electronic camera equipment has good image quality.
[0003] However, the noise reduction parameter configuration method using related technologies to configure noise reduction parameters has problems such as insufficient applicability and accuracy, low configuration efficiency, etc., resulting in poor image quality of electronic camera equipment. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides a noise reduction parameter configuration method, device, electronic device and storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, a method for configuring noise reduction parameters is provided, the method comprising:
[0006] Determine a first continuous fitting model, where the first fitting model is used to characterize a corresponding relationship between an image parameter value and a signal-to-noise ratio under a first shooting mode, and the first fitting model is obtained by fitting a first initial model to a first data group, wherein the first data group includes a plurality of different image parameter values under the first shooting mode and a signal-to-noise ratio corresponding to each image parameter value;
[0007] Determine a second fitting model of a continuous type, where the second fitting model is used to characterize the corresponding relationship between the image parameter value and the signal-to-noise ratio under the second shooting mode, and the second fitting model is obtained by fitting the second initial model to the second data group, wherein the second data group includes a plurality of different image parameter values under the second shooting mode and the signal-to-noise ratios corresponding to the respective image parameter values;
[0008] determining, based on the original image parameter value of the second shooting mode, the first fitting model, and the second fitting model, a target image parameter value under the first shooting mode, wherein a signal-to-noise ratio corresponding to the original image parameter value matches a signal-to-noise ratio corresponding to the target image parameter value;
[0009] Determine the noise reduction parameter of the second shooting mode based on the target image parameter value and preset configuration information, wherein the preset configuration information is used to characterize the corresponding relationship between the image parameter value and the noise reduction parameter in the first shooting mode.
[0010] In some embodiments of the present disclosure, the determining of the first fitting model of the continuous type includes:
[0011] Acquire a plurality of first images in the first shooting mode, where different first images correspond to different image parameter values;
[0012] determining a signal-to-noise ratio of each of the first images;
[0013] determining the first data group based on the image parameter value and the signal-to-noise ratio of each of the first images;
[0014] determining the first fitting model based on the first data set and the first initial model; and / or,
[0015] The second fitting model of the continuous type is determined, comprising:
[0016] Acquire a plurality of second images in the second shooting mode, where different second images correspond to different image parameter values;
[0017] determining a signal-to-noise ratio of each of the second images;
[0018] determining the second data set based on the image parameter value and the signal-to-noise ratio of each of the second images;
[0019] The second fitting model is determined based on the second data set and the second initial model.
[0020] In some embodiments of the present disclosure, the photographed object of the first image is a first color card, the first color card includes a first color block, and the area corresponding to the first color block in the first image is used to calculate the signal-to-noise ratio of the first image, and determining the signal-to-noise ratio of each first image includes:
[0021] Performing image preprocessing on each of the first images to obtain a third image corresponding to each of the first images;
[0022] Determining a region of interest of each of the third images;
[0023] determining the signal-to-noise ratio of each of the regions of interest as the signal-to-noise ratio of each of the first images; and / or,
[0024] The photographed object of the second image is a second color card, the second color card includes a second color block, and the area corresponding to the second color block in the second image is used to calculate the signal-to-noise ratio of the second image. The determining the signal-to-noise ratio of each second image includes:
[0025] performing image preprocessing on each of the second images to obtain a fourth image corresponding to each of the second images;
[0026] determining a region of interest of each of the fourth images;
[0027] The signal-to-noise ratio of each of the regions of interest is determined as the signal-to-noise ratio of each of the second images.
[0028] In some embodiments of the present disclosure, performing image preprocessing on each of the first images to obtain a third image corresponding to each of the first images includes:
[0029] The following image preprocessing is performed on each of the first images:
[0030] performing image separation processing on the first image to obtain a plurality of single-channel fifth images;
[0031] Performing image binarization processing on each of the fifth images to obtain a sixth image corresponding to each of the fifth images;
[0032] Performing image fusion processing on the plurality of the sixth images to obtain a seventh image;
[0033] Performing image morphology processing and image denoising processing on the seventh image to obtain the third image; and / or,
[0034] The performing image preprocessing on each of the second images to obtain a fourth image corresponding to each of the second images includes:
[0035] The following image preprocessing is performed on each of the second images:
[0036] performing image separation processing on the second image to obtain a plurality of single-channel eighth images;
[0037] Performing image binarization processing on each of the eighth images to obtain a ninth image corresponding to each of the eighth images;
[0038] Performing image fusion processing on a plurality of the ninth images to obtain a tenth image;
[0039] Perform image morphology processing and image denoising processing on the tenth image to obtain the fourth image.
[0040] In some embodiments of the present disclosure, the process of determining the region of interest of each of the third images includes:
[0041] Determining a plurality of target connected domains in the third image;
[0042] Determining a center of a region of interest of the third image based on the multiple target connected domains;
[0043] Determining the region of interest of the third image based on the center of the region of interest of the third image; and / or,
[0044] The process of determining the region of interest of each of the fourth images comprises:
[0045] Determining a plurality of target connected domains in the fourth image;
[0046] Determining a center of a region of interest of the fourth image based on the multiple target connected domains;
[0047] Based on the center of the region of interest of the fourth image, a region of interest of the fourth image is determined.
[0048] In some embodiments of the present disclosure, the first color card further includes a third color block, the image extraction integrity of the third color block is greater than the image extraction integrity of other color blocks in the first color card except the third color block, and determining the multiple target connected domains in the third image includes:
[0049] Performing connected domain calculation on the third image to obtain a plurality of first initial connected domains;
[0050] Determining a first threshold based on the number of pixels of the first initial connected domain corresponding to the third color block;
[0051] determining a second threshold based on the aspect ratio of the first initial connected domain corresponding to the third color block;
[0052] Determine the first initial connected domains among the multiple first initial connected domains whose number of pixels is greater than the first threshold and whose aspect ratio is less than the second threshold as the target connected domain; and / or,
[0053] The second color card further includes a fourth color block, the image extraction integrity of the fourth color block is greater than the image extraction integrity of other color blocks in the second color card except the fourth color block, and determining the multiple target connected domains in the fourth image includes:
[0054] Performing connected domain calculation on the fourth image to obtain a plurality of second initial connected domains;
[0055] Determining a third threshold based on the number of pixels of the second initial connected domain corresponding to the fourth color block;
[0056] determining a fourth threshold based on the aspect ratio of the second initial connected domain corresponding to the fourth color block;
[0057] The second initial connected domains among the plurality of second initial connected domains, whose number of pixels is greater than the third threshold and whose aspect ratio is less than the fourth threshold, are determined as the target connected domains.
[0058] In some embodiments of the present disclosure, determining the center of the region of interest of the third image based on the multiple target connected domains includes:
[0059] Based on the multiple target connected domains, determine a centroid coordinate set, wherein the centroid coordinate set includes the centroid coordinates of each of the target connected domains;
[0060] Based on the centroid coordinate set, determining the center of the region of interest of the third image; and / or,
[0061] Determining the center of the region of interest of the fourth image based on the multiple target connected domains includes:
[0062] Based on the multiple target connected domains, determine a centroid coordinate set, wherein the centroid coordinate set includes the centroid coordinates of each of the target connected domains;
[0063] Based on the centroid coordinate set, a center of a region of interest of the fourth image is determined.
[0064] In some embodiments of the present disclosure, determining the center of the region of interest of the third image based on the centroid coordinate set includes:
[0065] Based on the centroid coordinate set, determining a centroid coordinate calculation value corresponding to the first color block;
[0066] If the distance between the calculated centroid coordinate value and any centroid coordinate in the centroid coordinate set is less than or equal to a fifth threshold, determining the centroid coordinate as the center of the region of interest of the third image;
[0067] If the distances between the calculated value of the centroid coordinates and each of the centroid coordinates in the set of centroid coordinates are greater than the fifth threshold, determining the calculated value of the centroid coordinates as the center of the region of interest of the third image; and / or,
[0068] The step of determining the center of the region of interest of the fourth image based on the set of centroid coordinates includes:
[0069] Based on the centroid coordinate set, determining a centroid coordinate calculation value corresponding to the third color block;
[0070] If the distance between the calculated centroid coordinate value and any centroid coordinate in the centroid coordinate set is less than or equal to a sixth threshold, determining the centroid coordinate as the center of the region of interest of the fourth image;
[0071] If the distances between the calculated value of the centroid coordinate and each of the centroid coordinates in the set of centroid coordinates are greater than the sixth threshold, the calculated value of the centroid coordinate is determined as the center of the region of interest of the fourth image.
[0072] In some embodiments of the present disclosure, determining the region of interest of the third image based on the center of the region of interest of the third image includes:
[0073] Determining a width of a region of interest of the third image based on a width of the first initial connected domain corresponding to the third color block;
[0074] determining the region of interest of the third image based on the center of the region of interest of the third image and the width of the region of interest of the third image; and / or,
[0075] The determining the region of interest of the fourth image based on the center of the region of interest of the fourth image includes:
[0076] Determining a width of a region of interest of the fourth image based on a width of the second initial connected domain corresponding to the fourth color block;
[0077] The region of interest of the fourth image is determined based on the center of the region of interest of the fourth image and the width of the region of interest of the fourth image.
[0078] In some embodiments of the present disclosure, determining the signal-to-noise ratio of each region of interest includes:
[0079] Determining the signal-to-noise ratio of the region of interest in each single-channel image;
[0080] The signal-to-noise ratio of the region of interest is determined based on the signal-to-noise ratio of the region of interest in each single-channel image.
[0081] In some embodiments of the present disclosure, determining the first fitting model based on the first data set and the first initial model includes:
[0082] Preprocessing the first data group to obtain a third data group, wherein the data volume of the third data group is greater than the data volume of the first data group;
[0083] Determining parameter values of each parameter in the first fitting model based on the third data set and the first initial model;
[0084] determining the first fitting model based on parameter values of each parameter in the first fitting model; and / or,
[0085] The step of determining the second fitting model based on the second data set and the second initial model comprises:
[0086] Preprocessing the second data group to obtain a fourth data group, wherein the data volume of the fourth data group is greater than the data volume of the second data group;
[0087] Determining parameter values of each parameter in the second fitting model based on the fourth data set and the second initial model;
[0088] The second fitting model is determined based on the parameter value of each parameter in the second fitting model.
[0089] In some embodiments of the present disclosure, the image parameter value is a gain intensity value, the first initial model is an exponential model, and the preprocessing of the first data group to obtain the third data group includes:
[0090] Taking the inverse of each of the signal-to-noise ratios in the first data group, to obtain a fifth data group;
[0091] Performing a spline interpolation operation on the fifth data set to obtain the third data set; and / or,
[0092] The image parameter value is a gain intensity value, the second initial model is an exponential model, and the second data group is preprocessed to obtain a fourth data group, including:
[0093] Taking the inverse of the signal-to-noise ratio in the second data group to obtain a sixth data group;
[0094] Perform a spline interpolation operation on the sixth data set to obtain the fourth data set.
[0095] In some embodiments of the present disclosure, the image parameter value is a sampling ratio value, the first initial model is a polynomial model, and the preprocessing of the first data group to obtain the third data group includes:
[0096] Taking the logarithm of each of the signal-to-noise ratios in the first data group to obtain a seventh data group;
[0097] Performing a spline interpolation operation on the seventh data set to obtain the third data set; and / or,
[0098] The image parameter value is a sampling ratio value, the second initial model is a polynomial model, and the second data group is preprocessed to obtain a fourth data group, including:
[0099] Taking the logarithm of each of the signal-to-noise ratios in the second data group to obtain an eighth data group;
[0100] A spline interpolation operation is performed on the eighth data group to obtain the fourth data group.
[0101] In some embodiments of the present disclosure, determining the target image parameter value in the first shooting mode based on the original image parameter value in the second shooting mode, the first fitting model, and the second fitting model includes:
[0102] Determining a target signal-to-noise ratio corresponding to the original image parameter value in the second shooting mode based on the second fitting model;
[0103] Based on the first fitting model and the target signal-to-noise ratio, the target image parameter value corresponding to the target signal-to-noise ratio in the first shooting mode is determined.
[0104] According to a second aspect of an embodiment of the present disclosure, a noise reduction parameter configuration device is provided, the noise reduction parameter configuration device comprising:
[0105] a first determination module, the first determination module is used to determine a first continuous fitting model, the first fitting model is used to characterize the corresponding relationship between the image parameter value and the signal-to-noise ratio under the first shooting mode, the first fitting model is obtained by fitting the first initial model to the first data group, wherein the first data group includes a plurality of different image parameter values under the first shooting mode and the signal-to-noise ratios corresponding to the respective image parameter values;
[0106] a second determination module, the second determination module is used to determine a continuous second fitting model, the second fitting model is used to characterize the corresponding relationship between the image parameter value and the signal-to-noise ratio under the second shooting mode, the second fitting model is obtained by fitting the second initial model to the second data group, wherein the second data group includes a plurality of different image parameter values under the second shooting mode and the signal-to-noise ratios corresponding to the respective image parameter values;
[0107] a third determination module, the third determination module being used to determine a target image parameter value in the first shooting mode based on the original image parameter value in the second shooting mode, the first fitting model, and the second fitting model, wherein a signal-to-noise ratio corresponding to the original image parameter value matches a signal-to-noise ratio corresponding to the target image parameter value;
[0108] A fourth determination module, the fourth determination module is used to determine the noise reduction parameters of the second shooting mode based on the target image parameter value and preset configuration information, and the preset configuration information is used to characterize the corresponding relationship between the image parameter value and the noise reduction parameter in the first shooting mode.
[0109] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, the electronic device comprising:
[0110] processor;
[0111] a memory for storing processor-executable instructions;
[0112] Wherein, the processor is configured to:
[0113] Determine a first continuous fitting model, where the first fitting model is used to characterize a corresponding relationship between an image parameter value and a signal-to-noise ratio under a first shooting mode, and the first fitting model is obtained by fitting a first initial model to a first data group, wherein the first data group includes a plurality of different image parameter values under the first shooting mode and a signal-to-noise ratio corresponding to each image parameter value;
[0114] Determine a second fitting model of a continuous type, where the second fitting model is used to characterize the corresponding relationship between the image parameter value and the signal-to-noise ratio under the second shooting mode, and the second fitting model is obtained by fitting the second initial model to the second data group, wherein the second data group includes a plurality of different image parameter values under the second shooting mode and the signal-to-noise ratios corresponding to the respective image parameter values;
[0115] determining, based on the original image parameter value of the second shooting mode, the first fitting model, and the second fitting model, a target image parameter value under the first shooting mode, wherein a signal-to-noise ratio corresponding to the original image parameter value matches a signal-to-noise ratio corresponding to the target image parameter value;
[0116] Determine the noise reduction parameter of the second shooting mode based on the target image parameter value and preset configuration information, wherein the preset configuration information is used to characterize the corresponding relationship between the image parameter value and the noise reduction parameter in the first shooting mode.
[0117] According to a fourth aspect of an embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform a noise reduction parameter configuration method. The noise reduction parameter configuration method includes:
[0118] Determine a first continuous fitting model, where the first fitting model is used to characterize a corresponding relationship between an image parameter value and a signal-to-noise ratio under a first shooting mode, and the first fitting model is obtained by fitting a first initial model to a first data group, wherein the first data group includes a plurality of different image parameter values under the first shooting mode and a signal-to-noise ratio corresponding to each image parameter value;
[0119] Determine a second fitting model of a continuous type, where the second fitting model is used to characterize the corresponding relationship between the image parameter value and the signal-to-noise ratio under the second shooting mode, and the second fitting model is obtained by fitting the second initial model to the second data group, wherein the second data group includes a plurality of different image parameter values under the second shooting mode and the signal-to-noise ratios corresponding to the respective image parameter values;
[0120] determining, based on the original image parameter value of the second shooting mode, the first fitting model, and the second fitting model, a target image parameter value under the first shooting mode, wherein a signal-to-noise ratio corresponding to the original image parameter value matches a signal-to-noise ratio corresponding to the target image parameter value;
[0121] Determine the noise reduction parameter of the second shooting mode based on the target image parameter value and preset configuration information, wherein the preset configuration information is used to characterize the corresponding relationship between the image parameter value and the noise reduction parameter in the first shooting mode.
[0122] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: by determining the continuous first fitting model and the second fitting model, the target image parameter value in the first shooting mode can be determined according to the original image parameter values of the first fitting model, the second fitting model and the second shooting mode, and the noise reduction parameter of the second shooting mode can be determined according to the target image parameter value, thereby realizing the determination of the noise reduction parameter of the second shooting mode. The first fitting model and the second fitting model can respectively characterize the continuous correspondence between the image parameter value and the signal-to-noise ratio in the first shooting mode and the second shooting mode, so that any original image parameter value can determine the corresponding target image parameter value, thereby ensuring the applicability of the configuration method of the noise reduction parameter and the image quality in the second shooting mode, and improving the accuracy and efficiency of the configuration result.
[0123] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0124] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0125] Figure 1 The figure is a flow chart of a method for configuring noise reduction parameters according to an exemplary embodiment.
[0126] Figure 2 The figure is a flowchart of determining a first fitting model of a continuous type according to an exemplary embodiment.
[0127] Figure 3 is a schematic diagram of a first image according to an exemplary embodiment.
[0128] Figure 4 The flowchart of determining the signal-to-noise ratio of each first image is shown according to an exemplary embodiment.
[0129] Figure 5 is a schematic diagram of a third image according to an exemplary embodiment.
[0130] Figure 6 is a schematic diagram showing a target connected domain and a region of interest in a third image according to an exemplary embodiment.
[0131] Figure 7 is an image preprocessing flow chart showing image preprocessing performed on each first image according to an exemplary embodiment.
[0132] Figure 8 is a flowchart of a process of determining a region of interest of each third image according to an exemplary embodiment.
[0133] Fig. 9 The present invention is a flowchart of determining a plurality of target connected domains in a third image according to an exemplary embodiment.
[0134] Fig.10 The present invention is a flowchart showing a method of determining the center of a region of interest of a third image based on multiple target connected domains according to an exemplary embodiment.
[0135] Fig.11 The flowchart of determining the center of the region of interest of the third image based on a set of centroid coordinates according to an exemplary embodiment is shown.
[0136] Fig.12 The present invention is a flowchart of determining a region of interest of a third image based on a center of the region of interest of the third image according to an exemplary embodiment.
[0137] Fig.13 The figure is a flow chart showing a method of determining a signal-to-noise ratio of each region of interest according to an exemplary embodiment.
[0138] Fig.14 The present invention is a flowchart of determining a first fitting model based on a first data set and a first initial model according to an exemplary embodiment.
[0139] Fig.15 The present invention is a flowchart of preprocessing a first data group to obtain a third data group according to an exemplary embodiment.
[0140] Fig.16 The present invention is a flowchart of preprocessing a first data group to obtain a third data group according to another exemplary embodiment.
[0141] Fig.17 The present invention is a flowchart of determining a target image parameter value in a first shooting mode based on an original image parameter value in a second shooting mode, a first fitting model and a second fitting model according to an exemplary embodiment.
[0142] Fig.18 is a curve schematic diagram of a first fitting model according to an exemplary embodiment.
[0143] Fig.19 is a schematic diagram showing the deviation percentage between the first fitting model and the standard value according to an exemplary embodiment.
[0144] Fig. 20 is a curve schematic diagram of a first fitting model according to another exemplary embodiment.
[0145] Fig.21 is a schematic diagram showing the deviation percentage between the first fitting model and the standard value according to another exemplary embodiment.
[0146] Fig. 22 is a flowchart of a method for configuring noise reduction parameters according to another exemplary embodiment.
[0147] Fig.23 It is a block diagram of a noise reduction parameter configuration device according to an exemplary embodiment.
[0148] Fig.24 is a block diagram of an electronic device according to an exemplary embodiment.
[0149] In the figure:
[0150] 11-first color card; 12-first color block; 13-third color block; 20-first determination module; 30-second determination module; 40-third determination module; 50-fourth determination module; 101-processing component; 102-memory; 103-power component; 104-multimedia component; 105-audio component; 106-input / output interface; 107-sensor component; 108-communication component; 109-processor. DETAILED DESCRIPTION
[0151] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0152] In recent years, with the rapid development of image acquisition and image processing technology, electronic camera equipment has been increasingly widely used in fields such as security monitoring and autonomous driving, and people have higher and higher requirements for image clarity and noise performance. Noise reduction parameters have an important impact on the image quality of the final output of electronic camera equipment, and usually require a lot of tuning and adaptation of noise reduction parameters to ensure that electronic camera equipment has good image quality when leaving the factory.
[0153] In the related art, the image parameter value and the debugged noise reduction parameter under one image processing mode can be given, and the target signal-to-noise ratio corresponding to the image parameter value can be determined according to the correspondence between the image parameter value and the signal-to-noise ratio under the mode, and then the correspondence between the image parameter value and the signal-to-noise ratio under another image processing mode can be given to determine the image parameter value corresponding to the target signal-to-noise ratio, thereby obtaining the noise reduction parameter under another image processing mode. In this method, since the correspondence between the image parameter value and the signal-to-noise ratio is formed by discrete data, the image parameter values that can be mapped are limited, and the adapted noise reduction parameters cannot be accurately obtained. It is also possible to re-acquire the calibration image file after changing the image processing mode and repeat the existing image signal processing algorithm to readjust the noise reduction parameters, which results in a large debugging workload and low efficiency.
[0154] In summary, the noise reduction parameter configuration method of the related art is used to configure the noise reduction parameters, but there are problems such as insufficient applicability and accuracy, low configuration efficiency, etc., which leads to poor image quality of electronic camera equipment.
[0155] Based on this, the exemplary embodiment of the present disclosure provides a method for configuring noise reduction parameters. By determining a continuous first fitting model and a second fitting model, the target image parameter value in the first shooting mode can be determined according to the original image parameter values of the first fitting model, the second fitting model and the second shooting mode, and the noise reduction parameters of the second shooting mode can be determined according to the target image parameter values, thereby realizing the determination of the noise reduction parameters of the second shooting mode. The first fitting model and the second fitting model can respectively characterize the continuous correspondence between the image parameter value and the signal-to-noise ratio in the first shooting mode and the second shooting mode, so that any original image parameter value can determine the corresponding target image parameter value, thereby ensuring the applicability of the noise reduction parameter configuration method and the image quality in the second shooting mode, and improving the accuracy and efficiency of the configuration results.
[0156] In an exemplary embodiment, a noise reduction parameter configuration method is provided, referring to Figure 1 As shown, the noise reduction parameter configuration method includes:
[0157] S100, determining a first continuous fitting model, where the first fitting model is used to characterize the correspondence between image parameter values and signal-to-noise ratios under a first shooting mode, and the first fitting model is obtained by fitting a first initial model to a first data group, wherein the first data group includes a plurality of different image parameter values under the first shooting mode and signal-to-noise ratios corresponding to each image parameter value.
[0158] In step S100, the first shooting mode may have different image parameter values and signal-to-noise ratios corresponding to the different image parameter values. The image parameter values may include, for example, a gain intensity value and a sampling ratio value. For example, the gain intensity value may be changed by changing the brightness of the shooting scene or the sampling ratio value may be changed by changing the electronic zoom ratio. The first data group includes a plurality of different image parameter values under the first shooting mode and the signal-to-noise ratios corresponding to the image parameter values. The first fitting model may be determined by fitting the first data group with a first fitting model, so that the first fitting model can characterize the correspondence between the image parameter values and the signal-to-noise ratios under the first shooting mode. The first fitting model is a continuous model, so that the first fitting model can characterize the correspondence between the continuous image parameter values and the signal-to-noise ratios, thereby avoiding the problem in the related art that some image parameter values in discrete data cannot be corresponded.
[0159] S200, determining a continuous second fitting model, where the second fitting model is used to characterize the correspondence between the image parameter value and the signal-to-noise ratio under the second shooting mode, and the second fitting model is obtained by fitting the second initial model to the second data group, wherein the second data group includes a plurality of different image parameter values under the second shooting mode and the signal-to-noise ratio corresponding to each image parameter value.
[0160] The second shooting mode is different from the first shooting mode, for example, different cameras may be used for shooting, or the same camera may be used for shooting in different modes. The shooting mode may be, for example, a portrait mode, a macro mode, and the like. The second data group includes a plurality of different image parameter values in the second shooting mode and a signal-to-noise ratio corresponding to each image parameter value, respectively. The second fitting model may be determined by fitting the second data group with a second fitting model, so that the second fitting model can characterize the correspondence between the image parameter value and the signal-to-noise ratio in the second shooting mode. The second fitting model is also a continuous model, and the second fitting model may be, for example, a curve or a continuous formula, so that the second fitting model can also characterize the correspondence between continuous image parameter values and the signal-to-noise ratio.
[0161] S300, based on the original image parameter value of the second shooting mode, the first fitting model and the second fitting model, determine the target image parameter value in the first shooting mode, and the signal-to-noise ratio corresponding to the original image parameter value matches the signal-to-noise ratio corresponding to the target image parameter value.
[0162] In step S300, the target image parameter value in the first shooting mode can be determined according to the original image parameter value corresponding to the second shooting mode and the determined first fitting model and second fitting model, so that the signal-to-noise ratio corresponding to the original image parameter value matches the signal-to-noise ratio corresponding to the target image parameter value.
[0163] S400: Determine a noise reduction parameter of a second shooting mode based on a target image parameter value and preset configuration information, where the preset configuration information is used to characterize a correspondence between an image parameter value and a noise reduction parameter in a first shooting mode.
[0164] In step S400, the noise reduction parameter may be one or more, each noise reduction parameter has its corresponding parameter value, and the process of determining the noise reduction parameter is the process of determining the parameter value corresponding to each noise reduction parameter, and its parameter value can affect the image quality of the electronic camera device. Exemplarily, the noise reduction parameter may include abf, gic, anr, tf, hnr, lenr, etc.
[0165] The preset configuration information can characterize the correspondence between the image parameter value and the noise reduction parameter in the first shooting mode, that is, the correspondence between the image parameter value and the noise reduction parameter in the first shooting mode is known, and the noise reduction parameter in the second shooting mode can be determined according to the first shooting target image parameter value and the preset configuration information. The inventor of the present application has found that using the same noise reduction parameters to process image data with similar signal-to-noise ratios in two shooting modes can ensure that the clarity and noise performance of the output effect are similar, and the noise reduction parameters corresponding to the image parameter values in the preset configuration information are the preferred values that can ensure the quality of the effect, so that the noise reduction parameters determined for the second shooting mode can also ensure the image quality in the second shooting mode.
[0166] The preset configuration information can also characterize the correspondence between continuous image parameter values and noise reduction parameters in the first shooting mode. Exemplarily, the preset configuration information can be obtained by interpolating the pre-obtained image parameter values and the discrete data of the corresponding noise reduction parameters.
[0167] In this embodiment, by determining the continuous first fitting model and the second fitting model, the target image parameter value in the first shooting mode can be determined according to the original image parameter values of the first fitting model, the second fitting model and the second shooting mode, and the noise reduction parameters of the second shooting mode can be determined according to the target image parameter values, thereby realizing the determination of the noise reduction parameters of the second shooting mode. The first fitting model and the second fitting model can respectively characterize the continuous correspondence between the image parameter value and the signal-to-noise ratio in the first shooting mode and the second shooting mode, so that any original image parameter value can determine the corresponding target image parameter value, thereby ensuring the applicability of the configuration method of the noise reduction parameter and the image quality in the second shooting mode, and improving the accuracy and efficiency of the configuration result.
[0168] In some embodiments, reference Figure 2 As shown, the first fitting model of the continuous type is determined, including:
[0169] S110: Acquire a plurality of first images in a first shooting mode, where different first images correspond to different image parameter values.
[0170] In step S110, as mentioned above, the change of the image parameter value can be achieved, for example, by changing the shooting conditions such as the brightness of the shooting scene or the electronic zoom ratio. The images shot by the electronic camera device in the first shooting mode under different shooting conditions can be used as multiple first images, so that different first images correspond to different image parameter values.
[0171] S120: Determine the signal-to-noise ratio of each first image.
[0172] S130: Determine a first data group based on the image parameter value and the signal-to-noise ratio of each first image.
[0173] In step S120 to step S130, the signal-to-noise ratio corresponding to each first image is determined, and a first data group is determined according to different image parameter values and corresponding signal-to-noise ratios of each first image. Exemplarily, the first data group includes a plurality of first data, each of which is an image parameter value and a corresponding signal-to-noise ratio, so that the first data group includes a plurality of different image parameter values in the first shooting mode and a signal-to-noise ratio corresponding to each image parameter value.
[0174] S140: Determine a first fitting model based on the first data set and the first initial model.
[0175] In step S140, the first initial model is a model used to fit the first data group, and a first fitting model can be constructed through the first data group and the first initial model. Exemplarily, the first initial model can be, for example, an exponential model or a polynomial model, and the first initial model can, for example, include known values and unknown parameters.
[0176] In this embodiment, by acquiring multiple first images in the first shooting mode and determining the corresponding signal-to-noise ratio, the first data group can be determined according to the image parameter value and the signal-to-noise ratio of the first image, and the first fitting model can be determined according to the first data group and the first initial model, thereby realizing the determination of the first fitting model, and being able to provide a basis for determining the subsequent target image parameter values, so that any original image parameter value can determine the corresponding target image parameter value, thereby ensuring the applicability of the configuration method of the noise reduction parameters and the image quality in the second shooting mode, and improving the accuracy of the configuration results and the configuration efficiency.
[0177] In some embodiments, reference Figure 3As shown, the shooting object of the first image is the first color card 11, the first color card 11 includes a first color block 12, and the area corresponding to the first color block 12 in the first image is used to calculate the signal-to-noise ratio of the first image. The first color card 11 can be, for example, a test chart including a plurality of color blocks. Exemplarily, the first color card 11 can include, for example, 24 color blocks of different colors. The shapes of the first color card 11 and each color block can be, for example, rectangular. The color of the first color block 12 can be, for example, 18% gray, and the first color block 12 is located in the fourth row and fourth column. After the first color card 11 is shot, an area corresponding to the first color block 12 is formed in the first image, and the area is used to calculate the signal-to-noise ratio of the first image. Of course, it can be understood that the number of color blocks in the first color card 11 is not limited to 24, and the position of the first color block on the first color card is not limited to the fourth row and fourth column. As long as the first color block is a color that facilitates the calculation of the signal-to-noise ratio, this embodiment does not limit this.
[0178] refer to Figure 4 As shown, determining the signal-to-noise ratio of each first image includes:
[0179] S121. Perform image preprocessing on each first image to obtain a third image corresponding to each first image.
[0180] In step S121, each first image is subjected to image preprocessing so that the obtained Figure 5 The boundaries of the corresponding areas of the color blocks in the third image are clear, which makes it easy to distinguish the corresponding areas of the color blocks in the third image and the background area.
[0181] S122: Determine a region of interest of each third image.
[0182] In step S122, refer to Figure 6 As shown, a region of interest (ROI) in each third image is determined, Figure 6 The area where the rectangle in the dotted box is located is the area of interest. For example, the area of interest in the third image can correspond to the area corresponding to the first color block 12 in the first image. The area of interest in the third image is more complete and regular, which is conducive to the subsequent calculation of the signal-to-noise ratio.
[0183] S123: Determine the signal-to-noise ratio of each region of interest as the signal-to-noise ratio of each first image.
[0184] In step S123, for each third image, the signal-to-noise ratio of its region of interest may be calculated, and the signal-to-noise ratio may be determined as the signal-to-noise ratio of the first image corresponding to the third image. Exemplarily, the signal-to-noise ratio may be determined by, for example, calculating the mean and standard deviation of pixel grayscales in each region of interest, and determining the ratio of the mean pixel grayscale to the standard deviation as the signal-to-noise ratio of the region of interest, thereby achieving determination of the signal-to-noise ratio of each first image.
[0185] In this embodiment, the shooting object of the first image is set to be the first color card 11 including the first color block 12, and the third image is obtained by performing image preprocessing on each first image, and the signal-to-noise ratio is used as the signal-to-noise ratio of the corresponding first image by determining the region of interest of each third image and the corresponding signal-to-noise ratio, thereby achieving the acquisition of the signal-to-noise ratio of the first image, and providing a basis for the subsequent determination of the first data group. By performing image preprocessing on the first image, it is ensured that the region boundary corresponding to each color block in the obtained third image is clear, so that the region of interest of the third image is more complete and regular, which facilitates the determination of the signal-to-noise ratio and improves the accuracy of the determination of the signal-to-noise ratio.
[0186] In some embodiments, reference Figure 7 As shown, performing image preprocessing on each first image to obtain a third image corresponding to each first image includes: performing the following image preprocessing on each first image:
[0187] S121 - 1 . Perform image separation processing on the first image to obtain a plurality of single-channel fifth images.
[0188] In step S121 - 1 , image separation processing is performed on the multi-channel first image, so that the first image is separated into a plurality of single-channel fifth images. The fifth image may include, for example, a grayscale image or any one of three primary color channel images.
[0189] S121 - 2 . Perform image binarization processing on each fifth image to obtain a sixth image corresponding to each fifth image.
[0190] In step S121-2, the separated fifth images are subjected to image binarization processing. The image binarization operation is to perform binarization segmentation on the image according to the binarization threshold value, and the pixel values in the image are divided into two parts. The pixel values below the binarization threshold value are set to 0, and the pixel values above the binarization threshold value are set to 1, which can effectively simplify the image, thereby making image processing easier. Exemplarily, the binarization threshold value can be obtained by dynamic calculation based on the global grayscale of the fifth image, so as to separate the area corresponding to each color block in the fifth image and the background area.
[0191] S121 - 3. Perform image fusion processing on the multiple sixth images to obtain a seventh image.
[0192] In step S121-3, image fusion processing is performed on the sixth images obtained by performing image binarization processing corresponding to the fifth images. That is, the sixth images of each single channel are subjected to a union operation to obtain a fused image as the seventh image. This can make the sixth images of each single channel complement each other and obtain a seventh image with the corresponding area of each color block as complete as possible.
[0193] S121 - 4 . Perform image morphology processing and image denoising processing on the seventh image to obtain a third image.
[0194] In step S121-4, the seventh image is subjected to image morphological processing such as opening and closing operations and image denoising processing, so as to fill the holes in the seventh image and remove the black and white noise in the seventh image. Figure 5 As shown, the third image is obtained after the entire image preprocessing process is completed.
[0195] In this embodiment, by sequentially performing image separation processing, image binarization processing, image fusion processing, image morphology processing and image denoising processing on the first image, a third image is obtained after completing the entire image preprocessing process. The image preprocessing process can separate the area corresponding to each color block and the background area, so that the area corresponding to each color block is as complete as possible, and can fill the holes in the image and remove the black and white noise in the image, thereby ensuring that the boundaries of the areas corresponding to each color block are clear and realizing the segmentation of the first color card 11 and the background area, which is beneficial to the subsequent determination of the area of interest and improves the accuracy of the signal-to-noise ratio determination.
[0196] In some embodiments, reference Figure 8 As shown, the process of determining the region of interest of each third image includes:
[0197] S122-1. Determine a plurality of target connected domains in the third image.
[0198] In step S122-1, refer to Figure 6 As shown, each target connected domain is a connected area composed of adjacent pixels with the same pixel value. Each target connected domain in the third image corresponds to one of the color blocks of the first color card 11. The process of determining multiple target connected domains in the third image is to extract and screen the corresponding areas of multiple color blocks in the third image, so as to facilitate the subsequent determination of the area of interest based on the target connected domain.
[0199] S122-2: Determine the center of the region of interest of the third image based on the multiple target connected domains.
[0200] In step S122-2, the center of the region of interest of the third image is determined based on the multiple target connected domains of the third image, that is, the position of the region of interest is selected based on the corresponding areas of the multiple color blocks obtained by extraction and screening, ensuring that the region of interest can correspond to the first color block 12, so that the region of interest can be used to determine the signal-to-noise ratio.
[0201] S122-3. Determine the region of interest of the third image based on the center of the region of interest of the third image.
[0202] In step S122-3, after determining the center of the region of interest of the third image, the position of the region of interest can be determined according to the center of the region of interest of the third image, and the determination of the region of interest of the third image can be achieved after determining the size of the region of interest. Exemplarily, the size of the region of interest can be, for example, a preset value, and the size of the region of interest can also be determined according to the width of the region corresponding to the color block.
[0203] In this embodiment, by determining multiple target connected domains in the third image, and determining the center of the region of interest of the third image based on the multiple target connected domains, the region of interest of the third image can be determined based on the center of the region of interest of the third image, thereby defining a range for the subsequent determination of the signal-to-noise ratio. The determination of the target connected domain can extract the regions corresponding to the multiple color blocks in the third image, so that the position of the region of interest can be determined based on the position of the corresponding region of the screened color blocks, thereby ensuring that the region of interest is convenient for determining the signal-to-noise ratio and improving the accuracy of the determination of the signal-to-noise ratio.
[0204] In some embodiments, the first color card 11 further includes a third color block 13, and the image extraction integrity of the third color block 13 is greater than the image extraction integrity of other color blocks in the first color card 11 except the third color block 13. Figure 3 As shown, the third color block 13 has the same shape and size as the first color block 12. The color of the third color block 13 may be white, for example. The third color block 13 is located in the fourth row and the first column. After the first color card 11 is photographed, a region corresponding to the third color block 13 is formed in the first image and the subsequently processed image. The robustness and integrity of the region are greater than those of the regions corresponding to other color blocks, so that the image extraction integrity of the third color block 13 is greater than that of the other color blocks in the first color card 11 except the third color block 13.
[0205] refer to Fig. 9 As shown, determining multiple target connected domains in the third image includes:
[0206] S122-1-1. Perform connected domain calculation on the third image to obtain multiple first initial connected domains.
[0207] In step S122-1-1, the connected domain is calculated for the third image, and multiple first initial connected domains in the third image are extracted. Each first initial connected domain is a connected area composed of adjacent pixels with the same pixel value. Some of the multiple first initial connected domains are the target connected domains that are ultimately required, and the multiple first initial connected domains need to be screened.
[0208] S122-1-2. Determine a first threshold based on the number of pixels in the first initial connected domain corresponding to the third color block.
[0209] In step S122-1-2, a first threshold for extracting a target connected domain is determined based on the number of pixels of the first initial connected domain corresponding to the third color block 13. Exemplarily, the color of the third color block 13 is white, and 95% of the number of pixels of the first initial connected domain corresponding to the white color block is used as the first threshold.
[0210] S122-1-3. Determine a second threshold based on the aspect ratio of the first initial connected domain corresponding to the third color block.
[0211] In step S122-1-3, the second threshold for extracting the target connected domain is determined according to the aspect ratio of the first initial connected domain corresponding to the third color block 13. Exemplarily, the color of the third color block 13 is white, and 1.1 times the aspect ratio of the first initial connected domain corresponding to the white color block is used as the second threshold.
[0212] S122-1-4. Determine the first initial connected domains among the multiple first initial connected domains whose number of pixels is greater than the first threshold and whose aspect ratio is less than the second threshold as the target connected domain.
[0213] In step S122-1-4, a target connected domain is extracted from multiple first initial connected domains according to the first threshold and the second threshold, the number of pixels in the target connected domain is greater than the first threshold and the aspect ratio of the target connected domain is less than the second threshold. Exemplarily, the number of pixels in the target connected domain is greater than 95% of the number of pixels in the first initial connected domain corresponding to the white block, and the aspect ratio of the target connected domain is less than 1.1 times the aspect ratio of the first initial connected domain corresponding to the white block.
[0214] In this embodiment, multiple first initial connected domains are extracted by performing connected domain calculation on the third image, and the first threshold and the second threshold are determined respectively according to the number of pixels and the aspect ratio of the first initial connected domain corresponding to the third color block 13, and then the target connected domain is determined in the multiple first initial connected domains according to the first threshold and the second threshold, so as to achieve the screening and determination of the target connected domain, and provide a basis for the subsequent determination of the center of the region of interest. Since the image extraction integrity of the third color block 13 is greater than the image extraction integrity of other color blocks except the third color block 13 in the first color card 11, the target connected domain is screened according to the first threshold and the second threshold, which can eliminate the interference of the extraction process of the color block corresponding area, ensure that each target connected domain is the corresponding area of the color block of the first color card 11, and improve the accuracy of the determination of the target connected domain.
[0215] In some embodiments, reference Fig.10 As shown, based on the multiple target connected domains, determining the center of the region of interest of the third image includes:
[0216] S122-2-1. Based on multiple target connected domains, determine a centroid coordinate set, where the centroid coordinate set includes the centroid coordinates of each target connected domain.
[0217] In step S122-2-1, a centroid coordinate set is determined based on the multiple screened target connected domains, and the centroid coordinate set includes the centroid coordinates of each target connected domain, that is, the centroid coordinates of the corresponding areas of the multiple color blocks of the first color card 11 on the third image. Exemplarily, a total of 13 target connected domains are determined based on the third image, and the centroid coordinate set includes the centroid coordinates of the 13 target connected domains.
[0218] S122-2-2. Determine the center of the region of interest of the third image based on the centroid coordinate set.
[0219] In step S122-2-2, the center of the region of interest of the third image is determined according to the centroid coordinates of each target connected domain in the centroid coordinate set, so that the region of interest of the third image can correspond to the first color block 12, ensuring that the region of interest of the third image can be used to determine the signal-to-noise ratio.
[0220] In this embodiment, the center of interest region of the third image can be determined according to the center of interest coordinate set determined according to the center of interest coordinate set based on multiple target connected domains, which provides a basis for the subsequent determination of the region of interest. The center of interest coordinate set includes the center of interest coordinates of each target connected domain, so that the region of interest of the third image can correspond to the first color block 12, ensuring that the region of interest of the third image can be used to determine the signal-to-noise ratio.
[0221] In some embodiments, reference Fig.11 As shown, based on the centroid coordinate set, determining the center of the region of interest of the third image includes:
[0222] S122-2-2-1. Determine the calculated value of the centroid coordinate corresponding to the first color block based on the centroid coordinate set.
[0223] In step S122-2-2-1, the calculated centroid coordinate value corresponding to the first color block 12 is determined based on the centroid coordinate set. Exemplarily, the color of the first color block 12 is 18% gray, and the first color block 12 is located in the fourth row and fourth column. The areas corresponding to the color blocks in the first three columns of the fourth row can all be extracted as target connected domains, so that the centroid coordinates of these three areas are included in the centroid coordinate set. The calculated centroid coordinate value corresponding to the first color block 12 can be calculated based on the centroid coordinates of these three areas. Exemplarily, the centroid coordinates of the areas corresponding to the color blocks in the first three columns of the fourth row are (x1, y1), (x2, y2), and (x3, y3). Then the calculated centroid coordinate value corresponding to the first color block 12 can be, for example,
[0224] S122-2-2-2. If the distance between the calculated centroid coordinate and any centroid coordinate in the centroid coordinate set is less than or equal to a fifth threshold, the centroid coordinate is determined as the center of the region of interest of the third image.
[0225] In step S122-2-2-2, if the distance between the calculated centroid coordinate value and any centroid coordinate in the centroid coordinate set is less than or equal to the fifth threshold, it means that the centroid coordinate of the corresponding area of the first color block 12 is included in the centroid coordinate set, that is, the corresponding area of the first color block 12 is included in the target connected domain, and the centroid coordinate of the target connected domain corresponding to the first color block 12 can be directly determined as the center of the region of interest of the third image. Exemplarily, the fifth threshold can be, for example, 5% of the average value of the distance between the centroid coordinates of adjacent target connected domains.
[0226] S122-2-2-3. If the distances between the calculated value of the centroid coordinate and each centroid coordinate in the centroid coordinate set are greater than the fifth threshold, the calculated value of the centroid coordinate is determined as the center of the region of interest of the third image.
[0227] In step S122-2-2-3, if the distances between the calculated centroid coordinates and the centroid coordinates in the centroid coordinate set are all greater than the fifth threshold, it means that the centroid coordinates of the corresponding area of the first color block 12 are not included in the centroid coordinate set, that is, the corresponding area of the first color block 12 is not included in the target connected domain, and the calculated centroid coordinate value of the first color block 12 is determined as the center of the region of interest of the third image. Exemplarily, the fifth threshold may be, for example, 5% of the average value of the distances between the centroid coordinates of adjacent target connected domains.
[0228] In this embodiment, the calculated value of the centroid coordinates corresponding to the first color block 12 is determined according to the centroid coordinate set, and the center of the region of interest of the third image is determined by comparing the distance between the calculated value of the centroid coordinates and each centroid coordinate in the centroid coordinate set with the fifth threshold value, which provides a basis for the subsequent determination of the region of interest. According to the comparison result, it can be determined whether the target connected domain includes the corresponding region of the first color block 12, which can ensure that the center of the region of interest finally determined is the actual value or theoretical value of the centroid coordinates of the corresponding region of the first color block 12, so that the region of interest determined subsequently can correspond to the first color block 12, and it is ensured that the region of interest can be used to determine the signal-to-noise ratio.
[0229] In some embodiments, reference Fig.12 As shown, based on the center of the region of interest of the third image, determining the region of interest of the third image includes:
[0230] S122-3-1. Determine a width of a region of interest of a third image based on a width of a first initial connected domain corresponding to a third color block.
[0231] In step S122-3-1, since the image extraction integrity of the third color block 13 is greater than the image extraction integrity of other color blocks except the third color block 13 in the first color card 11, the width of the region of interest of the third image can be determined according to the width of the first initial connected domain corresponding to the third color block 13, so as to ensure that the region of interest can correspond to the corresponding region of the first color block 12. Exemplarily, the color of the third color block 13 is white, and for example, 0.7 times the width of the first initial connected domain corresponding to the third color block 13 can be used as the width of the region of interest of the third image.
[0232] S122-3-2. Determine the region of interest of the third image based on the center of the region of interest of the third image and the width of the region of interest of the third image.
[0233] In step S122-3-2, the region of interest of the third image can be determined based on the center of the region of interest of the third image and the width of the region of interest of the third image. Exemplarily, the shape of the region of interest is a square, the center of the region of interest is taken as the intersection of the two diagonals of the square, 0.7 times the width of the first initial connected domain corresponding to the third color block 13 is taken as the side length of the square, and the range contained in the square is taken as the region of interest of the third image.
[0234] In this embodiment, the width of the region of interest is determined according to the width of the first initial connected domain corresponding to the third color block 13, and the region of interest of the third image can be determined according to the center of the region of interest of the third image and the width of the region of interest of the third image, which defines a range for the subsequent determination of the signal-to-noise ratio. The determination of the center of the region of interest and the width of the region of interest ensures that the region of interest can correspond to the corresponding region of the first color block 12, ensures that the region of interest is convenient for determining the signal-to-noise ratio, and improves the accuracy of the determination of the signal-to-noise ratio.
[0235] In some embodiments, reference Fig.13 As shown, determine the signal-to-noise ratio of each region of interest, including:
[0236] S123-1. Determine the signal-to-noise ratio of the region of interest in each single-channel image.
[0237] In step S123-1, the region of interest in the third image is also a multi-channel image, and the signal-to-noise ratio of each single-channel image included in the region of interest is calculated respectively. As mentioned above, the noise ratio can be, for example, calculated by calculating the mean grayscale value and standard deviation of pixels in the region of interest, and the ratio of the mean grayscale value to the standard deviation of pixels is determined as the signal-to-noise ratio of the region of interest. Exemplarily, the third image is a three-channel image, and the signal-to-noise ratios of the three channels included in the region of interest are SNR1, SNR2 and SNR3 respectively.
[0238] S123-2. Determine the signal-to-noise ratio of the region of interest based on the signal-to-noise ratio of the region of interest in each single-channel image.
[0239] In step S123-2, the signal-to-noise ratio of the region of interest is determined according to the signal-to-noise ratio of the region of interest in each single-channel image. Exemplarily, the signal-to-noise ratios of the three channels included in the region of interest are SNR1, SNR2 and SNR3 respectively, and the signal-to-noise ratio snr of the region of interest may be the average of the signal-to-noise ratios of the three channels, and the signal-to-noise ratio snr is determined by the following formula:
[0240] snr=(SNR1+SNR2+SNR3) / 3
[0241] The signal-to-noise ratio (SNR) of the region of interest can also be the root mean square of the signal-to-noise ratios of the three channels. The signal-to-noise ratio (SNR) is determined by the following formula:
[0242]
[0243] In this embodiment, by determining the signal-to-noise ratio of the region of interest in each single-channel image, the signal-to-noise ratio of the region of interest can be determined according to the signal-to-noise ratio of the region of interest in each single-channel image, thereby achieving the determination of the signal-to-noise ratio of the first image, and providing a basis for the subsequent determination of the first data group. The signal-to-noise ratio of the region of interest is determined according to the signal-to-noise ratio of the region of interest in each single-channel image, and the signal-to-noise ratio of the corresponding region of interest in each single-channel image is fully considered, thereby ensuring the accuracy of the determination of the signal-to-noise ratio of the region of interest.
[0244] In some embodiments, reference Fig.14 As shown, based on the first data set and the first initial model, determining the first fitting model includes:
[0245] S141. Preprocess the first data group to obtain a third data group, wherein the data volume of the third data group is greater than the data volume of the first data group.
[0246] In step S141, as mentioned above, the first data group includes multiple first data, each of which is an image parameter value and a corresponding signal-to-noise ratio. The first data group is preprocessed to obtain a third data group. The data volume of the third data group is greater than that of the first data group, so that the data of the third data group is denser, which is conducive to the construction of subsequent models.
[0247] S142: Determine a parameter value of each parameter in the first fitting model based on the third data set and the first initial model.
[0248] In step S142, the data in the third data group may be fitted by the first initial model to determine the parameter value of each parameter in the first fitting model. Exemplarily, when the image parameter value is a gain intensity value, the first initial model may be an exponential model represented by the following formula:
[0249]
[0250] Where Gain is the image parameter value representing the gain intensity value, SNR is the signal-to-noise ratio corresponding to the image parameter value, and a e , a3, a2, a1, a0, and C are all unknown parameters in the first initial model. The parameter values of the unknown parameters a can be obtained by substituting the image parameter values and the corresponding signal-to-noise ratios of the data in the third data group into the above formula and calculating them using a nonlinear trust region optimization algorithm. e `, a3`, a2`, a1`, a0`, C`, and determine the parameter values of each unknown parameter obtained by calculation as the parameter values of each parameter in the first fitting model.
[0251] When the image parameter value is a sampling ratio value, the first initial model may also be a polynomial model represented by the following formula:
[0252] sampleRatio = a4·(ln(SNR)) 3 +a5·(ln(SNR)) 2 +a6·ln(SNR)+a7
[0253] Among them, sampleRatio is the image parameter value representing the sampling ratio value, SNR is the signal-to-noise ratio corresponding to the image parameter value, a4, a5, a6, a7 are all unknown parameters in the first initial model, and the image parameter value and the corresponding signal-to-noise ratio of each data in the third data group can be substituted into the above formula, and the parameter value a4`, a5`, a6`, a7` of each unknown parameter can be calculated by a nonlinear trust region optimization algorithm, and the calculated unknown parameters are determined as the parameter values of each parameter in the first fitting model.
[0254] S143: Determine the first fitting model based on the parameter value of each parameter in the first fitting model.
[0255] In step S413, the first fitting model is determined according to the parameter values of the parameters in the first fitting model. For example, when the image parameter value is a gain intensity value, the parameter values of the parameters in the first fitting model are respectively a e `, a3`, a2`, a1`, a0`, C`, the first fitting model can be characterized by the following formula, for example:
[0256]
[0257] When the image parameter value is a sampling ratio value, the parameter values of the parameters in the first fitting model are respectively a4`, a5`, a6`, and a7`. The first fitting model can be represented by the following formula, for example:
[0258] sampleRatio = a4`·(ln(SNR)) 3 +a5`·(ln(SNR)) 2 +a6`·ln(SNR)+a7`
[0259] In this embodiment, the density of data in the data group is increased by preprocessing the first data group, which facilitates the construction of subsequent models based on the third data group. According to the third data group and the first initial model, the parameter values of each parameter in the first fitting model can be determined, and the first fitting model is determined according to the parameter values of each parameter in the first fitting model, so that the construction of the final first fitting model is realized. The first fitting model can characterize the continuous correspondence between the image parameter value and the signal-to-noise ratio in the first shooting mode, so that any original image parameter value can determine the corresponding target image parameter value, which ensures the applicability of the configuration method of the noise reduction parameter and the image quality in the second shooting mode, and improves the accuracy and efficiency of the configuration result.
[0260] In some embodiments, the image parameter value is a gain intensity value, the first initial model is an exponential model, and the reference Fig.15 As shown, the first data group is preprocessed to obtain a third data group, including:
[0261] S141-1. Take the inverse of each signal-to-noise ratio in the first data group to obtain a fifth data group.
[0262] In step S141 - 1 , the reciprocal of the signal-to-noise ratio of each data in the first data group is taken to obtain a fifth data group, so that the reciprocal of the corresponding signal-to-noise ratio corresponds to each gain intensity value in the fifth data group.
[0263] S141-2. Perform spline interpolation operation on the fifth data group to obtain a third data group.
[0264] In step S141-2, the fifth data set is subjected to spline difference operation, and the fifth data set after the spline difference operation is subjected to small interval sampling at a fixed interval to obtain a third data set after preprocessing. The first fitting model determined by the third data set and the first initial model is also an exponential model.
[0265] In this embodiment, the fifth data group is obtained by taking the inverse of each signal-to-noise ratio in the first data group and performing a spline interpolation operation on the fifth data, thereby completing the preprocessing of the first data group and achieving the determination of the third data group, so that the third data group can be adapted to the first initial model when the image parameter value is the gain intensity value, thereby facilitating the subsequent simulation of the third data group through the first initial model which is an exponential model to construct a first fitting model.
[0266] In some other embodiments, the image parameter value is a sampling ratio value, the first initial model is a polynomial model, and the reference Fig.16 As shown, the first data group is preprocessed to obtain a third data group, including:
[0267] S141-3. Take the logarithm of each signal-to-noise ratio in the first data group to obtain a seventh data group.
[0268] In step S141 - 3 , the logarithm of the signal-to-noise ratio of each data in the first data group is taken to obtain a seventh data group, so that the logarithm of the corresponding signal-to-noise ratio corresponds to each sampling ratio value in the seventh data group.
[0269] S141-4. Perform spline interpolation operation on the seventh data group to obtain a third data group.
[0270] In step S141-4, the seventh data set is subjected to spline difference operation, and the seventh data set after the spline difference operation is subjected to small interval sampling at a fixed interval to obtain a third data set after preprocessing. The first fitting model determined by the third data set and the first initial model is also a polynomial model.
[0271] In this embodiment, the first data group is preprocessed by taking the inverse of each signal-to-noise ratio in the first data group to obtain the seventh data group, and a spline interpolation operation is performed on the seventh data, thereby completing the preprocessing of the first data group and achieving the determination of the third data group, so that the third data group can be adapted to the first initial model when the image parameter value is the sampling ratio value, thereby facilitating the subsequent simulation of the third data group through the first initial model of the polynomial model to construct the first fitting model.
[0272] In some embodiments, determining a continuous second fitting model includes: acquiring multiple second images in a second shooting mode, different second images corresponding to different image parameter values; determining a signal-to-noise ratio of each second image; determining a second data group based on the image parameter value and the signal-to-noise ratio of each second image; and determining a second fitting model based on the second data group and the second initial model.
[0273] In some embodiments, the photographed object of the second image is a second color card, the second color card includes a second color block, and the area corresponding to the second color block in the second image is used to calculate the signal-to-noise ratio of the second image, and the signal-to-noise ratio of each second image is determined, including: performing image preprocessing on each second image to obtain a fourth image corresponding to each second image; determining a region of interest of each fourth image; and determining the signal-to-noise ratio of each region of interest as the signal-to-noise ratio of each second image.
[0274] In some embodiments, image preprocessing is performed on each second image to obtain a fourth image corresponding to each second image, including: performing the following image preprocessing on each second image: performing image separation processing on the second image to obtain multiple single-channel eighth images; performing image binarization processing on each eighth image to obtain a ninth image corresponding to each eighth image; performing image fusion processing on the multiple ninth images to obtain a tenth image; performing image morphology processing and image denoising processing on the tenth image to obtain a fourth image.
[0275] In some embodiments, the process of determining the region of interest of each fourth image includes: determining multiple target connected domains in the fourth image; determining the center of the region of interest of the fourth image based on the multiple target connected domains; and determining the region of interest of the fourth image based on the center of the region of interest of the fourth image.
[0276] In some embodiments, the second color card also includes a fourth color block, the image extraction integrity of the fourth color block is greater than the image extraction integrity of other color blocks in the second color card except the fourth color block, and multiple target connected domains in the fourth image are determined, including: performing connected domain calculation on the fourth image to obtain multiple second initial connected domains; determining a third threshold based on the number of pixels of the second initial connected domain corresponding to the fourth color block; determining a fourth threshold based on the aspect ratio of the second initial connected domain corresponding to the fourth color block; and determining the second initial connected domain in the multiple second initial connected domains whose number of pixels is greater than the third threshold and whose aspect ratio is less than the fourth threshold as the target connected domain.
[0277] In some embodiments, determining the center of the region of interest of the fourth image based on multiple target connected domains includes: determining a set of centroid coordinates based on multiple target connected domains, the set of centroid coordinates including the centroid coordinates of each target connected domain; determining the center of the region of interest of the fourth image based on the set of centroid coordinates.
[0278] In some embodiments, based on the centroid coordinate set, determining the center of the region of interest of the fourth image includes: determining the calculated value of the centroid coordinate corresponding to the third color block based on the centroid coordinate set; if the distance between the calculated value of the centroid coordinate and any centroid coordinate in the centroid coordinate set is less than or equal to a sixth threshold, determining the centroid coordinate as the center of the region of interest of the fourth image; if the distance between the calculated value of the centroid coordinate and each centroid coordinate in the centroid coordinate set is greater than the sixth threshold, determining the calculated value of the centroid coordinate as the center of interest of the fourth image.
[0279] In some embodiments, the region of interest of the fourth image is determined based on the center of the region of interest of the fourth image, including: determining the width of the region of interest of the fourth image based on the width of the second initial connected domain corresponding to the fourth color block; determining the region of interest of the fourth image based on the center of the region of interest of the fourth image and the width of the region of interest of the fourth image.
[0280] In some embodiments, based on the second data group and the second initial model, determining the second fitting model includes: preprocessing the second data group to obtain a fourth data group, the data amount of the fourth data group is greater than the data amount of the second data group; based on the fourth data group and the second initial model, determining the parameter value of each parameter in the second fitting model; based on the parameter value of each parameter in the second fitting model, determining the second fitting model.
[0281] In some embodiments, the image parameter value is a gain intensity value, the second initial model is an exponential model, and the second data group is preprocessed to obtain a fourth data group, including: taking the inverse of the signal-to-noise ratio in the second data group to obtain a sixth data group; and performing a spline interpolation operation on the sixth data group to obtain a fourth data group.
[0282] In some embodiments, the image parameter value is a sampling ratio value, the second initial model is a polynomial model, and the second data group is preprocessed to obtain a fourth data group, including: taking the logarithm of each signal-to-noise ratio in the second data group to obtain an eighth data group; and performing a spline interpolation operation on the eighth data group to obtain a fourth data group.
[0283] It can be understood that the principle of the above-mentioned determination process of the second fitting model is the same as the determination process of the first fitting model, and the various steps of the determination process of the second fitting model are similar to the determination process of the first fitting model. The determination process of the second fitting model can refer to the determination process of the first fitting model, and will not be repeated here.
[0284] In some embodiments, reference Fig.17 As shown, based on the original image parameter value of the second shooting mode, the first fitting model and the second fitting model, determining the target image parameter value in the first shooting mode includes:
[0285] S310: Determine a target signal-to-noise ratio corresponding to the original image parameter value in the second shooting mode based on the second fitting model.
[0286] In step S310, the second fitting model can characterize the correspondence between the image parameter value and the signal-to-noise ratio in the second shooting mode, and the target signal-to-noise ratio corresponding to the original image parameter value in the second shooting mode can be determined according to the second fitting model.
[0287] S320: Determine a target image parameter value corresponding to the target signal-to-noise ratio in the first shooting mode based on the first fitting model and the target signal-to-noise ratio.
[0288] In step S320, the first fitting model can characterize the corresponding relationship between the image parameter value and the signal-to-noise ratio in the first shooting mode, and the target image parameter value corresponding to the target signal-to-noise ratio can be determined according to the first model.
[0289] In this embodiment, the target signal-to-noise ratio corresponding to the original image parameter value is determined by the second fitting model, and the target image parameter value corresponding to the target signal-to-noise ratio is determined by the first fitting model, thereby realizing the conversion from the second shooting mode to the first shooting mode under the same signal-to-noise ratio condition, so that any original image parameter value can determine the corresponding target image parameter value, and then the noise reduction parameter can be determined according to the target image parameter value of the first shooting mode in the subsequent process, thereby ensuring the applicability of the configuration method of the noise reduction parameter and the image quality in the second shooting mode, and improving the accuracy and efficiency of the configuration result.
[0290] It should be noted that the reference Fig.18 and Fig.19 As shown, Fig.18 It is a curve schematic diagram of the first fitting model constructed when the image parameter value is the gain intensity value, the abscissa represents the gain intensity value, and the ordinate represents the signal-to-noise ratio. Fig.19 is a schematic diagram of the deviation percentage between the first fitting model and the standard value, the horizontal axis represents the sampling ratio value, and the vertical axis represents the deviation percentage. The standard value can be, for example, a theoretical value of the signal-to-noise ratio obtained by continuously measuring the noise parameters of the image sensor, Fig.18 and Fig.19 It can be seen that the correspondence between the gain intensity value and the signal-to-noise ratio represented by the first fitting model constructed by the noise reduction parameter configuration method disclosed in the present invention is extremely close to the standard value, so that the final noise reduction parameters can be adapted to the corresponding shooting mode and image parameter values, ensuring the accuracy of the configuration results.
[0291] refer to Fig. 20 and Fig.21 As shown, Fig. 20 It is a curve schematic diagram of the first fitting model constructed when the image parameter value is the sampling ratio value, the abscissa represents the gain intensity value, and the ordinate represents the signal-to-noise ratio. Fig.21 is a schematic diagram of the deviation percentage between the first fitting model and the standard value, the horizontal axis represents the sampling ratio value, and the vertical axis represents the deviation percentage. The standard value can be, for example, a theoretical value of the signal-to-noise ratio obtained by continuously measuring the noise parameters of the image sensor, Fig. 20 and Fig.21 It can be seen that the correspondence between the sampling ratio value and the signal-to-noise ratio represented by the first fitting model constructed by the noise reduction parameter configuration method disclosed in the present invention is extremely close to the standard value, so that the final noise reduction parameters can be adapted to the corresponding shooting mode and image parameter values, thereby ensuring the accuracy of the configuration results.
[0292] In an exemplary embodiment, reference Fig. 22 As shown, a noise reduction parameter configuration method is provided, characterized in that the noise reduction parameter configuration method includes:
[0293] S1. Acquire a plurality of first images in a first shooting mode, where different first images correspond to different image parameter values;
[0294] S2, determining the signal-to-noise ratio of each first image;
[0295] S3, determining a first data group based on the image parameter value and the signal-to-noise ratio of each first image;
[0296] S4, determining a first fitting model based on the first data set and the first initial model;
[0297] S5, acquiring a plurality of second images in a second shooting mode, where different second images correspond to different image parameter values;
[0298] S6, determining the signal-to-noise ratio of each second image;
[0299] S7, determining a second data group based on the image parameter value and the signal-to-noise ratio of each second image;
[0300] S8, determining a second fitting model based on the second data set and the second initial model;
[0301] S9. Determine a target signal-to-noise ratio corresponding to the original image parameter value in the second shooting mode based on the second fitting model;
[0302] S10, determining a target image parameter value corresponding to the target signal-to-noise ratio in the first shooting mode based on the first fitting model and the target signal-to-noise ratio;
[0303] S11. Determine a noise reduction parameter of a second shooting mode based on a target image parameter value and preset configuration information.
[0304] In this embodiment, by determining the continuous first fitting model and the second fitting model, the target image parameter value in the first shooting mode can be determined according to the original image parameter values of the first fitting model, the second fitting model and the second shooting mode, and the noise reduction parameters of the second shooting mode can be determined according to the target image parameter values, thereby realizing the determination of the noise reduction parameters of the second shooting mode. The first fitting model and the second fitting model can respectively characterize the continuous correspondence between the image parameter value and the signal-to-noise ratio in the first shooting mode and the second shooting mode, so that any original image parameter value can determine the corresponding target image parameter value, thereby ensuring the applicability of the configuration method of the noise reduction parameter and the image quality in the second shooting mode, and improving the accuracy and efficiency of the configuration result.
[0305] In an exemplary embodiment, reference Fig.23As shown, a noise reduction parameter configuration device is provided, and the noise reduction parameter configuration device includes a first determination module 20, a second determination module 30, a third determination module 40 and a fourth determination module 50. The first determination module 20 is used to determine a continuous first fitting model, and the first fitting model is used to characterize the corresponding relationship between the image parameter value and the signal-to-noise ratio under the first shooting mode. The first fitting model is obtained by fitting the first initial model to the first data group, wherein the first data group includes a plurality of different image parameter values under the first shooting mode and the signal-to-noise ratios corresponding to each image parameter value.
[0306] The second determination module 30 is used to determine a continuous second fitting model, which is used to characterize the correspondence between the image parameter value and the signal-to-noise ratio under the second shooting mode. The second fitting model is obtained by fitting the second initial model to the second data group, wherein the second data group includes multiple different image parameter values under the second shooting mode and the signal-to-noise ratio corresponding to each image parameter value.
[0307] The third determination module 40 is used to determine the target image parameter value in the first shooting mode based on the original image parameter value of the second shooting mode, the first fitting model and the second fitting model, and the signal-to-noise ratio corresponding to the original image parameter value matches the signal-to-noise ratio corresponding to the target image parameter value.
[0308] The fourth determination module 50 is used to determine the noise reduction parameters of the second shooting mode based on the target image parameter value and preset configuration information, and the preset configuration information is used to characterize the corresponding relationship between the image parameter value and the noise reduction parameter in the first shooting mode.
[0309] In this embodiment, the first determination module 20 and the second determination module 30 respectively determine the continuous first fitting model and the second fitting model, and the third determination module 40 can determine the target image parameter value in the first shooting mode according to the original image parameter values of the first fitting model, the second fitting model and the second shooting mode, and the fourth determination module 50 determines the noise reduction parameter in the second shooting mode according to the target image parameter value, thereby realizing the determination of the noise reduction parameter in the second shooting mode. The first fitting model and the second fitting model can respectively characterize the continuous correspondence between the image parameter value and the signal-to-noise ratio in the first shooting mode and the second shooting mode, so that any original image parameter value can determine the corresponding target image parameter value, thereby ensuring the applicability of the configuration method of the noise reduction parameter and the image quality in the second shooting mode, and improving the accuracy and efficiency of the configuration result.
[0310] In one embodiment, the first determination module 20 is also used to: acquire multiple first images in a first shooting mode, different first images corresponding to different image parameter values; determine the signal-to-noise ratio of each first image; determine the first data group based on the image parameter value and the signal-to-noise ratio of each first image; and determine the first fitting model based on the first data group and the first initial model.
[0311] In one embodiment, the photographed object of the first image is a first color card, the first color card includes a first color block, and the area corresponding to the first color block in the first image is used to calculate the signal-to-noise ratio of the first image. The first determination module 20 is also used to: perform image preprocessing on each first image to obtain a third image corresponding to each first image; determine the region of interest of each third image; and determine the signal-to-noise ratio of each region of interest as the signal-to-noise ratio of each first image.
[0312] In one embodiment, the first determination module 20 is also used to: perform the following image preprocessing on each first image: perform image separation processing on the first image to obtain multiple single-channel fifth images; perform image binarization processing on each fifth image to obtain a sixth image corresponding to each fifth image; perform image fusion processing on the multiple sixth images to obtain a seventh image; perform image morphology processing and image denoising processing on the seventh image to obtain a third image.
[0313] In one embodiment, the first determination module 20 is further used to: determine multiple target connected domains in the third image; determine the center of the region of interest of the third image based on the multiple target connected domains; determine the region of interest of the third image based on the center of the region of interest of the third image.
[0314] In one embodiment, the first color card also includes a third color block, and the image extraction integrity of the third color block is greater than the image extraction integrity of other color blocks in the first color card except the third color block. The first determination module 20 is also used to: perform connected domain calculation on the third image to obtain multiple first initial connected domains; determine a first threshold based on the number of pixels of the first initial connected domain corresponding to the third color block; determine a second threshold based on the aspect ratio of the first initial connected domain corresponding to the third color block; and determine the first initial connected domain in the multiple first initial connected domains whose number of pixels is greater than the first threshold and whose aspect ratio is less than the second threshold as the target connected domain.
[0315] In one embodiment, the first determination module 20 is further used to: determine a centroid coordinate set based on multiple target connected domains, the centroid coordinate set including the centroid coordinates of each target connected domain; and determine the center of the region of interest of the third image based on the centroid coordinate set.
[0316] In one embodiment, the first determination module 20 is also used to: determine the calculated centroid coordinate value corresponding to the first color block based on the centroid coordinate set; if the distance between the calculated centroid coordinate value and any centroid coordinate in the centroid coordinate set is less than or equal to a fifth threshold, determine the centroid coordinate as the center of the area of interest of the third image; if the distance between the calculated centroid coordinate value and each centroid coordinate in the centroid coordinate set is greater than the fifth threshold, determine the calculated centroid coordinate value as the center of the area of interest of the third image.
[0317] In one embodiment, the first determination module 20 is also used to: determine the width of the region of interest of the third image based on the width of the first initial connected domain corresponding to the third color block; determine the region of interest of the third image based on the center of the region of interest of the third image and the width of the region of interest of the third image.
[0318] In one embodiment, the first determination module 20 is further used to: determine the signal-to-noise ratio of the region of interest in each single-channel image; and determine the signal-to-noise ratio of the region of interest based on the signal-to-noise ratio of the region of interest in each single-channel image.
[0319] In one embodiment, the first determination module 20 is also used to: preprocess the first data group to obtain a third data group, the data amount of the third data group is greater than the data amount of the first data group; determine the parameter value of each parameter in the first fitting model based on the third data group and the first initial model; determine the first fitting model based on the parameter value of each parameter in the first fitting model.
[0320] In one embodiment, the image parameter value is a gain intensity value, the first initial model is an exponential model, and the first determination module 20 is further used to: take the inverse of each signal-to-noise ratio in the first data group to obtain a fifth data group; and perform spline interpolation operation on the fifth data group to obtain a third data group.
[0321] In one embodiment, the image parameter value is a sampling ratio value, the first initial model is a polynomial model, and the first determination module 20 is further used to: take the logarithm of each signal-to-noise ratio in the first data group to obtain a seventh data group; and perform spline interpolation operation on the seventh data group to obtain a third data group.
[0322] In one embodiment, the second determination module 30 is also used to: acquire multiple second images in a second shooting mode, different second images corresponding to different image parameter values; determine the signal-to-noise ratio of each second image; determine the second data group based on the image parameter value and the signal-to-noise ratio of each second image; and determine the second fitting model based on the second data group and the second initial model.
[0323] In one embodiment, the photographed object of the second image is a second color card, the second color card includes a second color block, and the area corresponding to the second color block in the second image is used to calculate the signal-to-noise ratio of the second image. The second determination module 30 is also used to: perform image preprocessing on each second image to obtain a fourth image corresponding to each second image; determine the area of interest of each fourth image; and determine the signal-to-noise ratio of each area of interest as the signal-to-noise ratio of each second image.
[0324] In one embodiment, the second determination module 30 is also used to: perform the following image preprocessing on each second image: perform image separation processing on the second image to obtain multiple single-channel eighth images; perform image binarization processing on each eighth image to obtain a ninth image corresponding to each eighth image; perform image fusion processing on the multiple ninth images to obtain a tenth image; perform image morphology processing and image denoising processing on the tenth image to obtain a fourth image.
[0325] In one embodiment, the second determination module 30 is further used to: determine multiple target connected domains in the fourth image; determine the center of the region of interest of the fourth image based on the multiple target connected domains; determine the region of interest of the fourth image based on the center of the region of interest of the fourth image.
[0326] In one embodiment, the second color card also includes a fourth color block, and the image extraction integrity of the fourth color block is greater than the image extraction integrity of other color blocks in the second color card except the fourth color block. The second determination module 30 is also used to: perform connected domain calculation on the fourth image to obtain multiple second initial connected domains; determine a third threshold based on the number of pixels of the second initial connected domain corresponding to the fourth color block; determine a fourth threshold based on the aspect ratio of the second initial connected domain corresponding to the fourth color block; and determine the second initial connected domain in the multiple second initial connected domains whose number of pixels is greater than the third threshold and whose aspect ratio is less than the fourth threshold as the target connected domain.
[0327] In one embodiment, the second determination module 30 is further used to: determine a centroid coordinate set based on multiple target connected domains, the centroid coordinate set including the centroid coordinates of each target connected domain; and determine the center of the region of interest of the fourth image based on the centroid coordinate set.
[0328] In one embodiment, the second determination module 30 is also used to: determine the calculated centroid coordinate value corresponding to the third color block based on the centroid coordinate set; if the distance between the calculated centroid coordinate value and any centroid coordinate in the centroid coordinate set is less than or equal to a sixth threshold, determine the centroid coordinate as the center of the area of interest of the fourth image; if the distance between the calculated centroid coordinate value and each centroid coordinate in the centroid coordinate set is greater than the sixth threshold, determine the calculated centroid coordinate value as the center of the area of interest of the fourth image.
[0329] In one embodiment, the second determination module 30 is further used to: determine the width of the region of interest of the fourth image based on the width of the second initial connected domain corresponding to the fourth color block; determine the region of interest of the fourth image based on the center of the region of interest of the fourth image and the width of the region of interest of the fourth image.
[0330] In one embodiment, the second determination module 30 is further used to: determine the signal-to-noise ratio of the region of interest in each single-channel image; and determine the signal-to-noise ratio of the region of interest based on the signal-to-noise ratio of the region of interest in each single-channel image.
[0331] In one embodiment, the second determination module 30 is also used to: preprocess the second data group to obtain a fourth data group, the data amount of the fourth data group is greater than the data amount of the second data group; determine the parameter value of each parameter in the second fitting model based on the fourth data group and the second initial model; determine the second fitting model based on the parameter value of each parameter in the second fitting model.
[0332] In one embodiment, the image parameter value is a gain intensity value, the second initial model is an exponential model, and the second determination module 30 is further used to: take the inverse of the signal-to-noise ratio in the second data group to obtain a sixth data group; and perform spline interpolation operation on the sixth data group to obtain a fourth data group.
[0333] In one embodiment, the image parameter value is a sampling ratio value, the second initial model is a polynomial model, and the second determination module 30 is further used to: take the logarithm of each signal-to-noise ratio in the second data group to obtain an eighth data group; and perform spline interpolation operation on the eighth data group to obtain a fourth data group.
[0334] In one embodiment, the third determination module 40 is further used to: determine the target signal-to-noise ratio corresponding to the original image parameter value in the second shooting mode based on the second fitting model; and determine the target image parameter value corresponding to the target signal-to-noise ratio in the first shooting mode based on the first fitting model and the target signal-to-noise ratio.
[0335] In an exemplary embodiment, an electronic device is provided, referring to Fig.24 As shown, the electronic device may include one or more of the following components: a processing component 101 , a memory 102 , a power component 103 , a multimedia component 104 , an audio component 105 , an input / output (I / O) interface 106 , a sensor component 107 , and a communication component 108 .
[0336] The processing component 101 generally controls the overall operation of the electronic device, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 101 may include one or more processors 109 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 101 may include one or more modules to facilitate the interaction between the processing component 101 and other components. For example, the processing component 101 may include a multimedia module to facilitate the interaction between the multimedia component 104 and the processing component 101.
[0337] The memory 102 is configured to store various types of data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc. The memory 102 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0338] The power component 103 provides power to various components of the electronic device. The power component 103 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device.
[0339] The multimedia component 104 includes a screen that provides an output interface between the electronic device and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 104 includes a front camera and / or a rear camera. When the electronic device is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0340] The audio component 105 is configured to output and / or input audio signals. For example, the audio component 105 includes a microphone (MIC), and when the electronic device is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 102 or sent via the communication component 108. In some embodiments, the audio component 105 also includes a speaker for outputting audio signals.
[0341] I / O interface 106 provides an interface between processing component 101 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0342] The sensor assembly 107 includes one or more sensors for providing various aspects of status assessment for the electronic device. For example, the sensor assembly 107 can detect the on / off state of the electronic device, the relative positioning of components, such as the display and keypad of the electronic device, and the sensor assembly 107 can also detect the position change of the electronic device or a component of the electronic device, the presence or absence of user contact with the electronic device, the orientation or acceleration / deceleration of the electronic device and the temperature change of the electronic device. The sensor assembly 107 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 107 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 107 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0343] The communication component 108 is configured to facilitate wired or wireless communication between the electronic device and other devices. The device can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 108 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 108 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0344] In an exemplary embodiment, the electronic device may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned noise reduction parameter configuration method applied to the electronic device.
[0345] In an exemplary embodiment, a non-temporary computer-readable storage medium including instructions is also provided, such as a memory 102 including instructions, and the above instructions can be executed by a processor 109 of an electronic device to complete the above-mentioned noise reduction parameter configuration method applied to the electronic device. For example, the non-temporary computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a tape, a floppy disk, and an optical data storage device. When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is enabled to execute the noise reduction parameter configuration method shown in the above embodiment.
[0346] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0347] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A noise reduction parameter configuration method, characterized in that: The noise reduction parameter configuration method comprises: Determine a first continuous fitting model, where the first fitting model is used to characterize a corresponding relationship between an image parameter value and a signal-to-noise ratio under a first shooting mode, and the first fitting model is obtained by fitting a first initial model to a first data group, wherein the first data group includes a plurality of different image parameter values under the first shooting mode and a signal-to-noise ratio corresponding to each image parameter value; Determine a second fitting model of a continuous type, where the second fitting model is used to characterize the corresponding relationship between the image parameter value and the signal-to-noise ratio under the second shooting mode, and the second fitting model is obtained by fitting the second initial model to the second data group, wherein the second data group includes a plurality of different image parameter values under the second shooting mode and the signal-to-noise ratios corresponding to the respective image parameter values; determining, based on the original image parameter value of the second shooting mode, the first fitting model, and the second fitting model, a target image parameter value under the first shooting mode, wherein a signal-to-noise ratio corresponding to the original image parameter value matches a signal-to-noise ratio corresponding to the target image parameter value; Determine the noise reduction parameter of the second shooting mode based on the target image parameter value and preset configuration information, wherein the preset configuration information is used to characterize the corresponding relationship between the image parameter value and the noise reduction parameter in the first shooting mode.
2. The noise reduction parameter configuration method according to claim 1, characterized in that: The first fitting model of the continuous type is determined, comprising: Acquire a plurality of first images in the first shooting mode, where different first images correspond to different image parameter values; determining a signal-to-noise ratio of each of the first images; determining the first data group based on the image parameter value and the signal-to-noise ratio of each of the first images; determining the first fitting model based on the first data set and the first initial model; and / or, The second fitting model of the continuous type is determined, comprising: Acquire a plurality of second images in the second shooting mode, where different second images correspond to different image parameter values; determining a signal-to-noise ratio of each of the second images; determining the second data set based on the image parameter value and the signal-to-noise ratio of each of the second images; The second fitting model is determined based on the second data set and the second initial model.
3. The noise reduction parameter configuration method according to claim 2, characterized in that: The photographed object of the first image is a first color card, the first color card includes a first color block, and an area corresponding to the first color block in the first image is used to calculate the signal-to-noise ratio of the first image. The determining the signal-to-noise ratio of each first image includes: Performing image preprocessing on each of the first images to obtain a third image corresponding to each of the first images; Determining a region of interest of each of the third images; determining a signal-to-noise ratio of each of the regions of interest as a signal-to-noise ratio of each of the first images; and / or, The photographed object of the second image is a second color card, the second color card includes a second color block, and the area corresponding to the second color block in the second image is used to calculate the signal-to-noise ratio of the second image. The determining the signal-to-noise ratio of each second image includes: performing image preprocessing on each of the second images to obtain a fourth image corresponding to each of the second images; determining a region of interest of each of the fourth images; The signal-to-noise ratio of each of the regions of interest is determined as the signal-to-noise ratio of each of the second images.
4. The noise reduction parameter configuration method according to claim 3, characterized in that: The performing image preprocessing on each of the first images to obtain a third image corresponding to each of the first images includes: The following image preprocessing is performed on each of the first images: performing image separation processing on the first image to obtain a plurality of single-channel fifth images; Performing image binarization processing on each of the fifth images to obtain a sixth image corresponding to each of the fifth images; Performing image fusion processing on the plurality of the sixth images to obtain a seventh image; Performing image morphology processing and image denoising processing on the seventh image to obtain the third image; and / or, The performing image preprocessing on each of the second images to obtain a fourth image corresponding to each of the second images includes: The following image preprocessing is performed on each of the second images: performing image separation processing on the second image to obtain a plurality of single-channel eighth images; Performing image binarization processing on each of the eighth images to obtain a ninth image corresponding to each of the eighth images; Performing image fusion processing on a plurality of the ninth images to obtain a tenth image; Perform image morphology processing and image denoising processing on the tenth image to obtain the fourth image.
5. The noise reduction parameter configuration method according to claim 3, characterized in that: The process of determining the region of interest of each of the third images comprises: Determining a plurality of target connected domains in the third image; Determining a center of a region of interest of the third image based on the multiple target connected domains; Determining the region of interest of the third image based on the center of the region of interest of the third image; and / or, The process of determining the region of interest of each of the fourth images comprises: Determining a plurality of target connected domains in the fourth image; Determining a center of a region of interest of the fourth image based on the multiple target connected domains; Based on the center of the region of interest of the fourth image, a region of interest of the fourth image is determined.
6. The noise reduction parameter configuration method according to claim 5, characterized in that: The first color card further includes a third color block, the image extraction integrity of the third color block is greater than the image extraction integrity of other color blocks in the first color card except the third color block, and determining a plurality of target connected domains in the third image includes: Performing connected domain calculation on the third image to obtain a plurality of first initial connected domains; Determining a first threshold based on the number of pixels of the first initial connected domain corresponding to the third color block; determining a second threshold based on the aspect ratio of the first initial connected domain corresponding to the third color block; Determine the first initial connected domains among the multiple first initial connected domains whose number of pixels is greater than the first threshold and whose aspect ratio is less than the second threshold as the target connected domain; and / or, The second color card further includes a fourth color block, the image extraction integrity of the fourth color block is greater than the image extraction integrity of other color blocks in the second color card except the fourth color block, and determining the multiple target connected domains in the fourth image includes: Performing connected domain calculation on the fourth image to obtain a plurality of second initial connected domains; Determining a third threshold based on the number of pixels of the second initial connected domain corresponding to the fourth color block; determining a fourth threshold based on the aspect ratio of the second initial connected domain corresponding to the fourth color block; The second initial connected domains among the plurality of second initial connected domains, whose number of pixels is greater than the third threshold and whose aspect ratio is less than the fourth threshold, are determined as the target connected domains.
7. The noise reduction parameter configuration method according to claim 6, characterized in that: The step of determining the center of the region of interest of the third image based on the multiple target connected domains includes: Based on the multiple target connected domains, determine a centroid coordinate set, wherein the centroid coordinate set includes the centroid coordinates of each of the target connected domains; Based on the centroid coordinate set, determining the center of the region of interest of the third image; and / or, Determining the center of the region of interest of the fourth image based on the multiple target connected domains includes: Based on the multiple target connected domains, determine a centroid coordinate set, wherein the centroid coordinate set includes the centroid coordinates of each of the target connected domains; Based on the centroid coordinate set, a center of a region of interest of the fourth image is determined.
8. The noise reduction parameter configuration method according to claim 7, characterized in that: The step of determining the center of the region of interest of the third image based on the set of centroid coordinates includes: Based on the centroid coordinate set, determining a centroid coordinate calculation value corresponding to the first color block; If the distance between the calculated centroid coordinate value and any centroid coordinate in the centroid coordinate set is less than or equal to a fifth threshold, determining the centroid coordinate as the center of the region of interest of the third image; If the distances between the calculated value of the centroid coordinates and each of the centroid coordinates in the set of centroid coordinates are greater than the fifth threshold, determining the calculated value of the centroid coordinates as the center of the region of interest of the third image; and / or, The step of determining the center of the region of interest of the fourth image based on the set of centroid coordinates includes: Based on the centroid coordinate set, determining a centroid coordinate calculation value corresponding to the third color block; If the distance between the calculated centroid coordinate value and any centroid coordinate in the centroid coordinate set is less than or equal to a sixth threshold, determining the centroid coordinate as the center of the region of interest of the fourth image; If the distances between the calculated value of the centroid coordinate and each of the centroid coordinates in the set of centroid coordinates are greater than the sixth threshold, the calculated value of the centroid coordinate is determined as the center of the region of interest of the fourth image.
9. The method for configuring noise reduction parameters according to claim 6, characterized in that: The determining the region of interest of the third image based on the center of the region of interest of the third image comprises: Determining a width of a region of interest of the third image based on a width of the first initial connected domain corresponding to the third color block; determining the region of interest of the third image based on the center of the region of interest of the third image and the width of the region of interest of the third image; and / or, The determining the region of interest of the fourth image based on the center of the region of interest of the fourth image includes: Determining a width of a region of interest of the fourth image based on a width of the second initial connected domain corresponding to the fourth color block; The region of interest of the fourth image is determined based on the center of the region of interest of the fourth image and the width of the region of interest of the fourth image.
10. The noise reduction parameter configuration method according to claim 3, characterized in that: The determining the signal-to-noise ratio of each region of interest includes: Determining the signal-to-noise ratio of the region of interest in each single-channel image; The signal-to-noise ratio of the region of interest is determined based on the signal-to-noise ratio of the region of interest in each single-channel image.
11. The noise reduction parameter configuration method according to claim 2, characterized in that: The step of determining the first fitting model based on the first data set and the first initial model comprises: Preprocessing the first data group to obtain a third data group, wherein the data volume of the third data group is greater than the data volume of the first data group; Determining parameter values of each parameter in the first fitting model based on the third data set and the first initial model; determining the first fitting model based on parameter values of each parameter in the first fitting model; and / or, The step of determining the second fitting model based on the second data set and the second initial model comprises: Preprocessing the second data group to obtain a fourth data group, wherein the data volume of the fourth data group is greater than the data volume of the second data group; Determining parameter values of each parameter in the second fitting model based on the fourth data set and the second initial model; The second fitting model is determined based on the parameter value of each parameter in the second fitting model.
12. The noise reduction parameter configuration method according to claim 11, characterized in that: The image parameter value is a gain intensity value, the first initial model is an exponential model, and the first data group is preprocessed to obtain a third data group, including: Taking the inverse of each of the signal-to-noise ratios in the first data group, to obtain a fifth data group; Performing a spline interpolation operation on the fifth data set to obtain the third data set; and / or, The image parameter value is a gain intensity value, the second initial model is an exponential model, and the second data group is preprocessed to obtain a fourth data group, including: Taking the inverse of the signal-to-noise ratio in the second data group to obtain a sixth data group; Perform a spline interpolation operation on the sixth data set to obtain the fourth data set.
13. The noise reduction parameter configuration method according to claim 11, characterized in that: The image parameter value is a sampling ratio value, the first initial model is a polynomial model, and the first data group is preprocessed to obtain a third data group, including: Taking the logarithm of each of the signal-to-noise ratios in the first data group to obtain a seventh data group; Performing a spline interpolation operation on the seventh data set to obtain the third data set; and / or, The image parameter value is a sampling ratio value, the second initial model is a polynomial model, and the second data group is preprocessed to obtain a fourth data group, including: Taking the logarithm of each of the signal-to-noise ratios in the second data group to obtain an eighth data group; A spline interpolation operation is performed on the eighth data group to obtain the fourth data group.
14. The method for configuring noise reduction parameters according to any one of claims 1 to 13, characterized in that: The determining, based on the original image parameter value of the second shooting mode, the first fitting model and the second fitting model, the target image parameter value under the first shooting mode comprises: Determining a target signal-to-noise ratio corresponding to the original image parameter value in the second shooting mode based on the second fitting model; Based on the first fitting model and the target signal-to-noise ratio, the target image parameter value corresponding to the target signal-to-noise ratio in the first shooting mode is determined.
15. A noise reduction parameter configuration device, characterized in that: The noise reduction parameter configuration device comprises: a first determining module, the first determining module is used to determine a first continuous fitting model, the first fitting model is used to characterize the corresponding relationship between the image parameter value and the signal-to-noise ratio under the first shooting mode, the first fitting model is obtained by fitting the first initial model to the first data group, wherein the first data group includes a plurality of different image parameter values under the first shooting mode and the signal-to-noise ratios corresponding to the respective image parameter values; a second determination module, the second determination module is used to determine a continuous second fitting model, the second fitting model is used to characterize the corresponding relationship between the image parameter value and the signal-to-noise ratio under the second shooting mode, the second fitting model is obtained by fitting the second initial model to the second data group, wherein the second data group includes a plurality of different image parameter values under the second shooting mode and the signal-to-noise ratios corresponding to the respective image parameter values; a third determination module, the third determination module being used to determine a target image parameter value in the first shooting mode based on the original image parameter value in the second shooting mode, the first fitting model, and the second fitting model, wherein a signal-to-noise ratio corresponding to the original image parameter value matches a signal-to-noise ratio corresponding to the target image parameter value; A fourth determination module, the fourth determination module is used to determine the noise reduction parameters of the second shooting mode based on the target image parameter value and preset configuration information, and the preset configuration information is used to characterize the corresponding relationship between the image parameter value and the noise reduction parameter in the first shooting mode.
16. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Determine a first continuous fitting model, where the first fitting model is used to characterize a corresponding relationship between an image parameter value and a signal-to-noise ratio under a first shooting mode, and the first fitting model is obtained by fitting a first initial model to a first data group, wherein the first data group includes a plurality of different image parameter values under the first shooting mode and a signal-to-noise ratio corresponding to each image parameter value; Determine a second fitting model of a continuous type, where the second fitting model is used to characterize the corresponding relationship between the image parameter value and the signal-to-noise ratio under the second shooting mode, and the second fitting model is obtained by fitting the second initial model to the second data group, wherein the second data group includes a plurality of different image parameter values under the second shooting mode and the signal-to-noise ratios corresponding to the respective image parameter values; determining, based on the original image parameter value of the second shooting mode, the first fitting model, and the second fitting model, a target image parameter value under the first shooting mode, wherein a signal-to-noise ratio corresponding to the original image parameter value matches a signal-to-noise ratio corresponding to the target image parameter value; Determine the noise reduction parameter of the second shooting mode based on the target image parameter value and preset configuration information, wherein the preset configuration information is used to characterize the corresponding relationship between the image parameter value and the noise reduction parameter in the first shooting mode.
17. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute a noise reduction parameter configuration method, the noise reduction parameter configuration method comprising: Determine a first continuous fitting model, where the first fitting model is used to characterize a corresponding relationship between an image parameter value and a signal-to-noise ratio under a first shooting mode, and the first fitting model is obtained by fitting a first initial model to a first data group, wherein the first data group includes a plurality of different image parameter values under the first shooting mode and a signal-to-noise ratio corresponding to each image parameter value; Determine a second fitting model of a continuous type, where the second fitting model is used to characterize the corresponding relationship between the image parameter value and the signal-to-noise ratio under the second shooting mode, and the second fitting model is obtained by fitting the second initial model to the second data group, wherein the second data group includes a plurality of different image parameter values under the second shooting mode and the signal-to-noise ratios corresponding to the respective image parameter values; determining, based on the original image parameter value of the second shooting mode, the first fitting model, and the second fitting model, a target image parameter value under the first shooting mode, wherein a signal-to-noise ratio corresponding to the original image parameter value matches a signal-to-noise ratio corresponding to the target image parameter value; Determine the noise reduction parameter of the second shooting mode based on the target image parameter value and preset configuration information, wherein the preset configuration information is used to characterize the corresponding relationship between the image parameter value and the noise reduction parameter in the first shooting mode.
Citation Information
Patent Citations
Camera debugging method and device
CN114697470A
Rendering objects to match camera noise
US20200273212A1