An image hue adjusting method, device, computing apparatus and storage medium
By acquiring image color information, determining the adjustment angle and proportion, and calculating hue values using direct and gradient adjustment methods, the problem of unnatural color transitions in existing technologies is solved, thus improving the user experience.
Patent Information
- Application Number
- CN202211611849.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-14
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2042-12-14
AI Technical Summary
Existing technologies use the same value to adjust the hue of all colors in an image during color correction, resulting in unnatural color transitions and negatively impacting the user experience.
By acquiring the color information of the image, determining the adjustment angle and adjustment ratio, and using direct adjustment and gradient adjustment methods, the hue value is calculated and each color is adjusted individually to ensure a natural color transition.
It achieves natural color transitions and improves the user experience.
Smart Images

Figure CN115984128B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to an image hue adjustment method, apparatus, computing device, and storage medium. Background Technology
[0002] Images are composed of pixels of various colors. The human eye's visual perception of an image is influenced by many factors, and hue, as one of the most important attributes of color, typically affects the comfort of viewing an image. In image post-processing, changing the hue of a particular color in an image can also create a more impactful visual experience. Therefore, when dissatisfied with the image quality, one can adjust the hue according to their needs. However, current color correction techniques often use the same value to adjust the hue of all colors in an image. This method often results in unnatural color transitions, negatively impacting the user experience. Summary of the Invention
[0003] This invention provides an image hue adjustment method, apparatus, computing device, and storage medium. The image hue adjustment method makes the adjusted color transition natural and improves the user experience.
[0004] In a first aspect, embodiments of the present invention provide an image hue adjustment method, comprising:
[0005] Obtain the color information corresponding to the image to be adjusted, wherein the color information includes the hue value of each color in the image to be adjusted;
[0006] Determine the adjustment angle and adjustment ratio corresponding to the color to be adjusted;
[0007] The hue adjustment method is determined based on the hue value of the color to be adjusted and the adjustment ratio.
[0008] Based on the hue adjustment method, the adjusted hue value is calculated according to the hue value of the color to be adjusted, the adjustment angle, and the adjustment ratio.
[0009] Optionally, obtaining the color information corresponding to the image to be adjusted includes:
[0010] The image to be adjusted, which is in RGB color space, is calculated to obtain the color information of the image in HSV color space; wherein, the color information also includes saturation value and brightness value.
[0011] Optionally, determining the hue adjustment method based on the hue value of the color to be adjusted and the adjustment ratio includes:
[0012] When the adjustment ratio is not less than 50 and the hue value of the color to be adjusted is not less than 0°, the hue adjustment method is determined to be the direct adjustment method.
[0013] When the adjustment ratio is not less than 50 and the hue value of the color to be adjusted is less than 0°, the hue adjustment method is determined to be the first gradient adjustment method.
[0014] When the adjustment ratio is less than 50 and the hue value of the color to be adjusted is not greater than 0°, the hue adjustment method is determined to be the direct adjustment method.
[0015] When the adjustment ratio is less than 50 and the hue value of the color to be adjusted is greater than 0°, the hue adjustment method is determined to be the second gradient adjustment method; wherein, the value range of the adjustment ratio is (0, 100).
[0016] Optionally, the step of calculating the adjusted hue value based on the hue adjustment method, according to the hue value of the color to be adjusted, the adjustment angle, and the adjustment ratio, includes:
[0017] The adjusted hue value is obtained based on the direct adjustment method using the following formula:
[0018] Hue′=Hue+angle*(rate-50) / 50
[0019] The adjusted hue value is obtained based on the first gradient adjustment method using the following formula:
[0020]
[0021]
[0022] The adjusted hue value is obtained based on the second gradient adjustment method using the following formula:
[0023]
[0024]
[0025] Wherein, Hue' represents the adjusted hue value; Hue represents the hue value of the color to be adjusted; and angle represents the adjustment angle. Used to characterize the maximum adjustment angle when adjusted counterclockwise. Used to characterize the maximum adjustment angle when adjusted clockwise, and rate is used to characterize the adjustment ratio; Hue1 and Hue2 are both used to characterize the initial hue adjustment value.
[0026] Optionally, when the adjustment ratio is 50, the adjusted hue value is the same as the hue value of the color to be adjusted.
[0027] Optionally, in hour,
[0028] exist hour,
[0029] Optionally, after calculating the adjusted hue value, the method further includes:
[0030] The color to be adjusted is adjusted according to the hue value to obtain a target adjusted image in HSV space; wherein the saturation and brightness values of the color to be adjusted are the same in the target adjusted image and the image to be adjusted.
[0031] The target image is then converted to obtain a target image with the RGB color space.
[0032] Secondly, embodiments of the present invention also provide an image hue adjustment device, comprising:
[0033] The acquisition module is used to acquire the color information corresponding to the image to be adjusted, wherein the color information includes the hue value of each color in the image to be adjusted;
[0034] The first determining module is used to determine the adjustment angle and adjustment ratio corresponding to the color to be adjusted;
[0035] The second determining module is used to determine the hue adjustment method based on the hue value of the color to be adjusted and the adjustment ratio;
[0036] The calculation module is used to calculate the adjusted hue value based on the hue adjustment method, according to the hue value of the color to be adjusted, the adjustment angle, and the adjustment ratio.
[0037] Optionally, the acquisition module is further configured to perform the following operations:
[0038] The image to be adjusted, which is in RGB color space, is calculated to obtain the color information of the image in HSV color space; wherein, the color information also includes saturation value and brightness value.
[0039] Thirdly, embodiments of the present invention also provide a computing device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the image hue adjustment method described in any of the above claims.
[0040] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the image hue adjustment method described in any of the preceding claims.
[0041] This invention provides an image hue adjustment method, apparatus, computing device, and storage medium. The method, after determining the adjustment angle and adjustment ratio corresponding to the color to be adjusted, determines the corresponding hue adjustment method based on the obtained hue value and adjustment ratio of the color to be adjusted. Then, based on this hue adjustment method, the adjusted hue value is obtained through calculation of the hue value, adjustment angle, and adjustment ratio of the color to be adjusted, and the color to be adjusted is then adjusted. Thus, this method allows for individual adjustment of the hue of any color, ensuring that the hue wheel does not experience abrupt changes after adjustment, resulting in a natural transition between image areas and improving the user experience. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This is a flowchart of an image hue adjustment method provided in an embodiment of the present invention;
[0044] Figure 2 This is a hue map of an image to be adjusted provided in one embodiment of the present invention;
[0045] Figure 3 This is a hardware architecture diagram of a computing device provided in an embodiment of the present invention;
[0046] Figure 4 This is a structural diagram of an image hue adjustment device provided in an embodiment of the present invention. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0048] As mentioned earlier, using the same adjustment value to adjust the hue of all colors as a whole limits the hue adjustment effect significantly, failing to meet user needs. For example, if a viewer wants to deepen the blue of the sky, adjusting the hue might cause all other colors to change, resulting in an image that deviates significantly from reality. While monitors can adjust the hue of individual colors, the range of adjustable colors is limited, and adjustments may cause abrupt changes in the hue wheel and unnatural color transitions, all of which can lead to a poor visual experience. Therefore, this invention proposes an image hue adjustment method that allows for individual adjustment of any color's hue while ensuring that the adjusted hue wheel does not experience abrupt changes and that the adjusted image area transitions naturally.
[0049] The following describes the specific implementation of the above concept.
[0050] Please refer to Figure 1 This invention provides an image hue adjustment method, which includes:
[0051] Step 100: Obtain the color information corresponding to the image to be adjusted, wherein the color information includes the hue value of each color in the image to be adjusted;
[0052] Step 102: Determine the adjustment angle and adjustment ratio corresponding to the color to be adjusted;
[0053] Step 104: Determine the hue adjustment method based on the hue value and adjustment ratio of the color to be adjusted;
[0054] Step 106: Based on the hue adjustment method, calculate the adjusted hue value according to the hue value of the color to be adjusted, the adjustment angle, and the adjustment ratio.
[0055] In this embodiment of the invention, after determining the adjustment angle and adjustment ratio corresponding to the color to be adjusted, and based on the obtained hue value and adjustment ratio of the color to be adjusted, the corresponding hue adjustment method can be determined. Then, based on the hue adjustment method, the adjusted hue value can be obtained by calculating the hue value, adjustment angle, and adjustment ratio of the color to be adjusted, and the color to be adjusted can be adjusted. In this way, the hue of any color can be adjusted individually, and it is ensured that the hue wheel of the adjusted color will not have abrupt changes, and the transition of the adjusted image area is natural, thereby improving the user experience.
[0056] The following description Figure 1 The execution method for each step is shown.
[0057] First, for step 100, obtain the color information corresponding to the image to be adjusted, including:
[0058] The color information of the image to be adjusted in the HSV space is obtained by calculating the color information of the image in the RGB color space; the color information also includes saturation value and brightness value.
[0059] In this invention, the images to be adjusted are all RGB images. By parsing the RGB images, their color information in the HSV space is obtained. The color information includes the hue value, saturation value, brightness value or lightness value of each color.
[0060] Next, for step 102, the adjustment angle and adjustment ratio corresponding to the color to be adjusted are determined according to the user's actual adjustment needs.
[0061] It should be noted that the range of adjustable angle is (0°, 360°), including but not limited to 30°, 45°, 60°, 90°, 120°, 240°, etc.; the range of adjustable ratio is (0, 100], and the unit of adjustable ratio is %.
[0062] Specifically, for example, the image to be adjusted includes six colors, corresponding to red, green, blue, cyan, magenta, and yellow, and its hue diagram is as follows: Figure 2 As shown. If the color to be adjusted is red, its corresponding hue value is 0°, and the maximum range of the corresponding hue interval is 300° to 60°. Therefore, the preferred adjustment angle is 0° to 60°. When the adjustment angle is 60°, the maximum adjustment from 0° to 300° is when adjusting counterclockwise, and the maximum adjustment from 0° to 60° is when adjusting clockwise. Within this hue interval, adjusting the hue will not result in a sudden change in color from red to red.
[0063] Regarding step 104, based on the hue value and adjustment ratio of the color to be adjusted, determine the hue adjustment method, including:
[0064] When the adjustment ratio is not less than 50 and the hue value of the color to be adjusted is not less than 0°, the hue adjustment method is determined to be the direct adjustment method.
[0065] When the adjustment ratio is not less than 50 and the hue value of the color to be adjusted is less than 0°, the hue adjustment method is determined to be the first gradient adjustment method.
[0066] When the adjustment ratio is less than 50 and the hue value of the color to be adjusted is not greater than 0°, the hue adjustment method is determined to be the direct adjustment method.
[0067] When the adjustment ratio is less than 50 and the hue value of the color to be adjusted is greater than 0°, the hue adjustment method is determined to be the second gradient adjustment method; where the adjustment ratio range is (0, 100).
[0068] In this invention, different hue adjustment methods are applied to pixels with different adjustment ratios and hue values greater than or equal to 0°. This is mainly because in actual images, the same color block (area of similar colors) is composed of similar colors. Therefore, when the image hue is adjusted clockwise and the hue value is not less than 0°, a direct adjustment method is used, and the color will not change abruptly, nor will it appear monotonous within the hue circle included by the adjustment angle. However, if a direct adjustment method is still used when the hue value is less than 0°, the color blocks before and after adjustment will not be composed of similar colors, resulting in a poor visual experience. Therefore, a gradient adjustment method is required. Similarly, different hue adjustment methods are also required for counterclockwise adjustment.
[0069] In this invention, direct adjustment and gradual adjustment methods are used to adjust different hues within the same range. The image after adjusting any color range will not change drastically within the hue adjustment angle.
[0070] Regarding step 106, based on the hue adjustment method, the adjusted hue value is calculated according to the hue value of the color to be adjusted, the adjustment angle, and the adjustment ratio, including:
[0071] The adjusted hue value is obtained using the following formula based on the direct adjustment method:
[0072] Hue′=Hue+angle*(rate-50) / 50
[0073] The adjusted hue value is obtained based on the first gradient adjustment method using the following formula:
[0074]
[0075]
[0076] The adjusted hue value is obtained based on the second gradient adjustment method using the following formula:
[0077]
[0078]
[0079] Here, Hue' represents the hue value to be adjusted; Hue represents the hue value of the color to be adjusted; and angle represents the adjustment angle. Used to characterize the maximum adjustment angle when adjusted counterclockwise. Used to characterize the maximum adjustment angle when adjusted clockwise, and rate is used to characterize the adjustment ratio; Hue1 and Hue2 are both used to characterize the initial hue adjustment value.
[0080] Specifically, when the adjustment ratio is 50, no hue adjustment is required.
[0081] Specifically, in step 106, in hour,
[0082] exist hour,
[0083] Specifically, following the previous example, in Figure 2 In the example, if the color to be adjusted is red, its hue value is 0°, and the adjustment angle is 60°, then... This is the maximum adjustment angle when adjusting counterclockwise from 0°. This refers to the maximum adjustment angle when adjusting clockwise from 0°. The specific formula based on the direct adjustment method is Hue′=Hue+60°*(rate-50) / 50;
[0084] The formula based on the first gradient adjustment method is as follows:
[0085] Hue1=Hue+(Hue+360°-300°) / 60*angle*(rate-50) / 50
[0086]
[0087] The formula based on the second gradient adjustment method is as follows:
[0088] Hue2=Hue+(60-Hue) / 60*angle*(rate-50) / 50
[0089]
[0090] In this specific implementation, when the color to be adjusted is red, the adjustment angle is 60°, the adjustment ratio is not less than 50, and the hue value of the color to be adjusted is less than 0°, the first gradient adjustment method is used. Due to the added restriction, all initial hue adjustment values exceeding 60° after calculation are assigned a value of 59°. This ensures that the color will not undergo abrupt changes (i.e., it will not change from red to yellow) and will remain monotonous within the red hue circle. Similarly, when the adjustment ratio is less than 50% and the hue value of the color to be adjusted is greater than 0°, the second gradient adjustment method is used. Due to the added restriction, all initial hue adjustment values below 300° after calculation are assigned a value of 300°. This also ensures that the color will not undergo abrupt changes (i.e., it will not change from red to magenta). Thus, by adding restrictions to the gradient adjustment method, this invention ensures that the adjusted hue value remains monotonous within the hue adjustment range (i.e., within the adjustment angle).
[0091] Specifically, following the previous example, in Figure 2 In the middle, if the color to be adjusted is yellow and the adjustment angle is 30°, then If the color to be adjusted is yellow, and the adjustment angle is 120°, then The hue adjustment for any color is performed using the method described above.
[0092] Following step 106, the following is also included:
[0093] The hue value is adjusted to obtain the target adjusted image in HSV space; the saturation and brightness values of the color to be adjusted are the same in both the target adjusted image and the image to be adjusted.
[0094] The target image is adjusted and converted to obtain a target image with the RGB color space.
[0095] In this invention, after determining the adjusted hue value, the target image in HSV format is converted into a target image in RGB format using a known formula. At this time, the RGB value of the adjusted target image is in the range of 0 to 1, and the target image has only changed hue compared to the image to be adjusted, while its saturation and brightness values remain unchanged.
[0096] like Figure 3 , Figure 4 As shown, this embodiment of the invention provides an image hue adjustment device. The device embodiment can be implemented through software, hardware (e.g., FPGA or SOC), or a combination of software and hardware. From a hardware perspective, as... Figure 3 The diagram shown is a hardware architecture diagram of a computing device containing an image hue adjustment device according to an embodiment of the present invention. (Except for...) Figure 3 In addition to the processor, memory, network interface, and non-volatile memory shown, the computing device in the embodiment may also include other hardware, such as a forwarding chip responsible for processing packets. Taking software implementation as an example, such as... Figure 4 As shown, as a logical device, it is formed by the CPU of its computing device reading the corresponding computer program from the non-volatile memory into the memory for execution. This embodiment provides an image hue adjustment device, including: an acquisition module 400, a first determination module 402, a second determination module 404, and a calculation module 406;
[0097] The acquisition module 400 is used to acquire the color information corresponding to the image to be adjusted, wherein the color information includes the hue value of each color in the image to be adjusted;
[0098] The first determining module 402 is used to determine the adjustment angle and adjustment ratio corresponding to the color to be adjusted;
[0099] The second determining module 404 is used to determine the hue adjustment method based on the hue value and adjustment ratio of the color to be adjusted;
[0100] The calculation module 406 is used to calculate the adjusted hue value based on the hue adjustment method, the hue value of the color to be adjusted, the adjustment angle, and the adjustment ratio.
[0101] In some specific implementations, the acquisition module 400 can be used to perform the above step 100, the first determination module 402 can be used to perform the above step 102, the second determination module 404 can be used to perform the above step 104, and the calculation module 406 can be used to perform the above step 106.
[0102] In some specific implementations, the acquisition module 400 is also used to perform the following operations:
[0103] The color information of the image to be adjusted in the HSV space is obtained by calculating the color information of the image in the RGB color space; the color information also includes saturation value and brightness value.
[0104] In some specific implementations, the second determining module 404 is also used to perform the following operations:
[0105] When the adjustment ratio is not less than 50 and the hue value of the color to be adjusted is not less than 0°, the hue adjustment method is determined to be the direct adjustment method.
[0106] When the adjustment ratio is not less than 50 and the hue value of the color to be adjusted is less than 0°, the hue adjustment method is determined to be the first gradient adjustment method.
[0107] When the adjustment ratio is less than 50 and the hue value of the color to be adjusted is not greater than 0°, the hue adjustment method is determined to be the direct adjustment method.
[0108] When the adjustment ratio is less than 50 and the hue value of the color to be adjusted is greater than 0°, the hue adjustment method is determined to be the second gradient adjustment method; where the adjustment ratio range is (0, 100).
[0109] In some specific implementations, the calculation module 406 is also used to perform the following operations:
[0110] The adjusted hue value is obtained using the following formula based on the direct adjustment method:
[0111] Hue′=Hue+angle*(rate-50) / 50
[0112] The adjusted hue value is obtained based on the first gradient adjustment method using the following formula:
[0113]
[0114]
[0115] The adjusted hue value is obtained based on the second gradient adjustment method using the following formula:
[0116]
[0117]
[0118] Here, Hue' represents the hue value to be adjusted; Hue represents the hue value of the color to be adjusted; and angle represents the adjustment angle. Used to characterize the maximum adjustment angle when adjusted counterclockwise. Used to characterize the maximum adjustment angle when adjusted clockwise, and rate is used to characterize the adjustment ratio; Hue1 and Hue2 are both used to characterize the initial hue adjustment value.
[0119] exist hour,
[0120] exist hour,
[0121] Specifically, when the adjustment ratio is 50, the hue value is adjusted to be the same as the hue value of the color to be adjusted.
[0122] In some specific embodiments, the device further includes a conversion module for performing the following operations:
[0123] The hue value is adjusted to obtain the target adjusted image in HSV space; the saturation and brightness values of the color to be adjusted are the same in both the target adjusted image and the image to be adjusted.
[0124] The target image is adjusted and converted to obtain a target image with the RGB color space.
[0125] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on an image hue adjustment device. In other embodiments of the present invention, an image hue adjustment device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0126] The information interaction and execution process between the modules in the above-mentioned device are based on the same concept as the method embodiment of the present invention, and the specific details can be found in the description of the method embodiment of the present invention, and will not be repeated here.
[0127] This invention also provides a computing device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements an image hue adjustment method according to any embodiment of this invention.
[0128] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform an image hue adjustment method according to any embodiment of this invention.
[0129] Specifically, a system or apparatus equipped with a storage medium may be provided, on which software program code implementing the functions of any of the embodiments described above is stored, and the computer (or CPU or MPU) of the system or apparatus may read and execute the program code stored in the storage medium.
[0130] In this case, the program code read from the storage medium can itself implement the function of any of the above embodiments, and therefore the program code and the storage medium storing the program code constitute part of the present invention.
[0131] Examples of storage media used to provide program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer via a communication network.
[0132] Furthermore, it should be clear that not only can the program code read by the computer be executed, but also the operating system or other components operating on the computer can be instructed based on the program code to perform some or all of the actual operations, thereby realizing the function of any of the embodiments described above.
[0133] Furthermore, it is understood that the program code read from the storage medium is written to the memory set in the expansion board inserted into the computer or to the memory set in the expansion module connected to the computer. Then, based on the instructions of the program code, the CPU or other components installed on the expansion board or expansion module execute some and all of the actual operations, thereby realizing the function of any of the above embodiments.
[0134] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0135] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as ROM, RAM, magnetic disk, or optical disk.
[0136] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for adjusting the hue of an image, characterized in that, include: Obtain the color information corresponding to the image to be adjusted, wherein the color information includes the hue value of each color in the image to be adjusted; Determine the adjustment angle and adjustment ratio corresponding to the color to be adjusted; The hue adjustment method is determined based on the hue value of the color to be adjusted and the adjustment ratio. Based on the hue adjustment method, the adjusted hue value is calculated according to the hue value of the color to be adjusted, the adjustment angle, and the adjustment ratio; The step of determining the hue adjustment method based on the hue value of the color to be adjusted and the adjustment ratio includes: When the adjustment ratio is not less than 50 and the hue value of the color to be adjusted is not less than 0°, the hue adjustment method is determined to be the direct adjustment method. When the adjustment ratio is not less than 50 and the hue value of the color to be adjusted is less than 0°, the hue adjustment method is determined to be the first gradient adjustment method. When the adjustment ratio is less than 50 and the hue value of the color to be adjusted is not greater than 0°, the hue adjustment method is determined to be the direct adjustment method. When the adjustment ratio is less than 50 and the hue value of the color to be adjusted is greater than 0°, the hue adjustment method is determined to be the second gradient adjustment method; wherein, the value range of the adjustment ratio is (0, 100).
2. The method according to claim 1, characterized in that, The step of obtaining the color information corresponding to the image to be adjusted includes: The image to be adjusted, which is in RGB color space, is calculated to obtain the color information of the image in HSV color space; wherein, the color information also includes saturation value and brightness value.
3. The method according to claim 1, characterized in that, The step of calculating the adjusted hue value based on the hue adjustment method, according to the hue value of the color to be adjusted, the adjustment angle, and the adjustment ratio, includes: The adjusted hue value is obtained based on the direct adjustment method using the following formula: Hue' = Hue + angle * (rate - 50) / 50 The adjusted hue value is obtained based on the first gradient adjustment method using the following formula: The adjusted hue value is obtained based on the second gradient adjustment method using the following formula: Wherein, Hue' represents the adjusted hue value; Hue represents the hue value of the color to be adjusted; and angle represents the adjustment angle. Used to characterize the maximum adjustment angle when adjusted counterclockwise. Used to characterize the maximum adjustment angle when adjusted clockwise, and rate is used to characterize the adjustment ratio; Hue1 and Hue2 are both used to characterize the initial hue adjustment value.
4. The method according to claim 3, characterized in that, exist hour, exist hour, 5. The method according to claim 2, characterized in that, After the adjusted hue value is calculated, the following is also included: The color to be adjusted is adjusted according to the hue value to obtain a target adjusted image in HSV space; wherein the saturation and brightness values of the color to be adjusted are the same in the target adjusted image and the image to be adjusted. The target image is then converted to obtain a target image with the RGB color space.
6. An image hue adjustment device, characterized in that, include: The acquisition module is used to acquire the color information corresponding to the image to be adjusted, wherein the color information includes the hue value of each color in the image to be adjusted; The first determining module is used to determine the adjustment angle and adjustment ratio corresponding to the color to be adjusted; The second determining module is used to determine the hue adjustment method based on the hue value of the color to be adjusted and the adjustment ratio; The calculation module is used to calculate the adjusted hue value based on the hue adjustment method, according to the hue value of the color to be adjusted, the adjustment angle, and the adjustment ratio; The second determination module is also used to perform the following operations: When the adjustment ratio is not less than 50 and the hue value of the color to be adjusted is not less than 0°, the hue adjustment method is determined to be the direct adjustment method. When the adjustment ratio is not less than 50 and the hue value of the color to be adjusted is less than 0°, the hue adjustment method is determined to be the first gradient adjustment method. When the adjustment ratio is less than 50 and the hue value of the color to be adjusted is not greater than 0°, the hue adjustment method is determined to be the direct adjustment method. When the adjustment ratio is less than 50 and the hue value of the color to be adjusted is greater than 0°, the hue adjustment method is determined to be the second gradient adjustment method; wherein, the value range of the adjustment ratio is (0, 100).
7. The apparatus according to claim 6, characterized in that, The acquisition module is also used to perform the following operations: The image to be adjusted, which is in RGB color space, is calculated to obtain the color information of the image in HSV color space; wherein, the color information also includes saturation value and brightness value.
8. A computing device comprising a memory and a processor, wherein the memory stores a computer program, and the processor, when executing the computer program, implements the method as described in any one of claims 1-5.
9. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method of any one of claims 1-5.
Citation Information
Patent Citations
Chroma enhancing system and method
CN101505432A
Method for color conversing from monitor to printed matter and its device
JP1996032828A