Apparatus, method, and program product for color correction
View Patent ↗A color correction apparatus includes a correction unit to correct a color of an input pixel having a color included in a specified region of a color space, a correction range selector to select a range with a center in a grayscale to the specified region. With this color correction apparatus, a grayscale can be specified as the target color and only a part of a region in white component direction can be set as the correction range. Thus a desired range of the grayscale can be corrected.
1. A color correction apparatus comprising:
a correction unit to correct a color of an input pixel having a color included in a specified region of a color space;
a correction range selector to select a range with a center in a grayscale to the specified region,
wherein the correction range selector calculates an approximation, the approximation representing an approximation of the input pixel in the specified region to a target color; and
a correction amount processor to calculate a correction amount of the input pixel according to the calculated approximation,
wherein the color is corrected in a whole color space including the gray scale.
2. The color correction apparatus according to claim 1 , wherein the color space is a RGB color space.
3. The color correction apparatus according to claim 2 , wherein the correction range selector calculates the approximation according to a difference between a RGB value including a white component of the target color and a RGB value including a white component of the input pixel.
4. The color correction apparatus according to claim 3 , wherein the correction range selector calculates a color distance D by following formulas 1 and 2, and calculates the approximation according to the calculated color distance D,
( dR,dG,dB )=( r 0 −r,g 0 −g,b 0 −b ) Formula 1,
D =max( dR,d 0 ,dB )−min( dR,d 0 ,dB ) Formula 2, and
wherein (r 0 ,g 0 ,b 0 ) are the RGB values of the target color, (r,g,b) are the RGB values of the input pixel, and D is a color distance on a color space between the target color and the input pixel.
5. The color correction apparatus according to claim 4 , wherein the correction range selector reduces the approximation so that the approximation is reduced from inside the specified region to a boundary, the approximation being reduced to 0 at the boundary, and
the correction range selector controls a decrease trend of the approximation at least once.
6. The color correction apparatus according to claim 3 , wherein the correction range selector reduces the approximation so that the approximation is reduced from inside the specified region to a boundary, the approximation being reduced to 0 at the boundary, and
the correction range selector controls a decrease trend of the approximation at least Once.
7. The color correction apparatus according to claim 3 , wherein the correction range selector calculates a color distance D according to the RGB values of the target color and the RGB values of the input pixel to provide the color distance D on a color space between the target color and the input pixel.
8. The color correction apparatus according to claim 7 , wherein the correction range selector calculates the approximation according to the calculated color distance.
9. The color correction apparatus according to claim 2 , wherein the correction range selector reduces the approximation so that the approximation is reduced from inside the specified region to a boundary, the approximation being reduced to 0 at the boundary, and
the correction range selector controls a decrease trend of the approximation at least once.
10. The color correction apparatus according to claim 1 , wherein the correction range selector comprises:
a hue approximation calculator to calculate an approximation of an hue component of the input pixel;
a saturation approximation calculator to calculate an approximation of a saturation component of the input pixel;
a value approximation calculator to calculate an approximation of a value component of the input pixel; and
a multiplier to calculate the approximation by multiplying a valid value among the approximation of the hue component, the approximation of the saturation component, and the approximation of the value component,
wherein the correction range selector sets the approximation of the hue component to invalid, the approximation of the saturation component to valid, and the approximation of the value component to valid.
11. The color correction apparatus according to claim 10 , wherein the correction range selector calculates the approximation by a following formula 3,
hx =( sm−|s 1 −Sat 1)/ sm *( vm−|v 1 −Va 1|)/ vm Formula 3, and
wherein (Hue,Sat,Val) are the HSV values of the target color, (h 1 ,s 1 ,v 1 ) are HSV values of the input pixel, sm is a weight coefficient to define a restriction of a saturation component, vm is a weight coefficient to define a restriction of a value component, and hx is the approximation.
12. The color correction apparatus according to claim 11 , wherein the correction range selector reduces the approximation so that the approximation is reduced from inside the specified region to a boundary, the approximation being reduced to 0 at the boundary, and
the correction range selector controls a decrease trend of the approximation at least once.
13. The color correction apparatus according to claim 10 , wherein the correction range selector reduces the approximation so that the approximation is reduced from inside the specified region to a boundary, the approximation being reduced to 0 at the boundary, and
the correction range selector controls a decrease trend of the approximation at least once.
14. The color correction apparatus according to claim 1 , wherein the correction range selector reduces the approximation so that the approximation is reduced from inside the specified region to a boundary, the approximation being reduced to 0 at the boundary, and
the correction range selector controls a decrease trend of the approximation at least once.
15. The color correction apparatus according to claim 1 , wherein, the correction amount processor changes the amount of color correction in an order of a color aligned from inside the specified region toward the boundary.
16. The color correction apparatus according to claim 1 , wherein the correction amount processor reduces the correction amount such that it is reduced to zero at the boundary of the correction range according to the color distance from a target color, which is the center of the correction region.
17. The color correction apparatus according to claim 1 , wherein any color in the whole color space including the gray scale is corrected, and
wherein a part of a region in a white component direction is set as the range by the correction range selector.
18. A method for color correction, the method comprising:
selecting, by a correction range selector, a region having a center in a grayscale as a specified region of a color space; and
correcting a color of an input pixel having a color included in the specified region of a color space,
wherein the correction range selector calculates an approximation, the approximation representing an approximation of the input pixel in the specified region to a target color, and
wherein there is further comprised a correction amount processor to calculate a correction amount of the input pixel according to the calculated approximation,
wherein the color is corrected in a whole color space including the gray scale.
19. The method according to claim 18 , wherein:
the color space comprises a RGB color space,
the correction range selector calculates the approximation according to a difference between a RGB value including a white component of the target color and a RGB value including a white component of the input pixel,
the correction range selector calculates the color distance D by following formulas 1 and 2, and calculates the approximation according to the calculated color distance D,
( dR,dG,dB )=( r 0 −r,g 0 −g,b 0 −b ) Formula 1,
D =max( dR,dG,dB )−min( dR,dG,dB ) Formula 2, and
the (r 0 ,g 0 ,b 0 ) are the RGB values of the target color, (r,g,b) are the RGB values of the input pixel, and D is a color distance on a color space between the target color and the input pixel.
20. A program product, stored on a tangible non-transitory computer readable medium, to execute a color correction process by a computer, the program product comprising:
selecting a region having a center in a grayscale as a specified region of a color space; and
correcting a color of an input pixel having a color included in the specified region of the color space,
wherein correcting the color of the input pixel comprising:
calculating an approximation, the approximation representing an approximation of the input pixel in the specified region to a target color, and
calculating a correction amount of the input pixel according to the calculated approximation,
wherein the color is corrected in a whole color space including the gray scale.
21. The program product according to claim 20 , wherein:
the color space comprises an RGB color space,
the selecting the region includes calculating the approximation according to a difference between a RGB value including a white component of the target color and a RGB value including a white component of the input pixel,
the selecting the region includes calculating the color distance D by following formulas 1 and 2, and calculates the approximation according to the calculated color distance D,
( dR,dG,dB )=( r 0 −r,g 0 −g,b 0 −b ) Formula 1,
D =max( dR,dG,dB )−min( dR,dG,dB ) Formula 2, and
the (r 0 ,g 0 ,b 0 ) are the RGB values of the target color, (r,g,b) are the RGB values of the input pixel, and D is a color distance on a color space between the target color and the input pixel.