[go: up one dir, main page]

CN111953953A - Method and device for adjusting pixel brightness and electronic equipment - Google Patents

Method and device for adjusting pixel brightness and electronic equipment Download PDF

Info

Publication number
CN111953953A
CN111953953A CN201910412740.9A CN201910412740A CN111953953A CN 111953953 A CN111953953 A CN 111953953A CN 201910412740 A CN201910412740 A CN 201910412740A CN 111953953 A CN111953953 A CN 111953953A
Authority
CN
China
Prior art keywords
pixel
image
value
gain
color temperature
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910412740.9A
Other languages
Chinese (zh)
Inventor
周兰
许译天
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Horizon Robotics Technology Research and Development Co Ltd
Original Assignee
Beijing Horizon Robotics Technology Research and Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Horizon Robotics Technology Research and Development Co Ltd filed Critical Beijing Horizon Robotics Technology Research and Development Co Ltd
Priority to CN201910412740.9A priority Critical patent/CN111953953A/en
Publication of CN111953953A publication Critical patent/CN111953953A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/73Colour balance circuits, e.g. white balance circuits or colour temperature control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/77Circuits for processing the brightness signal and the chrominance signal relative to each other, e.g. adjusting the phase of the brightness signal relative to the colour signal, correcting differential gain or differential phase

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

A method and a device for adjusting pixel brightness and an electronic device are disclosed. In an embodiment of the present application, a method for adjusting pixel brightness may include: determining a color temperature value of an image to be corrected; determining correction parameters of a preset image partition in the image to be corrected according to the color temperature value; calculating a gain value of a pixel in the predetermined image partition according to the correction parameter and a position parameter of the pixel; and adjusting the brightness of the pixel using the gain value. The embodiment of the application can more efficiently and accurately eliminate the dark corners in the image.

Description

Method and device for adjusting pixel brightness and electronic equipment
Technical Field
The present disclosure relates to image processing technologies, and in particular, to a method and an apparatus for adjusting pixel brightness, and an electronic device.
Background
Due to the optical characteristics of the lens, the amount of light at the focal plane away from the optical axis is reduced, resulting in a dark angle phenomenon such as normal brightness at the center of the image, and uneven brightness at the periphery. In some applications, it is desirable to eliminate vignetting in the image.
Disclosure of Invention
In order to solve the above technical problems, it is desirable to provide a method and an apparatus for adjusting pixel brightness, and an electronic device, which can eliminate dark corners in an image more efficiently and accurately.
According to an aspect of the present application, there is provided a method of adjusting luminance of a pixel, including:
determining a color temperature value of an image to be corrected;
determining correction parameters of a preset image partition in the image to be corrected according to the color temperature value;
calculating a gain value of a pixel in the predetermined image partition according to the correction parameter and a position parameter of the pixel; and
adjusting the brightness of the pixel using the gain value.
According to an aspect of the present application, there is provided a method of determining a parameter for adjusting luminance of a pixel, comprising:
acquiring sample images of a plurality of reference color temperature values and corresponding target images;
obtaining a gain image by using the target image and the sample image; and
training a preset regression equation by taking the sample image as input and the gain image as a target to obtain reference correction parameters corresponding to all reference color temperature values;
wherein the predetermined regression equation is used for representing the variation of the gain value of the pixel along with the position parameter.
According to an aspect of the present application, there is provided an apparatus for adjusting luminance of a pixel, including:
the device comprises a first determination module, a second determination module and a correction module, wherein the first determination module is configured to determine a color temperature value of an image to be corrected;
the second determining module is configured to determine the correction parameters of the preset image partitions in the image to be corrected according to the color temperature values;
a calculation module configured to calculate a gain value for a pixel in the predetermined image partition based on the correction parameter and a position parameter of the pixel; and
an adjustment module configured to adjust the brightness of the pixel using the gain value.
According to an aspect of the present application, there is provided an apparatus for determining a parameter for adjusting luminance of a pixel, including:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is configured to acquire sample images of a plurality of reference color temperature values and corresponding target images;
a second obtaining module configured to obtain a gain image using the target image and the sample image; and
the training module is configured to train a predetermined regression equation by taking the sample image as input and the gain image as a target so as to obtain reference correction parameters corresponding to the reference color temperature values;
wherein the predetermined regression equation is used for representing the variation of the gain value of the pixel along with the position parameter.
According to an aspect of the present application, there is provided an electronic apparatus including:
a processor; a memory for storing the processor-executable instructions; the processor is configured to read the executable instructions from the memory and execute the instructions to implement the steps of the method for adjusting the brightness of the pixel and/or the method for determining the parameter for adjusting the brightness of the pixel.
According to an aspect of the present application, there is provided a computer-readable storage medium storing a computer program for performing the steps of the above-described method of adjusting the luminance of a pixel and/or the method of determining a parameter for adjusting the luminance of a pixel.
According to the method, the device and the electronic equipment for adjusting the pixel brightness, the dark corners in the image can be eliminated more efficiently and accurately.
Drawings
The above and other objects, features and advantages of the present application will become more apparent by describing in more detail embodiments of the present application with reference to the attached drawings. The accompanying drawings are included to provide a further understanding of the embodiments of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the principles of the application. In the drawings, like reference numbers generally represent like parts or steps.
Fig. 1 is a flowchart illustrating a method for adjusting luminance of a pixel according to an exemplary embodiment of the present disclosure.
Fig. 2 is a schematic diagram illustrating division of image partitions in an image with dark corners at edges according to an exemplary embodiment of the present application.
Fig. 3 is a schematic diagram of image partition when an equal division manner of 2 × 2 is adopted according to an exemplary embodiment of the present application.
Fig. 4 is a flowchart illustrating a method for determining a parameter for adjusting the brightness of a pixel according to an exemplary embodiment of the present application.
Fig. 5 is a schematic structural diagram of an apparatus for adjusting luminance of a pixel according to an exemplary embodiment of the present application.
Fig. 6 is a schematic structural diagram of an apparatus for determining a parameter for adjusting luminance of a pixel according to an exemplary embodiment of the present application.
Fig. 7 is a block diagram of an electronic device provided in an exemplary embodiment of the present application.
Detailed Description
Hereinafter, example embodiments according to the present application will be described in detail with reference to the accompanying drawings. It should be understood that the described embodiments are only some embodiments of the present application and not all embodiments of the present application, and that the present application is not limited by the example embodiments described herein.
Summary of the application
As described above, due to the influence of the optical characteristics of the lens, dark corners, such as normal brightness in the center of the image and low brightness in the periphery, often occur. In practical application of images, whether the brightness of the images is uniform, that is, whether the images have dark corners, directly affects the result of image processing. For example, in the smart driving application, if the image has a dark corner, the accuracy of the image processing result, such as obstacle detection, is reduced, and the accuracy of the image processing result directly affects the accuracy of the decision, such as obstacle avoidance, in the smart driving application. Therefore, there is a need to efficiently and timely eliminate vignetting in an image (e.g., before performing image processing such as image recognition, object detection, etc.).
In order to solve the above technical problem, the inventive concept of the embodiments of the present application includes providing a method and an apparatus for adjusting luminance of a pixel, and an electronic device, where a color temperature value of an image to be corrected is used to determine a correction parameter for each predetermined image partition in the image to be corrected, a gain value of each pixel is calculated according to the correction parameter for the predetermined image partition and a position parameter of each pixel in the predetermined image partition, and finally the luminance of the corresponding pixel is adjusted by using the gain value. Therefore, for each pixel in the image, the embodiment of the present application can reasonably compensate the brightness of the pixel by the correction parameter of the area (i.e., the image partition) to which the pixel belongs and the position of the pixel, thereby making full use of the "characteristic that the distribution of the dark corners in the image is strongly correlated with the position of the pixel in the image", and more efficiently and accurately eliminating the dark corners in the image (for example, the brightness unevenness problems such as normal central brightness and uneven peripheral brightness of the image due to different light quantities at different positions on the imaging focal plane and at different distances from the optical axis).
In order to solve the above technical problem, the inventive concept of the embodiments of the present application further includes providing a method and an apparatus for determining a parameter for adjusting brightness of a pixel, and an electronic device, wherein a predetermined regression equation is trained through a sample image and a gain image obtained from the sample image and a target image, so as to obtain a reference correction parameter related to an agreed reference color temperature in advance before adjusting the brightness of the pixel, and the reference correction parameter can represent a degree of variation of the gain of the pixel with a position thereof, so that only a small amount of the reference correction parameter is stored in the electronic device, such as a computer, the vignetting correction can be accurately and efficiently performed on various images by the method for adjusting brightness of the pixel, and not only the vignetting correction effect is better, but also the requirements on storage capacity and processor calculation performance are smaller, and the hardware cost is lower.
The embodiment of the application can be applied to various applicable scenes. In one example, the embodiment of the application can be applied to application scenes needing to make decisions through image processing technologies such as image recognition, target detection, face recognition and the like. Of course, the embodiment of the application can also be applied to other scenes such as intelligent image trimming and the like.
Exemplary method
Fig. 1 is a flowchart illustrating a method for adjusting luminance of a pixel according to an exemplary embodiment of the present disclosure. The embodiment can be applied to an electronic device, as shown in fig. 1, and includes the following steps:
step 101, determining a color temperature value of an image to be corrected;
step 102, determining correction parameters of a preset image partition in an image to be corrected according to the color temperature value;
103, calculating a gain value of the pixel according to the correction parameter and the position parameter of the pixel in the preset image partition;
step 104, the brightness of the pixel is adjusted by using the gain value.
The embodiment of the present application can reasonably compensate the brightness of each pixel in an image by using the correction parameters of the area (i.e., image partition) to which the pixel belongs and the position of the pixel, thereby making full use of the "characteristic that the distribution of the dark corners in the image is strongly correlated with the position of the pixel in the image", and more efficiently and accurately eliminating the dark corners in the image (for example, the brightness unevenness problems such as normal brightness in the center of the image, uneven brightness in the periphery, and the like, caused by different light quantities at positions with different distances from the optical axis on the imaging focal plane).
In some examples, in step 101, the color temperature value of the image to be corrected may be determined by, for example, white balance or the like. Furthermore, any other applicable image color temperature algorithm may be applied in step 101. For example, the color temperature value of the image may also be determined directly by the type of light source used by the imaging device.
In the embodiment of the present application, the correction parameter is associated with the color temperature of the image and the value of the correction parameter can indicate the degree of compensation required for a certain image partition in the image to be corrected. In some examples, for image partitions with significant vignetting, the compensation is required to be performed more, the value of the correction parameter is larger, for image partitions with less compensation, the value of the correction parameter is smaller, and for image partitions without compensation, the value of the correction parameter may be close to 0 or equal to 0. For example, for a region in the center of the image with normal brightness and low brightness around the center, the correction parameter may be close to 0 or equal to 0. For the partitions around the image, the closer to the edge, the larger the value of the correction parameter, and the closer to the center, the smaller the value of the correction parameter.
In some examples, the correction parameters may include: the zeroth group of coefficients represent the degree of nonlinear variation of the gain value of the pixel along with the position parameter of the pixel; a first set of coefficients characterizing the degree of linear variation of the gain value of the pixel with the abscissa value of the pixel; a second set of coefficients characterizing the degree of linear variation of the gain value of the pixel with the ordinate value of the pixel; and a third set of coefficients characterizing the degree to which the gain value of the pixel varies linearly with the abscissa and ordinate values of the pixel. In this example, the coefficients in the correction parameters enable the degree of compensation required represented by the correction parameters to better conform to the actual vignetting situation of the image and the target image, so that the pixel gain value more conforming to the actual vignetting situation of the image is obtained through the correction parameters and the position parameters, and the brightness of the image is compensated more efficiently and accurately.
In some examples, a parameter of a pre-constructed learning model may be used as a correction parameter in the embodiment of the present application, the learning model may be any model capable of learning a variation rule of a gain value of a pixel with its position by a sample image and a target image, and the learning module may be operated in an electronic device such as a computer. For example, the learning model may be a regression model, a convolutional neural network, a support vector machine, or other similar model, and accordingly, the correction parameters may be parameters of the regression model, the convolutional neural network, the support vector machine, or other similar model.
In some examples, coefficients of a predetermined regression equation (i.e., parameters of a predetermined regression model) that can be used to characterize the variation of the gain value of a pixel with its position parameter may be used as the correction parameters in the embodiments of the present application.
In some examples, an equation shown in the following formula (1) may be adopted as the predetermined regression equation in the embodiment of the present application.
gain=β01x+β2y+β3xy+…+βkxpyq+…+βn-1xmnym (1)
In the formula (1), beta0、β1、……、βnRespectively representing coefficients in the correction parameter, i.e. a correction parameter may comprise beta0~βnThe gain represents a gain value of a pixel with coordinates (x, y) in the image to be corrected, x represents an abscissa value of the pixel, and y represents an ordinate value of the pixel.
In the formula (1), k, p, q, and m may be preset positive integers, n represents the number of coefficients included in one correction parameter, and n may be a preset positive integer, or when k, p, q, and m are selected, the specific value of n may be determined by k, p, q, and m. It should be noted that k may be smaller than n, but the values of p, q, and m may be freely selected according to actual conditions or adjusted in real time (manually or automatically by an electronic device) according to the implementation process of the following training method. The specific value ranges of p, q, and m are not limited in the embodiments of the present application.
In one example, in a case where the storage capacity, the computing power (e.g., the CPU performance) and the like of hardware (e.g., the electronic device 70 below) are limited, and there is a certain requirement for the effect of the vignetting correction of the image, the values of p, q and m may be smaller. For example, p and q may be 1, and m may be 2, where the predetermined regression equation is shown in equation (2). This example is applicable to hardware such as embedded devices where both computing power and storage capacity are relatively limited but where there is some requirement for the effect of image vignetting correction (i.e., electronic devices that perform pixel brightness adjustment).
gain=β01x+β2y+β3xy+β4x25y2 (2)
In the formula (2), beta0、β1、……、β5Respectively representing coefficients in correction parameters, correctionThe positive parameter may include β0~β5The gain represents a gain value of a certain pixel, x represents an abscissa value of the pixel, and y represents an ordinate value of the pixel.
In other examples, p may take a value greater than 1 or equal to 1, q may take a value greater than 1 or equal to 1, and m may take a value greater than 2. The present example is applicable to hardware (i.e., electronic devices that perform adjusting pixel brightness) that has a certain computing power and a relatively sufficient storage capacity and requires a better image vignetting correction effect.
In an example of using coefficients of a predetermined regression equation as the correction parameters in the embodiment of the present application, the zeroth set of coefficients may include coefficients of respective constant terms in the predetermined regression equation, the first set of coefficients may include coefficients of respective terms in an integer-degree polynomial of abscissa values (i.e., a polynomial with abscissa as a variable) in the predetermined regression equation, the second set of coefficients may include coefficients of respective terms in an integer-degree polynomial of ordinate values (i.e., a polynomial with ordinate as a variable) in the predetermined regression equation, and the third set of coefficients may include coefficients of respective terms in an integer-degree polynomial of abscissa values and ordinate values (i.e., a polynomial with both abscissa and ordinate as variables) in the predetermined regression equation.
For example, the zeroth set of coefficients may include coefficients for all terms in the predetermined regression equation that do not contain any variable, i.e., (x, y, xy), the first set of coefficients may include coefficients for all terms in the predetermined regression equation that contain only x, the second set of coefficients may include coefficients for all terms in the predetermined regression equation that contain only y, and the third set of coefficients may include coefficients for terms in the predetermined regression equation that contain xy. Taking equation (2) as an example, the zeroth group of coefficients may include β0The first set of coefficients may include β1、β4The second set of coefficients may include β2、β5The third set of coefficients may include β3
In some examples, the correction parameters may be determined by pre-training the derived baseline correction parameters and color temperature values of the image. In other examples, the correction parameters may be trained by a learning model (e.g., a regression model, a convolutional neural network, a support vector machine, etc.) or the like pre-installed in the electronic device. In addition to this, the correction parameters may also be calculated in any other applicable way.
In some examples, in step 102, the correction parameters for the predetermined image partition may be determined according to a look-up table, which may include the reference color temperature value and the reference correction parameters corresponding to the reference color temperature value for each image partition. Therefore, the correction parameters suitable for various images can be calculated in real time only by storing a small number of groups of reference correction parameters in a memory of the electronic equipment, so that the calculation efficiency is higher, the storage space can be saved, and the method is particularly suitable for electronic equipment with limited storage capacity, such as embedded equipment.
In the embodiment of the present application, the reference correction parameter is a correction parameter corresponding to a reference color temperature value, and may be obtained in a training phase of the learning model and stored in a memory of the electronic device in advance, so as to determine the correction parameters of various images to be corrected. The reference correction parameter is the same as the above correction parameter in terms of its attributes, specific contents, representation thereof, determination, and the like. That is, in some examples, the reference correction parameters may also include: the zeroth group of coefficients represent the degree of nonlinear variation of the gain value of the pixel along with the position parameter of the pixel; a first set of coefficients characterizing the degree of linear variation of the gain value of the pixel with the abscissa value of the pixel; a second set of coefficients characterizing the degree of linear variation of the gain value of the pixel with the ordinate value of the pixel; and a third set of coefficients characterizing the degree to which the gain value of the pixel varies linearly with the abscissa and ordinate values of the pixel. Further details regarding the baseline correction parameters may be found in the description above regarding the correction parameters.
In the embodiment of the present application, the reference color temperature value may be predetermined. In some examples, the reference color temperature value may be selected according to various aspects such as the type of light source used in a specific application scenario, the accuracy requirement of vignetting correction, the performance efficiency of vignetting correction, etc., or determined according to industry standards. In one example, H, A, TL84, CW, D50 and D65 can be selected as the reference color temperature value, and the light source identifiers and the color temperature values of the color temperatures are shown in table 1 below.
Light source identification H A TL84 CW D50 D65
Color temperature value 2300K 2856K 4100K 4150K 5000K 6500K
TABLE 1
In the embodiment of the present application, the predetermined image partition may be determined according to a parameter of the imaging device. For example, a predetermined image partition of each image may be determined in advance according to parameters of total pixels, effective pixels, sizes, and the like of the imaging device, and the parameters of the predetermined image partition (for example, parameters indicating a predetermined image partition size and/or a boundary) may be configured as initial parameters in the electronic device that performs the adjustment of the brightness of the pixel and the electronic device that determines the vignetting correction parameter of the image.
In some examples, all imaging units of the image sensor may be divided into a plurality of grids, each grid may correspond to one image region, and the location of each image region may be determined by the location of pixels at the grid boundaries. In some other examples, the image partition may also be determined by directly dividing the image into a plurality of image blocks. Generally, the denser the division, the finer the granularity of the image partition, the higher the accuracy of adjusting the pixel brightness. For example, it can be divided into 2 × 2, 4 × 4, etc. Fig. 2 shows a division example of an image with dark corners at the edges.
In this embodiment, the lookup table may include reference correction parameters of all predetermined image partitions (i.e., image partitions divided in advance), and each predetermined image partition corresponds to one set of reference correction parameters, each set of reference correction parameters may include reference correction parameters corresponding to respective reference color temperature values, and each reference correction parameter may include multiple sets of coefficients, such as the zeroth set of coefficients, the first set of coefficients, the second set of coefficients, the third set of coefficients, and the like, described above.
For example, assuming that the predetermined image partition includes image partitions P1-Px (x is an integer not less than 1), reference correction parameters for the x image partitions may be included in the lookup table, wherein each image partition in the x image partitions corresponds to a set of reference correction parameters, each set of correction parameters includes reference correction parameters corresponding to one-to-one correspondence with the six reference color temperature values H, A, TL84, CW, D50, D65, and each reference correction parameter may include the above-mentioned multiple sets of coefficients (e.g., zeroth set of coefficients, first set of coefficients, second set of coefficients, third set of coefficients, etc.).
Taking the equation (1) and 2 x 2 as an example, fig. 3 shows a schematic diagram of image partitions in the 2 x 2 equation, where an image has 4 image partitions P1-P4, and the lookup table may include the contents shown in table 2 below, βr0~βrnRepresenting coefficients in the reference correction parameters.
Light source identification H A TL84 CW D50 D65
Color temperature value 2300K 2856K 4100K 4150K 5000K 6500K
Image partition P1 βr0~βrn βr0~βrn βr0~βrn βr0~βrn βr0~βrn βr0~βrn
Image partition P2 βr0~βrn βr0~βrn βr0~βrn βr0~βrn βr0~βrn βr0~βrn
Image partition P3 βr0~βrn βr0~βrn βr0~βrn βr0~βrn βr0~βrn βr0~βrn
Image partition P4 βr0~βrn βr0~βrn βr0~βrn βr0~βrn βr0~βrn βr0~βrn
TABLE 2
Note that, the coefficient β in each cell in table 2 is shown abover0~βrnMay or may not be the same, beta in Table 2r0~βrnThis can be achieved by the following method of determining the parameters for adjusting the brightness of the pixel.
In the embodiment of the present application, each image partition in the image to be corrected corresponds to a correction parameter, and each correction parameter includes the above-mentioned multiple sets of coefficients, such as the zeroth set of coefficients, the first set of coefficients, the second set of coefficients, the third set of coefficients, and so on. Taking the equation (1) and 2 x 2 as an example, the image to be corrected has 4 image partitions P1-P4 (as shown in fig. 3), and then the image to be corrected has four correction parameters corresponding to the four image partitions P1-P4, and each correction parameter may include n coefficients β0~βnAs shown in table 3 below. Note that, the coefficient β in each cell in table 30~βnMay or may not be the same, may be represented by β in table 2r0~βrnAnd the color temperature value of the image to be corrected, etc.
Image partition P1 β0~βn
Image partition P2 β0~βn
Image partition P3 β0~βn
Image partition P4 β0~βn
TABLE 3
In some examples, determining the correction parameters for the predetermined image partition from the look-up table in step 102 may include: in the step b1, the step b,determining a reference color temperature value which is closest to the color temperature value of the image to be corrected in the lookup table; and b2, taking the reference correction parameter corresponding to the nearest reference color temperature value of the preset image partition as the correction parameter of the preset image partition. Therefore, the correction parameters of each image partition in the image to be corrected can be quickly determined by table lookup without calculation, the processing speed is high, and the method is particularly suitable for application scenes with low hardware configuration and high requirement on the speed of adjusting the pixel brightness. For example, assuming that the reference color temperature value closest to or equal to the color temperature value of the image to be corrected is 4100K, the reference correction parameter corresponding to "TL 84" in the lookup table (e.g., β in each cell in the column of "TL 84" in table 2) may be directly usedr0~βrn) As correction parameters for the image to be corrected.
In some examples, determining the correction parameters for the predetermined image partition from the look-up table in step 102 may include: step b1, determining two reference color temperature values closest to the color temperature value of the image to be corrected in the lookup table and two reference correction parameters corresponding to the two reference color temperature values of the preset image partition; step b2, determining correction parameters for the predetermined image partition by linear interpolation based on the two reference color temperature values and the corresponding two reference correction parameters. Therefore, the correction parameters can be determined only through simple linear interpolation, the calculation amount is small, the calculation complexity is low, the correction can be realized through lower-cost hardware (for example, a circuit comprising a small number of multipliers and adders), and the method is particularly suitable for application scenes with lower hardware configuration (for example, electronic equipment such as an FPGA (field programmable gate array), an ASIC (application specific integrated circuit), an MCU (micro control unit) and the like is selected), and meanwhile, the speed and the quality of adjusting the brightness of the pixel are higher.
Above includes beta0~βnFor example, for beta0~βnEach beta value in (b) needs to be calculated by determining one or more of the correction parameters for the predetermined image partition, for example, as in the above example.
In one example, assuming that the color temperature value of the image to be corrected is T, the reference color temperatures closest to the color temperature value T are T, respectivelyLAnd THA certain pair of image partitions P1Reference color temperature TLThe reference correction parameter includes a coefficient betaL0~βLnThe image partition P1 corresponds to the reference color temperature THThe reference correction parameter includes a coefficient betaH0~βHnThe correction parameters of the image partition P1 in the image to be corrected corresponding to the current color temperature value T comprise a coefficient beta0~βnThen coefficient β0~βnEach of beta ini(i ═ 0,1,2, … …, n) can be calculated by the following formula (3).
Figure BDA0002063347720000101
In one example, assuming that two reference color temperature values closest to the color temperature value of the image to be corrected are a first reference color temperature value and a second reference color temperature value, the process of determining the correction parameter of the predetermined image partition by linear interpolation may include: step 1, calculating a first difference value (for example, T-T in formula (3)) between a color temperature value of an image to be corrected and a first reference color temperature valueL) A second difference value between the color temperature value of the image to be corrected and a second reference color temperature value (e.g., T in equation (3))H-TL) And the ratio between the first difference and the second difference (e.g., in equation (3))
Figure BDA0002063347720000102
) (ii) a Step 2, calculating the difference value (for example, β in formula (3)) between each coefficient in the first correction parameter corresponding to the first reference color temperature value and the corresponding coefficient in the first correction parameter corresponding to the second reference color temperature valueHiLi) And the difference and the ratio (e.g., in equation (3))
Figure BDA0002063347720000111
) The value of the product between; step 3, calculating the sum of each coefficient in the first correction parameter corresponding to the first reference color temperature value and the product value corresponding to the coefficient (for example, in formula (3))
Figure BDA0002063347720000112
) To obtain each of the second correction coefficients (for example, equation (3). beta.)0~βnEach of beta ini,i=0,1,2,……,n)。
It should be noted that, although two specific ways of determining the correction parameters are shown above, it is to be understood that the embodiments of the present application may also determine the correction parameters of each image partition in the image to be corrected in any other applicable ways. For example, it is also possible to use, as the correction parameter of the image to be corrected, the average value of the reference correction parameters corresponding to the closest reference color temperature value after determining the reference color temperature value closest to the color temperature of the image to be corrected.
In some examples, the gain value of the pixel may be calculated in step 103 by a learning model pre-configured in the electronic device, which may be any one of the above-mentioned. In one example, in step 103, a multiply-add operation of the predetermined regression equation may be performed using the correction parameter and the position coordinate value of the pixel to obtain a gain value of the pixel. Here, the dark angle correction can be performed by using fewer parameters through the regression equation, and since the fitted curve is more consistent with the actual dark angle condition of the image, the gain value more consistent with the actual dark angle condition of the image can be obtained by using the regression equation, and the brightness of each pixel in the image can be adjusted more efficiently and accurately.
In one example, the predetermined regression equation may be a regression equation shown in equation (1) or equation (2) above. For example, step 103 may include: step a1, using the abscissa value of the pixel and the first set of coefficients in the correction parameter to perform the multiply-add operation of the A-th order polynomial of the abscissa value to obtain the first correlation value; step a2, using the ordinate value of the pixel and the second set of coefficients in the correction parameter to execute the multiplication and addition operation of the B-th order polynomial of the ordinate value to obtain the second correlation value; step a3, using the abscissa value and the ordinate value of the pixel and the third set of coefficients in the correction parameter to perform the multiply-add operation of the polynomial of degree C of the abscissa value and the ordinate value to obtain a third correlation value; step a4, calculating a fixed value determined by the zeroth set of coefficients in the correction parameters, the first phaseSumming the correlation value, the second correlation value, and the third correlation value to obtain a gain value for the pixel; wherein A, B and C are preset positive integers. In this example, the steps a1 to a3 may be executed in parallel or in a certain order (the execution order is not limited). The formula (2) is given as an example in which a is 2, B is 2, and C is 1, and the a-th order polynomial on the abscissa is "β ═ 2%1x+β4x2", the B-th order polynomial of ordinate values is" beta2y+β5y2", the C-th order polynomial of the abscissa and said ordinate is" β3xy ", the fixed value determined by the zeroth set of coefficients in the correction parameters being equal to β0
In one example, the multiply-add operation of the predetermined regression equation may be performed by a multiply-accumulator whose inputs are the correction parameters and the coordinate values of the pixel and whose output is the gain value of the pixel. Here, the correction parameter may be directly read from the memory, and the coordinate value x and the coordinate value y of the pixel may be read from the image data or the parameter of the imaging device. In a specific application, the number of multipliers and adders in the multiplier-accumulator and the connection relationship thereof can be predetermined by a predetermined regression equation. Taking equation (2) as an example, the input of the multiply accumulator includes β0~β5And coordinate values x and y of the pixel, and the output is a gain value gain of the pixel with coordinates (x, y).
In some examples, the adjusting the brightness in step 104 may include: calculating an update value of the pixel according to the current value of the pixel and the gain value of the pixel; and resetting the current value of the pixel to the updated value. Therefore, the brightness of the pixel can be adjusted through the gain value so as to achieve the purpose of eliminating the dark corner.
In one example, the update value of the pixel may be calculated by the following formula (4):
current value of gain (4)
Where gain represents the gain value of the pixel. It should be noted that the above equation (4) is only an example, and the adjustment process of step 104 in a specific application can also be implemented by using any other applicable algorithm.
Fig. 4 is a flowchart illustrating a method for determining a parameter for adjusting the brightness of a pixel according to an exemplary embodiment of the present application. The embodiment can be applied to an electronic device, as shown in fig. 4, and includes the following steps:
step 401, obtaining a plurality of sample images of reference color temperature values and corresponding target images;
step 402, obtaining a gain image by using the target image and the sample image;
step 403, training a predetermined regression equation by using the sample image as an input and the gain image as a target to obtain a reference correction parameter corresponding to each reference color temperature value.
Here, the technical details of the predetermined regression equation, the reference correction parameter, the reference color temperature value, and the like may refer to the above part of the method of adjusting the pixel luminance.
In the method for determining the parameters for adjusting the pixel brightness in the embodiment of the application, the predetermined regression equation is trained through the sample image and the gain image obtained from the sample image and the target image, and the reference correction parameters related to the appointed reference color temperature can be obtained in advance before the pixel brightness is adjusted, so that only a small amount of reference correction parameters are stored in electronic equipment such as a computer, the vignetting correction method can be used for accurately and efficiently correcting various images, the vignetting correction effect is better, the requirements on the storage capacity and the calculation performance of a processor are smaller, and the hardware cost is lower.
In the embodiment of the application, the target image can be an image with uniform brightness or self-defined brightness. The requirements for image brightness uniformity in different application scenes are different, and the selected target image can also be different.
In the embodiment of the application, the sample image and the target image can be selected according to the selected reference color temperature value. For example, assuming that the selected reference color temperature values are six kinds shown in table 1, an image taken by the corresponding light source may be used as a sample image and an image taken by the corresponding light source with uniform brightness may be used as a target image for each of the six kinds of reference color temperature values. For example, for the reference color temperature value "4100K", an image captured by a light source identified as "TL 84" may be used as a sample image of the reference color temperature value, and an image with uniform luminance (no dark corners) with the color temperature value of "4100K" may be used as a target image of the reference color temperature value.
In the embodiment of the present application, the gain image may be an image in which the pixel value of each pixel is equal to the target gain value. In some examples, in step 402, obtaining the gain image may include: and calculating a target gain value from the pixel value of the sample image and the pixel value of the target image, and taking the target gain value as the pixel value of the gain image. For example, it can be determined by the above formula (4). Specifically, the gain in equation (4) may be calculated by using the pixel value in the target image as the updated value in equation (4) and using the pixel value in the sample image as the current value in equation (4), where the gain in equation (4) is the target gain value.
In some examples, the parameters for adjusting the pixel brightness may be determined by image partition. In some examples, the sample image and the target image may be divided into a plurality of predetermined image partitions, the processes of steps 401-403 may be performed on each image partition, and the reference correction parameters corresponding to the respective reference color temperature values may be determined for each predetermined image partition. Here, the principle of dividing the predetermined image partition is the same as the method of adjusting the pixel luminance described above.
In some examples, step 403 may include the following sub-processing steps: step c1, using a predetermined regression equation to perform a multiply-add operation on the position coordinate values of the pixels in a predetermined image partition of the sample image to obtain a prediction gain partition corresponding to the predetermined image partition; step c2, adjusting the coefficients of the predetermined regression equation based on the difference between the prediction gain partition and the corresponding partition in the gain image. Therefore, the reference correction parameters of each image partition can be obtained by training the coefficients of the predetermined regression equation, and the predetermined regression equation can accurately reflect the change rule of the pixel gain value along with the change rule of the coordinate value of the pixel gain value, so that the coefficients can accurately indicate the degree of compensation required by each reference color temperature value corresponding to a certain image partition, and the brightness of the pixel can be adjusted more efficiently and accurately.
It should be noted that the prediction gain partition here can be obtained by performing the process of step 403 on a predetermined image partition in the sample image, where the pixel value of each pixel in the predetermined gain partition is equal to the prediction gain value of the corresponding pixel in the corresponding predetermined image partition in the sample image. In some examples, the prediction gain value of a certain pixel may be calculated by a predetermined regression equation and a coordinate value of the pixel.
In some examples, the process of adjusting the coefficients of the predetermined regression equation in step c2 may be implemented by a loss function and a gradient descent method. In one example, the process of adjusting the coefficients of the predetermined regression equation in step c2 may include the following sub-processing steps: step c21, calculating loss values between the prediction gain partitions and the corresponding partitions in the gain image; step c22, calculating the gradient of each coefficient of the predetermined regression equation corresponding to the loss value; step c23, calculating the sum of the current value of each coefficient of the predetermined regression equation and the corresponding gradient as the updated value of each coefficient of the predetermined regression equation. Thus, a predetermined regression equation with better fitting can be obtained, and a reference correction parameter which can better accord with the actual condition of the dark corner of the image can be obtained.
For example, in step c21, the loss value may be calculated by a loss function shown in the following equation (5). In some examples, the calculation of step c21 may be performed in units of pixels, which may be some, a particular, or all of the pixels in the prediction gain partition.
Figure BDA0002063347720000141
Where m is the number of pixels in the prediction gain partition, gaintIs a target gain value, gain, of a certain pixel i (i is an integer of not less than 1 and not more than m)outIs the prediction gain value for a certain pixel i and loss is the loss value between the prediction gain partition and the corresponding partition in the gain image.
For example, in step c22, the gradient corresponding to each loss can be obtained by devising the loss value with respect to the coefficient β by the following equation (6). In some examples, the calculation of step c22 may be performed in units of pixels, which may be some, a particular, or all of the pixels in the prediction gain partition.
Figure BDA0002063347720000142
Where m is the number of pixels in the prediction gain partition, gaintIs a target gain value, gain, of a pixel i (i is an integer of not less than 1 and not more than m)outIs the prediction gain value for pixel i, loss is the loss value between the prediction gain partition and the corresponding partition in the gain image,
Figure BDA0002063347720000151
is the jth coefficient in the reference correction parameter for the predetermined image partition corresponding to pixel i. As an example, in the above formula (1), the reference correction parameter of a predetermined image partition includes n coefficients βr0~βrnAnd j is an integer not less than 1 and not more than n.
For example, in the step c23, the loss value is minimized, and thus the loss value can be minimized by the following equation (7) for each parameter βjNegative direction of gradient of to update each betarj
Figure BDA0002063347720000152
Where m is the number of pixels in the prediction gain partition, gaintIs a target gain value, gain, of a pixel i (i is an integer of not less than 1 and not more than m)outIs the prediction gain value for pixel i, loss is the loss value between the prediction gain partition and the corresponding partition in the gain image,
Figure BDA0002063347720000153
βrjis the jth coefficient in the reference correction parameter for the predetermined image partition corresponding to pixel i,β′rjis betarjThe update value of (2).
In practical applications, the steps c1 to c2 may be an iterative process, and the iteration is ended until the loss value is minimized or a convergence condition is reached. In this way, a best fit predetermined regression equation can be obtained, thereby obtaining reference correction parameters that better fit the image vignetting practice and adjust the brightness of the pixels.
It should be noted that the training in step 403 in the embodiment of the present application may also be implemented by any other applicable processing manner.
Exemplary devices
Fig. 5 is a schematic structural diagram of an apparatus 50 for adjusting pixel brightness according to an exemplary embodiment of the present application. The present embodiment may be disposed on or implemented by an electronic device, and as shown in fig. 5, the apparatus 50 may include:
a first determining module 51 configured to determine a color temperature value of an image to be corrected;
a second determining module 52 configured to determine a correction parameter of a predetermined image partition in the image to be corrected according to the color temperature value;
a calculation module 53 configured to calculate a gain value of a pixel in the predetermined image partition according to the correction parameter and a position parameter of the pixel; and
an adjustment module 54 configured to adjust the brightness of the pixel using the gain value.
In some examples, the second determining module 52 is configured to determine the correction parameters for the predetermined image partition according to a look-up table, the look-up table including the reference color temperature value and the reference correction parameters corresponding to the reference color temperature value for each image partition.
In some examples, the second determination module 52 may include: the first determining submodule is configured to determine a reference color temperature value which is closest to the color temperature value of the image to be corrected in the lookup table; a second determination submodule configured to take the reference correction parameter of the predetermined image partition corresponding to the closest reference color temperature value as the correction parameter of the predetermined image partition.
In some examples, the first determining sub-module may be configured to determine two reference color temperature values closest to the color temperature value of the image to be corrected in a look-up table and two reference correction parameters corresponding to the two reference color temperature values of the predetermined image partition; a second configuration submodule, which may be configured to determine correction parameters for the predetermined image partition by linear interpolation based on the two reference color temperature values and the corresponding two reference correction parameters.
In some examples, the correction parameters may include: the zeroth group of coefficients represent the degree of nonlinear variation of the gain value of the pixel along with the position parameter of the pixel; a first set of coefficients characterizing the degree of linear variation of the gain value of the pixel with the abscissa value of the pixel; a second set of coefficients characterizing the degree of linear variation of the gain value of the pixel with the ordinate value of the pixel; and a third set of coefficients characterizing the degree to which the gain value of the pixel varies linearly with the abscissa and ordinate values of the pixel. Further technical details regarding the correction parameters may be found in the exemplary method section above.
In some examples, the calculation module 53 is configured to perform a multiply-add operation of a predetermined regression equation using the correction parameter and the position coordinate value of the pixel to obtain a gain value of the pixel; wherein the predetermined regression equation is used for representing the variation of the gain value of the pixel with the position parameter. Here, specific technical details regarding the predetermined regression equation may refer to the above exemplary method section.
In one example, the calculation module 53 may include: a first multiply-add module configured to perform a multiply-add operation of a polynomial of degree a of the abscissa value using the abscissa value of the pixel and a first set of coefficients in the correction parameter to obtain a first correlation value; a second multiply-add module configured to perform a multiply-add operation of a polynomial of degree B of the ordinate value using the ordinate value of the pixel and a second set of coefficients in the correction parameter to obtain a second correlation value; a third multiply-add module configured to perform a multiply-add operation of a polynomial of degree C of the abscissa value and the ordinate value by using the abscissa value and the ordinate value of the pixel and a third set of coefficients in the correction parameter to obtain a third correlation value; and a fourth adding module configured to calculate a sum of a fixed value determined by a zeroth set of coefficients in the correction parameters, the first correlation value, the second correlation value, and the third correlation value to obtain a gain value of the pixel; wherein A, B and C can be preset positive integers.
Fig. 6 is a schematic structural diagram of an apparatus 60 for determining a parameter for adjusting luminance of a pixel according to an exemplary embodiment of the present application. The present embodiment may be disposed on or implemented by an electronic device, and as shown in fig. 6, the apparatus 60 may include:
a first obtaining module 61 configured to obtain sample images of a plurality of reference color temperature values and corresponding target images;
a second acquisition module 62 configured to obtain a gain image using the target image and the sample image; and
a training module 63 configured to train a predetermined regression equation with the sample image as an input and the gain image as a target to obtain reference correction parameters corresponding to the respective reference color temperature values;
in some examples, the baseline correction parameters include: the zeroth group of coefficients represent the degree of nonlinear variation of the gain value of the pixel along with the position parameter of the pixel; a first set of coefficients characterizing the degree of linear variation of the gain value of the pixel with the abscissa value of the pixel; a second set of coefficients characterizing the degree of linear variation of the gain value of the pixel with the ordinate value of the pixel; and a third set of coefficients characterizing the degree to which the gain value of the pixel varies linearly with the abscissa and ordinate values of the pixel.
In some examples, training module 63 may include: a prediction submodule configured to perform a multiply-add operation on the position coordinate values of the pixels in a predetermined image partition of the sample image using a predetermined regression equation to obtain a prediction gain partition corresponding to the predetermined image partition; and an adjustment sub-module configured to adjust coefficients of a predetermined regression equation according to differences between prediction gain partitions and corresponding partitions in the gain image.
In one example, the adjustment submodule may include: a loss value calculation module configured to calculate loss values between the prediction gain partitions and corresponding partitions in the gain image; a gradient calculation module configured to calculate a gradient of each coefficient of the predetermined regression equation corresponding to a loss value; an update value calculation module configured to calculate a sum of a current value of each coefficient of the predetermined regression equation and the corresponding gradient as an update value of each coefficient of the predetermined regression equation.
In some examples, the baseline correction parameters may include: the zeroth group of coefficients represent the degree of nonlinear variation of the gain value of the pixel along with the position parameter of the pixel; a first set of coefficients characterizing the degree of linear variation of the gain value of the pixel with the abscissa value of the pixel; a second set of coefficients characterizing the degree of linear variation of the gain value of the pixel with the ordinate value of the pixel; and a third set of coefficients characterizing the degree to which the gain value of the pixel varies linearly with the abscissa and ordinate values of the pixel. Further technical details regarding the baseline correction parameters may be found in the exemplary methods section above.
Other technical details of the above-described apparatus 50 and apparatus 60 of embodiments of the present application may be found in the example methods section above. In practical applications, the above-mentioned apparatus 50 and apparatus 60 of the embodiment of the present application can be implemented by software, hardware or a combination thereof. In some examples, apparatus 50 and apparatus 60 may be deployed on the same electronic device (e.g., electronic device 70, below). In other examples, apparatus 50 and apparatus 60 may be deployed in two electronic devices that are communicable with each other. Of course, the apparatus 50 and the apparatus 60 may also be implemented separately or together by a hardware or software architecture, e.g. a distributed system or the like.
Exemplary electronic device
FIG. 7 illustrates a block diagram of an electronic device 70 according to an embodiment of the present application.
As shown in fig. 7, the electronic device 70 may include one or more processors 71 and memory 72.
The processor 71 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device 70 to perform desired functions.
Memory 72 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium and executed by processor 71 to implement the methods of adjusting pixel brightness and/or the methods of determining parameters for adjusting pixel brightness of the various embodiments of the present application described above and/or other desired functions. Various contents such as a lookup table may also be stored in the computer-readable storage medium.
In one example, the electronic device 70 may further include: an input device 73, an output device 74, and an image capture device 75, which are interconnected by a bus system and/or other form of connection mechanism (not shown).
In one example, the input device 73 may include, for example, a keyboard, a mouse, and the like.
In one example, the output device 74 may output various information to the outside, including the determined distance information, direction information, and the like. The output devices 74 may include, for example, a display, speakers, a printer, and a communication network and remote output devices connected thereto, among others.
In one example, the image capture device 75 may include, for example, a camera, an image sensor, and the like.
Of course, for simplicity, only some of the components of the electronic device 70 relevant to the present application are shown in fig. 7, and components such as buses, input/output interfaces, and the like are omitted. In addition, the electronic device 70 may include any other suitable components, depending on the particular application.
Exemplary computer program product and computer-readable storage Medium
In addition to the above-described methods and apparatus, embodiments of the present application may also be a computer program product comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps of the method of adjusting pixel brightness and/or the method of determining a parameter for adjusting pixel brightness according to various embodiments of the present application described in the "exemplary methods" section above in this specification.
The computer program product may be written with program code for performing the operations of embodiments of the present application in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present application may also be a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, cause the processor to perform steps in a method of adjusting pixel brightness and/or a method of determining a parameter for adjusting pixel brightness according to various embodiments of the present application described in the "exemplary methods" section above in this specification.
The computer-readable storage medium may take any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing describes the general principles of the present application in conjunction with specific embodiments, however, it is noted that the advantages, effects, etc. mentioned in the present application are merely examples and are not limiting, and they should not be considered essential to the various embodiments of the present application. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the foregoing disclosure is not intended to be exhaustive or to limit the disclosure to the precise details disclosed.
The block diagrams of devices, apparatuses, systems referred to in this application are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
It should also be noted that in the devices, apparatuses, and methods of the present application, the components or steps may be decomposed and/or recombined. These decompositions and/or recombinations are to be considered as equivalents of the present application.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the application. Thus, the present application is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, the description is not intended to limit embodiments of the application to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.

Claims (15)

1. A method of adjusting pixel brightness, comprising:
determining a color temperature value of an image to be corrected;
determining correction parameters of a preset image partition in the image to be corrected according to the color temperature value;
calculating a gain value of a pixel in the predetermined image partition according to the correction parameter and a position parameter of the pixel; and
adjusting the brightness of the pixel using the gain value.
2. The method according to claim 1, wherein determining correction parameters for predetermined image partitions in the image to be corrected according to the color temperature values comprises:
determining correction parameters for the predetermined image partition according to a look-up table, the look-up table comprising reference color temperature values and reference correction parameters for respective image partitions corresponding to the reference color temperature values.
3. The method of claim 2, wherein determining the correction parameters for the predetermined image partition from a look-up table comprises:
determining a reference color temperature value which is closest to the color temperature value of the image to be corrected in the lookup table; and
and taking the reference correction parameter corresponding to the closest reference color temperature value of the predetermined image partition as the correction parameter of the predetermined image partition.
4. The method of claim 2, wherein determining the correction parameters for the predetermined image partition from a look-up table comprises:
determining two reference color temperature values which are closest to the color temperature value of the image to be corrected in the lookup table and two reference correction parameters which correspond to the two reference color temperature values of the preset image partition; and
determining correction parameters for the predetermined image partition by linear interpolation based on the two reference color temperature values and the corresponding two reference correction parameters.
5. The method of claim 1, wherein the correction parameters comprise:
the zeroth group of coefficients represent the degree of nonlinear variation of the gain value of the pixel along with the position parameter of the pixel;
a first set of coefficients characterizing the degree of linear variation of the gain value of the pixel with the abscissa value of the pixel;
a second set of coefficients characterizing the degree of linear variation of the gain value of the pixel with the ordinate value of the pixel; and
and a third set of coefficients characterizing the degree to which the gain value of the pixel varies linearly with the abscissa and ordinate values of the pixel.
6. The method of claim 5, wherein calculating a gain value for a pixel in the predetermined image partition based on the correction parameter and a location parameter of the pixel comprises:
performing a multiply-add operation of a predetermined regression equation using the correction parameter and the position coordinate value of the pixel to obtain a gain value of the pixel;
wherein the predetermined regression equation is used for representing the variation of the gain value of the pixel along with the position parameter.
7. The method of claim 6, wherein performing a multiply-add operation of a predetermined regression equation using the correction parameter and the position coordinate value of the pixel to obtain a gain value of the pixel comprises:
utilizing the abscissa value of the pixel and a first group of coefficients in the correction parameter to execute the multiply-add operation of an A-th order polynomial of the abscissa value so as to obtain a first correlation value;
utilizing the ordinate value of the pixel and a second group of coefficients in the correction parameter to execute the multiplication and addition operation of a B-th-order polynomial of the ordinate value so as to obtain a second correlation value;
utilizing the abscissa value and the ordinate value of the pixel and a third group of coefficients in the correction parameter to execute the multiplication and addition operation of a polynomial of degree C of the abscissa value and the ordinate value so as to obtain a third correlation value; and
calculating the sum of a fixed value determined by the zeroth set of coefficients in the correction parameter, the first correlation value, the second correlation value, and the third correlation value to obtain a gain value for the pixel;
wherein A, B and C are preset positive integers.
8. A method of determining an image vignetting correction parameter, comprising:
acquiring sample images of a plurality of reference color temperature values and corresponding target images;
obtaining a gain image by using the target image and the sample image; and
training a preset regression equation by taking the sample image as input and the gain image as a target to obtain reference correction parameters corresponding to all reference color temperature values;
wherein the predetermined regression equation is used for representing the variation of the gain value of the pixel along with the position parameter.
9. The method of claim 8, wherein the baseline correction parameters comprise:
the zeroth group of coefficients represent the degree of nonlinear variation of the gain value of the pixel along with the position parameter of the pixel;
a first set of coefficients characterizing the degree of linear variation of the gain value of the pixel with the abscissa value of the pixel;
a second set of coefficients characterizing the degree of linear variation of the gain value of the pixel with the ordinate value of the pixel; and
and a third set of coefficients characterizing the degree to which the gain value of the pixel varies linearly with the abscissa and ordinate values of the pixel.
10. The method of claim 8, wherein training a predetermined regression equation with the sample image as an input and the gain image as a target comprises:
performing a multiply-add operation on the position coordinate values of the pixels in a predetermined image partition of the sample image by using the predetermined regression equation to obtain a prediction gain partition corresponding to the predetermined image partition; and
adjusting coefficients of the predetermined regression equation according to differences between the prediction gain partitions and corresponding partitions in the gain image.
11. The method of claim 10, wherein adjusting coefficients of the predetermined regression equation according to differences between the prediction gain partitions and corresponding partitions in the gain image comprises:
calculating loss values between the prediction gain partitions and corresponding partitions in the gain image;
calculating a gradient of each coefficient of the predetermined regression equation corresponding to the loss value;
calculating a sum of a current value of each coefficient of the predetermined regression equation and the corresponding gradient as an updated value of each coefficient of the predetermined regression equation.
12. An apparatus for adjusting brightness of a pixel, comprising:
the device comprises a first determination module, a second determination module and a correction module, wherein the first determination module is configured to determine a color temperature value of an image to be corrected;
the second determining module is configured to determine the correction parameters of the preset image partitions in the image to be corrected according to the color temperature values;
a calculation module configured to calculate a gain value for a pixel in the predetermined image partition based on the correction parameter and a position parameter of the pixel; and
an adjustment module configured to adjust the brightness of the pixel using the gain value.
13. An apparatus for determining a parameter for adjusting the brightness of a pixel, comprising:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is configured to acquire sample images of a plurality of reference color temperature values and corresponding target images;
a second obtaining module configured to obtain a gain image using the target image and the sample image; and
the training module is configured to train a predetermined regression equation by taking the sample image as input and the gain image as a target so as to obtain reference correction parameters corresponding to the reference color temperature values;
wherein the predetermined regression equation is used for representing the variation of the gain value of the pixel along with the position parameter.
14. An electronic device, the electronic device comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement the method of any one of claims 1-11.
15. A computer-readable storage medium, in which a computer program is stored, the computer program being adapted to perform the method of claims 1-11.
CN201910412740.9A 2019-05-17 2019-05-17 Method and device for adjusting pixel brightness and electronic equipment Pending CN111953953A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910412740.9A CN111953953A (en) 2019-05-17 2019-05-17 Method and device for adjusting pixel brightness and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910412740.9A CN111953953A (en) 2019-05-17 2019-05-17 Method and device for adjusting pixel brightness and electronic equipment

Publications (1)

Publication Number Publication Date
CN111953953A true CN111953953A (en) 2020-11-17

Family

ID=73336103

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910412740.9A Pending CN111953953A (en) 2019-05-17 2019-05-17 Method and device for adjusting pixel brightness and electronic equipment

Country Status (1)

Country Link
CN (1) CN111953953A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112991211A (en) * 2021-03-12 2021-06-18 中国大恒(集团)有限公司北京图像视觉技术分公司 Dark corner correction method for industrial camera
CN113747066A (en) * 2021-09-07 2021-12-03 汇顶科技(成都)有限责任公司 Image correction method, image correction device, electronic equipment and computer-readable storage medium
CN115100071A (en) * 2022-07-18 2022-09-23 芯原微电子(上海)股份有限公司 Brightness equalization correction method, device, image acquisition device and storage medium
CN115103168A (en) * 2022-06-27 2022-09-23 展讯通信(上海)有限公司 Image generation method, image generation device, electronic equipment and storage medium
CN115767285A (en) * 2021-09-02 2023-03-07 哲库科技(上海)有限公司 Image shading correction method, device, storage medium and electronic equipment
CN115883976A (en) * 2022-12-29 2023-03-31 溯徕科技(上海)有限公司 Endoscope calibration method, device, electronic apparatus, and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101292519A (en) * 2005-10-13 2008-10-22 诺基亚公司 Method and system for eliminating vignetting in digital images
US20110001880A1 (en) * 2009-07-02 2011-01-06 Mstar Semiconductor, Inc. Image Processing Apparatus and Method Thereof
CN108364267A (en) * 2018-02-13 2018-08-03 北京旷视科技有限公司 Image processing method, device and equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101292519A (en) * 2005-10-13 2008-10-22 诺基亚公司 Method and system for eliminating vignetting in digital images
US20110001880A1 (en) * 2009-07-02 2011-01-06 Mstar Semiconductor, Inc. Image Processing Apparatus and Method Thereof
CN108364267A (en) * 2018-02-13 2018-08-03 北京旷视科技有限公司 Image processing method, device and equipment

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112991211A (en) * 2021-03-12 2021-06-18 中国大恒(集团)有限公司北京图像视觉技术分公司 Dark corner correction method for industrial camera
CN115767285A (en) * 2021-09-02 2023-03-07 哲库科技(上海)有限公司 Image shading correction method, device, storage medium and electronic equipment
CN113747066A (en) * 2021-09-07 2021-12-03 汇顶科技(成都)有限责任公司 Image correction method, image correction device, electronic equipment and computer-readable storage medium
CN113747066B (en) * 2021-09-07 2023-09-15 汇顶科技(成都)有限责任公司 Image correction method, image correction device, electronic equipment and computer readable storage medium
CN115103168A (en) * 2022-06-27 2022-09-23 展讯通信(上海)有限公司 Image generation method, image generation device, electronic equipment and storage medium
CN115103168B (en) * 2022-06-27 2024-07-19 展讯通信(上海)有限公司 Image generation method, device, electronic equipment and storage medium
CN115100071A (en) * 2022-07-18 2022-09-23 芯原微电子(上海)股份有限公司 Brightness equalization correction method, device, image acquisition device and storage medium
CN115883976A (en) * 2022-12-29 2023-03-31 溯徕科技(上海)有限公司 Endoscope calibration method, device, electronic apparatus, and storage medium
CN115883976B (en) * 2022-12-29 2025-07-18 江西远赛医疗科技有限公司 Endoscope calibration method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111953953A (en) Method and device for adjusting pixel brightness and electronic equipment
EP4020328B1 (en) Data processing method and apparatus, computer device, and storage medium
EP4020321A1 (en) Data processing method, apparatus, computer device, and storage medium
EP4020329A1 (en) Data processing method and apparatus, computer equipment and storage medium
EP4024280A1 (en) Data processing method and apparatus, computer equipment, and storage medium
CN108961184B (en) A depth image correction method, device and device
JP2004534490A (en) Method and system for calculating a transformed image from a digital image
US11238571B2 (en) Method and device for enhancing image contrast, display apparatus, and storage medium
CN109064434B (en) Image enhancement method and device, storage medium and computer equipment
CN111860276A (en) Human body key point detection method, device, network device and storage medium
EP3633559A1 (en) Information processing apparatus, information processing method, non-transitory computer-readable storage medium
CN112285992B (en) Projector heat dissipation control method and device, projector and readable storage medium
CN107431794B (en) Image processing device and color balance method
US20200265299A1 (en) Data processing method, device and related products
CN112765540A (en) Data processing method and device and related products
WO2020135601A1 (en) Image processing method and device, vehicle-mounted operation platform, electronic device and system
CN112784206B (en) Winograd convolution operation method, device, equipment and storage medium
US8089534B2 (en) Multi illuminant shading correction using singular value decomposition
CN106778550A (en) A kind of method and apparatus of Face datection
CN107967691B (en) Visual mileage calculation method and device
CN112243119B (en) White balance processing method and device, electronic equipment and storage medium
CN112308787A (en) Distortion correction method and device and electronic equipment
US10229474B2 (en) Image processing apparatus, image processing method, and storage medium
CN118283437A (en) Parameter debugging method and system of CMS monitor
CN109993694B (en) A method and apparatus for generating super-resolution images

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201117