Color correction method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202211338319.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-28
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2042-10-28
AI Technical Summary
这种情况会导致图像伪影,观众可能会察觉到不连贯的视频
Smart Images

Figure CN115689926B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing, and more specifically, to a color correction method, apparatus, electronic device, and storage medium. Background Technology
[0002] When rendering images, the refresh rate of the display device needs to vary with the rendering rate of the image. For example, in a game scene, when the display device's refresh rate is set to 60Hz, the display refreshes pixels every 16.6ms. Since the rendering time of images on the GPU (Graphics Processing Unit) varies throughout the game—for example, a frame with little detail or effects might take 12ms to render, while the next frame with more detail and effects (such as explosions or smoke scenes) might take 30ms—a fully rendered frame might not be ready in the frame buffer when the next frame needs to be output to the display device via the video interface. This can cause image artifacts, which viewers may perceive as discontinuous video. Conversely, if the rendering speed is faster than the refresh rate set by the display, causing the portion of the frame buffer being processed to be overwritten, image tearing may occur.
[0003] Some display devices support running at refresh rates within a certain range, dynamically keeping pace with the GPU's output frame rate. However, due to uneven changes in the brightness of the three primary colors of the same display sub-pixel at different refresh rates, the display device exhibits screen flickering that is perceptible to the human eye, and may also cause color distortion problems on the consumer side, such as orange tomatoes.
[0004] To address the aforementioned color cast issue, color calibration is currently performed using color measurement and color compensation at a fixed frequency. However, the accuracy of color compensation measured at a single fixed frequency is low, and it cannot resolve the screen flickering phenomenon that occurs when switching frequencies. Summary of the Invention
[0005] The purpose of this application is to provide a color correction method, apparatus, and electronic device. The technical solution provided by this application is as follows:
[0006] On one hand, embodiments of this application provide a color correction device, the device comprising:
[0007] The mode selection module is used to receive video stream data of the color to be corrected and receive the indicated refresh rate; determine the target frequency range where the indicated refresh rate is located, and determine the correction mode corresponding to the target frequency range.
[0008] The color correction module is used to perform color correction on the video stream data based on the correction mode, so as to obtain the corrected video stream data for display.
[0009] On the other hand, embodiments of this application provide a color correction method, including:
[0010] Receive video stream data containing the colors to be corrected, and receive an indication of refresh rate;
[0011] Determine the target frequency range where the refresh frequency is located, and determine the correction mode corresponding to the target frequency range;
[0012] Based on the correction mode, color correction is performed on the video stream data to obtain corrected video stream data, which is then displayed.
[0013] On the other hand, embodiments of this application also provide an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method provided in any optional embodiment of this application.
[0014] On the other hand, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method provided in any optional embodiment of this application.
[0015] On the other hand, embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the methods provided in any optional embodiment of this application. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.
[0017] Figure 1 This is a schematic diagram illustrating the application environment of a color correction method provided in an example.
[0018] Figure 2 This is a schematic diagram of the structure of a color correction device provided in an embodiment of this application;
[0019] Figure 3 A schematic diagram of a data sampling scheme for a color measurement device provided in one example of this application;
[0020] Figure 4 This is a schematic diagram of a sampling scheme with different refresh rates in one example of this application;
[0021] Figure 5This is a schematic diagram of different color correction modes corresponding to different refresh rates in one example of this application;
[0022] Figure 6 This is a schematic diagram of a color correction scheme for a refresh rate of [48, x) in one example of this application;
[0023] Figure 7 This is a schematic diagram illustrating a scheme for determining the grayscale values of two endpoints in one example of this application;
[0024] Figure 8 This is a schematic diagram of a color correction scheme for a refresh rate of [48, x) in one example of this application;
[0025] Figure 9 This is a schematic diagram illustrating a color correction scheme corresponding to a refresh rate of [x, y] in one example of this application;
[0026] Figure 10 This is a schematic diagram illustrating a scheme for determining the first and second corrected gray levels in one example of this application.
[0027] Figure 11 This is a schematic diagram of a color correction scheme corresponding to a refresh rate of (y, 165] in one example of this application;
[0028] Figure 12 A schematic flowchart of a color correction method provided in an embodiment of this application;
[0029] Figure 13 This is a schematic diagram of the structure of an electronic device to which this application applies. Detailed Implementation
[0030] The embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions of the embodiments of this application.
[0031] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this application mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element establish a connection relationship through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” can be implemented as “A,” or as “B,” or as “A and B.” When describing multiple (two or more) items, if the relationship between the multiple items is not explicitly defined, the multiple items can refer to one, several or all of the multiple items. For example, the description of "parameter A includes A1, A2, A3" can be implemented as parameter A includes A1 or A2 or A3, or it can be implemented as parameter A includes at least two of the three items A1, A2 and A3.
[0032] The following description of several optional embodiments illustrates the technical solutions provided in this application and the technical effects produced by these solutions. It should be noted that the following embodiments can be referenced, borrowed from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.
[0033] Figure 1This diagram illustrates the application environment of the color correction method provided in this embodiment. The color correction method can be executed by the color correction module of a display device. In a display device, such as an LCD monitor, the display driver chip includes a backlight processing module, a color correction module, a motion compensation module, a dithering module, and a pixel rearrangement module. The input video stream data is processed by these modules and then output to the panel driver chip. After passing through the backlight processing module, due to the non-uniform changes in the brightness of the three primary colors of the LCD monitor at different refresh rates, image flicker and color deviation occur. The color correction module maps or modifies the data values through calculation to eliminate screen flicker and severe color deviation. Specifically, the color correction module receives video stream data of the color to be corrected and receives the indicated refresh rate; determines the target frequency range where the indicated refresh rate is located; determines the target mapping information corresponding to the target frequency range from multiple color mapping relationships corresponding to different refresh rates; the color mapping relationship is used to represent the mapping relationship between the actual display color data and the theoretical color data of the display device; performs color correction on the video stream data based on the obtained target mapping information to obtain the corrected video stream data; the corrected video stream data is processed by the motion compensation module, the jitter module and the pixel rearrangement module, and finally output to the panel driver chip for display on the panel.
[0034] Those skilled in the art will understand that a display device is a device that supports operation at refresh rates within a certain range.
[0035] In the above application scenarios, the display device is divided into multiple modules with different functions, and color correction is performed by the color correction module. In other application scenarios, the display device may not be divided into functional modules, and color correction may be performed directly by the display device. The above application scenarios do not limit the application scenarios of the color correction method of this application.
[0036] In some possible implementations, a color correction device is provided, such as Figure 2 As shown, the device includes:
[0037] The mode selection module 201 is used to receive video stream data of the color to be corrected and receive the indicated refresh rate; determine the target frequency range where the indicated refresh rate is located, and determine the correction mode corresponding to the target frequency range.
[0038] The video stream data whose color needs to be corrected can be the initial video stream data input into the display device, and the video stream data obtained after backlight processing by the backlight processing module of the display device.
[0039] The refresh rate can be determined based on the image rendering rate.
[0040] Specifically, the display device can support a refresh rate range, that is, the minimum refresh rate to the maximum refresh rate that it supports. At least one target refresh rate can be determined in advance within the refresh rate range, thereby dividing the refresh rate range into at least two different frequency ranges. The specific division of the refresh rate range will be further elaborated below.
[0041] The color correction module 202 is used to perform color correction on the video stream data based on the correction mode to obtain the corrected video stream data for display.
[0042] Different calibration modes correspond to different color mapping relationships, which are used to represent the mapping relationship between the actual display color data and the theoretical color data of the display device.
[0043] In specific implementations, different refresh rates correspond to different correction modules, which in turn correspond to different color mapping relationships. That is, different color mapping relationships can be used for color correction for different refresh rates.
[0044] Specifically, at least two target refresh frequencies can be pre-determined within the refresh frequency range, thereby dividing the refresh frequency range into at least two different frequency ranges. Sampling is performed at each of the at least two target refresh frequencies to obtain the color mapping relationship corresponding to each of the at least two target refresh frequencies. The target refresh frequencies related to the target frequency range can then be determined, thereby obtaining the correction mode.
[0045] In practice, different indicator refresh frequencies correspond to different target frequency ranges, which in turn correspond to different correction modes for different color correction processes.
[0046] Specifically, the indicated refresh rate can be mapped and the calculation completed by using the target refresh rate mapping relationship related to the target frequency range. The process of color correction for video stream data will be further explained in detail below.
[0047] In the above embodiments, by pre-dividing the refresh frequency range into at least two different frequency ranges, and different refresh frequencies corresponding to different correction modes, the target frequency range of the indicated refresh frequency is determined, thereby determining the corresponding correction mode. That is, different color mapping relationships can be used for color correction for different refresh frequencies, thereby improving the accuracy of color correction and effectively avoiding screen flickering when switching frequencies.
[0048] In some possible implementations, the correction modes correspond to different color mapping relationships; the color mapping relationships are obtained in the following way:
[0049] (1) Determine the refresh rate range supported by the display device.
[0050] The refresh rate range includes the minimum refresh rate and the maximum refresh rate.
[0051] For example, the display device supports a variable refresh rate range of 48-165Hz.
[0052] (2) Identify at least two target refresh frequencies within the refresh frequency range.
[0053] Specifically, the first and second refresh frequencies, which are within the refresh frequency range, can be determined by measuring them with a color measurement device.
[0054] The first refresh rate is less than the second refresh rate.
[0055] Among them, the color measurement device can be a device that has the function of measuring and analyzing color, such as a color analyzer.
[0056] In practice, the first refresh frequency and the second refresh frequency can be the low-frequency refresh frequency and the high-frequency refresh frequency of the color measurement device within the refresh frequency range.
[0057] For example, the display device supports a variable refresh rate range of 48-165Hz, and the input video stream data is 10-bit. The 48-160Hz range is divided into three segments: [48,x), [x,y], and (y,165], where x and y are the low-frequency and high-frequency refresh rates measured by the color measurement device within the range of [48,165], respectively. That is, x is the first refresh rate and y is the second refresh rate.
[0058] In practice, a third refresh frequency can be determined between the minimum refresh frequency and the first refresh frequency, and a fourth refresh frequency can be determined between the second refresh frequency and the maximum refresh frequency.
[0059] For example, between 40Hz and xHz, choose mHz, which is the third refresh rate; between yHz and 165Hz, choose nHz, which is the fourth refresh rate.
[0060] Specifically, the refresh rate range includes the minimum refresh rate and the maximum refresh rate; at least two target refresh rates include the first refresh rate, the second refresh rate, the third refresh rate, and the fourth refresh rate; the minimum refresh rate, the third refresh rate, the first refresh rate, the second refresh rate, the fourth refresh rate, and the maximum refresh rate increase sequentially.
[0061] (3) Sample at at least two target refresh frequencies using a color measurement device to obtain color mapping relationships for at least two target refresh frequencies.
[0062] The color mapping relationship can be in the form of a grayscale mapping lookup table (LUT).
[0063] Specifically, the adoption process is as follows: Figure 3 As shown, it can be as follows:
[0064] In an environment where the light intensity is less than a preset threshold (i.e., a darkroom environment), the color measurement device reads the color-related parameters displayed on the display device (e.g., an LCD screen, a Liquid Crystal Display), and sends them to a computing terminal, such as a PC (personal computer). The PC then calculates and generates a lookup table based on the color test data and the received color-related parameters from the LCD screen, and sends it to the LCD control unit. The LCD control unit reads the lookup table, maps the data, and displays it on the LCD screen. This process is repeated until the actual color data measured by the color measurement device conforms to the theoretical color standard. Finally, the generated grayscale mapping lookup table is stored in the storage module.
[0065] Specifically, a first preset number of gray levels can be sampled at a first refresh frequency using a color measurement device to obtain the corresponding first preset number of mapping values. A first mapping relationship for the first refresh frequency is generated based on the gray level values of the sampled gray levels and the corresponding mapping values. A second mapping relationship for the second refresh frequency can be generated based on the gray level values of the sampled gray levels and the corresponding mapping values using a color measurement device at a second refresh frequency.
[0066] A second preset number of gray levels are sampled at a third refresh frequency using a color measurement device to generate a third mapping relationship for the third refresh frequency, and the first gray level value of the second preset number of gray levels at the third refresh frequency is recorded; a second preset number of gray levels are sampled at a fourth refresh frequency using a color measurement device to generate a fourth mapping relationship for the fourth refresh frequency, and the second gray level value of the second preset number of gray levels at the fourth refresh frequency is recorded; wherein, the second preset number is less than the first preset number.
[0067] by Figure 4As shown in the example, a color measurement device is used to sample 256 gray levels at the first refresh frequency (low frequency) xHZ and the second refresh frequency (high frequency) yHZ respectively, with a sampling interval of 4 (which can be called dense sampling). The first mapping relationship (also called gray level mapping lookup table 1, or simply dense lookup table 1) and the second mapping relationship (also called gray level mapping lookup table 2, or simply dense lookup table 2) of the RGB three channels are measured respectively. Between 48Hz and xHz, 16 gray levels are sampled at mHz (the third refresh rate), with no fixed sampling interval (this can be called sparse sampling). The third mapping relationship of the RGB three channels is measured (this can also be called sparse lookup table 1), and the first gray level value of the 16 sampling points is recorded. This is called sparse sampling point gray level value table 1 (the sampling points of the R / G / B three channels are consistent). Between yHz and 165Hz, 16 gray levels are sampled at nHz (the fourth refresh rate), with no fixed sampling interval (this can be called sparse sampling). The fourth mapping relationship of the RGB three channels is measured (this can also be called sparse lookup table 2), and the second gray level value of the 16 sampling points is recorded. This is called sparse sampling point gray level value table 2 (the sampling points of the R / G / B three channels are consistent).
[0068] The following will illustrate different color correction methods corresponding to different indicator refresh rates with reference to examples.
[0069] In some possible implementations, if the target frequency range where the indicated refresh frequency is located is greater than or equal to the minimum refresh frequency and less than the first refresh frequency, then the mode selection module 201, when determining the target mapping relationship corresponding to the target frequency range from multiple color mapping relationships corresponding to different refresh frequencies, can specifically be used for:
[0070] The first mapping relationship for the first refresh frequency, the third mapping relationship for the third refresh frequency, and the first gray level value of the second preset number of gray levels at the third refresh frequency are used as the target mapping relationship.
[0071] Specifically, if the target frequency range of the indicated refresh frequency is greater than or equal to the minimum refresh frequency and less than the first refresh frequency, then the first mapping relationship for the first refresh frequency, the third mapping relationship for the third refresh frequency in the range of greater than or equal to the minimum refresh frequency and less than the first refresh frequency, and the first grayscale value can be used as the target mapping relationship.
[0072] Color correction module 202 includes a first sparsity correction module, specifically used for:
[0073] Based on the first mapping relationship, the third mapping relationship, and the first gray level value of the second preset number of gray levels at the third refresh frequency, the video stream data is color corrected to obtain the corrected video stream data.
[0074] For example, if the refresh rate is within the range of [48, x), the input video stream data is calculated to complete the mapping value according to the third mapping relationship (sparse lookup table 1), the first gray level value of the second preset number of gray levels (sparse sampling point gray level value table 1), and the first mapping relationship (dense lookup table 1), and finally outputs 10-bit video stream data.
[0075] In some possible implementations, if the target frequency range where the indicated refresh frequency is located is greater than or equal to the first refresh frequency and less than or equal to the second refresh frequency, then when the mode selection module 201 determines the target mapping relationship corresponding to the target frequency range from multiple color mapping relationships corresponding to different refresh frequencies, it can be specifically used for:
[0076] The first mapping relationship for the first refresh frequency and the second mapping relationship for the second refresh frequency are used as the target mapping relationship.
[0077] Specifically, if the target frequency range of the indicated refresh frequency is greater than or equal to the first refresh frequency and less than or equal to the second refresh frequency, then the associated first mapping relationship and second mapping relationship can be used as the target mapping relationship.
[0078] Color correction module 202 also includes a dense sampling correction module, specifically used for:
[0079] Color correction is performed on the video stream data based on the first and second mapping relationships to obtain the corrected video stream data.
[0080] For example, if the refresh rate is within the range of [x, y], the input video stream data is calculated by performing data fusion on the mapping values of the two tables according to the first mapping relationship (dense lookup table 1) and the second mapping relationship (dense lookup table 2), and in conjunction with the refresh rate, to obtain the corrected video stream data.
[0081] In some possible implementations, if the target frequency range where the indicated refresh frequency is located is greater than the second refresh frequency and less than or equal to the maximum refresh frequency, the mode selection module 201, when determining the target mapping relationship corresponding to the target frequency range from multiple color mapping relationships corresponding to different refresh frequencies, can be specifically used for:
[0082] The second mapping relationship for the second refresh frequency, the fourth mapping relationship for the fourth refresh frequency, and the second grayscale value of the second preset number of grayscale values at the fourth refresh frequency are used as the target mapping relationship.
[0083] The color correction module 202 also includes a second sparsity correction module, specifically used for:
[0084] Based on the second mapping relationship, the fourth mapping relationship, and the second grayscale value of the second preset number of grayscale levels at the fourth refresh frequency, the video stream data is color corrected to obtain the corrected video stream data.
[0085] For example, if the refresh frequency is within the range of (y, 165], the input video stream data is calculated to complete the mapping value according to the fourth mapping relationship (sparse lookup table 2), the second gray level value of the second preset number of gray levels at the fourth refresh frequency (sparse sampling point gray level value table 2), and the second mapping relationship (dense lookup table 2), so as to obtain the corrected video stream data.
[0086] The following examples will illustrate the different color correction methods corresponding to different indicator refresh rates.
[0087] In one example, the display supports a variable refresh rate range of 48-165Hz.
[0088] Within the 48-165Hz range, 256 gray levels are sampled at both the low-frequency xHz and high-frequency yHz using a color measurement device, with a sampling interval of 4. The first mapping relationship (dense lookup table 1) and the second mapping relationship (dense lookup table 2) are measured and stored in the storage module 2. Simultaneously, between 40Hz and xHz, 16 gray levels are sampled at mHz with an irregular sampling interval to measure the third mapping relationship of the RGB three channels (sparse lookup table 1). The first gray level values of the 16 sampling points are also recorded, referred to as the sparse sampling point gray level value table 1 (sampling points of the R / G / B three channels are consistent), and stored together in storage module 1. Between yHz and 165Hz, 16 gray levels are sampled at nHz with an irregular sampling interval to measure the fourth mapping relationship of the RGB three channels (sparse lookup table 2). The second gray level values of the 16 sampling points are also recorded, referred to as the sparse sampling point gray level value table 2 (sampling points of the R / G / B three channels are consistent), and stored together in storage module 3.
[0089] like Figure 5As shown, the mode selection module first determines the processing mode based on the indicated refresh rate value (i.e., the input refresh rate shown in the figure) FRE_VAL, and then the input video stream data enters the data processing module corresponding to the mode for calculation. When in mode 1, i.e., FRE_VAL is in the range [48, x), the input video stream data queries the sparse lookup table 1, the sparse sampling point grayscale value table 1 stored in storage module 1, and the dense lookup table 1 stored in storage module 2. The mapping value is completed and calculated by the sparse sampling correction module 1, and finally 10-bit video stream data is output. When in mode 2, i.e., FRE_VAL is in the range [x, y], the input video stream data queries the dense lookup table 1 and the dense lookup table 2 stored in storage module 2. At the same time, combined with the refresh frequency FRE_VAL, the mapping value of the above two tables is fused and calculated by the dense sampling correction module, and finally 10-bit video stream data is output. When in mode 3, i.e., FRE_VAL is in the range (y, 165], the input video stream data queries the sparse lookup table 2, the sparse sampling point grayscale value table 2, and the dense lookup table 2 stored in storage module 3. The mapping value is completed and calculated by the sparse sampling correction module 2, and finally 10-bit video stream data is output.
[0090] The following will describe the specific color correction process when the indicated refresh rate is greater than or equal to the minimum refresh rate and less than the first refresh rate, with reference to the embodiments.
[0091] Specifically, when the refresh rate is greater than or equal to the minimum refresh rate and less than the first refresh rate, the first sparse correction module performs color correction on the video stream data based on the first grayscale value of the first grayscale level at the second preset number of grayscale levels at the third refresh rate, and obtains the corrected video stream data. Specifically, this is used for:
[0092] (1) For each image channel, determine the grayscale value to be corrected corresponding to the video stream data;
[0093] (2) The first gray level values of the second preset number of gray levels at the third refresh frequency are sorted based on their numerical values, and a sub-gray level interval is determined based on every two adjacent first gray level values.
[0094] (3) Determine the target sub-grayscale interval where the grayscale value to be corrected is located, and determine the first grayscale value corresponding to the two endpoint values of the target sub-grayscale interval respectively;
[0095] (4) Based on the first mapping relationship, query the first mapping value corresponding to the first gray level value of each endpoint value;
[0096] (5) Based on the third mapping relationship, query the second mapping value corresponding to the first gray level value of each endpoint value;
[0097] (6) Correct the grayscale value to be corrected based on the first and second mapping values obtained from the query, and obtain the corrected grayscale value;
[0098] (7) Based on the corrected grayscale values of each image channel, the corrected video stream data is obtained.
[0099] Among them, the two endpoint values of the target sub-grayscale interval can be called the left sparse sampling point and the right sparse sampling point.
[0100] by Figure 6 Taking the example shown, the monitor supports a variable refresh rate range of 48-165Hz and input video stream data of 10 bits. Taking the R channel as an example, when the refresh rate range is indicated as [48, x), the input 10-bit data enters the sparse sampling module 1 processing flow. At this time, the sparse sampling point grayscale value table 1 in storage module 1 is first read. In the sparse table index lookup module, based on the input video stream data value, the sparse sampling point to the left and the sparse sampling point to the right of the value (i.e., the first grayscale values corresponding to the two endpoints of the target sub-grayscale interval) are located. Then, these two sparse sampling points are used as indices and mapped in sparse lookup table 1 and dense lookup table 1 respectively. Two lookup table mappings are obtained for each, resulting in a total of four mapping values (i.e., two first mapping values and two second mapping values). These are denoted as l_data. sparse r_data sparse l_data dense r_data dense Simultaneously, it combines the input data data_in and data_in+1 with the mapping value data_in_l in R channel dense lookup table 1. dense and data_in_r dense As input to the data reconstruction module, the final output is 10-bit data, which is then used as the output of the color correction module. The same applies to the G and B channels.
[0101] like Figure 7 As shown, during the sampling process at the third refresh rate, i.e., the sparse sampling process, there are 16 sampling points and 15 intervals. The grayscale values of the sampling points in the RGB three channels are the same, sharing a single sparse sampling point grayscale value table. For example, if the values in the sparse sampling point grayscale value table are [0, 16, 32, 46, 62, 77, 89, 105, 128, 140, 156, 177, 190, 212, 228, 255], they are sorted in ascending order. Each pair of adjacent values forms a sub-grayscale interval. If the input data is 996, the input data is scaled by 4 times to 224, with the two endpoint values being 212 and 228 respectively. That is, the grayscale value of the left sampling point is 212, and the grayscale value of the right sampling point is 228, with an interval of 16.
[0102] like Figure 8 As shown, taking the R channel as an example, after each input data passes through the sparse table index lookup module, the grayscale values of the left and right sampling points are output as indices. These indices are then mapped in sparse lookup table 1 and dense lookup table 1, generating a total of 4 mapped values, denoted as l_data. sparse r_data sparse l_data dense r_data dense .
[0103] Specifically, when the first sparse correction module corrects the grayscale value to be corrected based on the queried first and second mapping values to obtain the corrected grayscale value, it is specifically used for:
[0104] a. Determine the scaling factor based on the first and second mapping values obtained from the query.
[0105] Taking the R channel as an example, the sparse lookup table is reconstructed based on the dense lookup table to obtain the final output value. Specifically, six parameters are input, and the scaling factor is first calculated according to Formula 1, as follows:
[0106]
[0107] b. Obtain input data through the first mapping relationship and the grayscale value to be corrected.
[0108] Specifically, the mapping value data_in_l in the R channel dense lookup table 1 can be combined with the input data_in and data in+1. dense and data_in_r dense As input to the data reconstruction module.
[0109] c. Correct the second mapping value based on the first mapping value, the input data, and the scaling factor to obtain the corrected mapping value.
[0110] Specifically, the sparsely sampled mapping value can be reconstructed based on the first mapping value, the second mapping value, the input data, and the scaling factor.
[0111] Reconstruct the sparsely sampled mapping values based on the scaling factor and the known lookup table mapping values:
[0112] data_out_l sparse =
[0113] scale*(data_in_l dense -l_data dense )+l_data sparse (2)
[0114] data_out_r sparse =
[0115] scale*(data_in_r dense -l_data dense )+l_data sparse (3)
[0116] d. The corrected grayscale value is obtained by interpolating the corrected mapping value.
[0117] Specifically, the corrected grayscale value is obtained by interpolating the mapping value of the reconstructed sparse sampling.
[0118] The reconstructed mapping values obtained above are interpolated using interpolation to obtain the final 10-bit output data:
[0119] data out =data_out_l sparse *delta+data_out_r sparse *(step-delta) (4)
[0120] delta = data in %step (5)
[0122] In formulas (4) and (5), step is the interval of dense sampling intervals. In this example, step can be 4.
[0123] The above embodiments illustrate the specific color correction process when the indicated refresh frequency is greater than or equal to the minimum refresh frequency and less than the first refresh frequency. The following will further illustrate the specific color correction process when the indicated refresh frequency is greater than or equal to the first refresh frequency and less than or equal to the second refresh frequency.
[0124] In some possible implementations, when the specific color correction process is indicated as having a refresh rate greater than or equal to a first refresh rate and less than or equal to a second refresh rate, the dense sampling correction module, when performing color correction on the video stream data based on the first mapping relationship and the second mapping relationship to obtain the corrected video stream data, is specifically used for:
[0125] (1) For each image channel, determine the grayscale value to be corrected corresponding to the video stream data;
[0126] (2) Correct the grayscale value to be corrected by the first mapping relationship and the second mapping relationship respectively to obtain the corresponding first corrected grayscale and second corrected grayscale;
[0127] (3) Determine the target fusion parameters based on the indicated refresh frequency, and fuse the first and second corrected gray levels using the target fusion parameters to obtain the corrected gray level value;
[0128] (4) Based on the corrected grayscale values of each image channel, the corrected video stream data is obtained.
[0129] like Figure 9 As shown, when the refresh frequency range is [x, y], the input 10-bit data enters the dense sampling correction module processing flow. First, dense lookup table 1 and dense lookup table 2 are read. For the input 10-bit R channel data, high-frequency sampling reconstruction is performed based on dense lookup table 2, outputting h_data (second corrected grayscale), and low-frequency sampling reconstruction is performed based on dense lookup table 1, outputting l_data (first corrected grayscale). Simultaneously, for the indicated refresh frequency, the gain control module outputs the frequency gain alpha. Finally, in the data fusion module, the outputs of the high-frequency sampling reconstruction module and the low-frequency sampling reconstruction module are fused, and the corrected video stream data is output.
[0130] like Figure 10 As shown, taking the R channel as an example, the high-frequency sampling reconstruction module inputs 10 bits of data and takes the high 8 bits of this data as the lookup table index. That is, if the input data is date_in, then date_in / 4 can be used as the lookup table index, which is the grayscale value to be corrected. For example, if the input data is 996, then the input data is scaled by 4 times to 224 to obtain the lookup table index. Then, after mapping through dense lookup table 2, the grayscale mapping values of the left and right sampling points are output. Finally, a linear interpolation algorithm is used to calculate the grayscale mapping values of the left and right sampling points, and the interpolation result is output by the module. The G and B channels are similar. The data processing flow of the low-frequency sampling reconstruction module is the same as that of the high-frequency sampling reconstruction module, the difference being the dense lookup mapping table read.
[0131] Specifically, the target fusion parameters are determined based on the indicated refresh rate, and the first and second corrected grayscale levels are fused using the target fusion parameters to obtain the corrected grayscale value, including:
[0132] a. Determine the gain mapping relationship for different refresh frequencies within the range of the first refresh frequency to the second refresh frequency based on the first mapping relationship and the second mapping relationship;
[0133] The mapping value corresponding to the gain mapping relationship is obtained by fusing the mapping value corresponding to the first mapping relationship and the mapping value corresponding to the second mapping relationship through the fusion parameter; different refresh frequencies correspond to different fusion parameters;
[0134] b. Determine the target fusion parameters corresponding to the indicated refresh frequency;
[0135] c. Based on the gain mapping relationship and the target fusion parameters, the first and second corrected gray levels are fused to obtain the corrected gray level value.
[0136] In order to correct colors at different refresh rates and reduce the use of lookup tables, this application fits the lookup table mapping relationship at different refresh rates based on dense and sparse lookup table values and the different gains at different frequencies.
[0137] Specifically, taking channel R as an example, it is known that the mapping at frequency x is dense lookup table 1, denoted as X, and the mapping at frequency y is dense lookup table 2, denoted as Y. At the same time, the lookup table at frequency f in the range [x,y] is measured as Z, which is the gain mapping relationship.
[0138] The following formula is used to calculate and obtain a solution for α and β (i.e., the fusion parameters), which serves as the gain lookup table mapping value at that frequency:
[0139]
[0140] Based on the above method, [x,y] is divided into 15 intervals and 16 points, and a gain lookup table is generated.
[0141] The gain lookup table values for channels G and B are generated in the same way as those for channel R.
[0142] In the gain control module, taking the R channel as an example, based on the indicated refresh frequency, the left and right boundary frequency values of the interval where the indicated refresh frequency is located are indexed in the gain lookup table (gain mapping relationship), as well as the α and β values mapped by the two boundary values. Then, the α and β values of the refresh frequency are obtained by interpolation and used as the output of the gain control module.
[0143] Formula (6) is obtained by fitting the measured gain mapping relationship Z. However, different indicator refresh frequencies correspond to different fusion parameter α and β values. Therefore, the endpoint values corresponding to the indicator refresh frequency in the multiple refresh frequencies of the gain mapping relationship are determined, namely the left boundary frequency value and the right boundary frequency value. Thus, the fusion parameters corresponding to the two endpoint values are determined. The target fusion parameter corresponding to the indicator refresh frequency is further determined. Then, based on the target fusion parameter, h_data (second correction gray level) and l_data (first correction gray level) are fused to obtain the correction gray level value.
[0144] The above embodiments illustrate the specific color correction process when the indicated refresh frequency is greater than or equal to the first refresh frequency and less than or equal to the second refresh frequency. The following will further illustrate the specific color correction process when the indicated refresh frequency is greater than the second refresh frequency and less than or equal to the maximum refresh frequency.
[0145] In some possible implementations, when the indicated refresh frequency is greater than the second refresh frequency and less than or equal to the maximum refresh frequency, the second sparse correction module performs color correction on the video stream data based on the second grayscale values of the second grayscale levels at the second preset number of grayscale levels at the fourth refresh frequency, to obtain the corrected video stream data. Specifically, this is used for:
[0146] For each image channel, determine the grayscale value to be corrected corresponding to the video stream data;
[0147] The second grayscale values of the second preset number of grayscale at the fourth refresh frequency are sorted based on their numerical values, and a sub-grayscale interval is determined based on every two adjacent second grayscale values.
[0148] Determine the target sub-grayscale interval where the grayscale value to be corrected is located, and determine the second grayscale values corresponding to the two endpoint values of the target sub-grayscale interval respectively;
[0149] Based on the second mapping relationship, query the third mapping value corresponding to the second grayscale value of each endpoint value;
[0150] Based on the fourth mapping relationship, query the fourth mapping value corresponding to the second grayscale value of each endpoint value;
[0151] The grayscale value to be corrected is corrected based on the third and fourth mapping values obtained from the query, and the corrected grayscale value is obtained.
[0152] Based on the corrected grayscale values of each image channel, the corrected video stream data is obtained.
[0153] like Figure 11 As shown, when the refresh frequency range is (y, 165], 10-bit data is input into the sparse sampling module 2 processing flow. At this time, the sparse sampling point grayscale value table 2 in the storage module 3 is first read. In the sparse table index lookup module, based on the input video stream data value, the sparse sampling points to the left and right of the value are located. Then, these two sparse sampling points are used as indices and mapped in the sparse lookup table 2 and dense lookup table 2 respectively. Two lookup table mappings are obtained for each, resulting in a total of four mapping values, denoted as l_data. sparse r_data sparse l_data dense r_data dense Simultaneously, it combines the input data data_in and data_in+1 with the mapping value data_in_l in R channel dense lookup table 1. dense and data_in_ r denseAs input to the data reconstruction module, the final output is 10-bit data, which is then used as the output of the color correction module. The same applies to the G and B channels.
[0154] The specific processing flow of sparse sampling module 2 is the same as that of sparse sampling module 1, the difference being that this module uses sparse lookup table 2 and dense lookup table 2 for mapping. Finally, it outputs 10-bit data as the output of the color correction module.
[0155] In the above embodiments, different target mapping relationships are determined by different refresh frequencies, thereby performing color correction in different ways. The target mapping relationships include dense sampling and sparse sampling. The first and second mapping relationships corresponding to dense sampling can accurately calculate the mapping values based on the table data, thus improving correction accuracy. The second and fourth mapping relationships corresponding to sparse sampling can reduce the number of samples, improve sampling efficiency, and, based on sparse sampling, combine with dense sampling for data reconstruction, thereby ensuring correction accuracy.
[0156] In some possible implementations, a color correction method is provided, which can be performed by a color correction module in a display device for performing color correction, or by the display device itself.
[0157] Figure 12 The illustration shows a flowchart of a color correction method provided in an embodiment of this application. Taking a color correction module as the executing entity as an example, the color correction method provided in this application may include the following steps:
[0158] Step S1201: Receive video stream data of the color to be corrected and receive an indication of refresh rate;
[0159] Step S1202: Determine the target frequency range where the refresh frequency is located, and determine the correction mode corresponding to the target frequency range;
[0160] Step S1203: Based on the correction mode, perform color correction on the video stream data to obtain corrected video stream data, and then display the corrected video stream data.
[0161] In some possible implementations, the correction modes correspond to different color mapping relationships; the color mapping relationships are obtained in the following way:
[0162] Determine the refresh rate range supported by the display device;
[0163] Identify at least two target refresh rates within the refresh rate range;
[0164] By sampling at at least two target refresh rates using a color measurement device, color mapping relationships are obtained for at least two target refresh rates.
[0165] In some possible implementations, the refresh frequency range includes a minimum refresh frequency and a maximum refresh frequency; at least two target refresh frequencies include a first refresh frequency, a second refresh frequency, a third refresh frequency, and a fourth refresh frequency; the minimum refresh frequency, the third refresh frequency, the first refresh frequency, the second refresh frequency, the fourth refresh frequency, and the maximum refresh frequency increase sequentially.
[0166] By sampling at at least two target refresh rates using a color measurement device, color mapping relationships are obtained for each of the at least two target refresh rates, including:
[0167] A first preset number of gray levels are sampled at the first refresh frequency using a color measurement device to obtain the corresponding first preset number of mapping values. A first mapping relationship for the first refresh frequency is generated based on the gray level values of the sampled gray levels and the corresponding mapping values.
[0168] By sampling a first preset number of gray levels at the second refresh frequency using a color measurement device, the corresponding first preset number of mapping values are obtained, and a second mapping relationship for the second refresh frequency is generated based on the gray level values of the sampled gray levels and the corresponding mapping values.
[0169] A second preset number of gray levels are sampled at a third refresh frequency using a color measurement device to generate a third mapping relationship for the third refresh frequency, and the first gray level value of the second preset number of gray levels at the third refresh frequency is recorded; wherein, the second preset number is less than the first preset number.
[0170] By sampling a second preset number of gray levels at the fourth refresh rate using a color measurement device, a fourth mapping relationship for the fourth refresh rate is generated, and the second gray level value of the second preset number of gray levels at the fourth refresh rate is recorded.
[0171] In some possible implementations, the target frequency range where the indicated refresh frequency is located is greater than or equal to the minimum refresh frequency and less than the first refresh frequency.
[0172] Based on the correction mode, color correction is performed on the video stream data to obtain corrected video stream data, including:
[0173] Based on the first mapping relationship, the third mapping relationship, and the first gray level value of the second preset number of gray levels at the third refresh frequency, the video stream data is color corrected to obtain the corrected video stream data.
[0174] In some possible implementations, color correction is performed on the video stream data based on the first mapping relationship, the third mapping relationship, and the first grayscale value of a second preset number of grayscale levels at the third refresh frequency to obtain corrected video stream data, including:
[0175] For each image channel, determine the grayscale value to be corrected corresponding to the video stream data;
[0176] The first gray level values of the second preset number of gray levels at the third refresh frequency are sorted based on their numerical values, and a sub-gray level interval is determined based on every two adjacent first gray level values.
[0177] Determine the target sub-grayscale interval where the grayscale value to be corrected is located, and determine the first grayscale value corresponding to the two endpoint values of the target sub-grayscale interval respectively;
[0178] Based on the first mapping relationship, query the first mapping value corresponding to the first grayscale value of each endpoint value;
[0179] Based on the third mapping relationship, query the second mapping value corresponding to the first grayscale value of each endpoint value;
[0180] Based on the first and second mapping values obtained from the query, the grayscale value to be corrected is corrected to obtain the corrected grayscale value;
[0181] Based on the corrected grayscale values of each image channel, the corrected video stream data is obtained.
[0182] In some possible implementations, the grayscale value to be corrected is corrected based on the queried first and second mapping values to obtain the corrected grayscale value, including:
[0183] The scaling factor is determined based on the first and second mapping values retrieved from the query.
[0184] Input data is obtained through the first mapping relationship and the grayscale value to be corrected;
[0185] The second mapping value is corrected based on the first mapping value, the input data, and the scaling factor to obtain the corrected mapping value.
[0186] The corrected grayscale value is obtained by interpolating the corrected mapping value.
[0187] In some possible implementations, if the target frequency range of the indicated refresh frequency is greater than or equal to the first refresh frequency and less than or equal to the second refresh frequency;
[0188] Based on the correction mode, color correction is performed on the video stream data to obtain corrected video stream data, including:
[0189] Color correction is performed on the video stream data based on the first and second mapping relationships to obtain the corrected video stream data.
[0190] In some possible implementations, color correction is performed on the video stream data based on the first mapping relationship and the second mapping relationship to obtain corrected video stream data, including:
[0191] For each image channel, determine the grayscale value to be corrected corresponding to the video stream data;
[0192] The grayscale value to be corrected is corrected using the first mapping relationship and the second mapping relationship respectively, to obtain the corresponding first corrected grayscale and second corrected grayscale;
[0193] The target fusion parameters are determined based on the indicated refresh frequency, and the first and second corrected gray levels are fused using the target fusion parameters to obtain the corrected gray level value.
[0194] Based on the corrected grayscale values of each image channel, the corrected video stream data is obtained.
[0195] In some possible implementations, a target fusion parameter is determined based on an indicated refresh frequency, and the first and second corrected grayscale levels are fused using the target fusion parameter to obtain a corrected grayscale value, including:
[0196] Based on the first mapping relationship and the second mapping relationship, the gain mapping relationship corresponding to different refresh frequencies within the range of the first refresh frequency to the second refresh frequency is determined; wherein, the mapping value corresponding to the gain mapping relationship is obtained by fusing the mapping value corresponding to the first mapping relationship and the mapping value corresponding to the second mapping relationship through the fusion parameter; different refresh frequencies correspond to different fusion parameters.
[0197] Determine the target fusion parameters corresponding to the indicated refresh frequency;
[0198] The first and second corrected gray levels are fused based on the gain mapping relationship and the target fusion parameters to obtain the corrected gray level value.
[0199] In some possible implementations, if the target frequency range of the indicated refresh frequency is greater than the second refresh frequency and less than or equal to the maximum refresh frequency;
[0200] Based on the correction mode, color correction is performed on the video stream data to obtain corrected video stream data, including:
[0201] Based on the second mapping relationship, the fourth mapping relationship, and the second grayscale value of the second preset number of grayscale levels at the fourth refresh frequency, the video stream data is color corrected to obtain the corrected video stream data.
[0202] The color correction method of this application pre-divides the refresh rate range into at least two different frequency ranges. Different refresh rates correspond to different correction modes. The target frequency range where the indicated refresh rate is located is determined, thereby determining the corresponding correction mode. That is, different color mapping relationships can be used for color correction for different refresh rates, thereby improving the accuracy of color correction and effectively avoiding screen flickering when switching frequencies.
[0203] Furthermore, different target mapping relationships are determined by varying refresh rates, enabling different color correction methods. These target mapping relationships include dense sampling and sparse sampling. The first and second mapping relationships corresponding to dense sampling can accurately calculate mapping values based on table data, thus improving correction accuracy. The second and fourth mapping relationships corresponding to sparse sampling can reduce the number of samples, improve sampling efficiency, and, based on sparse sampling, combine with dense sampling for data reconstruction, thereby ensuring correction accuracy.
[0204] The apparatus in this application embodiment can execute the method provided in this application embodiment, and the implementation principle is similar. The actions performed by each module in the apparatus of each embodiment of this application correspond to the steps in the method of each embodiment of this application. For detailed functional descriptions of each module of the apparatus, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.
[0205] This application provides a display driving device, including the color correction device described above.
[0206] This application provides an electronic device including the aforementioned display driver.
[0207] This application provides an electronic device, including a memory, a processor, and a computer program stored in the memory. When the processor executes the computer program stored in the memory, it can implement the method in any optional embodiment of this application.
[0208] Figure 13 A schematic diagram of the structure of an electronic device to which an embodiment of the present invention applies is shown, such as... Figure 13 As shown, the electronic device can be a server or a user terminal, and it can be used to implement the methods provided in any embodiment of the present invention.
[0209] like Figure 13 As shown, the electronic device 1300 may primarily include at least one processor 1301. Figure 13 The diagram shows components such as a memory 1302, a communication module 1303, and an input / output interface 1304. Optionally, these components can be connected and communicate with each other via a bus 1305. It should be noted that... Figure 13 The structure of the electronic device 1300 shown is merely illustrative and does not constitute a limitation on the electronic devices to which the methods provided in the embodiments of this application are applicable.
[0210] The memory 1302 can be used to store operating systems and applications, etc. The applications can include computer programs that implement the methods shown in the embodiments of the present invention when invoked by the processor 1301, and can also include programs for implementing other functions or services. The memory 1302 can be ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices that can store information and computer programs, or it can be EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disk storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
[0211] Processor 1301 is connected to memory 1302 via bus 1305 and implements corresponding functions by calling the application programs stored in memory 1302. Processor 1301 can be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. Processor 1301 can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0212] Electronic device 1300 can connect to a network via communication module 1303 (which may include, but is not limited to, components such as a network interface) to communicate with other devices (such as user terminals or servers) through the network and achieve data interaction, such as sending data to or receiving data from other devices. Communication module 1303 may include wired network interfaces and / or wireless network interfaces, meaning the communication module may include at least one of wired or wireless communication modules.
[0213] Electronic device 1300 can connect to required input / output devices, such as keyboards and display devices, via input / output interface 1304. Electronic device 1300 itself may have a display device, and other display devices can also be connected externally via interface 1304. Optionally, storage devices, such as hard drives, can also be connected via interface 1304 to store data from electronic device 1300, retrieve data from storage devices, or store data from storage devices into memory 1302. It is understood that input / output interface 1304 can be a wired interface or a wireless interface. Depending on the actual application scenario, the device connected to input / output interface 1304 can be a component of electronic device 1300 or an external device connected to electronic device 1300 when needed.
[0214] The bus 1305 used to connect the components may include a pathway for transmitting information between the components. The bus 1305 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Depending on its function, the bus 1305 can be classified as an address bus, data bus, control bus, etc.
[0215] Optionally, for the solution provided in the embodiments of the present invention, the memory 1302 can be used to store a computer program that executes the solution of the present invention, and the processor 1301 runs the computer program. When the processor 1301 runs the computer program, it implements the operation of the method or apparatus provided in the embodiments of the present invention.
[0216] Based on the same principle as the method provided in the embodiments of this application, the embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the corresponding content of the aforementioned method embodiments.
[0217] This application also provides a computer program product, which includes a computer program that, when executed by a processor, can implement the corresponding content of the aforementioned method embodiments.
[0218] It should be noted that the terms "first," "second," "third," "fourth," "1," "2," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown in the figures or text.
[0219] It should be understood that although arrows indicate various operation steps in the flowcharts of this application's embodiments, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of this application's embodiments, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all steps in each flowchart, based on the actual implementation scenario, may include multiple sub-steps or multiple stages. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and this application's embodiments do not limit this.
[0220] The above description is only an optional implementation method for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application without departing from the technical concept of this application also fall within the protection scope of the embodiments of this application.
Claims
1. A color correction device, characterized in that, The device includes: The mode selection module is used to receive video stream data of the color to be corrected and receive an indication refresh rate; determine the target frequency range in which the indication refresh rate is located, and determine the correction mode corresponding to the target frequency range; A color correction module is used to perform color correction on the video stream data based on the correction mode to obtain corrected video stream data for display. The correction modes correspond to different color mapping relationships; these color mapping relationships are obtained in the following ways: Determine the refresh rate range supported by the display device; At least two target refresh frequencies are determined within the refresh frequency range; By sampling at the at least two target refresh rates using a color measurement device, color mapping relationships for the at least two target refresh rates are obtained. The refresh frequency range includes a minimum refresh frequency and a maximum refresh frequency; the at least two target refresh frequencies include a first refresh frequency, a second refresh frequency, a third refresh frequency, and a fourth refresh frequency; the minimum refresh frequency, the third refresh frequency, the first refresh frequency, the second refresh frequency, the fourth refresh frequency, and the maximum refresh frequency increase sequentially. The step of sampling at the at least two target refresh rates using a color measurement device to obtain color mapping relationships for the at least two target refresh rates includes: The color measurement device samples a first preset number of gray levels at the first refresh frequency to obtain the corresponding first preset number of mapping values. Based on the gray level values of the sampled gray levels and the corresponding mapping values, a first mapping relationship is generated for the first refresh frequency. The color measurement device samples a first preset number of gray levels at the second refresh frequency to obtain the corresponding first preset number of mapping values. A second mapping relationship for the second refresh frequency is generated based on the gray level values of the sampled gray levels and the corresponding mapping values. The color measurement device samples a second preset number of gray levels at the third refresh frequency to generate a third mapping relationship for the third refresh frequency, and records the first gray level value of the second preset number of gray levels at the third refresh frequency; wherein the second preset number is less than the first preset number. The color measurement device samples the second preset number of gray levels at the fourth refresh frequency to generate a fourth mapping relationship for the fourth refresh frequency, and records the second gray level value of the second preset number of gray levels at the fourth refresh frequency.
2. The apparatus according to claim 1, characterized in that, If the target frequency range in which the indicated refresh frequency is located is greater than or equal to the minimum refresh frequency and less than the first refresh frequency; The color correction module includes a first sparse correction module, used for: Based on the first mapping relationship, the third mapping relationship, and the first grayscale value of the second preset number of grayscale levels at the third refresh frequency, the video stream data is color corrected to obtain the corrected video stream data.
3. The apparatus according to claim 2, characterized in that, When the first sparse correction module performs color correction on the video stream data based on the first mapping relationship, the third mapping relationship, and the first grayscale value of a second preset number of grayscale levels at the third refresh frequency to obtain the corrected video stream data, it is specifically used for: For each image channel, determine the grayscale value to be corrected corresponding to the video stream data; The first gray level values of the second preset number of gray levels at the third refresh frequency are sorted based on their numerical values, and a sub-gray level interval is determined based on every two adjacent first gray level values. Determine the target sub-grayscale interval where the grayscale value to be corrected is located, and determine the first grayscale value corresponding to the two endpoint values of the target sub-grayscale interval respectively; Based on the first mapping relationship, query the first mapping value corresponding to the first grayscale value of each endpoint value; Based on the third mapping relationship, query the second mapping value corresponding to the first grayscale value of each endpoint value; The grayscale value to be corrected is corrected based on the first mapping value and the second mapping value obtained from the query to obtain the corrected grayscale value; Based on the corrected grayscale values of each image channel, the corrected video stream data is obtained.
4. The apparatus according to claim 3, characterized in that, When the first sparse correction module corrects the grayscale value to be corrected based on the queried first mapping value and the second mapping value to obtain the corrected grayscale value, it is specifically used for: The scaling factor is determined based on the first and second mapping values retrieved from the query. Input data is obtained through the first mapping relationship and the grayscale value to be corrected; The second mapping value is corrected based on the first mapping value, the input data, and the scaling factor to obtain a corrected mapping value; The corrected grayscale value is obtained by interpolating the corrected mapping value.
5. The apparatus according to claim 1, characterized in that, If the target frequency range of the indicated refresh frequency is greater than or equal to the first refresh frequency and less than or equal to the second refresh frequency; The color correction module also includes a dense sampling correction module, used for: Based on the first mapping relationship and the second mapping relationship, color correction is performed on the video stream data to obtain corrected video stream data.
6. The apparatus according to claim 5, characterized in that, When the dense sampling correction module performs color correction on the video stream data based on the first mapping relationship and the second mapping relationship to obtain the corrected video stream data, it is specifically used for: For each image channel, determine the grayscale value to be corrected corresponding to the video stream data; The grayscale value to be corrected is corrected by the first mapping relationship and the second mapping relationship respectively, to obtain the corresponding first corrected grayscale and second corrected grayscale; The target fusion parameters are determined based on the indicated refresh frequency, and the first corrected grayscale and the second corrected grayscale are fused using the target fusion parameters to obtain the corrected grayscale value; Based on the corrected grayscale values of each image channel, the corrected video stream data is obtained.
7. The apparatus according to claim 6, characterized in that, When the dense sampling correction module determines the target fusion parameters based on the indicated refresh frequency, and fuses the first corrected grayscale and the second corrected grayscale using the target fusion parameters to obtain the corrected grayscale value, it is specifically used for: Based on the first mapping relationship and the second mapping relationship, gain mapping relationships corresponding to different refresh frequencies within the range of the first refresh frequency to the second refresh frequency are determined; wherein, the mapping value corresponding to the gain mapping relationship is obtained by fusing the mapping value corresponding to the first mapping relationship and the mapping value corresponding to the second mapping relationship through a fusion parameter; different refresh frequencies correspond to different fusion parameters; Determine the target fusion parameters corresponding to the indicated refresh frequency; Based on the gain mapping relationship and the target fusion parameters, the first corrected gray level and the second corrected gray level are fused to obtain the corrected gray level value.
8. The apparatus according to claim 1, characterized in that, If the target frequency range in which the indicated refresh frequency is located is greater than the second refresh frequency and less than or equal to the maximum refresh frequency; The color correction module further includes a second sparse correction module, used for: Based on the second mapping relationship, the fourth mapping relationship, and the second grayscale value of the second preset number of grayscale levels at the fourth refresh frequency, the video stream data is color corrected to obtain the corrected video stream data.
9. A color correction method, characterized in that, include: Receive video stream data containing the colors to be corrected, and receive an indication of refresh rate; Determine the target frequency range in which the indicated refresh frequency is located, and determine the correction mode corresponding to the target frequency range; Based on the correction mode, the video stream data is color corrected to obtain corrected video stream data, which is then displayed. The correction modes correspond to different color mapping relationships; these color mapping relationships are obtained in the following ways: Determine the refresh rate range supported by the display device; At least two target refresh frequencies are determined within the refresh frequency range; By sampling at the at least two target refresh rates using a color measurement device, color mapping relationships for the at least two target refresh rates are obtained. The refresh frequency range includes a minimum refresh frequency and a maximum refresh frequency; the at least two target refresh frequencies include a first refresh frequency, a second refresh frequency, a third refresh frequency, and a fourth refresh frequency; the minimum refresh frequency, the third refresh frequency, the first refresh frequency, the second refresh frequency, the fourth refresh frequency, and the maximum refresh frequency increase sequentially. The step of sampling at the at least two target refresh rates using a color measurement device to obtain color mapping relationships for the at least two target refresh rates includes: The color measurement device samples a first preset number of gray levels at the first refresh frequency to obtain the corresponding first preset number of mapping values. Based on the gray level values of the sampled gray levels and the corresponding mapping values, a first mapping relationship is generated for the first refresh frequency. The color measurement device samples a first preset number of gray levels at the second refresh frequency to obtain the corresponding first preset number of mapping values. A second mapping relationship for the second refresh frequency is generated based on the gray level values of the sampled gray levels and the corresponding mapping values. The color measurement device samples a second preset number of gray levels at the third refresh frequency to generate a third mapping relationship for the third refresh frequency, and records the first gray level value of the second preset number of gray levels at the third refresh frequency; wherein the second preset number is less than the first preset number. The color measurement device samples the second preset number of gray levels at the fourth refresh frequency to generate a fourth mapping relationship for the fourth refresh frequency, and records the second gray level value of the second preset number of gray levels at the fourth refresh frequency.
10. A display driving device, characterized in that, include: The color correction device as described in any one of claims 1 to 8.
11. An electronic device, characterized in that, include: The display driving device as described in claim 10.
12. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method of claim 9.
Citation Information
Patent Citations
Driving method of display panel and driving device thereof and display device
CN112927658A