Summary of the invention
The invention provides method, device and the computer of adjusting image color, in order to obtain the better pictures effect.
In order to solve the problems of the technologies described above, the invention provides a kind of method of adjusting image color, may further comprise the steps:
The image of picked-up screen front region;
The color of all or part of described pickup image is carried out statistical analysis obtain colour cast value between itself and the target setting color; And
Adjust described screen light source according to described colour cast value camera watch region is carried out the colour cast compensation.
Further, said method also can have following characteristics: the described concrete grammar that camera watch region is carried out colour cast compensation is: change the current display image of described screen and/or adjust the color of the current display image of described screen according to described colour cast value.
Further, said method also can have following characteristics: the concrete grammar that obtains described colour cast value is: each color component of adding up all or part of described pickup image, and compare with each component value of target setting color respectively, obtain the colour cast value of each color component of described pickup image.
Further, said method also can have following characteristics: the concrete grammar that obtains described colour cast value is: detect described pickup image, obtain human face region wherein, and the color of described human face region is carried out statistical analysis obtain colour cast value between itself and the target setting color.
Further, said method also can have following characteristics: the people face coloured silk of described target setting color for estimating according to statistical value to draw.
Further, said method also can have following characteristics: the concrete grammar that changes the current display image of described screen according to described colour cast value is: show the animation that described colour cast value is compensated on described screen.
Further, said method also can have following characteristics: the concrete grammar of adjusting the color of the current display image of described screen according to described colour cast value is one of following three kinds of methods or its combination in any:
Adjust described desktop screen color according to described colour cast value;
Adjust the background colour of window picture according to described colour cast value;
Adjust the colour temperature of described screen according to described colour cast value.
Further, said method also can have following characteristics: during the described screen light source of described adjustment, earlier whether judge described colour cast value, and when judging, adjust the color of the current display image of described screen according to described threshold value greater than described threshold value greater than setting threshold.
The present invention also provides a kind of device of adjusting image color, and described device comprises:
Photographing module is used to the image that obtains to absorb;
Color analysis module, the color that is used for all or part of pickup image that described photographing module is obtained are carried out statistical analysis and are obtained colour cast value between itself and the target setting color;
Control module is used for adjusting described screen light source according to the colour cast value that described color analysis module obtains.
Further, said apparatus also can have following characteristics: described device also comprises people's face detection module, be used to detect the pickup image that described photographing module obtains, obtain human face region wherein, and indicate described color analysis unit that described human face region is carried out statistical analysis.
The present invention also provides a kind of computer, comprises screen, and described computer also comprises:
Camera is used to absorb the image of described screen front region;
Photographing module is used to obtain the image that described camera absorbs;
Color analysis module, the color that is used for all or part of pickup image that described photographing module is obtained are carried out statistical analysis and are obtained colour cast value between itself and the target setting color;
Control module is used for adjusting described screen light source according to the colour cast value that described color analysis module obtains.
Further, the aforementioned calculation machine also can have following characteristics: described computer also comprises people's face detection module, be used to detect the pickup image that described photographing module obtains, obtain human face region wherein, and indicate described color analysis unit that described human face region is carried out statistical analysis.
Adopt technical solution of the present invention, by having adjusted the screen light source, camera watch region has been carried out the colour cast compensation, the image that makes current picked-up obtain compensates through colour cast, thereby forms a feedback control loop, thereby has obtained the better pictures effect.
Embodiment
In the present invention, the image of picked-up screen front region; The color of all or part of pickup image is carried out statistical analysis obtain colour cast value between itself and the target setting color; And adjust the screen light source according to this colour cast value camera watch region is carried out the colour cast compensation.Promptly utilize screen as the floor light light source, to obtain the better pictures effect.
Below in conjunction with drawings and Examples the present invention is done description further.
Embodiment one
In embodiment one, the flow process of adjustment image color may further comprise the steps as shown in Figure 1:
Step S101, the image of picked-up screen front region;
Step S102 carries out statistical analysis to the color of image of picked-up and obtains colour cast value between itself and the target setting color;
In this step, add up each color component of this pickup image, and compare with each component value of target setting color respectively, obtain the colour cast value of each color component.
For example, in the example of embodiment one, count RGB (Red Green Green, RGB) each color component mean value is respectively (90,90,80), and each component value of target setting color is (100,100,80), as seen, the color component mean value that statistics is obtained and each component value of target setting color compare as can be known, and it is red that statistics obtains, the mean value of green two components is less than the corresponding component value of target setting color, therefore, red, green two components need compensate, and carry out the mean value of the respective component that this offset can obtain by statistics and the difference of this component value of target setting color is determined.
Step S103 adjusts the screen light source according to this colour cast value camera watch region is carried out the colour cast compensation.
In this step, adjust the light that the screen light source is promptly adjusted screen and sent, to the concrete grammar that camera watch region carries out the colour cast compensation can be: change the current display image of screen and/or adjust the color of the current display image of screen according to this colour cast value and adjust screen light source according to this colour cast value.
When taking to adjust the color of the current display image of screen,, then can adjust the desktop screen color according to this colour cast value if the current display image of screen comprises the desktop (desktop) of screen; If the current display image of screen comprises window (as application program, file etc.), then can adjust the background colour of window picture according to this colour cast value; Also can adjust the colour temperature of screen according to this colour cast value.When specific implementation, can select one of them or its combination in any of above-mentioned concrete compensation method.
Be that example describes still, in this step,, therefore can compensate these two components that therefore, the color that can adjust desktop screen is for yellow partially by yellow owing to will compensate to red, green two components with above-mentioned example; The background colour of perhaps adjusting window picture is adjusted into inclined to one side yellow; Perhaps adjust the colour temperature of screen, make its displayed map kine bias Huang.
When taking to change the current display image of screen, can on screen, show animation or direct display color adjustment prompting frame that this colour cast value is compensated, and utilize this prompting frame to carry out color compensation.
Be that example describes still, then can on screen, show to be the animation or the prompting frame of dominant hue, red, green two components are compensated with the yellow with above-mentioned example.
As seen, the technical scheme that adopts embodiment one to provide, adjust the color of current display image of screen and/or the current display image of adjustment screen according to the colour cast value, camera watch region is carried out the colour cast compensation, the image that makes current picked-up obtain compensates through colour cast, thereby forms a feedback control loop.
In order to make this feedback loop stable as far as possible, in addition also for as far as possible not because the variation of screen color and change the current display image of screen and bring negative impression to the user, therefore, can be when adjusting screen color, adjustment degree to color is done some restrictions, for example, set a threshold value, when adjusting the color of the current display image of screen, whether the colour cast value that judgement statistics earlier obtains is greater than this threshold value, and when judging greater than this threshold value, adjust the color of the current display image of screen according to threshold value, rather than adjust according to the colour cast value, can control the scope that screen color is adjusted like this, the scope that makes this color adjustment is within the scope that the user can accept.When specific implementation, an optional scope can be provided, select this threshold value by the user, to adapt to user's demand more neatly.And when changing the current display image of screen, can zone and the size that this change relates to be limited equally, for example, when demonstration is the animation of dominant hue with certain color on screen, the regional maximum that shows animation on screen can only account for 1/4 of screen size, perhaps, the prompting frame that is used for color compensation that order occurs on screen can only appear at the upper left corner of screen, and size can only be less than 1/5 of screen.When specific implementation, can provide an optional scope to this restriction equally, select by the user, to adapt to user's demand more neatly.
When camera watch region being carried out the colour cast compensation, can strengthen corresponding color component, also can weaken corresponding color.For example, in another example of embodiment one, the mean value of each color component that statistics obtains is (90,90,100), and each component value of target setting color is (100,100,80), the two is compared as can be known, red, green two components are needed to strengthen, and need weaken blue component, therefore, can adjust the color of the current display image of screen in conjunction with the difference of each component value of each component and target setting color, and/or change the current display image of screen, thereby camera watch region is being carried out the colour cast compensation.
Wherein, when changing the current display image of screen, should know the mean value of current each color component of screen earlier, change the current display image of screen according to the comparative result between this mean value and pickup image and the target setting color again, for example, in this example, the mean value of current each color component of screen is (120,120,120), because to red, green two components need to strengthen, and need weaken blue component, therefore, can play one section average color component is (140,140,100) animation, thus reach the purpose of camera watch region being carried out the colour cast compensation.
Embodiment two
Because the present invention is particularly useful for the situation of Internet video chat, therefore, seem very important for the colour cast compensation of human face region image, therefore, in embodiment two, the flow process of adjusting image color may further comprise the steps as shown in Figure 2:
Step S201, the image of picked-up screen front region;
Step S202 detects this pickup image, obtains human face region wherein;
Step S203 carries out statistical analysis to the color of this human face region and obtains colour cast value between itself and the target setting color;
Because in the present embodiment, hope is after carrying out the colour cast compensation to camera watch region, can make the color of the color of human face region in the image of picked-up near normal person's face, therefore, the target setting color that adopts in this step can be to estimate people's face coloured silk that (being empirical value) draws according to statistical value.
Step S204 adjusts the screen light source according to this colour cast value camera watch region is carried out the colour cast compensation.
In embodiment two, owing to only add up, can obtain the colour cast value of human face region more accurately, thereby better human face region be carried out the colour cast compensation at the color of human face region, make human face region that better picture effect be arranged, improve user's enthusiasm.
Among the embodiment two,, see also the description of embodiment one with embodiment one identical or corresponding part.
Embodiment three
The device of the adjustment image color among the embodiment three as shown in Figure 3, comprising:
Photographing module 100 is used to the image that obtains to absorb;
Color analysis module 200, the color that is used for all or part of pickup image that photographing module 100 is obtained are carried out statistical analysis and are obtained colour cast value between itself and the target setting color;
Control module 300 is used for adjusting the screen light source according to the colour cast value that color analysis module 200 obtains.
This device can also comprise people's face detection module, is used to detect the pickup image that photographing module 100 obtains, and obtains human face region wherein, and indication color analysis unit carries out statistical analysis to this human face region.
Embodiment four
Computer among the embodiment four as shown in Figure 4, comprising:
Screen 400 is used for display image;
Camera 500 is used to absorb the image of screen 400 front region;
Photographing module 100 is used to obtain the image that camera 500 absorbs;
Color analysis module 200, the color that is used for all or part of pickup image that photographing module 100 is obtained are carried out statistical analysis and are obtained colour cast value between itself and the target setting color;
Control module 300 is used for adjusting the screen light source according to the colour cast value that color analysis module 200 obtains.
This computer can also comprise people's face detection module, is used to detect the pickup image that photographing module 100 obtains, and obtains human face region wherein, and indication color analysis unit carries out statistical analysis to this human face region.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.