Color correction method, color correction device, medium, and electronic device
By using multiple chroma color cards under a preset hue to obtain and process color values of multiple chroma values, and determining targeted correction parameters, the problem of unnatural color correction in existing technologies is solved, and a more efficient color correction effect is achieved.
Patent Information
- Application Number
- CN202310802371.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-06-30
AI Technical Summary
In existing technologies, color correction based on a single hue color chart results in poor and unnatural correction effects, especially in low-saturation and high-saturation areas where effective adjustment is difficult to achieve.
Color correction is performed using multiple chroma color cards under a preset hue. By acquiring the color values to be corrected and the target color values of multiple chroma values in the color card image, the color correction parameters are determined, and targeted adjustments are made for different chroma ranges, including linear correction in the low chroma range and non-linear correction in the medium and high chroma range.
It improves the effectiveness and accuracy of color correction, avoids poor color adjustment effects in different chroma ranges, and achieves a more natural color correction effect.
Smart Images

Figure CN119232901B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, and particularly relates to a color correction method, a color correction device, a computer readable storage medium and an electronic device. BACKGROUND
[0002] In order to ensure the display effect of images on the electronic device, the color of the electronic device needs to be effectively corrected, such as color restoration processing or color enhancement processing. The prior art usually corrects the color by means of a specific color card (such as ColorChecker 24 color card of X-Rite). However, since the color card in the prior art is often limited by hue, the correction effect is poor and unnatural when each hue color is corrected. SUMMARY
[0003] The present disclosure provides a color correction method, a color correction device, a computer readable storage medium and an electronic device, thereby at least partly solving the problem of unnatural correction color and poor correction effect when the prior art corrects the color.
[0004] Other characteristics and advantages of the present disclosure will become apparent from the following detailed description, or will be learned by practice of the present disclosure.
[0005] According to a first aspect of the present disclosure, a color correction method is provided, comprising: obtaining a color card image obtained by shooting a color card of a preset hue by a to-be-corrected device, each color card of a preset hue comprising a plurality of chroma color cards under the preset hue; extracting a to-be-corrected color value of the plurality of chroma from the color card image; obtaining a target color value of the plurality of chroma; and determining a color correction parameter of the to-be-corrected device based on the to-be-corrected color value of the plurality of chroma and the target color value of the plurality of chroma.
[0006] According to a second aspect of the present disclosure, a color correction device is provided, comprising: a color card image acquisition module configured to obtain a color card image obtained by shooting a color card of a preset hue by a to-be-corrected device, each color card of a preset hue comprising a plurality of chroma color cards under the preset hue; a to-be-corrected color extraction module configured to extract a to-be-corrected color value of the plurality of chroma from the color card image; a target color acquisition module configured to obtain a target color value of the plurality of chroma; and a correction parameter determination module configured to determine a color correction parameter of the to-be-corrected device based on the to-be-corrected color value of the plurality of chroma and the target color value of the plurality of chroma.
[0007] According to a third aspect of the present disclosure, a computer readable storage medium having a computer program stored thereon is provided, the computer program being executed by a processor to implement the color correction method of the first aspect and possible implementation manners thereof.
[0008] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing executable instructions of the processor. Wherein the processor is configured to execute the color correction method of the first aspect and possible implementation manners thereof by executing the executable instructions.
[0009] The technical solution of the present disclosure has the following beneficial effects:
[0010] The color card images obtained by shooting the color cards of preset hues by the to-be-corrected device are acquired, and each color card of a preset hue includes color cards of multiple chromas under the preset hue; the to-be-corrected color values of the multiple chromas are extracted from the color card images; the target color values of the multiple chromas are acquired; and the color correction parameters of the to-be-corrected device are determined based on the to-be-corrected color values of the multiple chromas and the target color values of the multiple chromas. On the one hand, the present exemplary embodiment proposes a new color correction method, which adopts color card images including preset hues for color correction, wherein each color card of a preset hue includes color cards of multiple chromas under the preset hue. Compared with the method in the related art which can only select one hue for color correction, the present exemplary embodiment enriches the color correction benchmark, provides multiple color correction paths and possibilities, and can obtain more color correction effects to meet different color correction needs or scenarios. On the other hand, the present exemplary embodiment can extract to-be-corrected color values of multiple chromas from the color card images, that is, each chroma can have a corresponding to-be-corrected color value. Further, the color correction parameters for color correction can be determined according to the to-be-corrected color values of the multiple chromas and the target color values. It can be seen that, while expanding the color correction benchmark color, the present exemplary embodiment considers the differences in color correction of different chroma colors, can make targeted adjustments for different chroma colors, avoids the problem that uniform adjustment of different chroma colors leads to poor color adjustment effect in different chroma intervals, and improves the effectiveness and accuracy of color correction.
[0011] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0012] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative labor based on these drawings.
[0013] Figure 1 A color card schematic diagram of the related art is shown;
[0014] Figure 2 A color enhancement diagram showing related art;
[0015] Figure 3 A flowchart showing a color correction method in the present exemplary embodiment;
[0016] Figure 4 A diagram showing a color chart image in the present exemplary embodiment;
[0017] Figure 5 A diagram showing different chroma color charts in the present exemplary embodiment;
[0018] Figure 6 A diagram showing a chroma interval in the present exemplary embodiment;
[0019] Figure 7 A partial diagram showing a color distribution in the present exemplary embodiment;
[0020] Figure 8 A color enhancement diagram in the present exemplary embodiment;
[0021] Figure 9 A flowchart showing another color correction method in the present exemplary embodiment;
[0022] Figure 10 A block diagram showing a color correction apparatus in the present exemplary embodiment;
[0023] Figure 11 A block diagram showing an electronic device in the present exemplary embodiment. DETAILED DESCRIPTION
[0024] Example embodiments now will be described more fully hereinafter with reference to the accompanying drawings; however, the example embodiments can be implemented in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the example embodiments to those skilled in the art. Like reference numerals refer to like elements throughout. The terminology used in the description presented herein is not intended to be interpreted in any specific and / or particular manner. Embodiments of the present disclosure are not limited to the examples described herein; rather, examples are provided for illustrative purposes.
[0025] In addition, the accompanying drawings are merely schematic and are not necessarily drawn to scale. Like reference numerals designate like or similar parts throughout the several views, and the detailed description is directed to what is more specifically shown. Some of the blocks in the drawings can be functional building blocks, and can not necessarily correspond to a physical or logical entity. These functional building blocks can be implemented in software, or in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0026] In another solution of the related art, color correction can be performed on a device to be corrected based on a preset color card, such as Figure 1 As shown in the color distribution diagram, different hues of colors can be extracted from the color distribution diagram to obtain a ColorChecker 24-color color card, and color correction processing can be performed based on each color in the color card. However, when color correction is performed in this way, since each time only one color card color is used as an adjustment reference, and the color card is often selected only in the medium chroma field, it is difficult to adjust the low chroma and high chroma fields, and the low, medium, and high chroma fields are all adjusted linearly according to the adjustment degree of this one color card color. If the adjustment degree is too large, such as a large chroma enhancement for blue, the low chroma field will also be greatly enhanced, especially for colors close to gray, which are more sensitive to chroma changes, and are prone to cause unnatural corrected colors and poor results. For example, in the color enhancement diagram shown in Figure 2 As shown in the color enhancement diagram, the sky blue hue is selected from the color card 210 for color enhancement, and the identification 221 in the color distribution 220 represents the color to be corrected, and the identification 222 represents the target color. When the correction is performed, since it is a strong linear enhancement, as shown in the region 231 in the linear adjustment diagram 230, the adjusted color will have a problem of obvious blue adjustment in the low chroma region.
[0027] The color correction method will be described below. Figure 3 The flow of the color correction method will be described. Referring to Figure 3 The color correction method shown in can include the following steps S310 to S340:
[0028] In step S310, a color card image obtained by photographing a color card of a preset hue using a device to be corrected is acquired, and each color card of a preset hue includes a plurality of chroma color cards under the preset hue.
[0029] The to-be-corrected device can be any device with display function that needs color correction, such as a smartphone, a television, a game console, a tablet computer, a personal computer, etc. Hue is the primary characteristic of color and the most accurate standard for distinguishing different colors. A color card is a color tool used to unify color standards within a certain range. It can be a physical color card that includes one or more preset hues. Subsequent color correction can be based on the color references in the color card. The color card can be presented in the form of a color wheel or in the form of a color arrangement. The present disclosure does not limit the form of presentation. The color card of each preset hue includes color cards of multiple saturations under the preset hue. For example, the color card under the blue hue 410 in the color card image shown in FIG. 4A includes blue color cards of different saturations shown in the area 420. In this way, different color representations can be better presented with the diversity of rich colors. Figure 4 The preset hue can be a specific hue configured in advance. The preset hue can be one or more. The specific configuration of the preset hue can be customized according to actual needs or scenarios or selected from existing hues. In addition, the number and specific values of the saturations in the color cards of each preset hue can be customized as needed. For example, seven color cards of different saturations with a lightness value of 5 can be selected, or six color cards of different saturations with a lightness value of 6 can be selected, etc. In the example embodiment, the selection of the color card can be implemented based on Munsell color blocks under multiple hues. For example, Figure 5 Hue 1 and Hue 2 are shown. The color block examples of the two hues are shown. The vertical direction represents lightness, and the horizontal direction represents saturation. Under the same hue, there are multiple lightness values. The same lightness value can correspond to multiple color cards of different saturations. Therefore, the lightness value can be determined according to actual needs, and multiple color cards can be selected from the lightness value, etc. The multiple color cards can be all saturation color cards under the determined lightness value, or multiple saturation color cards less than the maximum number of saturations, etc. In addition, other ways can also be used to implement the color card as long as they can cover color blocks from low to high saturation under the same preset hue. The present disclosure does not limit the specific implementation.
[0030] In order to facilitate the to-be-corrected device to use the color card for correction and to ensure the difference in color capture of the color card by different to-be-corrected devices, the example embodiment can first use the to-be-corrected device to capture the color card of the preset hue to obtain a color card image. The color card image can include multiple presentation modes, such as a color card row-column layout or a color card ring, as shown in Figure 4
[0031] Step S320: Extracting multiple saturation to-be-corrected color values from the color card image.
[0032] In the color card image as shown in Figure 4 In the color card image as shown in
[0033] In step S330, the target color values of the multiple saturations are obtained.
[0034] In the present example embodiment, the target color values corresponding to different saturations can be set. The target color values can be standard color values of the color cards, or custom expected effect color values, such as skin color and sky color. The target color values can be determined according to user preferences for different saturations, for example, a user prefers a high-saturation blue color as the color of the sky, and the high-saturation blue color is the target color value. The target color values can be determined by pre-configuration, calculated according to a preset algorithm, determined based on historical correction experience, or adjusted according to current actual color effect requirements, etc., which are not limited in the present disclosure.
[0035] In step S340, based on the color correction values of the multiple saturations and the target color values of the multiple saturations, the color correction parameters of the device to be corrected are determined.
[0036] Further, based on the color correction values of the multiple saturations and the target color values of the multiple saturations, a color correction parameter can be determined, and the device to be corrected can be color corrected through the color correction parameter. The color correction parameter can be a color correction matrix. The present example embodiment can determine a color correction parameter of a device to be corrected based on the color correction values of the multiple saturations and the target color values of the multiple saturations for all hues in the color card image, and color correct the device to be corrected through the color correction parameter. The color correction can include color restoration or color enhancement, etc., which can be configured according to actual needs. During correction, different correction strategies can be executed according to different saturation intervals, for example, no color enhancement processing can be performed in the low saturation interval, and nonlinear color enhancement processing can be performed in the medium and high saturation intervals, etc.
[0037] To sum up, in the example embodiment, a color card image obtained by capturing a color card of a preset hue by the to-be-corrected device is acquired, and each color card of a preset hue includes color cards of multiple chroma under the preset hue; a to-be-corrected color value of each chroma is extracted from the color card image; a target color value of each chroma is acquired; and a color correction parameter of the to-be-corrected device is determined based on the to-be-corrected color value of each chroma and the target color value of each chroma. On the one hand, the example embodiment proposes a new color correction method, which uses color card images including preset hues for color correction, and each color card of a preset hue includes color cards of multiple chroma under the preset hue. Compared with the method in the related art that can only select one hue for color correction, the example embodiment enriches the color correction benchmark, provides multiple color correction paths and possibilities, and can obtain more color correction effects to meet different color correction needs or scenarios. On the other hand, the example embodiment can extract a to-be-corrected color value of each chroma from the color card image, that is, each chroma can have a corresponding to-be-corrected color value, and the color correction parameter for color correction can be further determined according to the to-be-corrected color value of each chroma and the target color value. It can be seen that the example embodiment not only expands the color correction benchmark color, but also considers the difference in color correction of different chroma colors, can make targeted adjustments for different chroma colors, avoids the problem that uniform adjustment of different chroma colors leads to poor color adjustment effect in different chroma intervals, and improves the effectiveness and accuracy of color correction.
[0038] In an example embodiment, before step S310, the color correction method can further include:
[0039] Acquiring a plurality of preset chroma intervals, and selecting at least one chroma from each preset chroma interval to obtain a plurality of chroma.
[0040] It is considered that the example embodiment is based on different chroma color cards under a preset hue as a benchmark for color correction. When the number of chroma is larger, the span is larger, and the distribution is more uniform, the to-be-corrected color value of each chroma can better present a targeted correction effect. Therefore, a plurality of preset chroma intervals can be acquired first, and one or more chroma can be selected from each preset chroma interval to obtain a plurality of chroma under the preset hue. The plurality of preset chroma intervals can be continuous or discontinuous. When the plurality of preset chroma intervals are continuous, the intersection of each preset chroma interval can be zero, that is, different chroma can be extracted. The example embodiment can configure corresponding color blocks from low to high chroma fields to facilitate accurate adjustment of each chroma field.
[0041] In an example embodiment, the plurality of preset chroma intervals can include a low chroma interval, a medium chroma interval, and a high chroma interval.
[0042] The above selection of at least one chroma from each preset chroma range may include:
[0043] Select at least two chroma values from the low chroma range, at least three chroma values from the medium chroma range, and at least three chroma values from the high chroma range.
[0044] like Figure 6 As shown, within the full chroma range of a preset hue, a low chroma range (610), a medium chroma range (620), and a high chroma range (630) can be defined. Then, multiple chroma values can be selected from these three chroma ranges. Each chroma range can be divided equally or non-equally.
[0045] Considering the small chroma difference within the low chroma range, at least two chroma values can be selected from the low chroma range, at least three from the medium chroma range, and at least three from the high chroma range. The number of chroma values selected in each chroma range can be the same, for example, three chroma values can be extracted from the low, medium, and high chroma ranges respectively. Alternatively, the number of chroma values selected in each chroma range can be different, for example, two chroma values can be extracted from the low chroma range, and three chroma values can be extracted from the medium and high chroma ranges respectively. The specific number of chroma values extracted from each chroma range can be customized according to actual needs.
[0046] In an exemplary embodiment, step S340 may include:
[0047] Based on the color values to be corrected and target color values for each chroma in the low chroma range, the color values to be corrected and target color values for each chroma in the medium chroma range, and the color values to be corrected and target color values for each chroma in the high chroma range, the color correction parameters of the device to be corrected are determined so that linear correction can be performed in the low chroma range and nonlinear correction can be performed in the medium and high chroma ranges.
[0048] Based on the color values to be corrected and target color values for each chroma in the low chroma range, the medium chroma range, and the high chroma range, a color correction parameter for the device to be corrected is determined. This color correction parameter is determined based on the color values to be corrected and target color values in each chroma range, allowing for targeted correction of colors in each chroma range. Specifically, linear correction can be performed in the low chroma range, where the difference between the color before and after enhancement remains unchanged or maintains a stable linear change. For example, when performing color enhancement, no enhancement is applied to the low chroma range, in which case the linear coefficient can be 1. Non-linear enhancement is then performed on the medium and high chroma ranges.
[0049] Figure 7 A color distribution local diagram is shown, in which the circular marks represent the respective to-be-corrected color values, the square marks represent the target color values corresponding to the to-be-corrected color values, and the horizontal and vertical coordinates are a and b in the CIELab color space, which is commonly used in color processing and evaluation, Figure 7 The to-be-corrected color values and the target color values of the colors corresponding to different chroma can be intuitively displayed, such as the to-be-corrected color values and the target color values of different chroma under the same hue shown in region 710. Further, the color enhancement diagram of the multi-chroma interval shown in FIG. 8 can be determined as Figure 8 The color enhancement diagram of the multi-chroma interval is shown in FIG. 8. Specifically, eight colors of different chroma 1, 2, 3, 4, 5, 6, 7, and 8 can be selected from the color card 810 of a preset hue, the color values of the colors are taken as the to-be-corrected color values, the target color values corresponding to the colors of each chroma are determined, and the color correction parameters for color correction are determined. In the color enhancement diagram shown in FIG. 8, the dashed line 820 represents the boundary between the low-chroma interval and the medium-chroma interval. The low-chroma interval includes two colors 1 and 2. In the low-chroma interval, no color enhancement processing is performed. In the medium-chroma interval and the high-chroma interval, based on the corresponding relationship between the to-be-corrected color values and the target color values, nonlinear enhancement processing is performed. Based on the above manner, on the one hand, the chroma region is processed in segments, and nonlinear enhancement is implemented for the medium-chroma interval and the high-chroma interval, thereby avoiding the unnatural problem of low-chroma interval color caused by linear enhancement. Moreover, since the low-chroma interval is not enhanced, even if there is strong color enhancement in the medium-chroma interval and the high-chroma interval, the near-gray color will not be deviated and will not be unnatural.
[0050] In an example embodiment, after the step S330, the color correction method can further include:
[0051] The target color values of each chroma in the low-chroma interval are adjusted to be the same as the to-be-corrected color values of each chroma in the low-chroma interval.
[0052] It is considered that the low-chroma interval behaves as a near-gray color, and the color difference changes are low. Therefore, in the low-chroma interval, no correction processing is performed, and the target color values of each chroma in the low-chroma interval are adjusted to be the same as the to-be-corrected color values of each chroma in the low-chroma interval, that is, the target color values of the color card can be set as the input to-be-corrected color values. In the medium-chroma interval and the high-chroma interval, the target color values of the color card are set to be in a nonlinear enhancement relationship with the input to-be-corrected color values.
[0053] In an example embodiment, the step S340 can include:
[0054] Based on the mapping relationship between the to-be-corrected color values and the target color values of each chroma, a color correction matrix of the to-be-corrected device is determined. The color correction matrix is an M*N matrix, and M and N are both positive integers not less than 3.
[0055] The present exemplary embodiment can calculate a color correction matrix according to the target color value corresponding to each chroma of the input color value to be corrected, which can be a matrix of M*N, where M and N are positive integers not less than 3, for example, which can be a matrix of 3*9. Through the color correction matrix, the color correction process of the device to be corrected can be realized, and the corrected RGB (Red Green Blue) color value can be obtained.
[0056] In an exemplary embodiment, the above step S340 can include:
[0057] Converting the color values to be corrected and the target color values of multiple chromas into the LCH color space, and determining the color correction parameters of the device to be corrected based on the color values to be corrected and the target color values in the LCH color space.
[0058] In actual color correction applications, in order to better process image colors and more intuitively control colors, color space conversion can be performed. Considering that in the LCH color space, the differences or effects of different brightness, saturation or chroma can be better presented, even if the RGB values are completely equal in the RGB space, but the corresponding color gamut is different, the obtained LCH values will also be different. Therefore, the present exemplary embodiment can first convert the color values to be corrected and the target color values of multiple chromas into the LCH color space, and determine the color correction parameters of the device to be corrected based on the color values to be corrected and the target color values in the LCH color space.
[0059] Figure 9 A flowchart of another color correction method in the present exemplary embodiment is shown, which can specifically include: extracting first color values to be corrected of multiple chromas from a color card image 910; determining first target color values corresponding to the first color values to be corrected through a target color value design module 920 930; determining a color correction matrix based on the first color values to be corrected and the first target color values through a color optimization module 940 950; further, applying the color correction matrix to the color correction of the device to be corrected, such as inputting second color values to be corrected of the device to be corrected into a color correction module 970, and the color correction matrix M 3*9 is calculated, and the second target color value 980 is output, such as second target color value = color correction matrix M 3*9 * second color value to be corrected.
[0060] The first to-be-corrected color value and the first target color value can be used as a preliminary optimization process of the color correction process, and the purpose is to determine a color correction matrix, which can be used in a later actual device color correction scenario. According to the calculation of the second to-be-corrected color value and the color correction matrix, the second target color value is obtained, and the color correction process is realized by adjusting the color of the to-be-corrected device to the second target color value.
[0061] The exemplary embodiments of the present disclosure also provide a color correction device. As shown in the figure, the color correction device 1000 can include a color card image acquisition module 1010 configured to acquire color card images obtained by photographing color cards of preset hues by a to-be-corrected device, each color card of a preset hue including color cards of multiple chroma at the preset hue; a to-be-corrected color extraction module 1020 configured to extract to-be-corrected color values of the multiple chroma from the color card images; a target color acquisition module 1030 configured to acquire target color values of the multiple chroma; and a correction parameter determination module 1040 configured to determine color correction parameters of the to-be-corrected device based on the to-be-corrected color values of the multiple chroma and the target color values of the multiple chroma. Figure 10 The exemplary embodiments of the present disclosure also provide a color correction device. As shown in the figure, the color correction device 1000 can include a color card image acquisition module 1010 configured to acquire color card images obtained by photographing color cards of preset hues by a to-be-corrected device, each color card of a preset hue including color cards of multiple chroma at the preset hue; a to-be-corrected color extraction module 1020 configured to extract to-be-corrected color values of the multiple chroma from the color card images; a target color acquisition module 1030 configured to acquire target color values of the multiple chroma; and a correction parameter determination module 1040 configured to determine color correction parameters of the to-be-corrected device based on the to-be-corrected color values of the multiple chroma and the target color values of the multiple chroma.
[0062] In an exemplary embodiment, the color correction device includes a chroma acquisition unit configured to acquire multiple preset chroma intervals before acquiring color card images obtained by photographing color cards of preset hues by a to-be-corrected device, and select at least one chroma from each preset chroma interval to obtain multiple chroma.
[0063] In an exemplary embodiment, the multiple preset chroma intervals include a low chroma interval, a medium chroma interval, and a high chroma interval.
[0064] In an exemplary embodiment, the chroma acquisition unit includes a chroma selection subunit configured to select at least two chroma from the low chroma interval, select at least three chroma from the medium chroma interval, and select at least three chroma from the high chroma interval.
[0065] In an exemplary embodiment, the correction parameter determination module includes a parameter determination unit configured to determine color correction parameters of the to-be-corrected device based on the to-be-corrected color values and the target color values of the chroma in the low chroma interval, the to-be-corrected color values and the target color values of the chroma in the medium chroma interval, and the to-be-corrected color values and the target color values of the chroma in the high chroma interval, so as to perform linear correction in the low chroma interval and nonlinear correction in the medium chroma interval and the high chroma interval by using the color correction parameters.
[0066] In an example embodiment, the color correction device comprises: a color adjusting unit configured to adjust the target color value of each chroma in the low chroma interval to be the same as the to-be-corrected color value of each chroma in the low chroma interval.
[0067] In an example embodiment, the correction parameter determination module comprises: a matrix determination unit configured to determine a color correction matrix of the to-be-corrected device based on the mapping relationship between the to-be-corrected color value and the target color value of each chroma; the color correction matrix is an M*N matrix, and M and N are both positive integers not less than 3.
[0068] In an example embodiment, the correction parameter determination module comprises: a space conversion unit configured to convert the to-be-corrected color value and the target color value of the plurality of chromas into the LCH color space, and determine the color correction parameter of the to-be-corrected device based on the to-be-corrected color value and the target color value in the LCH color space.
[0069] The specific details of each part of the above device have been described in detail in the method part embodiment, and thus will not be repeated.
[0070] The example embodiments of the present disclosure also provide a computer readable storage medium, which can be implemented in the form of a program product, comprising program codes, when the program product is run on a terminal device, the program codes are used to make the terminal device execute the steps according to various example embodiments of the present disclosure described in the above "example method" part of the specification, for example, can execute any one or more steps in the above "example method" part of the specification. The program product can adopt a portable compact disc read-only memory (CD-ROM) and include program codes, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited to this, in this document, the readable storage medium can be any tangible medium containing or storing programs, which can be used by or in combination with an instruction execution system, device or apparatus. Figure 3
[0071] The program product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium may, for example, be but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memories, read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disc read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.
[0072] A computer readable signal medium can include a propagated data signal with computer readable program code embodied therein. The propagated data signal can take any of a variety of forms, including but not limited to radio frequency signals, light signals, infrared signals, and any suitable combination thereof. The computer readable signal medium can be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
[0073] Program code embodied on a computer readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0074] Computer program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, etc., or conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider.
[0075] An exemplary embodiment of the present disclosure also provides an electronic device. The electronic device can include a processor and a memory storing executable instructions of the processor, the processor configured to perform the above color correction method by executing the executable instructions.
[0076] The configuration of the electronic device will be described below with reference to a mobile terminal 1100 in Figure 11 It should be understood by those skilled in the art that, in addition to components specifically used for mobile purposes, Figure 11 The configuration in
[0077] As shown in Figure 11 The mobile terminal 1100 can specifically include a processor 1101, a memory 1102, a bus 1103, a mobile communication module 1104, an antenna 1, a wireless communication module 1105, an antenna 2, a display screen 1106, a camera module 1107, an audio module 1108, a power module 1109, and a sensor module 1110.
[0078] The processor 1101 can include one or more processing units, for example: the processor 1101 can include an AP (Application Processor, application processor), a modem processor, a GPU (Graphics Processing Unit, graphics processing unit), an ISP (Image Signal Processor, image signal processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor, digital signal processor), a baseband processor and / or an NPU (Neural-Network Processing Unit, neural network processor) and the like.
[0079] An encoder can encode (i.e. compress) an image or video to reduce data size for storage or transmission. A decoder can decode (i.e. decompress) encoded data of an image or video to restore the image or video data. The mobile terminal 1100 can support one or more encoders and decoders, for example: JPEG (Joint Photographic Experts Group, Joint Photographic Experts Group), PNG (Portable Network Graphics, Portable Network Graphics), BMP (Bitmap, Bitmap) and other image formats, MPEG (Moving Picture Experts Group, Moving Picture Experts Group) 1, MPEG 10, H.1063, H.1064, HEVC (High Efficiency Video Coding, High Efficiency Video Coding) and other video formats.
[0080] The processor 1101 can be connected with the memory 1102 or other components through the bus 1103.
[0081] The memory 1102 can be used to store computer executable program code, which includes instructions. The processor 1101 executes various functional applications and data processing of the mobile terminal 1100 by running the instructions stored in the memory 1102. The memory 1102 can also store application data, for example, store images, videos and other files.
[0082] The communication function of the mobile terminal 1100 can be implemented by the mobile communication module 1104, an antenna 1, a wireless communication module 1105, an antenna 2, a modem processor, and a baseband processor, etc. The antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals. The mobile communication module 1104 can provide a mobile communication solution applied on the mobile terminal 1100, such as 3G, 4G, 5G, etc. The wireless communication module 1105 can provide a wireless communication solution applied on the mobile terminal 1100, such as wireless local area network, Bluetooth, near field communication, etc.
[0083] The display screen 1106 is used to realize a display function, such as displaying a user interface, an image, a video, etc. The camera module 1107 is used to realize a shooting function, such as shooting an image, a video, etc. The audio module 1108 is used to realize an audio function, such as playing an audio, collecting a voice, etc. The power module 1109 is used to realize a power management function, such as charging a battery, supplying power for the device, monitoring a battery state, etc. The sensor module 1110 can include one or more sensors, which are used to realize a corresponding sensing detection function. For example, the sensor module 1110 can include an inertial sensor, which is used to detect a motion pose of the mobile terminal 1100 and output inertial sensing data.
[0084] Those skilled in the art can understand that each aspect of the disclosure can be implemented as a system, a method or a program product. Therefore, each aspect of the disclosure can be embodied as a whole hardware embodiment, a whole software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software aspects, which can be collectively referred to as "circuitry", "module" or "system" here. Those skilled in the art can easily derive other embodiments of the disclosure after considering the specification and practicing the invention disclosed herein. The disclosure is intended to cover any variations, uses or adaptations of the disclosure that follow the general principles of the disclosure and include common knowledge or conventional technical means in the art that are not disclosed in the disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the disclosure are indicated by the claims.
[0085] It should be understood that the disclosure is not limited to the precise structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the disclosure is only limited by the appended claims.
Claims
1. A color correction method, characterized in that, include: The image of a color card is obtained by taking a picture of a color card with a preset hue using a device to be calibrated. Each preset hue color card includes color cards with multiple chroma values under the preset hue. Extract the color values to be corrected from the multiple chroma values in the color chart image; Obtain the target color values of the multiple chroma values; Based on the color values to be corrected for the multiple chroma values and the target color values for the multiple chroma values, the color correction parameters of the device to be corrected are determined; Before acquiring the color chart image obtained by photographing the color chart with a preset hue using the device to be calibrated, the method further includes: Multiple preset chroma intervals are obtained, and at least one chroma is selected from each preset chroma interval to obtain the multiple chroma. The multiple preset chroma ranges include low chroma range, medium chroma range, and high chroma range; The step of selecting at least one chroma from each preset chroma range includes: Select at least two chroma values from the low chroma range, at least three chroma values from the medium chroma range, and at least three chroma values from the high chroma range; The process of determining the color correction parameters of the device to be corrected based on the multiple chroma values and the target color values of the multiple chroma values includes: Based on the color values to be corrected and target color values for each chroma in the low chroma range, the color values to be corrected and target color values for each chroma in the medium chroma range, and the color values to be corrected and target color values for each chroma in the high chroma range, color correction parameters for the device to be corrected are determined so that linear correction is performed in the low chroma range and nonlinear correction is performed in the medium chroma range and the high chroma range.
2. The method according to claim 1, characterized in that, After obtaining the target color values of the multiple chroma values, the method further includes: The target color value of each chroma in the low chroma range is adjusted to be the same as the color value to be corrected for each chroma in the low chroma range.
3. The method according to claim 1, characterized in that, The process of determining the color correction parameters of the device to be corrected based on the multiple chroma values and the target color values of the multiple chroma values includes: Based on the mapping relationship between the color value to be corrected and the target color value for each chroma, a color correction matrix for the device to be corrected is determined; the color correction matrix is M. N is a matrix, where M and N are both positive integers not less than 3.
4. The method according to claim 1, characterized in that, The process of determining the color correction parameters of the device to be corrected based on the multiple chroma values and the target color values of the multiple chroma values includes: The color values to be corrected and the target color values of the multiple chroma values are all converted to the LCH color space. Based on the color values to be corrected and the target color values in the LCH color space, the color correction parameters of the device to be corrected are determined.
5. A color correction device, characterized in that, include: The color card image acquisition module is used to acquire color card images obtained by taking pictures of color cards with preset hues using the device to be calibrated. Each preset hue color card includes color cards with multiple chroma values under the preset hue. The color extraction module is used to extract the color values to be corrected from the multiple chroma values in the color chart image; The target color acquisition module is used to acquire the target color values of the multiple chroma values; The calibration parameter determination module is used to determine the color calibration parameters of the device to be calibrated based on the color values to be calibrated of the plurality of chroma values and the target color values of the plurality of chroma values; Before acquiring the color chart image obtained by photographing the color chart with a preset hue using the device to be corrected, the device is further configured to: Multiple preset chroma intervals are obtained, and at least one chroma is selected from each preset chroma interval to obtain the multiple chroma. The multiple preset chroma ranges include low chroma range, medium chroma range, and high chroma range; The step of selecting at least one chroma from each preset chroma interval is configured as follows: Select at least two chroma values from the low chroma range, at least three chroma values from the medium chroma range, and at least three chroma values from the high chroma range; The color correction parameters for the device to be corrected, determined based on the multiple chroma values to be corrected and the multiple chroma values to be target color values, are configured as follows: Based on the color values to be corrected and target color values for each chroma in the low chroma range, the color values to be corrected and target color values for each chroma in the medium chroma range, and the color values to be corrected and target color values for each chroma in the high chroma range, color correction parameters for the device to be corrected are determined so that linear correction is performed in the low chroma range and nonlinear correction is performed in the medium chroma range and the high chroma range.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 4.
7. An electronic device, characterized in that, include: processor; Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1 to 4 by executing the executable instructions.
Citation Information
Patent Citations
Image processing method, image processing program and image processor
JP2005176028A
Method for correcting high dynamic range synthetic images
TW201121336A
Color correction method
TW560176B