Color correction method, color correction device, medium and electronic equipment
By extracting the color values of multiple chromaticities using a preset color card image and determining the color correction parameters, the problems of unnatural and poor results in the prior art are solved, and more accurate and effective color correction is achieved.
Patent Information
- Application Number
- CN202310802371.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2043-06-30
AI Technical Summary
In the prior art, the color correction method is limited by the hue, resulting in poor correction effects and unnatural.
Color correction is performed using color card images with preset hues. By extracting the color values to be corrected and the target color values of multiple chromaticities from the color card images, the color correction parameters of the device are determined, and multiple color correction paths are provided and different colors are provided. degree adjustment.
It improves the effectiveness and accuracy of color correction, avoids the problem of poor color adjustment effect in different color intervals caused by unified adjustment, and meets a variety of color correction needs and scenarios.
Smart Images

Figure CN119232901A_ABST
Abstract
Description
Background Art
[0002] In order to ensure the display effect of the image on the electronic device, it is necessary to effectively calibrate the color of the electronic device, such as color restoration processing or color enhancement processing. The prior art usually uses a specific color card (such as the X-Rite ColorChecker 24-color card) to perform color correction. However, since the color cards in the prior art are often limited by hue, the correction effect is poor and unnatural when the correction is performed based on the colors of each hue. Summary of the invention
[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 to a certain extent improving the problem of unnatural correction color and poor correction effect when performing color correction in the prior art.
[0004] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the 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 photographing a color card of a preset hue using a device to be calibrated, each color card of the preset hue comprising color cards of multiple chromas under the preset hue; extracting color values to be calibrated of the multiple chromas from the color card image; obtaining target color values of the multiple chromas; and determining color correction parameters of the device to be calibrated based on the color values to be calibrated of the multiple chromas and the target color values of the multiple chromas.
[0006] According to a second aspect of the present disclosure, a color correction device is provided, comprising: a color card image acquisition module, used to acquire a color card image obtained by photographing a color card of a preset hue using a device to be calibrated, each color card of a preset hue including color cards of multiple chromas under the preset hue; a to-be-calibrated color extraction module, used to extract to-be-calibrated color values of the multiple chromas from the color card image; a target color acquisition module, used to acquire target color values of the multiple chromas; and a correction parameter determination module, used to determine the color correction parameters of the device to be calibrated based on the to-be-calibrated color values of the multiple chromas and the target color values of the multiple chromas.
[0007] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the color correction method of the first aspect and possible implementation methods thereof are implemented.
[0008] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and 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 thereof by executing the executable instructions.
[0009] The technical solution disclosed in this disclosure has the following beneficial effects:
[0010] A color card image is obtained by photographing a color card of a preset hue using a device to be calibrated, wherein each color card of the preset hue includes color cards of multiple chromas under the preset hue; multiple color values of the chromas to be calibrated are extracted from the color card image; multiple target color values of the chromas are obtained; and color correction parameters of the device to be calibrated are determined based on the multiple color values of the chromas to be calibrated and the multiple target color values of the chromas. On the one hand, the present exemplary embodiment proposes a new color correction method, which uses a color card image including a preset hue for color correction, wherein each color card of the preset hue includes multiple color cards of chroma under the preset hue. Compared with the method in the related art that 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 multiple chroma color values to be corrected from the color card image, that is, each chroma can have a corresponding color value to be corrected, and further, the color correction parameters for color correction can be determined according to the multiple chroma color values to be corrected and the target color value. It can be seen that the present exemplary embodiment, while expanding the color correction benchmark color, takes into account the differences in color correction of colors with different chromas, and can make targeted adjustments to colors with different chromas, avoiding the problem of poor color adjustment effects in different chroma ranges caused by unified adjustment of colors with different chromas, thereby improving the effectiveness and accuracy of color correction.
[0011] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0013] Figure 1 A schematic diagram of a color card showing related art;
[0014] Figure 2A schematic diagram showing color enhancement of related art;
[0015] Figure 3 A flow chart showing a color correction method in this exemplary embodiment is shown;
[0016] Figure 4 A schematic diagram showing a color card image in this exemplary embodiment;
[0017] Figure 5 A schematic diagram showing a color chart of different chroma under hue in this exemplary embodiment;
[0018] Figure 6 A schematic diagram showing a chroma interval in this exemplary embodiment;
[0019] Figure 7 A partial schematic diagram of color distribution in this exemplary embodiment is shown;
[0020] Figure 8 A schematic diagram of color enhancement in this exemplary embodiment is shown;
[0021] Fig. 9 A flow chart showing another color correction method in this exemplary embodiment;
[0022] Fig.10 A structural block diagram of a color correction device in this exemplary embodiment is shown;
[0023] Fig.11 A structural diagram of an electronic device in this exemplary embodiment is shown. DETAILED DESCRIPTION
[0024] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0025] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0026] In another solution of the related art, the color calibration of the device to be calibrated can be performed based on a preset color card, such as Figure 1 As shown in FIG. 1 , colors of different hues can be extracted from the color distribution diagram to obtain the ColorChecker 24-color color card, and color correction processing can be performed based on each color in the color card. However, when this method is used for color correction, since only one color card color can be used as the adjustment reference each time, and the color card is often only selected in the medium chroma area, it is difficult to adjust the low chroma and high chroma areas. The low, medium, and high chroma areas are all linearly adjusted according to the adjustment degree of this color card color. If the adjustment degree is too large, such as when the chroma of blue is greatly enhanced, the low chroma area will also be greatly enhanced. In particular, colors close to gray are more sensitive to changes in chroma, which can easily lead to unnatural color correction and poor results. For example, in Figure 2 In the color enhancement schematic diagram shown, the sky blue hue is selected from the color card 210 for color enhancement, the mark 221 in the color distribution 220 represents the color to be corrected, and the mark 222 represents the target color. When correcting, since it is a strong linear enhancement, as shown in area 231 in the linear adjustment schematic diagram 230, the adjusted color will have a problem of obvious blueness in the low chroma area.
[0027] Combine the following Figure 3 This section describes the color correction method flow. Figure 3 The color correction method shown may include the following steps S310 to S340:
[0028] Step S310, obtaining a color card image obtained by photographing a color card of a preset hue using a device to be calibrated, wherein each color card of a preset hue includes color cards of multiple chromas under the preset hue.
[0029] Among them, the device to be calibrated can be any device with a display function that needs to be color calibrated, such as a smartphone, television, game console, tablet computer or personal computer. Hue is the primary characteristic of color and the most accurate standard for distinguishing various colors. A color card refers to a color tool used to unify color standards within a certain range. It can be a physical color card, which includes one or more pre-configured preset hues. Color correction can be performed based on the color reference 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 its form of expression. Each color card of a preset hue includes multiple color cards of a preset hue, that is, a color card of the same preset hue can include color cards of different chromas, for example Figure 4 The color card of the blue hue 410 in the color card image shown may include blue color cards of different chromas shown in area 420, thereby enriching the diversity of colors and better presenting different color representations. The preset hue may be a pre-configured specific hue, and the preset hue may be one or more. The configuration of the specific preset hue may be customized according to actual needs or scenarios, or may be selected and determined from existing hues. In addition, in the color cards of multiple chromas under each preset hue, the number and specific values of the chromas may be customized as needed. For example, 7 color cards with different chromas and a lightness value of 5 may be selected, or 6 color cards with different chromas and a lightness value of 6 may be selected, etc. In this exemplary embodiment, the selection of the color card may be implemented based on Munsell color blocks under a plurality of hues, for example Figure 5 The diagram shows examples of color blocks of two hues, hue 1 and hue 2, with the vertical direction representing lightness and the horizontal direction representing chroma. Under the same hue, there are multiple lightness values, and the same lightness value can correspond to multiple color cards of different chromas. Therefore, the lightness value can be determined according to actual needs, and multiple color cards can be selected from the lightness value, wherein the multiple color cards can be all chroma color cards under the determined lightness value, or multiple chroma color cards less than the maximum number of chromas, etc. In addition, it can also be implemented based on other methods, as long as it can cover color blocks from low to high chroma on the same preset hue, and the present disclosure does not make specific limitations on this.
[0030] In order to facilitate the calibration of the device to be calibrated using the color card and to ensure the differences in the color capture of the color card by different devices to be calibrated, the present exemplary embodiment can first use the device to be calibrated to shoot a color card of a preset hue to obtain a color card image. The color card image can include multiple presentation methods, such as color card row and column layout, or color card ring, such as Figure 4 As shown, etc.
[0031] Step S320: extracting a plurality of color values to be corrected of chroma from the color card image.
[0032] In such Figure 4 In the color card image shown, each color card of a preset hue may include multiple color cards of chroma under the preset hue, and each color card of chroma may correspond to a color value. This exemplary embodiment may use it as the color value to be corrected, that is, when the preset hue includes multiple color cards of chroma, this exemplary embodiment may select the color value corresponding to any color card from the multiple chroma color cards as the color value to be corrected, and use this as the color correction reference for correction, thereby enriching the diversity of the color values to be corrected and providing more correction paths and correction effects for color correction.
[0033] Step S330, obtaining target color values of multiple chromas.
[0034] In this exemplary embodiment, corresponding target color values can be set for different chromas, and the target color value can be a standard color value of a color card, or a customized expected effect color value, such as skin color, sky color, and the target color value can be determined according to the user's preference for colors of different saturations. For example, if the user prefers a high-saturation blue as the color of the sky, the high-saturation blue is the target color value. The target color value can be determined by pre-configuration, calculated according to a preset algorithm, determined based on historical correction experience, or adjusted according to the current actual color effect requirements, etc., and the present disclosure does not make specific limitations on this.
[0035] Step S340 , determining color correction parameters of the device to be calibrated based on the to-be-calibrated color values of the multiple chromaticities and the target color values of the multiple chromaticities.
[0036] Furthermore, a color correction parameter can be determined based on multiple color values to be corrected of chroma and multiple target color values of chroma, and then the color correction of the device to be corrected can be performed using the color correction parameter. The color correction parameter can be a color correction matrix. This exemplary embodiment can determine a color correction parameter of a device to be corrected based on multiple color values to be corrected of chroma and multiple target color values of chroma for all hues in the color card image, and then the color correction of the device to be corrected can be performed using 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 implemented according to different chroma intervals. For example, color enhancement processing can be omitted in low chroma intervals, while nonlinear color enhancement processing can be performed in medium and high chroma intervals.
[0037] In summary, in this exemplary embodiment, a color card image is obtained by photographing a color card of a preset hue using the device to be calibrated, and each color card of the preset hue includes color cards of multiple chromas under the preset hue; multiple chroma color values to be calibrated are extracted from the color card image; multiple chroma target color values are obtained; and based on the multiple chroma color values to be calibrated and the multiple chroma target color values, the color correction parameters of the device to be calibrated are determined. On the one hand, the present exemplary embodiment proposes a new color correction method, which uses a color card image including a preset hue for color correction, wherein each color card of the preset hue includes multiple color cards of chroma under the preset hue. Compared with the method in the related art that 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 multiple chroma color values to be corrected from the color card image, that is, each chroma can have a corresponding color value to be corrected, and further, the color correction parameters for color correction can be determined according to the multiple chroma color values to be corrected and the target color value. It can be seen that the present exemplary embodiment, while expanding the color correction benchmark color, takes into account the differences in color correction of colors with different chromas, and can make targeted adjustments to colors with different chromas, avoiding the problem of poor color adjustment effects in different chroma ranges caused by unified adjustment of colors with different chromas, thereby improving the effectiveness and accuracy of color correction.
[0038] In an exemplary embodiment, before the above step S310, the above color correction method may further include:
[0039] A plurality of preset chroma intervals are obtained, and at least one chroma is selected from each preset chroma interval to obtain a plurality of chromas.
[0040] Considering that this exemplary embodiment performs color correction based on color cards of different chromas under a preset hue, when the number of chromas is greater, the span is larger, and the distribution is more even, the more targeted correction effect can be presented when the color values to be corrected of each chroma are calculated. Therefore, multiple preset chroma intervals can be obtained first, and one or more chromas can be selected from each preset chroma interval to obtain multiple chromas under a preset hue. Among them, multiple preset chroma intervals can be continuous or discontinuous. When multiple preset chroma intervals are continuous, the intersection of each preset chroma interval can be zero, which ensures that different chromas can be extracted. This exemplary embodiment can configure corresponding color blocks in the chroma field from low to high, so as to facilitate precise adjustment of each chroma field.
[0041] In an exemplary embodiment, the plurality of preset chroma intervals may include a low chroma interval, a medium chroma interval, and a high chroma interval;
[0042] The selecting at least one chroma from each preset chroma range may include:
[0043] At least two chromas are selected from the low chroma range, at least three chromas are selected from the medium chroma range, and at least three chromas are selected from the high chroma range.
[0044] like Figure 6 As shown, a low chroma interval 610, a medium chroma interval 620, and a high chroma interval 630 can be determined within the full chroma interval under a preset hue. Then, multiple chromas are selected from these three chroma intervals. Each chroma interval can be evenly divided or unevenly divided.
[0045] Considering that the chroma difference in the low chroma interval is small, at least two chromas can be selected from the low chroma interval, at least three chromas can be selected from the medium chroma interval, and at least three chromas can be selected from the high chroma interval. The number of chromas selected in each chroma interval can be the same, for example, three chromas are respectively extracted from the low chroma interval, the medium chroma interval and the high chroma interval; the number of chromas selected in each chroma interval can also be different, for example, two chromas are extracted from the low chroma interval, three chromas are respectively extracted from the medium chroma interval and the high chroma interval, etc. The specific number of chromas extracted from each chroma interval can be customized according to actual needs.
[0046] In an exemplary embodiment, the above step S340 may include:
[0047] Based on the color values to be corrected and the target color values of each chroma in the low chroma range, the color values to be corrected and the target color values of each chroma in the medium chroma range, and the color values to be corrected and the target color values of each chroma in the high chroma range, the color correction parameters of the device to be corrected are determined, so as to perform linear correction in the low chroma range and nonlinear correction in the medium chroma range and the high chroma range through the color correction parameters.
[0048] Based on the color values to be corrected and the target color values of each chroma in the low chroma range, the color values to be corrected and the target color values of each chroma in the medium chroma range, and the color values to be corrected and the target color values of each chroma in the high chroma range, a color correction parameter of the device to be corrected is determined. The color correction parameter is determined based on the color values to be corrected and the target color values in each chroma range. Targeted correction can be performed on the colors of each chroma range. Specifically, linear correction can be performed in the low chroma range. The linear correction can be that the difference before and after color enhancement remains unchanged or maintains a stable linear change. For example, when color enhancement is performed, no enhancement is performed on the low chroma range. At this time, the linear coefficient can be 1, and nonlinear enhancement is performed on the medium chroma range and the high chroma range.
[0049] Figure 7 A partial schematic diagram of color distribution is shown, in which the circular marks represent the color values to be corrected, the square marks represent the target color values corresponding to the color values to be corrected, and the horizontal and vertical coordinates are a and b in the CIELab color space, which are commonly used in color processing and evaluation. Figure 7 The color values to be corrected and the target color values corresponding to different chromas can be displayed more intuitively, such as the color values to be corrected and the target color values of different chromas under the same hue are shown in area 710. Figure 8 The color enhancement schematic diagram of the multi-color saturation interval shown in FIG. 8 is a schematic diagram of color enhancement. Specifically, eight colors of different saturation 1, 2, 3, 4, 5, 6, 7, and 8 can be selected from the color card 810 of the preset hue, and the corresponding color values are used as the color values to be corrected, and the target color values corresponding to each saturation color are determined respectively, and the color correction parameters for color correction are determined. In the color enhancement schematic diagram shown in FIG. 8, the dotted line 820 represents the boundary between the low saturation interval and the medium saturation interval. The low saturation interval includes two colors 1 and 2. In the low saturation interval, it can be free of color enhancement. In the medium saturation interval and the high saturation interval, nonlinear enhancement is performed based on the correspondence between the color value to be corrected and the target color value. Based on the above method, on the one hand, the saturation area is segmented, and nonlinear enhancement is achieved for the medium and high saturation intervals, avoiding the problem of unnatural colors in the low saturation interval caused by linear enhancement. Moreover, since the low saturation interval is not enhanced, even if the medium and high saturation intervals have strong color enhancement, it will not cause its near-gray color cast and unnaturalness.
[0050] In an exemplary embodiment, after the above step S330, the above color correction method may further include:
[0051] The target color value of each chroma in the low chroma interval is adjusted to be the same as the to-be-corrected color value of each chroma in the low chroma interval.
[0052] Considering that the low chroma interval is nearly gray and its color difference is low, no correction is required in the low chroma interval, and the target color value of each chroma in the low chroma interval is adjusted to be the same as the color value to be corrected in the low chroma interval, that is, the target color value of the color card can be set to the input color value to be corrected. In the medium and high chroma interval, the target color value of the color card is set to have a nonlinear enhancement relationship with the input color value to be corrected.
[0053] In an exemplary embodiment, not performing S340 may include:
[0054] Based on the mapping relationship between the color value to be corrected and the target color value of each chroma, a color correction matrix of the device to be corrected is determined; the color correction matrix is an M*N matrix, and M and N are both positive integers not less than 3.
[0055] This exemplary embodiment can calculate a color correction matrix according to the target color value corresponding to each input color value to be corrected of each chroma, and the color correction matrix can be an M*N matrix, where M and N are both positive integers not less than 3, for example, it can be a 3*9 matrix. The color correction processing of the device to be corrected can be implemented through the color correction matrix to obtain the corrected RGB (Red Green Blue) color value.
[0056] In an exemplary embodiment, the above step S340 may include:
[0057] The color values to be corrected and the target color values of multiple chromaticities are converted into the LCH color space, and the color correction parameters of the device to be corrected are determined 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 control colors more intuitively, 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 in the RGB space, the RGB values are completely equal, but when the corresponding color gamuts are different, the LCH values obtained will also be different. Therefore, this 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] Fig. 9 A flowchart of another color correction method in this exemplary embodiment is shown, which may specifically include: extracting a plurality of first color values to be corrected 910 of chromaticity from a color card image; determining a first target color value 930 corresponding to each first color value to be corrected through a target color value design module 920; determining a color correction matrix 950 based on the first color value to be corrected and the first target color value through a color optimization module 940; further, applying the color correction matrix to the color correction of the device to be corrected, such as inputting a second color value to be corrected 960 of the device to be corrected into a color correction module 970, and comparing it with the color correction matrix M 3*9 Calculate and output the second target color value 980, such as the second target color value = color correction matrix M 3*9 * The second color value to be corrected.
[0060] Among them, the first color value to be corrected and the first target color value can be used as a preliminary optimization processing process for color correction processing, the purpose of which is to determine the color correction matrix, and the color correction matrix can be used in the actual device color correction scenario later. The required second target color value can be obtained based on the input second color value to be corrected and the calculation of the color correction matrix, and the color correction process is realized by adjusting the color of the device to be corrected to the second target color value.
[0061] The exemplary embodiment of the present disclosure also provides a color correction device. Fig.10 As shown, the color correction device 1000 may include: a color card image acquisition module 1010, which is used to acquire a color card image obtained by photographing a color card of a preset hue using a device to be calibrated, each color card of a preset hue includes color cards of multiple chromas under the preset hue; a color extraction module 1020 to be calibrated, which is used to extract color values of multiple chromas to be calibrated from the color card image; a target color acquisition module 1030, which is used to acquire target color values of multiple chromas; and a correction parameter determination module 1040, which is used to determine the color correction parameters of the device to be calibrated based on the color values of the multiple chromas to be calibrated and the target color values of the multiple chromas.
[0062] In an exemplary embodiment, a color correction device includes: a chroma acquisition unit, which is used to obtain multiple preset chroma intervals before obtaining a color card image obtained by photographing a color card of a preset hue using a device to be corrected, and select at least one chroma from each preset chroma interval to obtain multiple chromas.
[0063] In an exemplary embodiment, the plurality of 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, which is used to select at least two chromas from a low chroma range, at least three chromas from a medium chroma range, and at least three chromas from a high chroma range.
[0065] In an exemplary embodiment, a correction parameter determination module includes: a parameter determination unit, which is used to determine the color correction parameters of the device to be calibrated based on the color values to be corrected and the target color values of each chroma in a low chroma range, the color values to be corrected and the target color values of each chroma in a medium chroma range, and the color values to be corrected and the target color values of each chroma in a high chroma range, so as to perform linear correction in the low chroma range and nonlinear correction in the medium chroma range and the high chroma range through the color correction parameters.
[0066] In an exemplary embodiment, a color correction device includes: a color adjustment unit, configured to adjust a target color value of each chroma in a low chroma interval to be the same as a to-be-corrected color value of each chroma in the low chroma interval.
[0067] In an exemplary embodiment, a correction parameter determination module includes: a matrix determination unit, which is used to determine the color correction matrix of the device to be calibrated based on the mapping relationship between the color value to be corrected 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 exemplary embodiment, the correction parameter determination module includes: a space conversion unit, which is used to 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.
[0069] The specific details of each part of the above device have been described in detail in the implementation method part, so they will not be repeated here.
[0070] The exemplary embodiments of the present disclosure further provide a computer-readable storage medium, which can be implemented in the form of a program product, including program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification, for example, to execute Figure 3 The program product may be in the form of a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.
[0071] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory, a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0072] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0073] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0074] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0075] The exemplary embodiments of the present disclosure further provide an electronic device. The electronic device may include a processor and a memory, wherein the memory is used to store executable instructions of the processor, and the processor is configured to perform the above color correction method by executing the executable instructions.
[0076] Below Fig.11 Taking the mobile terminal 1100 in FIG. 1 as an example, the structure of the electronic device is exemplarily described. It should be understood by those skilled in the art that, in addition to the components specifically used for mobile purposes, Fig.11 The construction in can also be applied to fixed type equipment.
[0077] like Fig.11 As shown, the mobile terminal 1100 may 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] Processor 1101 may include one or more processing units, for example: processor 1101 may include AP (Application Processor), modem processor, GPU (Graphics Processing Unit), ISP (Image Signal Processor), controller, encoder, decoder, DSP (Digital Signal Processor), baseband processor and / or NPU (Neural-Network Processing Unit), etc.
[0079] The encoder can encode (i.e. compress) an image or video to reduce the data size for easy storage or transmission. The decoder can decode (i.e. decompress) the encoded data of the image or video to restore the image or video data. The mobile terminal 1100 can support one or more encoders and decoders, for example: image formats such as JPEG (Joint Photographic Experts Group), PNG (Portable Network Graphics), BMP (Bitmap), and video formats such as MPEG (Moving Picture Experts Group) 1, MPEG10, H.1063, H.1064, and HEVC (High Efficiency Video Coding).
[0080] The processor 1101 may be connected to the memory 1102 or other components via a bus 1103 .
[0081] The memory 1102 may be used to store computer executable program codes, which may include 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 may also store application data, such as images, videos, and other files.
[0082] The communication function of the mobile terminal 1100 can be implemented by the mobile communication module 1104, antenna 1, wireless communication module 1105, antenna 2, modulation and demodulation processor and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The mobile communication module 1104 can provide 3G, 4G, 5G and other mobile communication solutions applied to the mobile terminal 1100. The wireless communication module 1105 can provide wireless communication solutions such as wireless LAN, Bluetooth, near field communication, etc. applied to the mobile terminal 1100.
[0083] The display screen 1106 is used to implement display functions, such as displaying user interfaces, images, videos, etc. The camera module 1107 is used to implement shooting functions, such as shooting images, videos, etc. The audio module 1108 is used to implement audio functions, such as playing audio, collecting voice, etc. The power module 1109 is used to implement power management functions, such as charging the battery, powering the device, monitoring the battery status, etc. The sensor module 1110 may include one or more sensors for implementing corresponding sensing detection functions. For example, the sensor module 1110 may include an inertial sensor, which is used to detect the motion posture of the mobile terminal 1100 and output inertial sensing data.
[0084] It will be appreciated by those skilled in the art that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or implementations combining hardware and software aspects, which may be collectively referred to herein as "circuit", "module" or "system". Those skilled in the art will readily think of other implementations of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptive changes of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and implementation are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0085] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A color correction method, characterized in that: include: Acquire a color card image obtained by photographing a color card of a preset hue using the device to be calibrated, wherein each color card of the preset hue includes color cards of multiple chromas under the preset hue; Extracting the color values to be corrected of the plurality of chromas from the color card image; Obtaining target color values of the multiple chromas; Based on the to-be-corrected color values of the plurality of chromas and the target color values of the plurality of chromas, a color correction parameter of the to-be-corrected device is determined.
2. The method according to claim 1, characterized in that Before obtaining a color card image obtained by photographing a color card of a preset hue using the device to be calibrated, the method further includes: A plurality of preset chroma intervals are obtained, and at least one chroma is selected from each preset chroma interval to obtain the plurality of chromas.
3. The method according to claim 2, characterized in that The plurality of preset chroma intervals include a low chroma interval, a medium chroma interval, and a high chroma interval; The selecting at least one chroma from each preset chroma interval comprises: At least two chromas are selected from the low chroma range, at least three chromas are selected from the medium chroma range, and at least three chromas are selected from the high chroma range.
4. The method according to claim 3, characterized in that: The step of determining the color correction parameters of the device to be corrected based on the multiple chromaticity color values to be corrected and the multiple chromaticity target color values comprises: Based on the color values to be corrected and the target color values of each chroma in the low chroma range, the color values to be corrected and the target color values of each chroma in the medium chroma range, and the color values to be corrected and the target color values of each chroma in the high chroma range, the color correction parameters of the device to be corrected are determined, so as to perform linear correction in the low chroma range and nonlinear correction in the medium chroma range and the high chroma range through the color correction parameters.
5. The method according to claim 3, characterized in that: After obtaining the target color values of the plurality of chromas, the method further includes: The target color value of each chroma in the low chroma interval is adjusted to be the same as the to-be-corrected color value of each chroma in the low chroma interval.
6. The method according to claim 1, characterized in that The step of determining the color correction parameters of the device to be corrected based on the multiple chromaticity color values to be corrected and the multiple chromaticity target color values comprises: Based on the mapping relationship between the color value to be corrected and the target color value of each chromaticity, a color correction matrix of the device to be corrected is determined; the color correction matrix is an M*N matrix, and M and N are both positive integers not less than 3.
7. The method according to claim 1, characterized in that The step of determining the color correction parameters of the device to be corrected based on the multiple chromaticity color values to be corrected and the multiple chromaticity target color values comprises: The color values to be corrected and the target color values of the multiple chromaticities are converted into an LCH color space, and the color correction parameters of the device to be corrected are determined based on the color values to be corrected and the target color values in the LCH color space.
8. A color correction device, characterized in that: include: A color card image acquisition module, used to acquire a color card image obtained by photographing a color card of a preset hue using the device to be calibrated, wherein each color card of a preset hue includes color cards of multiple chromas under the preset hue; A color extraction module to be corrected, used for extracting the color values to be corrected of the plurality of chromas from the color card image; A target color acquisition module, used to acquire target color values of the multiple chromas; The correction parameter determination module is used to determine the color correction parameters of the device to be calibrated based on the to-be-calibrated color values of the multiple chromaticities and the target color values of the multiple chromaticities.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device, characterized in that: include: processor; A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 7 by executing the executable instructions.
Citation Information
Patent Citations
Colour calibration method for an image capture device
CN103503027A
Color correction method based on color card
CN113923429A
Image processing method, image processing program and image processor
JP2005176028A
Image processor, and method thereof
JP2006031375A
Method for correcting high dynamic range synthetic images
TW201121336A