CN114827565A - Color correction matrix determining method, color correction device and storage medium - Google Patents

Color correction matrix determining method, color correction device and storage medium Download PDF

Info

Publication number
CN114827565A
CN114827565A CN202110111734.7A CN202110111734A CN114827565A CN 114827565 A CN114827565 A CN 114827565A CN 202110111734 A CN202110111734 A CN 202110111734A CN 114827565 A CN114827565 A CN 114827565A
Authority
CN
China
Prior art keywords
color
color correction
brightness
actual
correction matrix
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
CN202110111734.7A
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.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies 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 Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN202110111734.7A priority Critical patent/CN114827565A/en
Publication of CN114827565A publication Critical patent/CN114827565A/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
    • 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

The embodiment of the application discloses a color correction matrix determining method, a color correction device and a storage medium; the color correction matrix determination method includes: respectively acquiring at least one color correction matrix under different color temperatures and different brightnesses for a plurality of preset color temperatures and a plurality of preset brightnesses; acquiring actual color temperature and actual brightness when an image to be corrected is shot, and searching a color correction matrix corresponding to the actual color temperature and the actual brightness according to the actual color temperature and the actual brightness; and determining a color correction matrix corresponding to the image to be corrected according to the searched color correction matrix. The color correction method includes: determining a color correction matrix corresponding to the image to be corrected according to the color correction matrix determination method; and performing color correction on the image to be corrected according to the color correction matrix corresponding to the image to be corrected.

Description

Color correction matrix determining method, color correction device and storage medium
Technical Field
The embodiments of the present application relate to, but not limited to, the field of image processing, and in particular, to a color correction matrix determining method, a color correction device, and a storage medium.
Background
There are generally two modes of obtaining RAW data (i.e., RAW data) of an image: linear and WDR (Wide Dynamic Range). In the linear mode, exposure is performed once within a certain exposure time, and RAW data is obtained as input of a subsequent ISP (Image Signal Processing). The wide dynamic range refers to a technique of obtaining a plurality of frames of images by shooting the same scene with different exposure amounts and then synthesizing the plurality of frames of images into one frame. The frame with large exposure is called a long exposure frame or a long frame, and because the exposure time is long, the dark area information can be effectively reserved; the frame with a small exposure amount is called a short frame or a short exposure frame because the exposure time is short and the information of the bright area can be effectively retained. The bright area information in the short frame and the dark area information in the long frame are synthesized into one frame through a wide dynamic technology, and the bright area information and the dark area information can be simultaneously reflected. Wide dynamics are further classified into digital wide dynamics and optical wide dynamics. The digital wide dynamic state means that a dark area and a bright area of an image are processed by an image processing method, so that the brightness of the whole image is ensured to be proper, and noise and the like can be introduced due to the fact that the digital wide dynamic state is realized by a pure algorithm. The optical wide dynamic is that RAW data of a plurality of images are acquired under different exposure times, frame composition is carried out on a sensor (photosensitive element) or a platform, and the RAW data of the plurality of images finally form one image and then are transmitted to ISP PIPELINE (pipeline) for processing.
Color correction, commonly referred to as a color correction matrix, is a method of restoring the colors of an image by obtaining a correction matrix through pre-correction. At present, color correction schemes made under wide dynamic conditions are color correction matrixes corrected under inheritance linearity, and the inventor of the application finds that the color correction schemes have a color cast phenomenon in practical application; the reason is that the RAW data in the wide dynamic range is multi-frame synthesized, and the color correction matrix in the linear range is corrected at a specific exposure time, and obviously cannot represent the RAW data synthesized at a plurality of exposure times.
Disclosure of Invention
The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
The embodiment of the application provides a method for determining a color correction matrix, which comprises the following steps:
respectively acquiring at least one color correction matrix under different color temperatures and different brightnesses for a plurality of preset color temperatures and a plurality of preset brightnesses;
acquiring actual color temperature and actual brightness when an image to be corrected is shot, and searching a color correction matrix corresponding to the actual color temperature and the actual brightness according to the actual color temperature and the actual brightness;
and determining a color correction matrix corresponding to the image to be corrected according to the searched color correction matrix.
In some exemplary embodiments, the obtaining at least one color correction matrix at different color temperatures and different luminances for a preset plurality of color temperatures and a preset plurality of luminances respectively includes:
the following operations are respectively carried out for each preset color temperature: collecting original data of different brightness under the color temperature;
and respectively carrying out color correction on the collected original data with different brightness to obtain color correction matrixes corresponding to different brightness under the color temperature.
In some exemplary embodiments, the collecting raw data of different luminances at the color temperature includes:
under the color temperature, the exposure is respectively adjusted to a plurality of preset different exposure levels, and original data under the brightness corresponding to the different exposure levels are collected.
In some exemplary embodiments, the color correction of the collected raw data with different luminances to obtain color correction matrices corresponding to different luminances at the color temperature respectively includes:
the following operations are respectively carried out on the raw data collected by each brightness under the color temperature to obtain the color correction matrixes corresponding to different brightnesses under the color temperature:
correcting RGB three-channel values of the color blocks in the original data under the brightness according to the color correction matrix under the brightness to obtain an output RGB matrix, and converting the output RGB matrix into a Lab space; then in Lab space, for each color block, respectively calculating the distance between the coordinate value of the color block in the original data and the coordinate value of the corresponding color block in the preset standard color card;
if the calculated sum of the distances of each color block is greater than the preset threshold value, the operation is performed again after the element values in the color correction matrix are adjusted until the calculated sum of the distances of each color block is not greater than the preset threshold value, and the current color correction matrix is used as the color correction matrix under the brightness.
In some exemplary embodiments, the obtaining at least one color correction matrix at different color temperatures and different luminances further includes:
correspondingly storing the acquired at least one color correction matrix under different color temperatures and different brightness with the color temperature and the brightness when the color correction matrix is acquired;
the searching the color correction matrix corresponding to the actual color temperature and the actual brightness according to the actual color temperature and the actual brightness comprises:
and searching the color correction matrix which is correspondingly stored with the actual color temperature and the actual brightness according to the actual color temperature and the actual brightness in the color temperature, brightness and color correction matrix which is correspondingly stored.
In some exemplary embodiments, the searching for the color correction matrix corresponding to the actual color temperature and the actual brightness according to the actual color temperature and the actual brightness includes:
determining a corresponding color correction matrix according to the two target color temperatures closest to the actual color temperature and the two target luminances closest to the actual luminance, comprising:
searching two color temperatures with the minimum absolute value of the difference value of the actual color temperature and the target color temperature from a plurality of preset color temperatures;
searching two luminances with the minimum absolute value of the difference value of the actual luminance as a target luminance in a plurality of preset luminances;
and determining four color correction matrixes corresponding to the two target color temperatures and the two target brightness.
In some exemplary embodiments, the determining a color correction matrix corresponding to the image to be corrected according to the searched color correction matrix includes:
performing interpolation on two pairs of color correction matrixes with the same color temperature in the four searched color correction matrixes according to brightness to obtain two intermediate color correction matrixes, and performing interpolation on the two intermediate color correction matrixes again according to the color temperature to obtain a color correction matrix corresponding to the image to be corrected;
or interpolating two pairs of color correction matrixes with the same brightness in the four searched color correction matrixes respectively according to the color temperature to obtain two intermediate color correction matrixes, and interpolating the two intermediate color correction matrixes again according to the brightness to obtain the color correction matrixes corresponding to the images to be corrected.
The embodiment of the present application further provides a color correction method, including:
determining a color correction matrix corresponding to the image to be corrected according to the color correction matrix determining method in any embodiment;
and performing color correction on the image to be corrected according to the color correction matrix corresponding to the image to be corrected.
The embodiment of the application also provides a color correction device, which comprises a memory and a processor;
the memory is used for storing a program for color correction;
the processor is configured to read and execute the program for performing color correction, perform the method for determining a color correction matrix according to any of the embodiments, or perform the method for performing color correction according to the embodiments.
The embodiment of the application also provides a storage medium, wherein the storage medium is used for storing the program for color correction; when being read and executed, the program for performing color correction performs the method for determining a color correction matrix according to any one of the embodiments described above, or performs the method for performing color correction according to the embodiments described above.
The color correction matrix is obtained by combining two different dimensionalities of brightness and color temperature, the influence of factors in the actual environment on the color correction matrix is considered when the color correction matrix used for correction is determined, and compared with the color correction matrix obtained under a single dimensionality, the color restoration of an image can be more accurate, and the wide dynamic mode has better adaptability.
Other aspects will be apparent upon reading and understanding the attached figures and detailed description.
Drawings
Fig. 1 is a schematic flowchart of a method for determining a color correction matrix according to an embodiment of the present disclosure;
FIG. 2 is a schematic flowchart illustrating a color correction method according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a color correction apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic flow chart of color correction in an example of the embodiment of the present application.
Detailed Description
Hereinafter, embodiments of the present application will be described in detail with reference to the accompanying drawings. It should be noted that the features of the embodiments and examples of the present application may be arbitrarily combined with each other without conflict.
The steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
The embodiment of the present application provides a method for determining a color correction matrix, as shown in fig. 1, including steps S110 to S130:
s110, respectively acquiring at least one CCM (Color Correction Matrix) under different Color temperatures and different luminances for multiple preset Color temperatures and multiple preset luminances; assuming that there are k preset color temperatures and m preset luminances (k and m are positive integers), k × m CCMs can be obtained in step S110;
s120, acquiring an actual color temperature and actual brightness when an image to be corrected is shot, and searching a CCM corresponding to the actual color temperature and the actual brightness according to the actual color temperature and the actual brightness;
s130, determining the CCM corresponding to the image to be corrected according to the searched CCM.
The present embodiment can be used in a wide dynamic mode, but is not limited to this, that is, the original data of the image to be corrected can be multi-frame synthesized; when the method is applied to the wide dynamic mode, the step S110 needs to be performed in the wide dynamic mode when at least one CCM with different color temperatures and different luminances is obtained; if the original data of the image to be corrected is of a single frame, i.e., in the linear mode, step S110 is performed in the linear mode.
The embodiment of the application combines brightness, color temperature to combine two different dimensions to obtain CCM, compares CCM under single dimension, not only can obtain the better CCM of adaptability under wide dynamic scene, guarantees the accuracy of colour reduction, owing to just consider the influence of the factor in the actual environment to CCM when proofreading in addition, can also save online optimization cost in later stage and equipment operation performance.
When the embodiment is applied to a wide dynamic mode, the problem that the influence of WDR brightness on an image is not considered in the existing color correction technology, and color cast is caused by continuously using a linear CCM correction method can be solved, and the method can be better suitable for wide dynamic scenes.
In this embodiment, different color temperatures can be realized by using light sources with different color temperatures; different brightness levels may be identified in the form of different brightness levels, or different exposures, etc.
In some exemplary embodiments, the obtaining at least one CCM at different color temperatures and different luminances for a plurality of preset color temperatures and a plurality of luminances respectively includes:
the following operations are respectively carried out for each preset color temperature: collecting original data of different brightness under the color temperature;
and respectively carrying out color correction on the collected original data with different brightness to obtain CCMs (continuous charge and discharge) corresponding to different brightness under the color temperature.
In an implementation manner of this embodiment, the acquiring raw data of different luminances at the color temperature may include:
under the color temperature, the exposure is respectively adjusted to a plurality of preset different exposure levels, and original data under the brightness corresponding to the different exposure levels are collected. In other embodiments, the brightness may be adjusted by adjusting the brightness to a preset plurality of different brightness levels, gradually increasing/decreasing the brightness in specific or unspecified steps, or the like, so as to obtain the original data at different brightness.
In an implementation manner of this embodiment, the performing color correction on the collected raw data with different luminances respectively to obtain color correction matrices corresponding to different luminances at the color temperature includes:
the following operations are respectively carried out on the raw data collected by each brightness under the color temperature to obtain the color correction matrixes corresponding to different brightnesses under the color temperature:
correcting RGB three-channel values of color blocks (such as but not limited to 1-18 color blocks in a 24-color card) in the original data under the brightness according to the color correction matrix under the brightness to obtain an output RGB matrix, and converting the output RGB matrix into Lab space; then in Lab space, for each color block, respectively calculating the distance between the coordinate value of the color block in the original data and the coordinate value of the corresponding color block in the preset standard color card;
if the calculated sum of the distances of each color block is greater than the preset threshold value, the operation is performed again after the element values in the color correction matrix are adjusted until the calculated sum of the distances of each color block is not greater than the preset threshold value, and the current color correction matrix is used as the color correction matrix under the brightness.
In other embodiments, other color correction processes may be employed to determine the color correction matrix.
In an implementation manner of this embodiment, the raw data of the image to be corrected may be acquired in a wide dynamic mode;
the collecting of the raw data of different brightness at the color temperature comprises:
in the wide dynamic mode, the raw data of different brightness at the color temperature are collected.
In this embodiment, when the correction needs to be performed in the wide dynamic mode, that is, when the original data of the image to be corrected is multi-frame synthesized data, the original data acquired under different color temperatures and different brightnesses are correspondingly multi-frame synthesized.
In other embodiments, the original data of different luminances at different color temperatures can be collected in a linear mode to obtain CCMs of different color temperatures and different luminances; the raw data of the image to be corrected are also acquired in the linear mode at this time.
In some exemplary embodiments, the obtaining at least one CCM corresponding to different color temperatures and different luminances further includes:
correspondingly storing the acquired at least one color correction matrix under different color temperatures and different brightness with the color temperature and the brightness when the color correction matrix is acquired;
the searching the color correction matrix corresponding to the actual color temperature and the actual brightness according to the actual color temperature and the actual brightness comprises:
and searching the color correction matrix which is correspondingly stored with the actual color temperature and the actual brightness according to the actual color temperature and the actual brightness in the color temperature, brightness and color correction matrix which is correspondingly stored.
In an embodiment of this embodiment, the CCMs corresponding to different color temperatures and different luminances obtained by the LUT may be stored, but not limited to; when stored in the LUT, different rows and different columns in the LUT correspond to different color temperatures and different luminances, or correspond to different luminances and different color temperatures, respectively;
correspondingly, the searching for the CCM corresponding to the actual color temperature and the actual brightness according to the actual color temperature and the actual brightness includes:
in the LUT, respectively searching corresponding rows and columns or columns and rows according to the actual color temperature and the actual brightness; and finding the CCM corresponding to the actual color temperature and the actual brightness in the found rows and columns or the cells intersected by the columns and the rows.
The LUT is adopted in this embodiment, which is more convenient for a computer to implement the color correction matrix determination method.
In other embodiments, the LUT is not limited to be used, and other data structures may be used to correspondingly store the color temperature, the brightness, and the CCM for searching.
In this embodiment, the color temperatures and the luminances in the LUT may be arranged in order of magnitude (or height), or may be arranged arbitrarily.
In some exemplary embodiments, said searching for CCMs corresponding to the actual color temperature and the actual luminance according to the actual color temperature and the actual luminance includes:
determining a corresponding color correction matrix according to the two target color temperatures closest to the actual color temperature and the two target luminances closest to the actual luminance, comprising:
searching two color temperatures with the minimum absolute value of the difference value of the actual color temperature and the target color temperature from a plurality of preset color temperatures;
searching two luminances with the minimum absolute value of the difference value of the actual luminance as a target luminance in a plurality of preset luminances;
and determining four CCMs corresponding to the two target color temperatures and the two target brightness.
For example, two target color temperatures having the smallest absolute value of the difference from the actual color temperatures are T1 and T2, and two target luminances having the smallest absolute value of the difference from the actual luminances are L1 and L2, four CCMs of CCM1 corresponding to T1 and L1, CCM2 corresponding to T1 and L2, CCM3 corresponding to T2 and L1, and CCM4 corresponding to T2 and L2 are found.
In this embodiment, if the closest target color temperature and target brightness are searched in the LUT, two color temperatures having the smallest absolute value of the difference with the actual color temperature are searched as the target color temperature among the plurality of color temperatures included in the LUT; and searching two luminances with the minimum absolute value of the difference value between the actual luminance and the target luminance from the plurality of luminances contained in the LUT.
In this embodiment, if CCMs are searched in the LUT, four CCMs at corresponding positions may be found in the LUT according to the two searched target color temperatures and two searched target luminances, that is: and taking the CCMs in the four intersected cells of two rows (or two columns) corresponding to the two target color temperatures and two columns (or two rows) corresponding to the two target brightness as the searched CCMs.
In this embodiment, if the plurality of preset color temperatures and luminances are sequentially arranged according to the order of magnitude (or height), finding the target color temperature/luminance may include: the actual color temperature/brightness is found to lie between which two preset color temperatures/brightnesses, i.e. the target color temperature/brightness.
In other embodiments, the number of the searched target color temperature and the number of the searched target brightness can be set by self and can be the same or different; for example, a color temperature/brightness closest to the actual color temperature/brightness can be searched as a target color temperature/brightness, so that a CCM can be searched in the LUT and directly used as the CCM corresponding to the image to be corrected; and for example, three or more color temperatures/luminances closest to the actual color temperature/luminance can be selected as the target color temperature/luminance to obtain more CCMs, so as to obtain the CCMs corresponding to the image to be corrected according to the more CCMs.
In an implementation manner of this embodiment, the determining, according to the found CCM, the CCM corresponding to the image to be corrected may include:
interpolating two pairs of CCMs with the same color temperature in the four searched CCMs according to the brightness to obtain two middle CCMs, and interpolating the two middle CCMs again according to the color temperature to obtain the CCMs corresponding to the image to be corrected;
or interpolating two pairs of CCMs with the same brightness in the four searched CCMs according to the color temperature to obtain two middle CCMs, and interpolating the two middle CCMs again according to the brightness to obtain the CCM corresponding to the image to be corrected.
For example, if four CCMs are found at target color temperatures T1 and T2 and target luminances L1 and L2, the CCMs 1 and T1 at T1 and L1 and the CCM2 at L2 may be interpolated according to luminances, the CCMs 3 and T2 at T2 and L1 and the CCM4 at L2 may be interpolated again according to luminances, and then the result of the interpolation according to luminances (two intermediate CCMs) may be interpolated according to color temperatures.
Alternatively, CCM1 at T1 and L1, CCM3 at T2 and L1 are interpolated from the color temperature, CCM3 and T2 at T1 and L2, and CCM4 at L2 are interpolated from the color temperature, and then the result of interpolation from the color temperature (two intermediate CCMs) is interpolated again from the luminance.
The embodiment can ensure that the adaptability of the CCM corresponding to the image to be corrected is better and the accuracy is higher.
In other embodiments, the CCM corresponding to the image to be corrected is obtained by interpolation.
The embodiment of the present application further provides a color correction method, as shown in fig. 2, including steps S110 to S140:
details of steps S110-S130 and their implementation can be found above.
S140, according to the CCM corresponding to the image to be corrected, color correction is carried out on the image to be corrected.
The embodiment of the present application further provides an apparatus for correcting color of an image, as shown in fig. 3, including a memory 31 and a processor 32; the memory 31 is used for storing a program for color correction; the processor 32 is configured to read and execute the program for performing color correction, and perform the method for determining a color correction matrix according to any of the above embodiments or implementations, or the color correction method.
The embodiment of the application also provides a storage medium, wherein the storage medium is used for storing the program for color correction; when being read and executed, the program for performing color correction performs the method for determining a color correction matrix according to any one of the embodiments or implementations, or the color correction method.
The following describes embodiments of the present application with an example.
In this example, k lamp sources of different color temperatures are arranged in the lamp box, and the color temperatures of these lamp sources are respectively denoted as T 0 ,T 1 ,…,T k . The practical application is not limited to setting the color temperature by using the light box environment.
The process of color correction in this example is shown in FIG. 4, and includes the following steps S410-S440:
s410, for preset k color temperatures and m brightness levels, k × m CCMs with different brightness levels are respectively obtained under each color temperature.
Specifically, the following operations are performed for each of the above k color temperatures, respectively: and capturing m groups of RAW data of brightness levels (m is a positive integer) at the color temperature, and respectively carrying out CCM correction to obtain m CCMs at the color temperature, wherein k color temperatures can obtain k multiplied by m CCMs.
The present example is used in the wide dynamic mode, and therefore, in the wide dynamic mode, RAW data at different levels of brightness are captured, and m sets of RAW data at different brightness levels can be obtained for each color temperature.
The method comprises the following steps that RAW data under different brightness levels can be captured by controlling exposure and taking the brightness of a white block (a 19 th color card) in a 24-color card as a target;
assuming that the number of bits of the captured RAW data is n bits (n is a positive integer), the maximum value of the luminance of the white block in the m sets of RAW data is 2 n
The white block luminance of the acquired m sets of RAW data is:
Figure BDA0002919157470000111
the exposure can be adjusted, and m groups of RAW data with different brightness levels can be captured under m exposure levels.
Setting the maximum value of exposure as E max Minimum value of E min I.e. adjustable range of exposure E range =E max -E min The exposure is divided into m levels, and the exposure of each level is respectively as follows:
Figure BDA0002919157470000112
and for each captured group of RAW data, performing CCM correction according to any existing mode to obtain CCMs corresponding to the group of RAW data. The CCM corresponding to a group of RAW data is the CCM corresponding to the color temperature and the brightness level when the group of data is collected.
In this example, the CCM correction may be performed, but not limited to, the following steps S51-S55, respectively, to obtain CCM:
s51, calculating the L, a and b values corresponding to each color block from 1 st to 18 th color blocks in the captured RAW data in Lab color space;
s52, for the given initial CCM, carrying out CCM correction on the three-channel R/G/B values of the 1 st to 18 th color blocks in the RAW data, and setting the input RGB matrix as follows:
Figure BDA0002919157470000113
the initial CCM was:
Figure BDA0002919157470000114
the output RGB matrix satisfies:
Figure BDA0002919157470000115
and S53, converting the output RGB matrix from the RGB space to the Lab space.
S54, placing the coordinate values of the color blocks from 1 st to 18 th in the RAW data and the coordinate values of the color blocks from 1 st to 18 th in the target chart of the standard color card under the same L-a-b coordinate, and calculating the distance delta between the color blocks with the corresponding serial numbers; including but not limited to the euclidean distance in three coordinates of L-a-b, or in two coordinates of a-b.
S55, judging whether the sum of the distances of the 18 color blocks meets the following formula:
∑Δ≤δ (1)
wherein δ is a preset threshold.
If not, fine tuning elements in CCM, and then performing the steps S51-S55 until the sum of the distances of the 18 color blocks satisfies the formula (1), wherein the obtained CCM is:
Figure BDA0002919157470000121
through the steps, k multiplied by m CCMs are obtained in total, and the k multiplied by m CCMs correspond to different color temperatures and different brightness respectively.
S420, constructing a Look-Up Table (LUT) related to color temperature and brightness level according to the obtained k × m CCMs, as shown in Table 1, wherein different columns respectively correspond to different color temperatures T 0 ,T 1 ,...,T k Different rows correspond to different brightness levels E 1 ,E 2 ,...,E m CCM in tables ij Refers to the brightness level E i Color temperature T j The CCM obtained when i is any one of 1 to m and j is any one of 1 to k.
TABLE 1 look-up table for color temperature and brightness level
Figure BDA0002919157470000122
S430, in the wide dynamic scene, with the actual brightness (or exposure) as the target value, the two brightness levels E which are closest to each other are searched in the LUT A 、E B As the target brightness, two color temperatures T closest to each other are searched in the LUT with the actual color temperature as the target value C 、T D As the target color temperature, 4 corresponding CCMs can be found according to the two target luminances and the two target color temperatures, which are respectively: CCM AC 、CCM AD 、CCM BC And CCM BD . And performing interpolation processing on the four CCMs twice according to the brightness and the color temperature in sequence (the sequence of the brightness and the color temperature is not limited), so as to obtain the final CCM (namely the CCM corresponding to the image to be corrected).
Such as CCM for different color temperatures with the same brightness AC 、CCM AD Interpolating according to the color temperature to obtain an intermediate CCM, and performing interpolation on the intermediate CCM BC And CCM BD Carrying out interpolation according to the color temperature to obtain another intermediate CCM; and carrying out interpolation on the two intermediate CCMs again according to the brightness to obtain the final CCM. Then for example CCM with different brightness for the same color temperature AC 、CCM BC Interpolating according to the brightness to obtain oneIntermediate CCM, to CCM AD And CCM BD Carrying out interpolation according to the brightness to obtain another intermediate CCM; and carrying out interpolation on the two intermediate CCMs again according to the color temperature to obtain the final CCM.
And S440, performing color correction on the original data actually acquired in the image to be corrected by adopting the final CCM. The raw data actually collected here is raw data in a wide dynamic mode.
The example provides a wide dynamic CCM correction method, considering that the difference of RAW data of different brightness is large under WDR, combining brightness and color temperature to obtain CCM, considering the influence of different factors in the actual environment on CCM during correction, and saving later-stage online optimization cost and equipment running performance; and then, an LUT table is obtained by combining brightness and color temperature, so that the nearest 4 CCMs are found according to the actual environment, and the final CCM is obtained by carrying out interpolation twice.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.

Claims (10)

1. A method for determining a color correction matrix, comprising:
respectively acquiring at least one color correction matrix under different color temperatures and different brightnesses for a plurality of preset color temperatures and a plurality of preset brightnesses;
acquiring actual color temperature and actual brightness when an image to be corrected is shot, and searching a color correction matrix corresponding to the actual color temperature and the actual brightness according to the actual color temperature and the actual brightness;
and determining a color correction matrix corresponding to the image to be corrected according to the searched color correction matrix.
2. The method for determining color correction matrices according to claim 1, wherein said obtaining at least one color correction matrix at different color temperatures and different luminances for a predetermined plurality of color temperatures and luminances, respectively, comprises:
the following operations are respectively carried out for each preset color temperature: collecting original data of different brightness under the color temperature;
and respectively carrying out color correction on the collected original data with different brightness to obtain color correction matrixes corresponding to different brightness under the color temperature.
3. The method of claim 2, wherein said collecting raw data for different luminances at the color temperature comprises:
under the color temperature, the exposure is respectively adjusted to a plurality of preset different exposure levels, and original data under the brightness corresponding to the different exposure levels are collected.
4. The method for determining the color correction matrix according to claim 2, wherein the step of performing color correction on the collected raw data with different luminances respectively to obtain the color correction matrix corresponding to each of the different luminances at the color temperature comprises:
the following operations are respectively performed on the raw data acquired by each brightness under the color temperature to obtain color correction matrixes corresponding to different brightnesses under the color temperature:
correcting RGB three-channel values of the color blocks in the original data under the brightness according to the color correction matrix under the brightness to obtain an output RGB matrix, and converting the output RGB matrix into a Lab space; then in Lab space, for each color block, respectively calculating the distance between the coordinate value of the color block in the original data and the coordinate value of the corresponding color block in the preset standard color card;
if the calculated sum of the distances of each color block is greater than the preset threshold value, the operation is performed again after the element values in the color correction matrix are adjusted until the calculated sum of the distances of each color block is not greater than the preset threshold value, and the current color correction matrix is used as the color correction matrix under the brightness.
5. The method for determining color correction matrix according to claim 1, wherein said obtaining at least one color correction matrix at different color temperatures and different luminances further comprises:
correspondingly storing the acquired at least one color correction matrix under different color temperatures and different brightness with the color temperature and the brightness when the color correction matrix is acquired;
the searching the color correction matrix corresponding to the actual color temperature and the actual brightness according to the actual color temperature and the actual brightness comprises:
and searching the color correction matrix which is correspondingly stored with the actual color temperature and the actual brightness according to the actual color temperature and the actual brightness in the color temperature, brightness and color correction matrix which is correspondingly stored.
6. The method for determining the color correction matrix according to claim 1, wherein the searching the color correction matrix corresponding to the actual color temperature and the actual brightness according to the actual color temperature and the actual brightness comprises:
determining a corresponding color correction matrix according to the two target color temperatures closest to the actual color temperature and the two target luminances closest to the actual luminance, comprising:
searching two color temperatures with the minimum absolute value of the difference value of the actual color temperature and the target color temperature from a plurality of preset color temperatures;
searching two luminances with the minimum absolute value of the difference value of the actual luminance as a target luminance in a plurality of preset luminances;
and determining four color correction matrixes corresponding to the two target color temperatures and the two target brightness.
7. The method for determining the color correction matrix according to claim 6, wherein the determining the color correction matrix corresponding to the image to be corrected according to the searched color correction matrix comprises:
performing interpolation on two pairs of color correction matrixes with the same color temperature in the four searched color correction matrixes respectively according to brightness to obtain two intermediate color correction matrixes, and performing interpolation on the two intermediate color correction matrixes again according to the color temperature to obtain a color correction matrix corresponding to the image to be corrected;
or interpolating two pairs of color correction matrixes with the same brightness in the four searched color correction matrixes respectively according to the color temperature to obtain two intermediate color correction matrixes, and interpolating the two intermediate color correction matrixes again according to the brightness to obtain the color correction matrixes corresponding to the images to be corrected.
8. A color correction method, comprising:
determining a color correction matrix corresponding to the image to be corrected according to the color correction matrix determination method as claimed in any one of claims 1 to 7;
and performing color correction on the image to be corrected according to the color correction matrix corresponding to the image to be corrected.
9. A color correction apparatus includes a memory and a processor; the method is characterized in that:
the memory is used for storing a program for color correction;
the processor is configured to read and execute the program for performing color correction, perform the color correction matrix determination method according to any one of claims 1 to 7, or perform the color correction method according to claim 8.
10. A storage medium, characterized by:
the storage medium is used for storing a program for color correction; the program for performing color correction, when read for execution, performs the color correction matrix determination method according to any one of claims 1 to 7, or performs the color correction method according to claim 8.
CN202110111734.7A 2021-01-27 2021-01-27 Color correction matrix determining method, color correction device and storage medium Pending CN114827565A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110111734.7A CN114827565A (en) 2021-01-27 2021-01-27 Color correction matrix determining method, color correction device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110111734.7A CN114827565A (en) 2021-01-27 2021-01-27 Color correction matrix determining method, color correction device and storage medium

Publications (1)

Publication Number Publication Date
CN114827565A true CN114827565A (en) 2022-07-29

Family

ID=82525103

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110111734.7A Pending CN114827565A (en) 2021-01-27 2021-01-27 Color correction matrix determining method, color correction device and storage medium

Country Status (1)

Country Link
CN (1) CN114827565A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115314604A (en) * 2022-10-12 2022-11-08 杭州魔点科技有限公司 Method and system for generating color correction matrix, electronic device and storage medium
CN115361507A (en) * 2022-10-21 2022-11-18 安翰科技(武汉)股份有限公司 Imaging method, and automatic exposure control method and device for dyeing imaging
CN115623338A (en) * 2022-08-02 2023-01-17 荣耀终端有限公司 Image processing method and electronic equipment
CN115619628A (en) * 2022-12-05 2023-01-17 荣耀终端有限公司 Image processing method and terminal device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115623338A (en) * 2022-08-02 2023-01-17 荣耀终端有限公司 Image processing method and electronic equipment
CN115623338B (en) * 2022-08-02 2024-04-12 荣耀终端有限公司 Image processing method and electronic equipment
CN115314604A (en) * 2022-10-12 2022-11-08 杭州魔点科技有限公司 Method and system for generating color correction matrix, electronic device and storage medium
CN115361507A (en) * 2022-10-21 2022-11-18 安翰科技(武汉)股份有限公司 Imaging method, and automatic exposure control method and device for dyeing imaging
CN115619628A (en) * 2022-12-05 2023-01-17 荣耀终端有限公司 Image processing method and terminal device
CN115619628B (en) * 2022-12-05 2023-05-23 荣耀终端有限公司 Image processing method and terminal equipment

Similar Documents

Publication Publication Date Title
CN114827565A (en) Color correction matrix determining method, color correction device and storage medium
US9554059B1 (en) Exposure control system and associated exposure control method
US9516290B2 (en) White balance method in multi-exposure imaging system
CN104954771B (en) Carry out the image processing equipment and image processing method of color range correction
US20070047803A1 (en) Image processing device with automatic white balance
JP4955235B2 (en) Digital camera and gain calculation method
US20100329553A1 (en) Image signal processing device
RU2496250C1 (en) Image processing apparatus and method
US20030179418A1 (en) Producing a defective pixel map from defective cluster pixels in an area array image sensor
CN101472188A (en) White balance control device and white balance control method
US20070146502A1 (en) Image sensor and method for controlling image brightness distribution therein
JP2011040088A (en) Method and system for luminance change-adaptive noise filtering
CN103581638A (en) Image processing apparatus and image processing method
US8059904B2 (en) Image-processing device, electronic camera, image-processing program, and image-processing method
JP2008153768A (en) Imaging apparatus, and white balance processor
US9443284B1 (en) Methods for AWB (automatic white balance) compensation and apparatuses using the same
JP4176369B2 (en) Compensating digital images for optical falloff while minimizing changes in light balance
CN113163127A (en) Image processing method, image processing device, electronic equipment and storage medium
CN110428391B (en) Image fusion method and device for removing ghost artifacts
CN107659777B (en) Automatic exposure method and device
CN112788322B (en) Adaptive white balance processing method, device, medium, and electronic apparatus
JP3631022B2 (en) Imaging apparatus and signal processing apparatus
US9565412B2 (en) Image processing apparatus that develops photographed data, image processing method, and recording medium
JP2004297797A (en) System and method for attenuating colorfulness correction in image highlight area
US20070211165A1 (en) Imaging device, method for controlling imaging device, program of method for controlling imaging device, recording medium in which program of method for controlling imaging device is recorded

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