WO2020107661A1 - Image color temperature acquisition method - Google Patents

Image color temperature acquisition method Download PDF

Info

Publication number
WO2020107661A1
WO2020107661A1 PCT/CN2019/070914 CN2019070914W WO2020107661A1 WO 2020107661 A1 WO2020107661 A1 WO 2020107661A1 CN 2019070914 W CN2019070914 W CN 2019070914W WO 2020107661 A1 WO2020107661 A1 WO 2020107661A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
pixel
weight
color
zone
Prior art date
Application number
PCT/CN2019/070914
Other languages
French (fr)
Chinese (zh)
Inventor
饶洋
彭乐立
Original Assignee
深圳市华星光电半导体显示技术有限公司
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 深圳市华星光电半导体显示技术有限公司 filed Critical 深圳市华星光电半导体显示技术有限公司
Publication of WO2020107661A1 publication Critical patent/WO2020107661A1/en

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/20Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
    • G09G3/2003Display of colours
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/20Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
    • G09G3/22Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources
    • G09G3/30Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels
    • G09G3/32Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels semiconductive, e.g. using light-emitting diodes [LED]
    • G09G3/3208Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels semiconductive, e.g. using light-emitting diodes [LED] organic, e.g. using organic light-emitting diodes [OLED]
    • G09G3/3225Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels semiconductive, e.g. using light-emitting diodes [LED] organic, e.g. using organic light-emitting diodes [OLED] using an active matrix
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/20Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
    • G09G3/34Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters by control of light from an independent source
    • G09G3/36Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters by control of light from an independent source using liquid crystals
    • G09G3/3611Control of matrices with row and column drivers
    • G09G3/3648Control of matrices with row and column drivers using an active matrix

Definitions

  • the present invention relates to the field of display technology, and in particular, to a method for acquiring image color temperature.
  • liquid crystal display devices Liquid Crystal Display, LCD
  • organic light emitting diode display devices Organic Light Emitting Display, OLED
  • other flat display devices have high image quality, power saving, thin body and application range It has been widely used in various consumer electronic products such as mobile phones, televisions, personal digital assistants, digital cameras, notebook computers, desktop computers, etc., and has become the mainstream in display devices.
  • Most of the existing liquid crystal display devices generally include: a liquid crystal display panel and a backlight module.
  • the working principle of the liquid crystal display panel is to place liquid crystal molecules in two parallel glass substrates. There are many vertical and horizontal small wires between the two glass substrates.
  • the liquid crystal molecules can be controlled to change the direction by turning on or off, and the backlight module light Refracted to produce a picture.
  • the existing OLED display device usually includes a substrate, an anode provided on the substrate, an organic light emitting layer provided on the anode, an electron transport layer provided on the organic light emitting layer, and a cathode provided on the electron transport layer.
  • the hole from the anode and the electron from the cathode are emitted to the organic light-emitting layer, and these electrons and holes are combined to generate an excited electron-hole pair, and the excited electron-hole pair is output from the excited state to the ground state Achieve glow.
  • color temperature is an important parameter used to characterize the color characteristics of light. The lower the color temperature, the more reddish the light color, and conversely, the lighter the color.
  • the overall color temperature of the image can characterize the overall feeling of the image to the viewer.
  • the color temperature of a single frame of image is calculated, and in actual use, the image displayed by the display device is constantly changing, and the human eye will change the pixels in the adjacent frame of the image that change greatly The area is more sensitive, and the existing image color temperature acquisition method cannot combine the human eye attention to locally adjust the pixel area in the adjacent frame image that changes greatly, so that the final obtained image color temperature is different from the actual human eye perception.
  • the object of the present invention is to provide an image color temperature acquisition method, which can more accurately acquire the color temperature of an image.
  • the present invention provides a method for acquiring image color temperature, including the following steps:
  • Step S1 Establish a statistical table;
  • the statistical table includes a plurality of preset reference color temperatures and a plurality of weights corresponding to the plurality of reference color temperatures, respectively, the plurality of reference color temperatures increase sequentially, and the weights corresponding to the plurality of reference color temperatures are all equal Is 0;
  • Step S2 Provide a chromatogram, divide the color gamut space in the chromatogram into the first zone, the second zone and the third zone connected in pairs; the boundary between the first zone and the second zone, the second zone and the third zone The boundary line of the zone and the boundary line of the third zone and the first zone converge at a reference point.
  • the boundary line of the first zone and the second zone coincides with the iso-color temperature line corresponding to the largest reference color temperature among the multiple reference color temperatures.
  • the first The boundary between the zone and the third zone coincides with the isochromatic line of the smallest reference color temperature among the multiple reference color temperatures, and the boundary between the second zone and the third zone is parallel to the y-axis of the chromatogram;
  • Step S3 providing display data of two adjacent frames of images; each frame of images includes a plurality of pixels arranged in an array, and the display data of each frame of images includes a plurality of RGB digital values respectively corresponding to the plurality of pixels;
  • Step S4 Use the display data of the two adjacent frames to calculate the weight parameters corresponding to the pixels of the next frame of image respectively.
  • the weight parameters corresponding to the pixels in the i-th row and j-th column of the next frame of image are equal to the latter
  • the color difference between the pixel in the i-th row and j-th column in the frame image and the pixel in the i-th row and j-th column in the previous frame image, i and j are both positive integers;
  • Step S5 Select one of the pixels in the next frame of image as the processing pixel; convert the rgb digital value of the processing pixel into the color coordinate of the processing pixel in the chromatogram;
  • Step S6 Determine the position of the color coordinate of the processing pixel in the color gamut space; if the color coordinate of the processing pixel is located in the first area, calculate the color temperature value of the processing pixel according to the color coordinate of the processing pixel and the preset pixel color temperature calculation formula, Determine whether the color temperature value of the processing pixel is one of multiple reference color temperatures, if it is, increase the weight corresponding to the color temperature value of the processing pixel in the statistical table by the weight parameter corresponding to the processing pixel, otherwise the color temperature value of the processing pixel and the processing The weight parameters corresponding to the pixels are added to the statistical table as the reference color temperature and their corresponding weights; if the color coordinates of the processed pixel are located in the second zone, the connection between the point corresponding to the color coordinate of the processed pixel and the reference point and the The angle between the boundary between the first zone and the second zone, the weight parameter corresponding to the processed pixel and the preset first weight value calculation formula calculate the weight value of the processed pixel, and add the weight value to the
  • Step S7 Repeat steps S5 and S6 until multiple pixels of the next frame of the image all execute steps S5 and S6;
  • Step S8 Multiply each reference color temperature in the statistical table by the corresponding weight, and divide the sum of the products of multiple reference color temperatures and corresponding weights by the sum of the weights corresponding to multiple reference color temperatures to obtain the image of the next frame. Color temperature value.
  • the specific process of converting the rgb digital value of the processing pixel to the color coordinate of the processing pixel in the chromatogram in the step S5 is as follows: calculating the rgb optical value of the processing pixel according to the rgb digital value of the processing pixel and the preset rgb optical value calculation formula , Calculate the tristimulus value of the processing pixel according to the optical rgb value of the processing pixel and the preset tristimulus value calculation formula, and calculate the color coordinate of the processing pixel in the chromatogram according to the tristimulus value of the processing pixel and the preset color coordinate calculation formula.
  • the preset calculation formula of rgb optical value is:
  • R is the red optical value in the rgb optical value
  • G is the green optical value in the rgb optical value
  • B is the blue optical value in the rgb optical value
  • r is the red digital value in the rgb digital value
  • g is rgb
  • b is the blue digital value in the rgb digital value
  • the preset formula for calculating the tristimulus value is:
  • X is the red stimulus value in the tristimulus value
  • Y is the green stimulus value in the tristimulus value
  • Z is the blue stimulus value in the tristimulus value
  • M is the preset conversion matrix.
  • the preset color coordinate formula is:
  • u is the abscissa of the color coordinate in the chromatogram
  • v is the ordinate of the color coordinate in the chromatogram
  • the coordinates of the reference points where the boundary between the first zone and the second zone, the boundary between the second zone and the third zone, and the boundary between the third zone and the first zone in the chromatogram are (0.332, 0.1858).
  • CT is the pixel color temperature value
  • ⁇ 1 is the weight value of the processing pixel when the color coordinate of the processing pixel is in the second area
  • ⁇ 1 is the line between the point corresponding to the color coordinate of the processing pixel and the reference point and the boundary line between the first area and the second area
  • ⁇ 1 is the angle between the boundary between the first zone and the second zone and the boundary between the second zone and the third zone
  • k is the weight parameter corresponding to the processed pixels
  • ⁇ 2 is the weight value of the processing pixel when the color coordinate of the processing pixel is in the third zone
  • ⁇ 2 is the line between the point corresponding to the color coordinate of the processing pixel and the reference point and the boundary between the first zone and the third zone
  • the angle, ⁇ 2 is the angle between the boundary between the first and third regions and the boundary between the second and third regions.
  • the chromatogram is CIE1931 chromatogram
  • the smallest one of the reference color temperatures is 1000K; the largest one of the reference color temperatures is 15000K.
  • the step S4 is specifically as follows:
  • Step S41 Set one of the pixels in the next frame image as the first weight extraction pixel, and set the pixel number of the row and column in the previous frame image as the first weight extraction pixel in the next frame image.
  • the tristimulus value calculation formula calculates the tristimulus value of the first weight extraction pixel, and calculates the brightness component, the first color component and the first weight extraction pixel according to the tristimulus value of the first weight extraction pixel and the preset Lab space conversion formula
  • the second color component, the rgb digital value of the extracted pixel according to the second weight and the preset rgb optical value calculation formula to calculate the rgb optical value of the second weight extracted pixel, according to the rgb optical value of the second
  • the preset Lab space conversion formula is:
  • L is the luminance component
  • a is the first color component
  • b' is the second color component
  • X1 is the preset first parameter
  • Y1 is the preset second parameter
  • Z1 is the preset third parameter
  • t is a real number
  • Step S42 Extract the luminance component, the first color component and the second color component of the pixel according to the first weight, extract the luminance component, the first color component and the second color component of the pixel according to the second weight and the preset color difference calculation formula Calculating the color difference value of the first weight extraction pixel and the second weight extraction pixel as the weight parameter corresponding to the first weight extraction pixel;
  • the preset formula for calculating the color difference value is:
  • L 1 is the luminance component of the first weight extraction pixel
  • a 1 is the first color component of the first weight extraction pixel
  • b′ 1 is the second color component of the first weight extraction pixel
  • L 2 is the second weight extraction the luminance component of a pixel, a 2 of the second weight extraction first color component pixel, b '2 to the second weight extraction of the second color component pixel
  • ⁇ E is the first weight and the second weight extraction pixel extracting color pixels value
  • Step S43 Repeat the above steps S41 and S42 until the acquisition of the weight parameters corresponding to all pixels in the next frame of image is completed.
  • the invention also provides a method for acquiring image color temperature, including the following steps:
  • Step S1 Establish a statistical table;
  • the statistical table includes a plurality of preset reference color temperatures and a plurality of weights corresponding to the plurality of reference color temperatures, respectively, the plurality of reference color temperatures increase sequentially, and the weights corresponding to the plurality of reference color temperatures are all equal Is 0;
  • Step S2 Provide a chromatogram, divide the color gamut space in the chromatogram into the first zone, the second zone and the third zone connected in pairs; the boundary between the first zone and the second zone, the second zone and the third zone The boundary line of the zone and the boundary line of the third zone and the first zone converge at a reference point.
  • the boundary line of the first zone and the second zone coincides with the iso-color temperature line corresponding to the largest reference color temperature among the multiple reference color temperatures.
  • the first The boundary between the zone and the third zone coincides with the isochromatic line of the smallest reference color temperature among the multiple reference color temperatures, and the boundary between the second zone and the third zone is parallel to the y-axis of the chromatogram;
  • Step S3 providing display data of two adjacent frames of images; each frame of images includes a plurality of pixels arranged in an array, and the display data of each frame of images includes a plurality of RGB digital values respectively corresponding to the plurality of pixels;
  • Step S4 Use the display data of the two adjacent frames to calculate the weight parameters corresponding to the pixels of the next frame of image respectively.
  • the weight parameters corresponding to the pixels in the i-th row and j-th column of the next frame of image are equal to the latter
  • the color difference between the pixel in the i-th row and j-th column in the frame image and the pixel in the i-th row and j-th column in the previous frame image, i and j are both positive integers;
  • Step S5 Select one of the pixels in the next frame of image as the processing pixel; convert the rgb digital value of the processing pixel into the color coordinate of the processing pixel in the chromatogram;
  • Step S6 Determine the position of the color coordinate of the processing pixel in the color gamut space; if the color coordinate of the processing pixel is located in the first area, calculate the color temperature value of the processing pixel according to the color coordinate of the processing pixel and the preset pixel color temperature calculation formula, Determine whether the color temperature value of the processing pixel is one of multiple reference color temperatures, if it is, increase the weight corresponding to the color temperature value of the processing pixel in the statistical table by the weight parameter corresponding to the processing pixel, otherwise the color temperature value of the processing pixel and the processing The weight parameters corresponding to the pixels are added to the statistical table as the reference color temperature and their corresponding weights; if the color coordinates of the processed pixel are located in the second zone, the connection between the point corresponding to the color coordinate of the processed pixel and the reference point and the The angle between the boundary between the first zone and the second zone, the weight parameter corresponding to the processed pixel and the preset first weight value calculation formula calculate the weight value of the processed pixel, and add the weight value to the
  • Step S7 Repeat steps S5 and S6 until multiple pixels of the next frame of the image all execute steps S5 and S6;
  • Step S8 Multiply each reference color temperature in the statistical table by the corresponding weight, and divide the sum of the products of multiple reference color temperatures and corresponding weights by the sum of the weights corresponding to multiple reference color temperatures to obtain the image of the next frame.
  • the specific process of converting the rgb digital value of the processing pixel to the color coordinate of the processing pixel in the chromatogram in the step S5 is as follows: calculating the rgb optical value of the processing pixel according to the rgb digital value of the processing pixel and the preset rgb optical value calculation formula , Calculate the tristimulus value of the processing pixel according to the optical rgb value of the processing pixel and the preset tristimulus value calculation formula, and calculate the color coordinate of the processing pixel in the chromatogram according to the tristimulus value of the processing pixel and the preset color coordinate calculation formula;
  • ⁇ 1 is the weight value of the processing pixel when the color coordinate of the processing pixel is in the second area
  • ⁇ 1 is the line between the point corresponding to the color coordinate of the processing pixel and the reference point and the boundary line between the first area and the second area
  • ⁇ 1 is the angle between the boundary between the first zone and the second zone and the boundary between the second zone and the third zone
  • k is the weight parameter corresponding to the processed pixels
  • ⁇ 2 is the weight value of the processing pixel when the color coordinate of the processing pixel is in the third zone
  • ⁇ 2 is the line between the point corresponding to the color coordinate of the processing pixel and the reference point and the boundary between the first zone and the third zone
  • the angle, ⁇ 2 is the angle between the boundary between the first and third regions and the boundary between the second and third regions.
  • the image color temperature acquisition method of the present invention divides the color gamut space into the first area, the second area, and the third area, and calculates the color difference value between pixels at the same position in two adjacent frames of images as The weight parameter of the pixels in the next frame of image, to determine the color coordinate position of the pixel in the next frame of image, when it is in the first zone, use the pixel color temperature formula to calculate the color temperature value of the pixel and weight the color temperature value in the statistical table Add the corresponding weight parameter, when it is in the second area, use the pixel's color coordinate and reference point positional relationship and the weight parameter to calculate the pixel's weight value and add it to the weight of the maximum reference color temperature in the statistical table.
  • the pixel's color coordinate and the reference point's positional relationship and weight parameters are used to calculate the pixel's weight value and add it to the weight of the smallest reference color temperature in the statistical table. Combined with the weight to calculate the color temperature of the next frame image, it can be more Obtain the color temperature of the image accurately.
  • FIG. 1 is a flowchart of a method for acquiring image color temperature of the present invention
  • FIG. 2 is a schematic diagram of a chromatogram in the method for acquiring image color temperature of the present invention.
  • the present invention provides a method for acquiring image color temperature, including the following steps:
  • Step S1 create a statistical table.
  • the statistical table includes a plurality of preset reference color temperatures and a plurality of weights respectively corresponding to the plurality of reference color temperatures, the plurality of reference color temperatures increase in sequence, and the weights corresponding to the plurality of reference color temperatures are all 0.
  • the smallest one of the reference color temperatures is 1000K.
  • the largest one of the reference color temperatures is 15000K.
  • the difference between adjacent reference color temperatures may be 500K
  • the statistical table may be the statistical table of Table 1 below.
  • Step S2 Please refer to FIG. 2 to provide a chromatogram to divide the color gamut space in the chromatogram into the first area A, the second area B, and the third area C connected in pairs; the first area A and the second area B , The boundary between the second area B and the third area C, and the boundary between the third area C and the first area A converge at a reference point O.
  • the boundary between the first area A and the second area B is more than The reference color temperature corresponding to the largest reference color temperature coincides with the isochromatic temperature line, the boundary between the first area A and the third area C coincides with the isochromatic temperature line with the smallest reference color temperature among the multiple reference color temperatures, and the second area B coincides with the third
  • the boundary of zone C is parallel to the y-axis of the chromatogram.
  • the chromatogram is a CIE1931 chromatogram.
  • the coordinates of the reference point O are (0.332, 0.1858).
  • Step S3 Provide display data of two adjacent frames of images.
  • Each frame of image includes multiple pixels arranged in an array, and the display data of each frame of image includes multiple RGB digital values corresponding to the multiple pixels, respectively.
  • the rgb digital value includes a red digital value, a green digital value, and a blue digital value.
  • Step S4 Use the display data of the two adjacent frames to calculate the weight parameters corresponding to the pixels of the next frame of image respectively.
  • the weight parameters corresponding to the pixels in the i-th row and j-th column of the next frame of image are equal to the latter
  • the color difference between the pixel in the i-th row and j-th column in the frame image and the pixel in the i-th row and j-th column in the previous frame image, i and j are both positive integers.
  • step S4 is specifically:
  • Step S41 Set one of the pixels in the next frame image as the first weight extraction pixel, and set the pixel number of the row and column in the previous frame image as the first weight extraction pixel in the next frame image.
  • the tristimulus value calculation formula calculates the tristimulus value of the first weight extraction pixel, and calculates the brightness component, the first color component and the first weight extraction pixel according to the tristimulus value of the first weight extraction pixel and the preset Lab space conversion formula
  • the second color component, the rgb digital value of the extracted pixel according to the second weight and the preset rgb optical value calculation formula to calculate the rgb optical value of the second weight extracted pixel, according to the rgb optical value of the second
  • the preset calculation formula of the rgb optical value is:
  • R is the red optical value in the rgb optical value
  • G is the green optical value in the rgb optical value
  • B is the blue optical value in the rgb optical value
  • r is the red digital value in the rgb digital value
  • g is rgb
  • b is the blue digital value in the rgb digital value
  • the preset tristimulus calculation formula is:
  • X is the red stimulus value in the tristimulus value
  • Y is the green stimulus value in the tristimulus value
  • Z is the blue stimulus value in the tristimulus value
  • M is the preset conversion matrix.
  • the preset Lab space conversion formula is:
  • L is the luminance component
  • a is the first color component
  • b' is the second color component
  • X1 is the preset first parameter
  • Y1 is the preset second parameter
  • Z1 is the preset third parameter
  • t is a real number.
  • Step S42 Extract the luminance component, the first color component and the second color component of the pixel according to the first weight, extract the luminance component, the first color component and the second color component of the pixel according to the second weight and the preset color difference calculation formula
  • the color difference value of the first weight extraction pixel and the second weight extraction pixel is calculated as a weight parameter corresponding to the first weight extraction pixel.
  • the preset formula for calculating the color difference value is:
  • L 1 is the luminance component of the pixel extracted by the first weight
  • a 1 is the first color component of the pixel extracted by the first weight
  • b′ 1 is the second color component of the pixel extracted by the first weight
  • L 2 is the second weight extracted the luminance component of a pixel
  • b '2 to the second weight extraction of the second color component pixel
  • ⁇ E is the first weight and the second weight extraction pixel extracting color pixels value.
  • Step S43 Repeat the above steps S41 and S42 until the acquisition of the weight parameters corresponding to all pixels in the next frame of image is completed.
  • Step S5 Select one of the pixels in the next frame of the image as the processing pixel. Convert the rgb digital value of the processed pixel to the color coordinate of the processed pixel in the chromatogram.
  • the specific process of converting the rgb digital value of the processing pixel into the color coordinate of the processing pixel in the chromatogram in the step S5 is as follows: calculating the processing pixel's value based on the processing pixel's rgb digital value and a preset rgb optical value calculation formula rgb optical value, calculate the tristimulus value of the processing pixel according to the processing pixel's optical rgb value and the preset tristimulus value calculation formula, calculate the tristimulus value of the processing pixel according to the processing pixel's tristimulus value and the preset color coordinate calculation formula Color coordinates.
  • the preset rgb optical value calculation formula and the preset tristimulus calculation formula used in step S5 are the same as the preset rgb optical value calculation formula and the preset tristimulus value calculation formula used in step S41.
  • the preset color coordinate formula is:
  • u is the abscissa of the color coordinate in the chromatogram
  • v is the ordinate of the color coordinate in the chromatogram
  • Step S6 Determine the position of the color coordinate of the processing pixel in the color gamut space. If the color coordinate of the processing pixel is located in the first area A, for example, at point P(A) in FIG. 2, the color temperature value of the processing pixel is calculated according to the color coordinate of the processing pixel and the preset pixel color temperature calculation formula to determine the processing pixel Whether the color temperature value is one of multiple reference color temperatures, if so, the weight corresponding to the color temperature value of the processing pixel in the statistical table is increased by the weight parameter corresponding to the processing pixel, otherwise the color temperature value of the processing pixel and the weight corresponding to the processing pixel are increased The parameters are added to the statistical table as reference color temperatures and their corresponding weights.
  • the color coordinate of the processing pixel is located in the second area B, for example, at the point P(B) in FIG. 2, the line between this point and the reference point O and the boundary line between the first area A and the second area B
  • the angle is ⁇ 1
  • the angle between the boundary between the first area A and the second area B and the boundary between the second area B and the third area C is ⁇ 1
  • the weight parameter corresponding to the processing pixel and the preset first weight value calculation formula to calculate the weight value of the processing pixel
  • the weight value is added to the weight corresponding to the largest one in the reference color temperature, namely 15000K, in the statistical table.
  • the color coordinate of the processing pixel is located in the third area C, for example, at the point P(C) in FIG. 3, the line between this point and the reference point O and the boundary line between the first area A and the third area C The angle is ⁇ 2, and the angle between the boundary between the first area A and the third area C and the boundary between the second area B and the third area C is ⁇ 2.
  • the point and reference corresponding to the color coordinates of the processed pixel The angle between the line connecting point O and the boundary between the first area A and the third area C is ⁇ 2, the weight parameter corresponding to the processing pixel and the preset second weight value calculation formula to calculate the weight value of the processing pixel, and The weight value is added to the weight corresponding to the smallest one of the reference color temperatures in the statistical table, that is, 1000K.
  • CT is the pixel color temperature value
  • ⁇ 1 is the weight value of the processing pixel when the color coordinate of the processing pixel is in the second area
  • ⁇ 1 is the line between the point corresponding to the color coordinate of the processing pixel and the reference point and the boundary line between the first area and the second area
  • ⁇ 1 is the angle between the boundary between the first area and the second area and the boundary between the second area and the third area
  • k is the weight parameter corresponding to the processed pixels.
  • ⁇ 2 is the weight value of the processing pixel when the color coordinate of the processing pixel is in the third zone
  • ⁇ 2 is the line between the point corresponding to the color coordinate of the processing pixel and the reference point and the boundary between the first zone and the third zone
  • the angle, ⁇ 2 is the angle between the boundary between the first and third regions and the boundary between the second and third regions.
  • Step S7 Repeat steps S5 and S6 until multiple pixels of the next frame of the image all execute steps S5 and S6.
  • Step S8 Multiply each reference color temperature in the statistical table by the corresponding weight, and divide the sum of the products of multiple reference color temperatures and corresponding weights by the sum of the weights corresponding to multiple reference color temperatures to obtain the image of the next frame. Color temperature value.
  • the image color temperature acquisition method of the present invention divides the color gamut space into the first area that can calculate the color temperature according to the pixel color temperature calculation formula, but cannot calculate the color temperature based on the pixel color temperature calculation formula, but has a second area of the image based on the image color temperature.
  • the third zone where the second zone is the transition zone between cool and neutral colors, and the third zone is the transition zone between warm and neutral colors, and the color difference between the pixels at the same position in the two adjacent frames of image is calculated as
  • the weight parameter of the pixels in a frame of image to determine the position of the color coordinate of the pixel in the next frame of image, when it is in the first area, use the pixel color temperature formula to calculate the color temperature value of the pixel and add the weight of the color temperature value in the statistical table
  • Corresponding weight parameter when it is in the second area, use the positional relationship between the color coordinates of the pixel and the reference point and the weight parameter to calculate the weight value of the pixel and add it to the weight of the maximum reference color temperature in the statistical table.
  • the pixel's color coordinate and the reference point's positional relationship and weight parameters are used to calculate the pixel's weight value and add it to the weight of the smallest reference color temperature in the statistical table.
  • the change characteristic of the image of the adjacent frame obtains the color temperature of the image, so that the color temperature value of the obtained image is more accurate and matches the actual human eye perception.
  • the image color temperature acquisition method of the present invention divides the color gamut space into the first area, the second area, and the third area, and calculates the color difference value between pixels at the same position in the adjacent two frames of images as the post
  • the weight parameter of the pixels in a frame of image to determine the position of the color coordinate of the pixel in the next frame of image
  • Corresponding weight parameter when it is in the second area, use the positional relationship between the color coordinates of the pixel and the reference point and the weight parameter to calculate the weight value of the pixel and add it to the weight of the maximum reference color temperature in the statistical table.
  • the pixel's color coordinates and the reference point's positional relationship and weight parameters are used to calculate the pixel's weight value and add it to the weight of the smallest reference color temperature in the statistical table. Combined with the weight to calculate the color temperature of the next frame image, it can be more accurate The color temperature of the acquired image.

Abstract

Provided is an image color temperature acquisition method. The image color temperature acquisition method of the present invention involves: dividing a color gamut space into a first area, a second area and a third area; calculating a color difference value between pixels, at the same position, in two adjacent frames of images, and taking same as a weighting parameter of a pixel in a next frame of image; determining the position of color coordinates of the pixel in the next frame of image, when the color coordinates are located in the first area, using a pixel color temperature formula to calculate a color temperature value of the pixel and adding the corresponding weighting parameter to a weight of the color temperature value in a statistical table, when the color coordinates are located in the second area, using a position relationship between the color coordinates of the pixel and a reference point and the weighting parameter to calculate a weight value of the pixel and adding the weight value to a weight of the maximum reference color temperature in the statistical table, and when the color coordinates are located in the third area, using a position relationship between the color coordinates of the pixel and the reference point and the weighting parameter to calculate a weight value of the pixel and adding the weight value to a weight of the minimum reference color temperature in the statistical table; and calculating a color temperature of the next frame of image in conjunction with the weight. By means of the method, an image color temperature can more accurately be acquired.

Description

影像色温的获取方法Image color temperature acquisition method 技术领域Technical field
本发明涉及显示技术领域,尤其涉及一种影像色温的获取方法。The present invention relates to the field of display technology, and in particular, to a method for acquiring image color temperature.
背景技术Background technique
随着显示技术的发展,液晶显示装置(Liquid Crystal Display,LCD)和有机发光二极管显示装置(Organic Light Emitting Display,OLED)等平面显示装置因具有高画质、省电、机身薄及应用范围广等优点,而被广泛的应用于手机、电视、个人数字助理、数字相机、笔记本电脑、台式计算机等各种消费性电子产品,成为显示装置中的主流。With the development of display technology, liquid crystal display devices (Liquid Crystal Display, LCD) and organic light emitting diode display devices (Organic Light Emitting Display, OLED) and other flat display devices have high image quality, power saving, thin body and application range It has been widely used in various consumer electronic products such as mobile phones, televisions, personal digital assistants, digital cameras, notebook computers, desktop computers, etc., and has become the mainstream in display devices.
现有的液晶显示装置大部分一般包括:液晶显示面板及背光模组(backlight module)。液晶显示面板的工作原理是在两片平行的玻璃基板当中放置液晶分子,两片玻璃基板中间有许多垂直和水平的细小电线,通过通电与否来控制液晶分子改变方向,将背光模组的光线折射出来产生画面。Most of the existing liquid crystal display devices generally include: a liquid crystal display panel and a backlight module. The working principle of the liquid crystal display panel is to place liquid crystal molecules in two parallel glass substrates. There are many vertical and horizontal small wires between the two glass substrates. The liquid crystal molecules can be controlled to change the direction by turning on or off, and the backlight module light Refracted to produce a picture.
现有的OLED显示装置通常包括:基板、设于基板上的阳极、设于阳极上的有机发光层,设于有机发光层上的电子传输层及设于电子传输层上的阴极。工作时向有机发光层发射来自阳极的空穴和来自阴极的电子,将这些电子和空穴组合产生激发性电子-空穴对,并将激发性电子-空穴对从受激态输出为基态实现发光。The existing OLED display device usually includes a substrate, an anode provided on the substrate, an organic light emitting layer provided on the anode, an electron transport layer provided on the organic light emitting layer, and a cathode provided on the electron transport layer. During operation, the hole from the anode and the electron from the cathode are emitted to the organic light-emitting layer, and these electrons and holes are combined to generate an excited electron-hole pair, and the excited electron-hole pair is output from the excited state to the ground state Achieve glow.
在显示行业中,色温是用来表征光的颜色特性的重要参数,色温越低,光色越偏红,反之,光色越偏。影像整体的色温可以表征影像给观看者的整体感觉。现有的影像色温的获取方式中,均是对单一帧的影像的色温进行计算,而实际使用中,显示装置显示的影像不断变化,人眼会对相邻帧的影像中变化较大的像素区域更为敏感,现有的影像色温获取方法无法结合人眼关注对相邻帧影像中变化较大的像素区域进行局部调整,使得最终获得的影像色温与实际的人眼感知情况存在差异。In the display industry, color temperature is an important parameter used to characterize the color characteristics of light. The lower the color temperature, the more reddish the light color, and conversely, the lighter the color. The overall color temperature of the image can characterize the overall feeling of the image to the viewer. In the existing methods for obtaining the color temperature of an image, the color temperature of a single frame of image is calculated, and in actual use, the image displayed by the display device is constantly changing, and the human eye will change the pixels in the adjacent frame of the image that change greatly The area is more sensitive, and the existing image color temperature acquisition method cannot combine the human eye attention to locally adjust the pixel area in the adjacent frame image that changes greatly, so that the final obtained image color temperature is different from the actual human eye perception.
发明内容Summary of the invention
本发明的目的在于提供一种影像色温的获取方法,能够更准确的获取影像的色温。The object of the present invention is to provide an image color temperature acquisition method, which can more accurately acquire the color temperature of an image.
为实现上述目的,本发明提供一种影像色温的获取方法,包括如下步骤:To achieve the above object, the present invention provides a method for acquiring image color temperature, including the following steps:
步骤S1、建立统计表;所述统计表包括多个预设的参考色温及分别与多个参考色温对应的多个权重,所述多个参考色温依次增大,多个参考色温对应的权重均为0;Step S1. Establish a statistical table; the statistical table includes a plurality of preset reference color temperatures and a plurality of weights corresponding to the plurality of reference color temperatures, respectively, the plurality of reference color temperatures increase sequentially, and the weights corresponding to the plurality of reference color temperatures are all equal Is 0;
步骤S2、提供色谱图,将色谱图中的色域空间划分为两两相连的第一区、第二区及第三区;第一区与第二区的交界线、第二区与第三区的交界线及第三区与第一区的交界线汇聚于一参考点,第一区与第二区的交界线与多个参考色温中最大的参考色温对应的等色温线重合,第一区与第三区的交界线与多个参考色温中最小的参考色温的等色温线重合,第二区与第三区的交界线平行于色谱图的y轴;Step S2. Provide a chromatogram, divide the color gamut space in the chromatogram into the first zone, the second zone and the third zone connected in pairs; the boundary between the first zone and the second zone, the second zone and the third zone The boundary line of the zone and the boundary line of the third zone and the first zone converge at a reference point. The boundary line of the first zone and the second zone coincides with the iso-color temperature line corresponding to the largest reference color temperature among the multiple reference color temperatures. The first The boundary between the zone and the third zone coincides with the isochromatic line of the smallest reference color temperature among the multiple reference color temperatures, and the boundary between the second zone and the third zone is parallel to the y-axis of the chromatogram;
步骤S3、提供相邻两帧影像的显示数据;每一帧影像包括阵列排布的多个像素,每一帧影像的显示数据包括分别与多个像素对应的多个rgb数字值;Step S3, providing display data of two adjacent frames of images; each frame of images includes a plurality of pixels arranged in an array, and the display data of each frame of images includes a plurality of RGB digital values respectively corresponding to the plurality of pixels;
步骤S4、利用相邻两帧影像的显示数据计算分别与后一帧影像的多个像素对应的多个权重参数,后一帧影像中第i行第j列的像素对应的权重参数等于后一帧影像中第i行第j列的像素与前一帧影像中第i行第j列的像素之间的色差值,i、j均为正整数;Step S4: Use the display data of the two adjacent frames to calculate the weight parameters corresponding to the pixels of the next frame of image respectively. The weight parameters corresponding to the pixels in the i-th row and j-th column of the next frame of image are equal to the latter The color difference between the pixel in the i-th row and j-th column in the frame image and the pixel in the i-th row and j-th column in the previous frame image, i and j are both positive integers;
步骤S5、选取后一帧影像的多个像素中的一个为处理像素;将处理像素的rgb数字值转换为色谱图中处理像素的色坐标;Step S5: Select one of the pixels in the next frame of image as the processing pixel; convert the rgb digital value of the processing pixel into the color coordinate of the processing pixel in the chromatogram;
步骤S6、判断处理像素的色坐标在色域空间中的位置;若处理像素的色坐标位于第一区,则依据处理像素的色坐标及预设的像素色温计算公式计算处理像素的色温值,判断处理像素的色温值是否为多个参考色温中的一个,若是则将统计表中与处理像素的色温值对应的权重增加该处理像素对应的权重参数,否则将处理像素的色温值及该处理像素对应的权重参数分别作为参考色温及其对应的权重增加至统计表中;若处理像素的色坐标位于第二区,则依据处理像素的色坐标所对应的点与参考点的连线和第一区与第二区的交界线间的夹角、处理像素对应的权重参数及预设的第一权重值计算公式计算处理像素的权重值,并将该权重值加入统计表中与参考色温中最大的一个对应的权重;若处理像素的色坐标位于第三区,则依据处理像素的色坐标所对应的点与参考点的连线和第一区与第三区的交界线间的夹角、处理像素对应的权重参数及预设的第二权重值计算公式计算处理像素的权重值,并将该权重值加入统计表中与参考色温中最小的一个对应的权重;Step S6: Determine the position of the color coordinate of the processing pixel in the color gamut space; if the color coordinate of the processing pixel is located in the first area, calculate the color temperature value of the processing pixel according to the color coordinate of the processing pixel and the preset pixel color temperature calculation formula, Determine whether the color temperature value of the processing pixel is one of multiple reference color temperatures, if it is, increase the weight corresponding to the color temperature value of the processing pixel in the statistical table by the weight parameter corresponding to the processing pixel, otherwise the color temperature value of the processing pixel and the processing The weight parameters corresponding to the pixels are added to the statistical table as the reference color temperature and their corresponding weights; if the color coordinates of the processed pixel are located in the second zone, the connection between the point corresponding to the color coordinate of the processed pixel and the reference point and the The angle between the boundary between the first zone and the second zone, the weight parameter corresponding to the processed pixel and the preset first weight value calculation formula calculate the weight value of the processed pixel, and add the weight value to the statistical table and the reference color temperature The largest one corresponds to the weight; if the color coordinate of the processing pixel is located in the third area, the angle between the point corresponding to the color coordinate of the processing pixel and the reference point and the boundary between the first area and the third area 1. The weight parameter corresponding to the processing pixel and the preset second weight value calculation formula calculate the weight value of the processing pixel, and add the weight value to the weight corresponding to the smallest one of the reference color temperatures in the statistical table;
步骤S7、重复步骤S5及S6,直至后一帧影像的多个像素均执行步骤S5及S6;Step S7. Repeat steps S5 and S6 until multiple pixels of the next frame of the image all execute steps S5 and S6;
步骤S8、将统计表中每一参考色温与对应的权重相乘,将多个参考色温与对应的权重的乘积之和与多个参考色温对应的权重之和相除,得到后一帧影像的色温值。Step S8. Multiply each reference color temperature in the statistical table by the corresponding weight, and divide the sum of the products of multiple reference color temperatures and corresponding weights by the sum of the weights corresponding to multiple reference color temperatures to obtain the image of the next frame. Color temperature value.
所述步骤S5中将处理像素的rgb数字值转换为色谱图中处理像素的色坐标的具体过程为:依据处理像素的rgb数字值及预设的rgb光学值计算公式计算处理像素的rgb光学值,依据处理像素的光学rgb值及预设的三刺激值计算公式计算处理像素的三刺激值,依据处理像素的三刺激值及预设的色坐标计算公式计算色谱图中处理像素的色坐标。The specific process of converting the rgb digital value of the processing pixel to the color coordinate of the processing pixel in the chromatogram in the step S5 is as follows: calculating the rgb optical value of the processing pixel according to the rgb digital value of the processing pixel and the preset rgb optical value calculation formula , Calculate the tristimulus value of the processing pixel according to the optical rgb value of the processing pixel and the preset tristimulus value calculation formula, and calculate the color coordinate of the processing pixel in the chromatogram according to the tristimulus value of the processing pixel and the preset color coordinate calculation formula.
所述预设的rgb光学值计算公式为:
Figure PCTCN2019070914-appb-000001
The preset calculation formula of rgb optical value is:
Figure PCTCN2019070914-appb-000001
其中,R为rgb光学值中的红色光学值,G为rgb光学值中的绿色光学值,B为rgb光学值中的蓝色光学值,r为rgb数字值中的红色数字值,g为rgb数字值中的绿色数字值,b为rgb数字值中的蓝色数字值,
Figure PCTCN2019070914-appb-000002
表示对r进行伽马变换处理后得到的值,
Figure PCTCN2019070914-appb-000003
表示对b进行伽马变换处理后得到的值,
Figure PCTCN2019070914-appb-000004
表示对g进行伽马变换处理后得到的值。
Where R is the red optical value in the rgb optical value, G is the green optical value in the rgb optical value, B is the blue optical value in the rgb optical value, r is the red digital value in the rgb digital value, and g is rgb The green digital value in the digital value, b is the blue digital value in the rgb digital value,
Figure PCTCN2019070914-appb-000002
Represents the value obtained by performing gamma transformation on r,
Figure PCTCN2019070914-appb-000003
Represents the value obtained by performing gamma transformation on b,
Figure PCTCN2019070914-appb-000004
Represents the value obtained by performing gamma transformation on g.
所述预设的三刺激值计算公式为:
Figure PCTCN2019070914-appb-000005
The preset formula for calculating the tristimulus value is:
Figure PCTCN2019070914-appb-000005
其中,X为三刺激值中的红色刺激值,Y为三刺激值中的绿色刺激值,Z为三刺激值中的蓝色刺激值,M为预设的转化矩阵。Wherein, X is the red stimulus value in the tristimulus value, Y is the green stimulus value in the tristimulus value, Z is the blue stimulus value in the tristimulus value, and M is the preset conversion matrix.
所述预设的色坐标公式为:
Figure PCTCN2019070914-appb-000006
The preset color coordinate formula is:
Figure PCTCN2019070914-appb-000006
其中,u为在色谱图中色坐标的横坐标,v为在色谱图中色坐标的纵坐标。Where u is the abscissa of the color coordinate in the chromatogram, and v is the ordinate of the color coordinate in the chromatogram.
所述色谱图中第一区与第二区的交界线、第二区与第三区的交界线及第三区与第一区的交界线汇聚的参考点的坐标为(0.332,0.1858)。The coordinates of the reference points where the boundary between the first zone and the second zone, the boundary between the second zone and the third zone, and the boundary between the third zone and the first zone in the chromatogram are (0.332, 0.1858).
所述预设的像素色温计算公式为:CT=-437×n 3+3601×n 2-6861×n+5514.31; The preset calculation formula of pixel color temperature is: CT=-437×n 3 +3601×n 2 -6861×n+5514.31;
其中,CT为像素色温值,
Figure PCTCN2019070914-appb-000007
Among them, CT is the pixel color temperature value,
Figure PCTCN2019070914-appb-000007
所述预设的第一权重值计算公式为:γ1=(1-α1/β1)×k;The preset formula for calculating the first weight value is: γ1=(1-α1/β1)×k;
其中,γ1为处理像素的色坐标位于第二区时处理像素的权重值,α1为处理像素的色坐标所对应的点与参考点的连线和第一区与第二区的交界线间的夹角,β1为第一区与第二区的交界线和第二区与第三区的交界线间的夹角,k为处理像素对应的权重参数;Among them, γ1 is the weight value of the processing pixel when the color coordinate of the processing pixel is in the second area, and α1 is the line between the point corresponding to the color coordinate of the processing pixel and the reference point and the boundary line between the first area and the second area Angle, β1 is the angle between the boundary between the first zone and the second zone and the boundary between the second zone and the third zone, and k is the weight parameter corresponding to the processed pixels;
所述预设的第二权重值计算公式为:γ2=(1-α2/β2)×k;The preset second weight value calculation formula is: γ2=(1-α2/β2)×k;
其中,γ2为处理像素的色坐标位于第三区时处理像素的权重值,α2为处理像素的色坐标所对应的点与参考点的连线和第一区与第三区的交界线间的夹角,β2为第一区与第三区的交界线和第二区与第三区的交界线间的夹角。Where γ2 is the weight value of the processing pixel when the color coordinate of the processing pixel is in the third zone, and α2 is the line between the point corresponding to the color coordinate of the processing pixel and the reference point and the boundary between the first zone and the third zone The angle, β2, is the angle between the boundary between the first and third regions and the boundary between the second and third regions.
所述色谱图为CIE1931色谱图;The chromatogram is CIE1931 chromatogram;
所述参考色温中最小的一个为1000K;所述参考色温中最大的一个为15000K。The smallest one of the reference color temperatures is 1000K; the largest one of the reference color temperatures is 15000K.
所述步骤S4具体为:The step S4 is specifically as follows:
步骤S41、将后一帧影像的多个像素中的一个设为第一权重提取像素,将前一帧影像中行列数与第一权重提取像素在后一帧影像中的行列数相同的像素设为第二权重提取像素,依据第一权重提取像素的rgb数字值及预设的rgb光学值计算公式计算第一权重提取像素的rgb光学值,依据第一权重提取像素的rgb光学值及预设的三刺激值计算公式计算第一权重提取像素的三刺激值,依据第一权重提取像素的三刺激值及预设的Lab空间转换公式计算第一权重提取像素的亮度分量、第一颜色分量及第二颜色分量,依据第二权重提取像素的rgb数字值及预设的rgb光学值计算公式计算第二权重提取像素的rgb光学值,依据第二权重的rgb光学值及预设的三刺激值计算公式计算第二权重提取像素的三刺激值,依据第二权重提取像素的三刺激值及预设的Lab空间转换公式计算第二权重提取像素的亮度分量、第一颜色分量及第二颜色分量;Step S41: Set one of the pixels in the next frame image as the first weight extraction pixel, and set the pixel number of the row and column in the previous frame image as the first weight extraction pixel in the next frame image. To extract pixels for the second weight, calculate the rgb optical value of the first weight extraction pixel according to the rgb digital value of the first weight extraction pixel and the preset rgb optical value calculation formula, and extract the rgb optical value and preset of the pixel according to the first weight The tristimulus value calculation formula calculates the tristimulus value of the first weight extraction pixel, and calculates the brightness component, the first color component and the first weight extraction pixel according to the tristimulus value of the first weight extraction pixel and the preset Lab space conversion formula The second color component, the rgb digital value of the extracted pixel according to the second weight and the preset rgb optical value calculation formula to calculate the rgb optical value of the second weight extracted pixel, according to the rgb optical value of the second weight and the preset tristimulus value The calculation formula calculates the tristimulus value of the second weight extraction pixel, and calculates the brightness component, the first color component and the second color component of the second weight extraction pixel according to the tristimulus value of the second weight extraction pixel and the preset Lab space conversion formula ;
所述预设的Lab空间转换公式为:The preset Lab space conversion formula is:
Figure PCTCN2019070914-appb-000008
Figure PCTCN2019070914-appb-000008
其中,L为亮度分量,a为第一颜色分量,b’为第二颜色分量,X1为预设的第一参数,Y1为预设的第二参数,Z1为预设的第三参数,Where L is the luminance component, a is the first color component, b'is the second color component, X1 is the preset first parameter, Y1 is the preset second parameter, and Z1 is the preset third parameter,
Figure PCTCN2019070914-appb-000009
t为实数;
Figure PCTCN2019070914-appb-000009
t is a real number;
步骤S42、依据第一权重提取像素的亮度分量、第一颜色分量及第二颜色分量、第二权重提取像素的亮度分量、第一颜色分量及第二颜色分量以及预设的色差值计算公式计算第一权重提取像素与第二权重提取像素的色差值作为第一权重提取像素对应的权重参数;Step S42: Extract the luminance component, the first color component and the second color component of the pixel according to the first weight, extract the luminance component, the first color component and the second color component of the pixel according to the second weight and the preset color difference calculation formula Calculating the color difference value of the first weight extraction pixel and the second weight extraction pixel as the weight parameter corresponding to the first weight extraction pixel;
所述预设的色差值计算公式为:The preset formula for calculating the color difference value is:
Figure PCTCN2019070914-appb-000010
Figure PCTCN2019070914-appb-000010
其中,L 1为第一权重提取像素的亮度分量,a 1为第一权重提取像素的第一颜色分量,b’ 1为第一权重提取像素的第二颜色分量,L 2为第二权重提取像素的亮度分量,a 2为第二权重提取像素的第一颜色分量,b’ 2为第二权重提取像素的第二颜色分量,ΔE为第一权重提取像素与第二权重提取像素的色差值; Among them, L 1 is the luminance component of the first weight extraction pixel, a 1 is the first color component of the first weight extraction pixel, b′ 1 is the second color component of the first weight extraction pixel, and L 2 is the second weight extraction the luminance component of a pixel, a 2 of the second weight extraction first color component pixel, b '2 to the second weight extraction of the second color component pixel, ΔE is the first weight and the second weight extraction pixel extracting color pixels value;
步骤S43、重复上述步骤S41及S42,直至完成后一帧影像中所有像素对应的权重参数的获取。Step S43. Repeat the above steps S41 and S42 until the acquisition of the weight parameters corresponding to all pixels in the next frame of image is completed.
本发明还提供一种影像色温的获取方法,包括如下步骤:The invention also provides a method for acquiring image color temperature, including the following steps:
步骤S1、建立统计表;所述统计表包括多个预设的参考色温及分别与多个参考色温对应的多个权重,所述多个参考色温依次增大,多个参考色温对应的权重均为0;Step S1. Establish a statistical table; the statistical table includes a plurality of preset reference color temperatures and a plurality of weights corresponding to the plurality of reference color temperatures, respectively, the plurality of reference color temperatures increase sequentially, and the weights corresponding to the plurality of reference color temperatures are all equal Is 0;
步骤S2、提供色谱图,将色谱图中的色域空间划分为两两相连的第一区、第二区及第三区;第一区与第二区的交界线、第二区与第三区的交界线及第三区与第一区的交界线汇聚于一参考点,第一区与第二区的交界线与多个参考色温中最大的参考色温对应的等色温线重合,第一区与第三区的交界线与多个参考色温中最小的参考色温的等色温线重合,第二区与第三区的交界线平行于色谱图的y轴;Step S2. Provide a chromatogram, divide the color gamut space in the chromatogram into the first zone, the second zone and the third zone connected in pairs; the boundary between the first zone and the second zone, the second zone and the third zone The boundary line of the zone and the boundary line of the third zone and the first zone converge at a reference point. The boundary line of the first zone and the second zone coincides with the iso-color temperature line corresponding to the largest reference color temperature among the multiple reference color temperatures. The first The boundary between the zone and the third zone coincides with the isochromatic line of the smallest reference color temperature among the multiple reference color temperatures, and the boundary between the second zone and the third zone is parallel to the y-axis of the chromatogram;
步骤S3、提供相邻两帧影像的显示数据;每一帧影像包括阵列排布的多个像素,每一帧影像的显示数据包括分别与多个像素对应的多个rgb数字值;Step S3, providing display data of two adjacent frames of images; each frame of images includes a plurality of pixels arranged in an array, and the display data of each frame of images includes a plurality of RGB digital values respectively corresponding to the plurality of pixels;
步骤S4、利用相邻两帧影像的显示数据计算分别与后一帧影像的多个像素对应的多个权重参数,后一帧影像中第i行第j列的像素对应的权重参数等于后一帧影像中第i行第j列的像素与前一帧影像中第i行第j列的像素之间的色差值,i、j均为正整数;Step S4: Use the display data of the two adjacent frames to calculate the weight parameters corresponding to the pixels of the next frame of image respectively. The weight parameters corresponding to the pixels in the i-th row and j-th column of the next frame of image are equal to the latter The color difference between the pixel in the i-th row and j-th column in the frame image and the pixel in the i-th row and j-th column in the previous frame image, i and j are both positive integers;
步骤S5、选取后一帧影像的多个像素中的一个为处理像素;将处理像素的rgb数字值转换为色谱图中处理像素的色坐标;Step S5: Select one of the pixels in the next frame of image as the processing pixel; convert the rgb digital value of the processing pixel into the color coordinate of the processing pixel in the chromatogram;
步骤S6、判断处理像素的色坐标在色域空间中的位置;若处理像素的色坐标位于第一区,则依据处理像素的色坐标及预设的像素色温计算公式计算处理像素的色温值,判断处理像素的色温值是否为多个参考色温中的一个,若是则将统计表中与处理像素的色温值对应的权重增加该处理像素对应的权重参数,否则将处理像素的色温值及该处理像素对应的权重参数分别作为参考色温及其对应的权重增加至统计表中;若处理像素的色坐标位于第二区,则依据处理像素的色坐标所对应的点与参考点的连线和第一区与第二区的交界线间的夹角、处理像素对应的权重参数及预设的第一权重值计算公式计算处理像素的权重值,并将该权重值加入统计表中与参考色温中最大的一个对应的权重;若处理像素的色坐标位于第三区,则依据处理像素的色坐标所对应的点与参考点的连线和第一区与第三区的交界线间的夹角、处理像素对应的权重参数及预设的第二权重值计算公式计算处理像素的权重值,并将该权重值加入统计表中与参考色温中最小的一个对应的权重;Step S6: Determine the position of the color coordinate of the processing pixel in the color gamut space; if the color coordinate of the processing pixel is located in the first area, calculate the color temperature value of the processing pixel according to the color coordinate of the processing pixel and the preset pixel color temperature calculation formula, Determine whether the color temperature value of the processing pixel is one of multiple reference color temperatures, if it is, increase the weight corresponding to the color temperature value of the processing pixel in the statistical table by the weight parameter corresponding to the processing pixel, otherwise the color temperature value of the processing pixel and the processing The weight parameters corresponding to the pixels are added to the statistical table as the reference color temperature and their corresponding weights; if the color coordinates of the processed pixel are located in the second zone, the connection between the point corresponding to the color coordinate of the processed pixel and the reference point and the The angle between the boundary between the first zone and the second zone, the weight parameter corresponding to the processed pixel and the preset first weight value calculation formula calculate the weight value of the processed pixel, and add the weight value to the statistical table and the reference color temperature The largest one corresponds to the weight; if the color coordinate of the processing pixel is located in the third area, the angle between the point corresponding to the color coordinate of the processing pixel and the reference point and the boundary between the first area and the third area 1. The weight parameter corresponding to the processing pixel and the preset second weight value calculation formula calculate the weight value of the processing pixel, and add the weight value to the weight corresponding to the smallest one of the reference color temperatures in the statistical table;
步骤S7、重复步骤S5及S6,直至后一帧影像的多个像素均执行步骤S5及S6;Step S7. Repeat steps S5 and S6 until multiple pixels of the next frame of the image all execute steps S5 and S6;
步骤S8、将统计表中每一参考色温与对应的权重相乘,将多个参考色温与对应的权重的乘积之和与多个参考色温对应的权重之和相除,得到后一帧影像的色温值;Step S8. Multiply each reference color temperature in the statistical table by the corresponding weight, and divide the sum of the products of multiple reference color temperatures and corresponding weights by the sum of the weights corresponding to multiple reference color temperatures to obtain the image of the next frame. Color temperature value
所述步骤S5中将处理像素的rgb数字值转换为色谱图中处理像素的色坐标的具体过程为:依据处理像素的rgb数字值及预设的rgb光学值计算公式计算处理像素的rgb光学值,依据处理像素的光学rgb值及预设的三刺激值计算公式计算处理像素的三刺激值,依据处理像素的三刺激值及预设的色坐标计算公式计算色谱图中处理像素的色坐标;The specific process of converting the rgb digital value of the processing pixel to the color coordinate of the processing pixel in the chromatogram in the step S5 is as follows: calculating the rgb optical value of the processing pixel according to the rgb digital value of the processing pixel and the preset rgb optical value calculation formula , Calculate the tristimulus value of the processing pixel according to the optical rgb value of the processing pixel and the preset tristimulus value calculation formula, and calculate the color coordinate of the processing pixel in the chromatogram according to the tristimulus value of the processing pixel and the preset color coordinate calculation formula;
所述预设的第一权重值计算公式为:γ1=(1-α1/β1)×k;The preset formula for calculating the first weight value is: γ1=(1-α1/β1)×k;
其中,γ1为处理像素的色坐标位于第二区时处理像素的权重值,α1为处理像素的色坐标所对应的点与参考点的连线和第一区与第二区的交界线间的夹角,β1为第一区与第二区的交界线和第二区与第三区的交界线间的 夹角,k为处理像素对应的权重参数;Among them, γ1 is the weight value of the processing pixel when the color coordinate of the processing pixel is in the second area, and α1 is the line between the point corresponding to the color coordinate of the processing pixel and the reference point and the boundary line between the first area and the second area Angle, β1 is the angle between the boundary between the first zone and the second zone and the boundary between the second zone and the third zone, and k is the weight parameter corresponding to the processed pixels;
所述预设的第二权重值计算公式为:γ2=(1-α2/β2)×k;The preset second weight value calculation formula is: γ2=(1-α2/β2)×k;
其中,γ2为处理像素的色坐标位于第三区时处理像素的权重值,α2为处理像素的色坐标所对应的点与参考点的连线和第一区与第三区的交界线间的夹角,β2为第一区与第三区的交界线和第二区与第三区的交界线间的夹角。Where γ2 is the weight value of the processing pixel when the color coordinate of the processing pixel is in the third zone, and α2 is the line between the point corresponding to the color coordinate of the processing pixel and the reference point and the boundary between the first zone and the third zone The angle, β2, is the angle between the boundary between the first and third regions and the boundary between the second and third regions.
本发明的有益效果:本发明的影像色温的获取方法将色域空间划分为第一区、第二区及第三区,计算相邻两帧影像中位置相同的像素之间的色差值作为后一帧影像中像素的权重参数,判断后一帧影像中像素的色坐标的位置,当其位于第一区内时采用像素色温公式计算像素的色温值并将统计表中该色温值的权重加对应的权重参数,当其位于第二区时则利用像素的色坐标与参考点的位置关系及权重参数计算像素的权重值并将其加入统计表中最大的参考色温的权重,当其位于第三区时则利用像素的色坐标与参考点的位置关系及权重参数计算像素的权重值并将其加入统计表中最小的参考色温的权重,结合权重计算后一帧影像的色温,能够更准确的获取影像的色温。Beneficial effect of the present invention: The image color temperature acquisition method of the present invention divides the color gamut space into the first area, the second area, and the third area, and calculates the color difference value between pixels at the same position in two adjacent frames of images as The weight parameter of the pixels in the next frame of image, to determine the color coordinate position of the pixel in the next frame of image, when it is in the first zone, use the pixel color temperature formula to calculate the color temperature value of the pixel and weight the color temperature value in the statistical table Add the corresponding weight parameter, when it is in the second area, use the pixel's color coordinate and reference point positional relationship and the weight parameter to calculate the pixel's weight value and add it to the weight of the maximum reference color temperature in the statistical table. In the third zone, the pixel's color coordinate and the reference point's positional relationship and weight parameters are used to calculate the pixel's weight value and add it to the weight of the smallest reference color temperature in the statistical table. Combined with the weight to calculate the color temperature of the next frame image, it can be more Obtain the color temperature of the image accurately.
附图说明BRIEF DESCRIPTION
为了能更进一步了解本发明的特征以及技术内容,请参阅以下有关本发明的详细说明与附图,然而附图仅提供参考与说明用,并非用来对本发明加以限制。In order to further understand the features and technical content of the present invention, please refer to the following detailed description and drawings of the present invention. However, the drawings are provided for reference and explanation only, and are not intended to limit the present invention.
附图中,In the drawings,
图1为本发明的影像色温的获取方法的流程图;1 is a flowchart of a method for acquiring image color temperature of the present invention;
图2为本发明的影像色温的获取方法中的色谱图的示意图。2 is a schematic diagram of a chromatogram in the method for acquiring image color temperature of the present invention.
具体实施方式detailed description
为更进一步阐述本发明所采取的技术手段及其效果,以下结合本发明的优选实施例及其附图进行详细描述。In order to further elaborate on the technical means adopted by the present invention and its effects, the following will be described in detail with reference to the preferred embodiments of the present invention and the accompanying drawings.
请参阅图1,本发明提供一种影像色温的获取方法,包括如下步骤:Please refer to FIG. 1, the present invention provides a method for acquiring image color temperature, including the following steps:
步骤S1、建立统计表。所述统计表包括多个预设的参考色温及分别与多个参考色温对应的多个权重,所述多个参考色温依次增大,多个参考色温对应的权重均为0。Step S1, create a statistical table. The statistical table includes a plurality of preset reference color temperatures and a plurality of weights respectively corresponding to the plurality of reference color temperatures, the plurality of reference color temperatures increase in sequence, and the weights corresponding to the plurality of reference color temperatures are all 0.
具体地,所述参考色温中最小的一个为1000K。所述参考色温中最大的一个为15000K。Specifically, the smallest one of the reference color temperatures is 1000K. The largest one of the reference color temperatures is 15000K.
优选地,相邻的参考色温之间的差值可以为500K,所述统计表可以为如下表1的统计表。Preferably, the difference between adjacent reference color temperatures may be 500K, and the statistical table may be the statistical table of Table 1 below.
表1、统计表Table 1. Statistics
参考色温Reference color temperature 1000K1000K 1500K1500K ……... 15000K 15000K
权重Weights 00 00 ……... 00
步骤S2、请参阅图2,提供色谱图,将色谱图中的色域空间划分为两两相连的第一区A、第二区B及第三区C;第一区A与第二区B的交界线、第二区B与第三区C的交界线及第三区C与第一区A的交界线汇聚于一参考点O,第一区A与第二区B的交界线与多个参考色温中最大的参考色温对应的等色温线重合,第一区A与第三区C的交界线与多个参考色温中最小的参考色温的等色温线重合,第二区B与第三区C的交界线平行于色谱图的y轴。Step S2. Please refer to FIG. 2 to provide a chromatogram to divide the color gamut space in the chromatogram into the first area A, the second area B, and the third area C connected in pairs; the first area A and the second area B , The boundary between the second area B and the third area C, and the boundary between the third area C and the first area A converge at a reference point O. The boundary between the first area A and the second area B is more than The reference color temperature corresponding to the largest reference color temperature coincides with the isochromatic temperature line, the boundary between the first area A and the third area C coincides with the isochromatic temperature line with the smallest reference color temperature among the multiple reference color temperatures, and the second area B coincides with the third The boundary of zone C is parallel to the y-axis of the chromatogram.
具体地,所述色谱图为CIE1931色谱图。Specifically, the chromatogram is a CIE1931 chromatogram.
具体地,所述色谱图中的所有等色温线均汇聚在该参考点O上。Specifically, all the isochromatic temperature lines in the chromatogram converge on this reference point O.
具体地,所述参考点O的坐标为(0.332,0.1858)。Specifically, the coordinates of the reference point O are (0.332, 0.1858).
步骤S3、提供相邻两帧影像的显示数据。每一帧影像包括阵列排布的多个像素,每一帧影像的显示数据包括分别与多个像素对应的多个rgb数字值。Step S3: Provide display data of two adjacent frames of images. Each frame of image includes multiple pixels arranged in an array, and the display data of each frame of image includes multiple RGB digital values corresponding to the multiple pixels, respectively.
具体地,所述rgb数字值包括红色数字值、绿色数字值及蓝色数字值。Specifically, the rgb digital value includes a red digital value, a green digital value, and a blue digital value.
步骤S4、利用相邻两帧影像的显示数据计算分别与后一帧影像的多个像素对应的多个权重参数,后一帧影像中第i行第j列的像素对应的权重参数等于后一帧影像中第i行第j列的像素与前一帧影像中第i行第j列的像素之间的色差值,i、j均为正整数。Step S4: Use the display data of the two adjacent frames to calculate the weight parameters corresponding to the pixels of the next frame of image respectively. The weight parameters corresponding to the pixels in the i-th row and j-th column of the next frame of image are equal to the latter The color difference between the pixel in the i-th row and j-th column in the frame image and the pixel in the i-th row and j-th column in the previous frame image, i and j are both positive integers.
具体地,所述步骤S4具体为:Specifically, the step S4 is specifically:
步骤S41、将后一帧影像的多个像素中的一个设为第一权重提取像素,将前一帧影像中行列数与第一权重提取像素在后一帧影像中的行列数相同的像素设为第二权重提取像素,依据第一权重提取像素的rgb数字值及预设的rgb光学值计算公式计算第一权重提取像素的rgb光学值,依据第一权重提取像素的rgb光学值及预设的三刺激值计算公式计算第一权重提取像素的三刺激值,依据第一权重提取像素的三刺激值及预设的Lab空间转换公式计算第一权重提取像素的亮度分量、第一颜色分量及第二颜色分量,依据第二权重提取像素的rgb数字值及预设的rgb光学值计算公式计算第二权重提取像素的rgb光学值,依据第二权重的rgb光学值及预设的三刺激值计算公式计算第二权重提取像素的三刺激值,依据第二权重提取像素的三刺 激值及预设的Lab空间转换公式计算第二权重提取像素的亮度分量、第一颜色分量及第二颜色分量。Step S41: Set one of the pixels in the next frame image as the first weight extraction pixel, and set the pixel number of the row and column in the previous frame image as the first weight extraction pixel in the next frame image. To extract pixels for the second weight, calculate the rgb optical value of the first weight extraction pixel according to the rgb digital value of the first weight extraction pixel and the preset rgb optical value calculation formula, and extract the rgb optical value and preset of the pixel according to the first weight The tristimulus value calculation formula calculates the tristimulus value of the first weight extraction pixel, and calculates the brightness component, the first color component and the first weight extraction pixel according to the tristimulus value of the first weight extraction pixel and the preset Lab space conversion formula The second color component, the rgb digital value of the extracted pixel according to the second weight and the preset rgb optical value calculation formula to calculate the rgb optical value of the second weight extracted pixel, according to the rgb optical value of the second weight and the preset tristimulus value The calculation formula calculates the tristimulus value of the second weight extraction pixel, and calculates the brightness component, the first color component and the second color component of the second weight extraction pixel according to the tristimulus value of the second weight extraction pixel and the preset Lab space conversion formula .
具体地,所述预设的rgb光学值计算公式为:
Figure PCTCN2019070914-appb-000011
Specifically, the preset calculation formula of the rgb optical value is:
Figure PCTCN2019070914-appb-000011
其中,R为rgb光学值中的红色光学值,G为rgb光学值中的绿色光学值,B为rgb光学值中的蓝色光学值,r为rgb数字值中的红色数字值,g为rgb数字值中的绿色数字值,b为rgb数字值中的蓝色数字值,
Figure PCTCN2019070914-appb-000012
表示对r进行伽马变换处理后得到的值,
Figure PCTCN2019070914-appb-000013
表示对b进行伽马变换处理后得到的值,
Figure PCTCN2019070914-appb-000014
表示对g进行伽马变换处理后得到的值。
Where R is the red optical value in the rgb optical value, G is the green optical value in the rgb optical value, B is the blue optical value in the rgb optical value, r is the red digital value in the rgb digital value, and g is rgb The green digital value in the digital value, b is the blue digital value in the rgb digital value,
Figure PCTCN2019070914-appb-000012
Represents the value obtained by performing gamma transformation on r,
Figure PCTCN2019070914-appb-000013
Represents the value obtained by performing gamma transformation on b,
Figure PCTCN2019070914-appb-000014
Represents the value obtained by performing gamma transformation on g.
具体地,所述预设的三刺激值计算公式为:
Figure PCTCN2019070914-appb-000015
Specifically, the preset tristimulus calculation formula is:
Figure PCTCN2019070914-appb-000015
其中,X为三刺激值中的红色刺激值,Y为三刺激值中的绿色刺激值,Z为三刺激值中的蓝色刺激值,M为预设的转化矩阵。Wherein, X is the red stimulus value in the tristimulus value, Y is the green stimulus value in the tristimulus value, Z is the blue stimulus value in the tristimulus value, and M is the preset conversion matrix.
具体地,所述预设的Lab空间转换公式为:Specifically, the preset Lab space conversion formula is:
Figure PCTCN2019070914-appb-000016
Figure PCTCN2019070914-appb-000016
其中,L为亮度分量,a为第一颜色分量,b’为第二颜色分量,X1为预设的第一参数,Y1为预设的第二参数,Z1为预设的第三参数,Where L is the luminance component, a is the first color component, b'is the second color component, X1 is the preset first parameter, Y1 is the preset second parameter, and Z1 is the preset third parameter,
Figure PCTCN2019070914-appb-000017
t为实数。
Figure PCTCN2019070914-appb-000017
t is a real number.
步骤S42、依据第一权重提取像素的亮度分量、第一颜色分量及第二颜色分量、第二权重提取像素的亮度分量、第一颜色分量及第二颜色分量以及预设的色差值计算公式计算第一权重提取像素与第二权重提取像素的色差值作为第一权重提取像素对应的权重参数。Step S42: Extract the luminance component, the first color component and the second color component of the pixel according to the first weight, extract the luminance component, the first color component and the second color component of the pixel according to the second weight and the preset color difference calculation formula The color difference value of the first weight extraction pixel and the second weight extraction pixel is calculated as a weight parameter corresponding to the first weight extraction pixel.
具体地,所述预设的色差值计算公式为:Specifically, the preset formula for calculating the color difference value is:
Figure PCTCN2019070914-appb-000018
Figure PCTCN2019070914-appb-000018
其中,L 1为第一权重提取像素的亮度分量,a 1为第一权重提取像素的第一颜色分量,b’ 1为第一权重提取像素的第二颜色分量,L 2为第二权重提取像素的亮度分量,a 2为第二权重提取像素的第一颜色分量,b’ 2为第二权重提取像素的第二颜色分量,ΔE为第一权重提取像素与第二权重提取像素的色差值。 Among them, L 1 is the luminance component of the pixel extracted by the first weight, a 1 is the first color component of the pixel extracted by the first weight, b′ 1 is the second color component of the pixel extracted by the first weight, and L 2 is the second weight extracted the luminance component of a pixel, a 2 of the second weight extraction first color component pixel, b '2 to the second weight extraction of the second color component pixel, ΔE is the first weight and the second weight extraction pixel extracting color pixels value.
步骤S43、重复上述步骤S41及S42,直至完成后一帧影像中所有像素对应的权重参数的获取。Step S43. Repeat the above steps S41 and S42 until the acquisition of the weight parameters corresponding to all pixels in the next frame of image is completed.
步骤S5、选取后一帧影像的多个像素中的一个为处理像素。将处理像素的rgb数字值转换为色谱图中处理像素的色坐标。Step S5: Select one of the pixels in the next frame of the image as the processing pixel. Convert the rgb digital value of the processed pixel to the color coordinate of the processed pixel in the chromatogram.
具体地,所述步骤S5中将处理像素的rgb数字值转换为色谱图中处理像素的色坐标的具体过程为:依据处理像素的rgb数字值及预设的rgb光学值计算公式计算处理像素的rgb光学值,依据处理像素的光学rgb值及预设的三刺激值计算公式计算处理像素的三刺激值,依据处理像素的三刺激值及预设的色坐标计算公式计算色谱图中处理像素的色坐标。Specifically, the specific process of converting the rgb digital value of the processing pixel into the color coordinate of the processing pixel in the chromatogram in the step S5 is as follows: calculating the processing pixel's value based on the processing pixel's rgb digital value and a preset rgb optical value calculation formula rgb optical value, calculate the tristimulus value of the processing pixel according to the processing pixel's optical rgb value and the preset tristimulus value calculation formula, calculate the tristimulus value of the processing pixel according to the processing pixel's tristimulus value and the preset color coordinate calculation formula Color coordinates.
具体地,步骤S5中利用的预设的rgb光学值计算公式及预设的三刺激计算公式与步骤S41中利用的预设的rgb光学值计算公式及预设的三刺激值计算公式相同。Specifically, the preset rgb optical value calculation formula and the preset tristimulus calculation formula used in step S5 are the same as the preset rgb optical value calculation formula and the preset tristimulus value calculation formula used in step S41.
具体地,所述预设的色坐标公式为:
Figure PCTCN2019070914-appb-000019
Specifically, the preset color coordinate formula is:
Figure PCTCN2019070914-appb-000019
其中,u为在色谱图中色坐标的横坐标,v为在色谱图中色坐标的纵坐标。Where u is the abscissa of the color coordinate in the chromatogram, and v is the ordinate of the color coordinate in the chromatogram.
步骤S6、判断处理像素的色坐标在色域空间中的位置。若处理像素的色坐标位于第一区A,例如位于图2中的P(A)点,则依据处理像素的色坐标及预设的像素色温计算公式计算处理像素的色温值,判断处理像素的色温值是否为多个参考色温中的一个,若是则将统计表中与处理像素的色温值对应的权重增加该处理像素对应的权重参数,否则将处理像素的色温值及该处理像素对应的权重参数分别作为参考色温及其对应的权重增加至统计表中。若处理像素的色坐标位于第二区B,例如位于图2中的P(B)点, 该点与参考点O之间的连线和第一区A与第二区B的交界线间的角度为α1,而第一区A与第二区B的交界线和第二区B与第三区C的交界线间的角度为β1,此时依据处理像素的色坐标所对应的点与参考点O的连线和第一区A与第二区B的交界线间的夹角也即α1、处理像素对应的权重参数及预设的第一权重值计算公式计算处理像素的权重值,并将该权重值加入统计表中与参考色温中最大的一个也即15000K对应的权重。若处理像素的色坐标位于第三区C,例如位于图3中的P(C)点,该点与参考点O之间的连线和第一区A与第三区C的交界线间的角度为α2,而第一区A与第三区C的交界线和第二区B与第三区C的交界线间的角度为β2,此时依据处理像素的色坐标所对应的点与参考点O的连线和第一区A与第三区C的交界线间的夹角也即α2、处理像素对应的权重参数及预设的第二权重值计算公式计算处理像素的权重值,并将该权重值加入统计表中与参考色温中最小的一个也即1000K对应的权重。Step S6: Determine the position of the color coordinate of the processing pixel in the color gamut space. If the color coordinate of the processing pixel is located in the first area A, for example, at point P(A) in FIG. 2, the color temperature value of the processing pixel is calculated according to the color coordinate of the processing pixel and the preset pixel color temperature calculation formula to determine the processing pixel Whether the color temperature value is one of multiple reference color temperatures, if so, the weight corresponding to the color temperature value of the processing pixel in the statistical table is increased by the weight parameter corresponding to the processing pixel, otherwise the color temperature value of the processing pixel and the weight corresponding to the processing pixel are increased The parameters are added to the statistical table as reference color temperatures and their corresponding weights. If the color coordinate of the processing pixel is located in the second area B, for example, at the point P(B) in FIG. 2, the line between this point and the reference point O and the boundary line between the first area A and the second area B The angle is α1, and the angle between the boundary between the first area A and the second area B and the boundary between the second area B and the third area C is β1, according to the point and reference corresponding to the color coordinates of the processed pixel The angle between the connection point O and the boundary between the first area A and the second area B is also α1, the weight parameter corresponding to the processing pixel and the preset first weight value calculation formula to calculate the weight value of the processing pixel, and The weight value is added to the weight corresponding to the largest one in the reference color temperature, namely 15000K, in the statistical table. If the color coordinate of the processing pixel is located in the third area C, for example, at the point P(C) in FIG. 3, the line between this point and the reference point O and the boundary line between the first area A and the third area C The angle is α2, and the angle between the boundary between the first area A and the third area C and the boundary between the second area B and the third area C is β2. At this time, the point and reference corresponding to the color coordinates of the processed pixel The angle between the line connecting point O and the boundary between the first area A and the third area C is α2, the weight parameter corresponding to the processing pixel and the preset second weight value calculation formula to calculate the weight value of the processing pixel, and The weight value is added to the weight corresponding to the smallest one of the reference color temperatures in the statistical table, that is, 1000K.
具体地,所述预设的像素色温计算公式为:CT=-437×n 3+3601×n 2-6861×n+5514.31。其中,CT为像素色温值,
Figure PCTCN2019070914-appb-000020
Specifically, the preset calculation formula of the pixel color temperature is: CT=-437×n 3 +3601×n 2 -6861×n+5514.31. Among them, CT is the pixel color temperature value,
Figure PCTCN2019070914-appb-000020
具体地,所述预设的第一权重值计算公式为:γ1=(1-α1/β1)×k。Specifically, the preset formula for calculating the first weight value is: γ1=(1-α1/β1)×k.
其中,γ1为处理像素的色坐标位于第二区时处理像素的权重值,α1为处理像素的色坐标所对应的点与参考点的连线和第一区与第二区的交界线间的夹角,β1为第一区与第二区的交界线和第二区与第三区的交界线间的夹角,k为处理像素对应的权重参数。Among them, γ1 is the weight value of the processing pixel when the color coordinate of the processing pixel is in the second area, and α1 is the line between the point corresponding to the color coordinate of the processing pixel and the reference point and the boundary line between the first area and the second area Angle, β1 is the angle between the boundary between the first area and the second area and the boundary between the second area and the third area, and k is the weight parameter corresponding to the processed pixels.
具体地,所述预设的第二权重值计算公式为:γ2=(1-α2/β2)×k。Specifically, the preset formula for calculating the second weight value is: γ2=(1-α2/β2)×k.
其中,γ2为处理像素的色坐标位于第三区时处理像素的权重值,α2为处理像素的色坐标所对应的点与参考点的连线和第一区与第三区的交界线间的夹角,β2为第一区与第三区的交界线和第二区与第三区的交界线间的夹角。Where γ2 is the weight value of the processing pixel when the color coordinate of the processing pixel is in the third zone, and α2 is the line between the point corresponding to the color coordinate of the processing pixel and the reference point and the boundary between the first zone and the third zone The angle, β2, is the angle between the boundary between the first and third regions and the boundary between the second and third regions.
步骤S7、重复步骤S5及S6,直至后一帧影像的多个像素均执行步骤S5及S6。Step S7. Repeat steps S5 and S6 until multiple pixels of the next frame of the image all execute steps S5 and S6.
步骤S8、将统计表中每一参考色温与对应的权重相乘,将多个参考色温与对应的权重的乘积之和与多个参考色温对应的权重之和相除,得到后一帧影像的色温值。Step S8. Multiply each reference color temperature in the statistical table by the corresponding weight, and divide the sum of the products of multiple reference color temperatures and corresponding weights by the sum of the weights corresponding to multiple reference color temperatures to obtain the image of the next frame. Color temperature value.
需要说明的是,本发明的影像色温的获取方法将色域空间划分能够依据像素色温计算公式计算色温的第一区、无法依据像素色温计算公式计算色温但对影像色温基调有影像的第二区及第三区,其中第二区为冷色和中 性色过渡区,而第三区为暖色和中性色过渡区,计算相邻两帧影像中位置相同的像素之间的色差值作为后一帧影像中像素的权重参数,判断后一帧影像中像素的色坐标的位置,当其位于第一区内时采用像素色温公式计算像素的色温值并将统计表中该色温值的权重加对应的权重参数,当其位于第二区时则利用像素的色坐标与参考点的位置关系及权重参数计算像素的权重值并将其加入统计表中最大的参考色温的权重,当其位于第三区时则利用像素的色坐标与参考点的位置关系及权重参数计算像素的权重值并将其加入统计表中最小的参考色温的权重,结合权重计算后一帧影像的色温,能够依据相邻帧的影像的变化特性获取影像的色温,使得获取的影像的色温值更加准确,与实际的人眼感知情况相匹配。It should be noted that the image color temperature acquisition method of the present invention divides the color gamut space into the first area that can calculate the color temperature according to the pixel color temperature calculation formula, but cannot calculate the color temperature based on the pixel color temperature calculation formula, but has a second area of the image based on the image color temperature. And the third zone, where the second zone is the transition zone between cool and neutral colors, and the third zone is the transition zone between warm and neutral colors, and the color difference between the pixels at the same position in the two adjacent frames of image is calculated as The weight parameter of the pixels in a frame of image, to determine the position of the color coordinate of the pixel in the next frame of image, when it is in the first area, use the pixel color temperature formula to calculate the color temperature value of the pixel and add the weight of the color temperature value in the statistical table Corresponding weight parameter, when it is in the second area, use the positional relationship between the color coordinates of the pixel and the reference point and the weight parameter to calculate the weight value of the pixel and add it to the weight of the maximum reference color temperature in the statistical table. In the three zones, the pixel's color coordinate and the reference point's positional relationship and weight parameters are used to calculate the pixel's weight value and add it to the weight of the smallest reference color temperature in the statistical table. The change characteristic of the image of the adjacent frame obtains the color temperature of the image, so that the color temperature value of the obtained image is more accurate and matches the actual human eye perception.
综上所述,本发明的影像色温的获取方法将色域空间划分为第一区、第二区及第三区,计算相邻两帧影像中位置相同的像素之间的色差值作为后一帧影像中像素的权重参数,判断后一帧影像中像素的色坐标的位置,当其位于第一区内时采用像素色温公式计算像素的色温值并将统计表中该色温值的权重加对应的权重参数,当其位于第二区时则利用像素的色坐标与参考点的位置关系及权重参数计算像素的权重值并将其加入统计表中最大的参考色温的权重,当其位于第三区时则利用像素的色坐标与参考点的位置关系及权重参数计算像素的权重值并将其加入统计表中最小的参考色温的权重,结合权重计算后一帧影像的色温,能够更准确的获取影像的色温。In summary, the image color temperature acquisition method of the present invention divides the color gamut space into the first area, the second area, and the third area, and calculates the color difference value between pixels at the same position in the adjacent two frames of images as the post The weight parameter of the pixels in a frame of image, to determine the position of the color coordinate of the pixel in the next frame of image Corresponding weight parameter, when it is in the second area, use the positional relationship between the color coordinates of the pixel and the reference point and the weight parameter to calculate the weight value of the pixel and add it to the weight of the maximum reference color temperature in the statistical table. In the three zones, the pixel's color coordinates and the reference point's positional relationship and weight parameters are used to calculate the pixel's weight value and add it to the weight of the smallest reference color temperature in the statistical table. Combined with the weight to calculate the color temperature of the next frame image, it can be more accurate The color temperature of the acquired image.
以上所述,对于本领域的普通技术人员来说,可以根据本发明的技术方案和技术构思作出其他各种相应的改变和变形,而所有这些改变和变形都应属于本发明权利要求的保护范围。As mentioned above, those of ordinary skill in the art can make various other corresponding changes and modifications according to the technical solutions and technical concepts of the present invention, and all such changes and modifications should fall within the protection scope of the claims of the present invention. .

Claims (15)

  1. 一种影像色温的获取方法,包括如下步骤:An image color temperature acquisition method includes the following steps:
    步骤S1、建立统计表;所述统计表包括多个预设的参考色温及分别与多个参考色温对应的多个权重,所述多个参考色温依次增大,多个参考色温对应的权重均为0;Step S1. Establish a statistical table; the statistical table includes a plurality of preset reference color temperatures and a plurality of weights corresponding to the plurality of reference color temperatures, respectively, the plurality of reference color temperatures increase sequentially, and the weights corresponding to the plurality of reference color temperatures are all equal Is 0;
    步骤S2、提供色谱图,将色谱图中的色域空间划分为两两相连的第一区、第二区及第三区;第一区与第二区的交界线、第二区与第三区的交界线及第三区与第一区的交界线汇聚于一参考点,第一区与第二区的交界线与多个参考色温中最大的参考色温对应的等色温线重合,第一区与第三区的交界线与多个参考色温中最小的参考色温的等色温线重合,第二区与第三区的交界线平行于色谱图的y轴;Step S2. Provide a chromatogram, divide the color gamut space in the chromatogram into the first zone, the second zone and the third zone connected in pairs; the boundary between the first zone and the second zone, the second zone and the third zone The boundary line of the zone and the boundary line of the third zone and the first zone converge at a reference point. The boundary line of the first zone and the second zone coincides with the iso-color temperature line corresponding to the largest reference color temperature among the multiple reference color temperatures. The first The boundary between the zone and the third zone coincides with the isochromatic line of the smallest reference color temperature among the multiple reference color temperatures, and the boundary between the second zone and the third zone is parallel to the y-axis of the chromatogram;
    步骤S3、提供相邻两帧影像的显示数据;每一帧影像包括阵列排布的多个像素,每一帧影像的显示数据包括分别与多个像素对应的多个rgb数字值;Step S3, providing display data of two adjacent frames of images; each frame of images includes a plurality of pixels arranged in an array, and the display data of each frame of images includes a plurality of RGB digital values respectively corresponding to the plurality of pixels;
    步骤S4、利用相邻两帧影像的显示数据计算分别与后一帧影像的多个像素对应的多个权重参数,后一帧影像中第i行第j列的像素对应的权重参数等于后一帧影像中第i行第j列的像素与前一帧影像中第i行第j列的像素之间的色差值,i、j均为正整数;Step S4: Use the display data of the two adjacent frames to calculate the weight parameters corresponding to the pixels of the next frame of image respectively. The weight parameters corresponding to the pixels in the i-th row and j-th column of the next frame of image are equal to the latter The color difference between the pixel in the i-th row and j-th column in the frame image and the pixel in the i-th row and j-th column in the previous frame image, i and j are both positive integers;
    步骤S5、选取后一帧影像的多个像素中的一个为处理像素;将处理像素的rgb数字值转换为色谱图中处理像素的色坐标;Step S5: Select one of the pixels in the next frame of image as the processing pixel; convert the rgb digital value of the processing pixel into the color coordinate of the processing pixel in the chromatogram;
    步骤S6、判断处理像素的色坐标在色域空间中的位置;若处理像素的色坐标位于第一区,则依据处理像素的色坐标及预设的像素色温计算公式计算处理像素的色温值,判断处理像素的色温值是否为多个参考色温中的一个,若是则将统计表中与处理像素的色温值对应的权重增加该处理像素对应的权重参数,否则将处理像素的色温值及该处理像素对应的权重参数分别作为参考色温及其对应的权重增加至统计表中;若处理像素的色坐标位于第二区,则依据处理像素的色坐标所对应的点与参考点的连线和第一区与第二区的交界线间的夹角、处理像素对应的权重参数及预设的第一权重值计算公式计算处理像素的权重值,并将该权重值加入统计表中与参考色温中最大的一个对应的权重;若处理像素的色坐标位于第三区,则依据处理像素的色坐标所对应的点与参考点的连线和第一区与第三区的交界线间的夹角、处理像素对应的权重参数及预设的第二权重值计算公式计算处 理像素的权重值,并将该权重值加入统计表中与参考色温中最小的一个对应的权重;Step S6: Determine the position of the color coordinate of the processing pixel in the color gamut space; if the color coordinate of the processing pixel is located in the first area, calculate the color temperature value of the processing pixel according to the color coordinate of the processing pixel and the preset pixel color temperature calculation formula, Determine whether the color temperature value of the processing pixel is one of multiple reference color temperatures, if it is, increase the weight corresponding to the color temperature value of the processing pixel in the statistical table by the weight parameter corresponding to the processing pixel, otherwise the color temperature value of the processing pixel and the processing The weight parameters corresponding to the pixels are added to the statistical table as the reference color temperature and their corresponding weights; if the color coordinates of the processed pixel are located in the second zone, the connection between the point corresponding to the color coordinate of the processed pixel and the reference point and the The angle between the boundary between the first zone and the second zone, the weight parameter corresponding to the processed pixel and the preset first weight value calculation formula calculate the weight value of the processed pixel, and add the weight value to the statistical table and the reference color temperature The largest one corresponds to the weight; if the color coordinate of the processing pixel is located in the third area, the angle between the point corresponding to the color coordinate of the processing pixel and the reference point and the boundary between the first area and the third area 1. The weight parameter corresponding to the processing pixel and the preset second weight value calculation formula calculate the weight value of the processing pixel, and add the weight value to the weight corresponding to the smallest one of the reference color temperatures in the statistical table;
    步骤S7、重复步骤S5及S6,直至后一帧影像的多个像素均执行步骤S5及S6;Step S7. Repeat steps S5 and S6 until multiple pixels of the next frame of the image all execute steps S5 and S6;
    步骤S8、将统计表中每一参考色温与对应的权重相乘,将多个参考色温与对应的权重的乘积之和与多个参考色温对应的权重之和相除,得到后一帧影像的色温值。Step S8. Multiply each reference color temperature in the statistical table by the corresponding weight, and divide the sum of the products of multiple reference color temperatures and corresponding weights by the sum of the weights corresponding to multiple reference color temperatures to obtain the image of the next frame. Color temperature value.
  2. 如权利要求1所述的影像色温的获取方法,其中,所述步骤S5中将处理像素的rgb数字值转换为色谱图中处理像素的色坐标的具体过程为:依据处理像素的rgb数字值及预设的rgb光学值计算公式计算处理像素的rgb光学值,依据处理像素的光学rgb值及预设的三刺激值计算公式计算处理像素的三刺激值,依据处理像素的三刺激值及预设的色坐标计算公式计算色谱图中处理像素的色坐标。The method for acquiring the color temperature of an image according to claim 1, wherein the specific process of converting the rgb digital value of the processed pixel to the color coordinate of the processed pixel in the chromatogram in the step S5 is: according to the rgb digital value of the processed pixel and The preset rgb optical value calculation formula calculates the rgb optical value of the processing pixel, and calculates the tristimulus value of the processing pixel according to the processing pixel optical rgb value and the preset tristimulus value calculation formula, based on the tristimulus value and preset of the processing pixel The color coordinate calculation formula calculates the color coordinates of the pixels processed in the chromatogram.
  3. 如权利要求2所述的影像色温的获取方法,其中,所述预设的rgb光学值计算公式为:
    Figure PCTCN2019070914-appb-100001
    The method for acquiring image color temperature according to claim 2, wherein the predetermined formula for calculating the rgb optical value is
    Figure PCTCN2019070914-appb-100001
    其中,R为rgb光学值中的红色光学值,G为rgb光学值中的绿色光学值,B为rgb光学值中的蓝色光学值,r为rgb数字值中的红色数字值,g为rgb数字值中的绿色数字值,b为rgb数字值中的蓝色数字值,
    Figure PCTCN2019070914-appb-100002
    表示对r进行伽马变换处理后得到的值,
    Figure PCTCN2019070914-appb-100003
    表示对b进行伽马变换处理后得到的值,
    Figure PCTCN2019070914-appb-100004
    表示对g进行伽马变换处理后得到的值。
    Where R is the red optical value in the rgb optical value, G is the green optical value in the rgb optical value, B is the blue optical value in the rgb optical value, r is the red digital value in the rgb digital value, and g is rgb The green digital value in the digital value, b is the blue digital value in the rgb digital value,
    Figure PCTCN2019070914-appb-100002
    Represents the value obtained by performing gamma transformation on r,
    Figure PCTCN2019070914-appb-100003
    Represents the value obtained by performing gamma transformation on b,
    Figure PCTCN2019070914-appb-100004
    Represents the value obtained by performing gamma transformation on g.
  4. 如权利要求3所述的影像色温的获取方法,其中,所述预设的三刺激值计算公式为:
    Figure PCTCN2019070914-appb-100005
    The method for acquiring image color temperature according to claim 3, wherein the preset formula for calculating the tristimulus value is
    Figure PCTCN2019070914-appb-100005
    其中,X为三刺激值中的红色刺激值,Y为三刺激值中的绿色刺激值,Z为三刺激值中的蓝色刺激值,M为预设的转化矩阵。Wherein, X is the red stimulus value in the tristimulus value, Y is the green stimulus value in the tristimulus value, Z is the blue stimulus value in the tristimulus value, and M is the preset conversion matrix.
  5. 如权利要求4所述的影像色温的获取方法,其中,所述预设的色坐 标公式为:
    Figure PCTCN2019070914-appb-100006
    The method for acquiring image color temperature according to claim 4, wherein the preset color coordinate formula is:
    Figure PCTCN2019070914-appb-100006
    其中,u为在色谱图中色坐标的横坐标,v为在色谱图中色坐标的纵坐标。Where u is the abscissa of the color coordinate in the chromatogram, and v is the ordinate of the color coordinate in the chromatogram.
  6. 如权利要求5所述的影像色温的获取方法,其中,所述色谱图中第一区与第二区的交界线、第二区与第三区的交界线及第三区与第一区的交界线汇聚的参考点的坐标为(0.332,0.1858)。The method for acquiring image color temperature according to claim 5, wherein the boundary between the first and second regions, the boundary between the second and third regions, and the boundary between the third and first regions in the chromatogram The coordinates of the reference points where the boundary lines converge are (0.332, 0.1858).
  7. 如权利要求6所述的影像色温的获取方法,其中,所述预设的像素色温计算公式为:CT=-437×n 3+3601×n 2-6861×n+5514.31; The method for acquiring the image color temperature according to claim 6, wherein the preset formula for calculating the pixel color temperature is: CT = -437×n 3 +3601×n 2 -6861×n+5514.31;
    其中,CT为像素色温值,
    Figure PCTCN2019070914-appb-100007
    Among them, CT is the pixel color temperature value,
    Figure PCTCN2019070914-appb-100007
  8. 如权利要求1所述的影像色温的获取方法,其中,所述预设的第一权重值计算公式为:γ1=(1-α1/β1)×k;The method for acquiring image color temperature according to claim 1, wherein the preset formula for calculating the first weight value is: γ1=(1-α1/β1)×k;
    其中,γ1为处理像素的色坐标位于第二区时处理像素的权重值,α1为处理像素的色坐标所对应的点与参考点的连线和第一区与第二区的交界线间的夹角,β1为第一区与第二区的交界线和第二区与第三区的交界线间的夹角,k为处理像素对应的权重参数;Among them, γ1 is the weight value of the processing pixel when the color coordinate of the processing pixel is in the second area, and α1 is the line between the point corresponding to the color coordinate of the processing pixel and the reference point and the boundary line between the first area and the second area Angle, β1 is the angle between the boundary between the first zone and the second zone and the boundary between the second zone and the third zone, and k is the weight parameter corresponding to the processed pixels;
    所述预设的第二权重值计算公式为:γ2=(1-α2/β2)×k;The preset second weight value calculation formula is: γ2=(1-α2/β2)×k;
    其中,γ2为处理像素的色坐标位于第三区时处理像素的权重值,α2为处理像素的色坐标所对应的点与参考点的连线和第一区与第三区的交界线间的夹角,β2为第一区与第三区的交界线和第二区与第三区的交界线间的夹角。Where γ2 is the weight value of the processing pixel when the color coordinate of the processing pixel is in the third zone, and α2 is the line between the point corresponding to the color coordinate of the processing pixel and the reference point and the boundary between the first zone and the third zone The angle, β2, is the angle between the boundary between the first and third regions and the boundary between the second and third regions.
  9. 如权利要求1所述的影像色温的获取方法,其中,所述色谱图为CIE1931色谱图;The method for acquiring image color temperature according to claim 1, wherein the chromatogram is a CIE1931 chromatogram;
    所述参考色温中最小的一个为1000K;所述参考色温中最大的一个为15000K。The smallest one of the reference color temperatures is 1000K; the largest one of the reference color temperatures is 15000K.
  10. 如权利要求4所述的影像色温的获取方法,其中,所述步骤S4具体为:The method for acquiring image color temperature according to claim 4, wherein the step S4 is specifically:
    步骤S41、将后一帧影像的多个像素中的一个设为第一权重提取像素,将前一帧影像中行列数与第一权重提取像素在后一帧影像中的行列数相同的像素设为第二权重提取像素,依据第一权重提取像素的rgb数字值及预设的rgb光学值计算公式计算第一权重提取像素的rgb光学值,依据第一权重提取像素的rgb光学值及预设的三刺激值计算公式计算第一权重提取像素 的三刺激值,依据第一权重提取像素的三刺激值及预设的Lab空间转换公式计算第一权重提取像素的亮度分量、第一颜色分量及第二颜色分量,依据第二权重提取像素的rgb数字值及预设的rgb光学值计算公式计算第二权重提取像素的rgb光学值,依据第二权重的rgb光学值及预设的三刺激值计算公式计算第二权重提取像素的三刺激值,依据第二权重提取像素的三刺激值及预设的Lab空间转换公式计算第二权重提取像素的亮度分量、第一颜色分量及第二颜色分量;Step S41: Set one of the pixels in the next frame image as the first weight extraction pixel, and set the pixel number of the row and column in the previous frame image as the first weight extraction pixel in the next frame image. To extract pixels for the second weight, calculate the rgb optical value of the first weight extraction pixel according to the rgb digital value of the first weight extraction pixel and the preset rgb optical value calculation formula, and extract the rgb optical value and preset of the pixel according to the first weight The tristimulus value calculation formula calculates the tristimulus value of the first weight extraction pixel, and calculates the brightness component, the first color component and the first weight extraction pixel according to the tristimulus value of the first weight extraction pixel and the preset Lab space conversion formula The second color component, the rgb digital value of the extracted pixel according to the second weight and the preset rgb optical value calculation formula to calculate the rgb optical value of the second weight extracted pixel, according to the rgb optical value of the second weight and the preset tristimulus value The calculation formula calculates the tristimulus value of the second weight extraction pixel, and calculates the brightness component, the first color component and the second color component of the second weight extraction pixel according to the tristimulus value of the second weight extraction pixel and the preset Lab space conversion formula ;
    所述预设的Lab空间转换公式为:The preset Lab space conversion formula is:
    Figure PCTCN2019070914-appb-100008
    Figure PCTCN2019070914-appb-100008
    其中,L为亮度分量,a为第一颜色分量,b’为第二颜色分量,X1为预设的第一参数,Y1为预设的第二参数,Z1为预设的第三参数,Where L is the luminance component, a is the first color component, b'is the second color component, X1 is the preset first parameter, Y1 is the preset second parameter, and Z1 is the preset third parameter,
    Figure PCTCN2019070914-appb-100009
    Figure PCTCN2019070914-appb-100009
    步骤S42、依据第一权重提取像素的亮度分量、第一颜色分量及第二颜色分量、第二权重提取像素的亮度分量、第一颜色分量及第二颜色分量以及预设的色差值计算公式计算第一权重提取像素与第二权重提取像素的色差值作为第一权重提取像素对应的权重参数;Step S42: Extract the luminance component, the first color component and the second color component of the pixel according to the first weight, extract the luminance component, the first color component and the second color component of the pixel according to the second weight and the preset color difference calculation formula Calculating the color difference value of the first weight extraction pixel and the second weight extraction pixel as the weight parameter corresponding to the first weight extraction pixel;
    所述预设的色差值计算公式为:The preset formula for calculating the color difference value is:
    Figure PCTCN2019070914-appb-100010
    Figure PCTCN2019070914-appb-100010
    其中,L 1为第一权重提取像素的亮度分量,a 1为第一权重提取像素的第一颜色分量,b’ 1为第一权重提取像素的第二颜色分量,L 2为第二权重提取像素的亮度分量,a 2为第二权重提取像素的第一颜色分量,b’ 2为第二权重提取像素的第二颜色分量,ΔE为第一权重提取像素与第二权重提取像素的色差值; Among them, L 1 is the luminance component of the pixel extracted by the first weight, a 1 is the first color component of the pixel extracted by the first weight, b′ 1 is the second color component of the pixel extracted by the first weight, and L 2 is the second weight extracted the luminance component of a pixel, a 2 of the second weight extraction first color component pixel, b '2 to the second weight extraction of the second color component pixel, ΔE is the first weight and the second weight extraction pixel extracting color pixels value;
    步骤S43、重复上述步骤S41及S42,直至完成后一帧影像中所有像素对应的权重参数的获取。Step S43. Repeat the above steps S41 and S42 until the acquisition of the weight parameters corresponding to all pixels in the next frame of image is completed.
  11. 一种影像色温的获取方法,包括如下步骤:An image color temperature acquisition method includes the following steps:
    步骤S1、建立统计表;所述统计表包括多个预设的参考色温及分别与多个参考色温对应的多个权重,所述多个参考色温依次增大,多个参考色温对应的权重均为0;Step S1. Establish a statistical table; the statistical table includes a plurality of preset reference color temperatures and a plurality of weights corresponding to the plurality of reference color temperatures, respectively, the plurality of reference color temperatures increase sequentially, and the weights corresponding to the plurality of reference color temperatures are all equal Is 0;
    步骤S2、提供色谱图,将色谱图中的色域空间划分为两两相连的第一区、第二区及第三区;第一区与第二区的交界线、第二区与第三区的交界线及第三区与第一区的交界线汇聚于一参考点,第一区与第二区的交界线与多个参考色温中最大的参考色温对应的等色温线重合,第一区与第三区的交界线与多个参考色温中最小的参考色温的等色温线重合,第二区与第三区的交界线平行于色谱图的y轴;Step S2. Provide a chromatogram, divide the color gamut space in the chromatogram into the first zone, the second zone and the third zone connected in pairs; the boundary between the first zone and the second zone, the second zone and the third zone The boundary line of the zone and the boundary line of the third zone and the first zone converge at a reference point. The boundary line of the first zone and the second zone coincides with the iso-color temperature line corresponding to the largest reference color temperature among the multiple reference color temperatures. The first The boundary between the zone and the third zone coincides with the isochromatic line of the smallest reference color temperature among the multiple reference color temperatures, and the boundary between the second zone and the third zone is parallel to the y-axis of the chromatogram;
    步骤S3、提供相邻两帧影像的显示数据;每一帧影像包括阵列排布的多个像素,每一帧影像的显示数据包括分别与多个像素对应的多个rgb数字值;Step S3, providing display data of two adjacent frames of images; each frame of images includes a plurality of pixels arranged in an array, and the display data of each frame of images includes a plurality of RGB digital values respectively corresponding to the plurality of pixels;
    步骤S4、利用相邻两帧影像的显示数据计算分别与后一帧影像的多个像素对应的多个权重参数,后一帧影像中第i行第j列的像素对应的权重参数等于后一帧影像中第i行第j列的像素与前一帧影像中第i行第j列的像素之间的色差值,i、j均为正整数;Step S4: Use the display data of the two adjacent frames to calculate the weight parameters corresponding to the pixels of the next frame of image respectively. The weight parameters corresponding to the pixels in the i-th row and j-th column of the next frame of image are equal to the latter The color difference between the pixel in the i-th row and j-th column in the frame image and the pixel in the i-th row and j-th column in the previous frame image, i and j are both positive integers;
    步骤S5、选取后一帧影像的多个像素中的一个为处理像素;将处理像素的rgb数字值转换为色谱图中处理像素的色坐标;Step S5: Select one of the pixels in the next frame of image as the processing pixel; convert the rgb digital value of the processing pixel into the color coordinate of the processing pixel in the chromatogram;
    步骤S6、判断处理像素的色坐标在色域空间中的位置;若处理像素的色坐标位于第一区,则依据处理像素的色坐标及预设的像素色温计算公式计算处理像素的色温值,判断处理像素的色温值是否为多个参考色温中的一个,若是则将统计表中与处理像素的色温值对应的权重增加该处理像素对应的权重参数,否则将处理像素的色温值及该处理像素对应的权重参数分别作为参考色温及其对应的权重增加至统计表中;若处理像素的色坐标位于第二区,则依据处理像素的色坐标所对应的点与参考点的连线和第一区与第二区的交界线间的夹角、处理像素对应的权重参数及预设的第一权重值计算公式计算处理像素的权重值,并将该权重值加入统计表中与参考色温中最大的一个对应的权重;若处理像素的色坐标位于第三区,则依据处理像素的色坐标所对应的点与参考点的连线和第一区与第三区的交界线间的夹角、处理像素对应的权重参数及预设的第二权重值计算公式计算处理像素的权重值,并将该权重值加入统计表中与参考色温中最小的一个对应的权重;Step S6: Determine the position of the color coordinate of the processing pixel in the color gamut space; if the color coordinate of the processing pixel is located in the first area, calculate the color temperature value of the processing pixel according to the color coordinate of the processing pixel and the preset pixel color temperature calculation formula, Determine whether the color temperature value of the processing pixel is one of multiple reference color temperatures, if it is, increase the weight corresponding to the color temperature value of the processing pixel in the statistical table by the weight parameter corresponding to the processing pixel, otherwise the color temperature value of the processing pixel and the processing The weight parameters corresponding to the pixels are added to the statistical table as the reference color temperature and their corresponding weights; if the color coordinates of the processed pixel are located in the second zone, the connection between the point corresponding to the color coordinate of the processed pixel and the reference point and the The angle between the boundary between the first zone and the second zone, the weight parameter corresponding to the processed pixel and the preset first weight value calculation formula calculate the weight value of the processed pixel, and add the weight value to the statistical table and the reference color temperature The largest one corresponds to the weight; if the color coordinate of the processing pixel is located in the third area, the angle between the point corresponding to the color coordinate of the processing pixel and the reference point and the boundary between the first area and the third area 1. The weight parameter corresponding to the processing pixel and the preset second weight value calculation formula calculate the weight value of the processing pixel, and add the weight value to the weight corresponding to the smallest one of the reference color temperatures in the statistical table;
    步骤S7、重复步骤S5及S6,直至后一帧影像的多个像素均执行步骤 S5及S6;Step S7. Repeat steps S5 and S6 until multiple pixels of the next frame of the image all execute steps S5 and S6;
    步骤S8、将统计表中每一参考色温与对应的权重相乘,将多个参考色温与对应的权重的乘积之和与多个参考色温对应的权重之和相除,得到后一帧影像的色温值;Step S8. Multiply each reference color temperature in the statistical table by the corresponding weight, and divide the sum of the products of multiple reference color temperatures and corresponding weights by the sum of the weights corresponding to multiple reference color temperatures to obtain the image of the next frame. Color temperature value
    其中,所述步骤S5中将处理像素的rgb数字值转换为色谱图中处理像素的色坐标的具体过程为:依据处理像素的rgb数字值及预设的rgb光学值计算公式计算处理像素的rgb光学值,依据处理像素的光学rgb值及预设的三刺激值计算公式计算处理像素的三刺激值,依据处理像素的三刺激值及预设的色坐标计算公式计算色谱图中处理像素的色坐标;Wherein, the specific process of converting the rgb digital value of the processing pixel to the color coordinate of the processing pixel in the chromatogram in the step S5 is: calculating the rgb of the processing pixel according to the rgb digital value of the processing pixel and the preset rgb optical value calculation formula Optical value, calculate the tristimulus value of the processing pixel according to the optical rgb value of the processing pixel and the preset tristimulus value calculation formula, calculate the color of the processing pixel in the chromatogram according to the tristimulus value of the processing pixel and the preset color coordinate calculation formula coordinate;
    其中,所述预设的第一权重值计算公式为:γ1=(1-α1/β1)×k;Wherein, the preset formula for calculating the first weight value is: γ1=(1-α1/β1)×k;
    其中,γ1为处理像素的色坐标位于第二区时处理像素的权重值,α1为处理像素的色坐标所对应的点与参考点的连线和第一区与第二区的交界线间的夹角,β1为第一区与第二区的交界线和第二区与第三区的交界线间的夹角,k为处理像素对应的权重参数;Among them, γ1 is the weight value of the processing pixel when the color coordinate of the processing pixel is in the second area, and α1 is the line between the point corresponding to the color coordinate of the processing pixel and the reference point and the boundary line between the first area and the second area Angle, β1 is the angle between the boundary between the first zone and the second zone and the boundary between the second zone and the third zone, and k is the weight parameter corresponding to the processed pixels;
    所述预设的第二权重值计算公式为:γ2=(1-α2/β2)×k;The preset second weight value calculation formula is: γ2=(1-α2/β2)×k;
    其中,γ2为处理像素的色坐标位于第三区时处理像素的权重值,α2为处理像素的色坐标所对应的点与参考点的连线和第一区与第三区的交界线间的夹角,β2为第一区与第三区的交界线和第二区与第三区的交界线间的夹角。Where γ2 is the weight value of the processing pixel when the color coordinate of the processing pixel is in the third zone, and α2 is the line between the point corresponding to the color coordinate of the processing pixel and the reference point and the boundary between the first zone and the third zone The angle, β2, is the angle between the boundary between the first and third regions and the boundary between the second and third regions.
  12. 如权利要求11所述的影像色温的获取方法,其中,所述预设的rgb光学值计算公式为:
    Figure PCTCN2019070914-appb-100011
    The method for acquiring image color temperature according to claim 11, wherein the predetermined formula for calculating the RGB optical value is:
    Figure PCTCN2019070914-appb-100011
    其中,R为rgb光学值中的红色光学值,G为rgb光学值中的绿色光学值,B为rgb光学值中的蓝色光学值,r为rgb数字值中的红色数字值,g为rgb数字值中的绿色数字值,b为rgb数字值中的蓝色数字值,
    Figure PCTCN2019070914-appb-100012
    表示对r进行伽马变换处理后得到的值,
    Figure PCTCN2019070914-appb-100013
    表示对b进行伽马变换处理后得到的值,
    Figure PCTCN2019070914-appb-100014
    表示对g进行伽马变换处理后得到的值。
    Where R is the red optical value in the rgb optical value, G is the green optical value in the rgb optical value, B is the blue optical value in the rgb optical value, r is the red digital value in the rgb digital value, and g is rgb The green digital value in the digital value, b is the blue digital value in the rgb digital value,
    Figure PCTCN2019070914-appb-100012
    Represents the value obtained by performing gamma transformation on r,
    Figure PCTCN2019070914-appb-100013
    Represents the value obtained by performing gamma transformation on b,
    Figure PCTCN2019070914-appb-100014
    Represents the value obtained by performing gamma transformation on g.
  13. 如权利要求12所述的影像色温的获取方法,其中,所述预设的三 刺激值计算公式为:
    Figure PCTCN2019070914-appb-100015
    The method for acquiring image color temperature according to claim 12, wherein the preset formula for calculating the tristimulus value is
    Figure PCTCN2019070914-appb-100015
    其中,X为三刺激值中的红色刺激值,Y为三刺激值中的绿色刺激值,Z为三刺激值中的蓝色刺激值,M为预设的转化矩阵。Wherein, X is the red stimulus value in the tristimulus value, Y is the green stimulus value in the tristimulus value, Z is the blue stimulus value in the tristimulus value, and M is the preset conversion matrix.
  14. 如权利要求13所述的影像色温的获取方法,其中,所述预设的色坐标公式为:
    Figure PCTCN2019070914-appb-100016
    The image color temperature acquisition method according to claim 13, wherein the preset color coordinate formula is:
    Figure PCTCN2019070914-appb-100016
    其中,u为在色谱图中色坐标的横坐标,v为在色谱图中色坐标的纵坐标。Where u is the abscissa of the color coordinate in the chromatogram, and v is the ordinate of the color coordinate in the chromatogram.
  15. 如权利要求14所述的影像色温的获取方法,其中,所述色谱图中第一区与第二区的交界线、第二区与第三区的交界线及第三区与第一区的交界线汇聚的参考点的坐标为(0.332,0.1858)。The method for acquiring image color temperature according to claim 14, wherein the boundary between the first and second regions, the boundary between the second and third regions, and the boundary between the third and first regions in the chromatogram The coordinates of the reference points where the boundary lines converge are (0.332, 0.1858).
PCT/CN2019/070914 2018-11-30 2019-01-08 Image color temperature acquisition method WO2020107661A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811460280.9A CN109584768B (en) 2018-11-30 2018-11-30 Method for acquiring color temperature of image
CN201811460280.9 2018-11-30

Publications (1)

Publication Number Publication Date
WO2020107661A1 true WO2020107661A1 (en) 2020-06-04

Family

ID=65926323

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/070914 WO2020107661A1 (en) 2018-11-30 2019-01-08 Image color temperature acquisition method

Country Status (2)

Country Link
CN (1) CN109584768B (en)
WO (1) WO2020107661A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110211062A (en) * 2019-05-20 2019-09-06 深圳市华星光电半导体显示技术有限公司 A kind of scene light source color temperature control method
CN110388987B (en) * 2019-07-24 2020-11-10 深圳市华星光电技术有限公司 Method for acquiring color temperature of image
CN115412711A (en) * 2022-09-16 2022-11-29 集创北方(珠海)科技有限公司 Color temperature adjusting method, color temperature adjusting device and display device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009162946A (en) * 2007-12-28 2009-07-23 Sharp Corp Image display device
CN104766574A (en) * 2015-03-24 2015-07-08 小米科技有限责任公司 Color temperature regulating method and device
CN106409251A (en) * 2016-09-06 2017-02-15 武汉华星光电技术有限公司 Display panel brightness and chroma adjustment and calculation method and system

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100563297C (en) * 2007-06-26 2009-11-25 北京中星微电子有限公司 Realize the method and the device of white balance correction
CN101616332B (en) * 2008-06-26 2013-01-02 北京中视中科光电技术有限公司 Color domain expanding system and method
TWI482140B (en) * 2011-04-29 2015-04-21 Geo Semiconductor Inc System and method for improving color and brightness uniformity of backlit lcd displays
JP5482850B2 (en) * 2012-09-05 2014-05-07 株式会社ニコン Imaging device
US9275607B2 (en) * 2012-11-21 2016-03-01 Apple Inc. Dynamic color adjustment for displays using local temperature measurements
JP2014134731A (en) * 2013-01-11 2014-07-24 Sony Corp Display device, image processing system, image processing method, and electronic apparatus
KR101992310B1 (en) * 2013-03-25 2019-09-30 엘지디스플레이 주식회사 Image processing method for display apparatus and image processing apparatus
TWI553622B (en) * 2015-05-07 2016-10-11 鈺緯科技開發股份有限公司 Image processing device with image compensation function and image processing method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009162946A (en) * 2007-12-28 2009-07-23 Sharp Corp Image display device
CN104766574A (en) * 2015-03-24 2015-07-08 小米科技有限责任公司 Color temperature regulating method and device
CN106409251A (en) * 2016-09-06 2017-02-15 武汉华星光电技术有限公司 Display panel brightness and chroma adjustment and calculation method and system

Also Published As

Publication number Publication date
CN109584768B (en) 2020-09-01
CN109584768A (en) 2019-04-05

Similar Documents

Publication Publication Date Title
US9613553B2 (en) Method and device for detecting uniformity of a dark state image of display
US11270657B2 (en) Driving method, driving apparatus, display device and computer readable medium
CN109493829B (en) Method for acquiring color temperature of image
WO2018214188A1 (en) Image processing method, image processing device, and display device
WO2020107661A1 (en) Image color temperature acquisition method
WO2021218405A1 (en) Method for improving picture display quality, and timing controller and display apparatus
US20170301275A1 (en) Display devices capable of adjusting the display color gamut and methods of adjusting the color gamut thereof
CN110444176B (en) Pixel color difference compensation method and system of display panel and display device
WO2018188122A1 (en) Drive method and drive apparatus for display, and display
US20100238101A1 (en) Image processing method capable of reducing color shift
WO2017045214A1 (en) Rgbw compensation method and apparatus based on white-subpixel colour cast
WO2017049703A1 (en) Image contrast enhancement method
WO2020094006A1 (en) Display device and driving method therefor, and driving apparatus and computer-readable medium
WO2018205369A1 (en) Liquid crystal display panel and driving method therefor, and liquid crystal display
WO2019071777A1 (en) Display driving method, device and apparatus
WO2020172921A1 (en) Image processing system and image processing method
US20200226988A1 (en) Display driving method, device and apparatus
WO2019061849A1 (en) Brightness adjustment method and brightness adjustment device for display panel
WO2017201789A1 (en) Graphene display, and drive method and drive device for graphene display
WO2020000477A1 (en) Color gamut correction method and apparatus
WO2020107656A1 (en) Pixel driving method
CN104332143B (en) Display device and color conversion method thereof
WO2021017028A1 (en) Lod table adjustment method and system
CN110379370B (en) RGB-Delta type display panel sub-pixel rendering method based on threshold comparison
WO2017063223A1 (en) Method and system for improving contrast of oled display panel

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19889830

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19889830

Country of ref document: EP

Kind code of ref document: A1