[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN104378612B - A kind of method and electronic equipment for adjusting color balance - Google Patents

A kind of method and electronic equipment for adjusting color balance Download PDF

Info

Publication number
CN104378612B
CN104378612B CN201310349785.9A CN201310349785A CN104378612B CN 104378612 B CN104378612 B CN 104378612B CN 201310349785 A CN201310349785 A CN 201310349785A CN 104378612 B CN104378612 B CN 104378612B
Authority
CN
China
Prior art keywords
image
color
values
pixel
vegetarian refreshments
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310349785.9A
Other languages
Chinese (zh)
Other versions
CN104378612A (en
Inventor
郑启忠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201310349785.9A priority Critical patent/CN104378612B/en
Publication of CN104378612A publication Critical patent/CN104378612A/en
Application granted granted Critical
Publication of CN104378612B publication Critical patent/CN104378612B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Color Image Communication Systems (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

The invention discloses a kind of method for adjusting color balance, to improve acquired picture quality.This method includes:By described image collecting unit, the first image with the first color temperature value in an area of visual field is obtained;Second image is shown by described image display unit, detects whether that there is the determination for being used to determine reference image vegetarian refreshments carried out to second image operates;When there is the determination operation, the determination operation is responded, the reference image vegetarian refreshments is determined in second image;Based on the reference image vegetarian refreshments, the color-values of each pixel in N number of pixel that amendment described first image is included obtain the 3rd image with second color temperature value different from first color temperature value, wherein, N is positive integer.The invention also discloses the electronic equipment for realizing methods described.

Description

A kind of method and electronic equipment for adjusting color balance
Technical field
The present invention relates to computer realm, more particularly to a kind of method and electronic equipment for adjusting color balance.
Background technology
With the continuous development of scientific technology, electronic technology has also obtained development at full speed, and the species of electronic product is also got over Come more, people have also enjoyed the various facilities that development in science and technology is brought.Present people can be set by various types of electronics It is standby to enjoy the comfortable life brought with development in science and technology.Such as, the electronic equipment such as digital camera, tablet personal computer, mobile phone, video camera An indispensable part in people's life is had become, people can pass through digital camera, tablet personal computer, mobile phone, shooting The electronic equipments such as machine optionally gather various images or video, at the same also can by image by way of multimedia message or upload and its Other people share or preserved.
At present, in order to improve picture quality, need to adjust the side of white balance, generally adjustment white balance often in shooting image Method has two kinds:One kind is manual white balance, sets the ambient light species under present filming scene manually by user, such as cloudy My god, snowfield, tengsten lamp etc. so as to be directed to the shooting that different scenes carry out photos;Another is AWB, Chang Wei The default setting of electronic equipment, it can be by calculating the RGB data of the pixel in preview image, R:G:B closest to 1:1:1 point is considered white balance datum mark, and then the data further according to the point are modified to other pixels.
Manual white balance method, is a kind of method for being classified adjustment in fact, is usually that the colour temperature of ambient light is divided into several Rank, a kind of rank is set when then shooting.But difference is larger between at different levels, these ranks are only set, adjustable scope compared with It is small, the picture quality obtained can be caused not high.
For AWB, when obtaining preview image using this method, the colour temperature of a hypothesis is first passed through(Generally It is daylight)Go to obtain preview image, calculating amendment is then carried out on the basis of preview image.Because preview image is schemed with actual As there is certain deviation, so the result calculated can also have deviation, even may be used also in the case where light illumination is too low It can cause under the distortion of image color, such as cloudy weather, using auto white balance system image can be caused partially blue.
It can be seen that, it is not accurate enough when adjusting white balance in the prior art, so that the picture quality obtained can be caused not high.
The content of the invention
The embodiment of the present invention provides a kind of method for adjusting color balance, for solving in the prior art because of white balance adjusting It is not accurate enough and make the relatively low technical problem of picture quality.
A kind of method for adjusting color balance, applied in an electronic equipment, the electronic equipment includes IMAQ list Member and image-display units, methods described include:
By described image collecting unit, the first image with the first color temperature value in an area of visual field is obtained;
Second image is shown by described image display unit, detect whether to exist is used for second image Determine the determination operation of reference image vegetarian refreshments;
When there is the determination operation, the determination operation is responded, the reference image is determined in second image Vegetarian refreshments;
Based on the reference image vegetarian refreshments, each pixel in N number of pixel that amendment described first image is included Color-values, obtain the 3rd image with second color temperature value different from first color temperature value, wherein, N is positive integer.
Preferably, described first image and second image are same image, or described first image and described second Image is different images.
Preferably, the determination operation is specially:Determine color-values in M pixel included in second image Difference between true standard color-values meets the pixel of a threshold value as the reference image vegetarian refreshments, and M is positive integer.
Preferably, it is determined that after the reference image vegetarian refreshments, in addition to:Obtain the reference color of the reference image vegetarian refreshments Value, actual standard color-values are modified to by the benchmark color value.
Preferably, each picture in the N number of pixel included based on the reference image vegetarian refreshments, amendment described first image The color-values of vegetarian refreshments, be specially:
Based on the benchmark color value and the true standard color-values, by the ith pixel point in N number of pixel Color-values are modified to the i-th actual standard color-values from the i-th color-values, wherein, i takes the integer from 1 to N successively.
Preferably, after the 3rd image with second color temperature value different from first color temperature value is obtained, Also include:3rd image is shown by described image display unit.
A kind of electronic equipment, the electronic equipment includes image acquisition units and image-display units, the electronic equipment Also include:
First acquisition unit, for by described image collecting unit, obtaining in an area of visual field to have the first colour temperature First image of value;
Detection unit, for showing the second image by described image display unit, detects whether to exist to described second What image was carried out is used to determine that the determination of reference image vegetarian refreshments to be operated;
Determining unit, it is true in second image for when there is the determination operation, responding the determination operation Determine reference image vegetarian refreshments;
Processing unit, for based on the reference image vegetarian refreshments, correcting the every of N number of pixel that described first image is included The color-values of individual pixel, obtain the 3rd image with second color temperature value different from first color temperature value, wherein, N is Positive integer.
Preferably, described first image and second image are same image, or described first image and described second Image is different images.
Preferably, the determination operation is specially:Determine color-values in M pixel included in second image Difference between true standard color-values meets the pixel of a threshold value as the reference image vegetarian refreshments, and M is positive integer.
Preferably, the electronic equipment also includes second acquisition unit, it is used for:Obtain for characterizing in second image The color-values are adjusted to actual standard by the first color-values of the color-values of the reference image vegetarian refreshments from first color-values Color-values.
Preferably, the processing unit specifically for:, will based on first color-values and the true standard color-values The color-values of the ith pixel point in addition to the reference image vegetarian refreshments in N number of pixel that described first image is included are from the i-th color Color value is adapted to the i-th actual standard color-values, wherein, i gets N from 1 successively.
Preferably, the electronic equipment also includes operating unit, for showing described the by described image display unit Three images.
The method of regulation color balance in the embodiment of the present invention can apply in an electronic equipment, the electronic equipment Image acquisition units and image-display units can be included, methods described includes:By described image collecting unit, obtain one and regard The first image with the first color temperature value in wild region;Second image is shown by described image display unit, detected whether In the presence of the determination operation for being used to determine reference image vegetarian refreshments carried out to second image;When there is the determination operation, ring The determination operation is answered, the reference image vegetarian refreshments is determined in second image;Based on the reference image vegetarian refreshments, amendment is described The color-values of each pixel in N number of pixel that first image is included, are obtained with different from first color temperature value The second color temperature value the 3rd image, wherein, N is positive integer.
In the embodiment of the present invention, the reference image vegetarian refreshments can be determined from second image, second image can To be the preferable image of blank level adjustment, therefore, the reference image vegetarian refreshments is therefrom determined, the reference image vegetarian refreshments can be made more Be near the mark pixel, and the color-values of each pixel in described first image, i.e. root are corrected by the reference image vegetarian refreshments The color-values of rest of pixels point are corrected according to the pixel of a more standard, can make second colour temperature obtained after amendment Value is more accurate, meets required color temperature value, so as to improve the picture quality of acquisition.In the embodiment of the present invention, without as existing A color temperature value must equally be selected from the several color temperature values set by having in technology, and, second image can also be One image for truly showing, and not preview image, can improve the degree of accuracy of the reference image vegetarian refreshments.
Brief description of the drawings
Fig. 1 is the broad flow diagram of the method for regulation color balance in the embodiment of the present invention;
Fig. 2 is the structure chart of electronic equipment in the embodiment of the present invention.
Embodiment
The method of regulation color balance in the embodiment of the present invention can apply in an electronic equipment, and it includes image and adopted Collect unit and image-display units, methods described includes:By described image collecting unit, having in an area of visual field is obtained First image of the first color temperature value;Second image is shown by described image display unit, detects whether to exist to described second What image was carried out is used to determine that the determination of reference image vegetarian refreshments to be operated;When there is the determination operation, the determination operation is responded, The reference image vegetarian refreshments is determined in second image;Based on the reference image vegetarian refreshments, amendment described first image is included N number of pixel in each pixel color-values, obtain with second color temperature value different from first color temperature value 3rd image, wherein, N is positive integer.
In the embodiment of the present invention, the reference image vegetarian refreshments can be determined from second image, second image can To be the preferable image of blank level adjustment, therefore, the reference image vegetarian refreshments is therefrom determined, the reference image vegetarian refreshments can be made more Be near the mark pixel, and the color-values of each pixel in described first image, i.e. root are corrected by the reference image vegetarian refreshments The color-values of rest of pixels point are corrected according to the pixel of a more standard, can make second colour temperature obtained after amendment Value is more accurate, meets required color temperature value, so as to improve the picture quality of acquisition.In the embodiment of the present invention, without as existing A color temperature value must equally be selected from the several color temperature values set by having in technology, and, second image can also be One image for truly showing, and not preview image, can improve the degree of accuracy of the reference image vegetarian refreshments.
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is A part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
In the embodiment of the present invention, the electronic equipment can be PC(Personal computer), notebook, PAD(Tablet personal computer)、 The different electronic equipment of mobile phone, digital camera etc., the invention is not limited in this regard.
Illustrate first, herein presented term "and/or", only a kind of incidence relation for describing affiliated partner, table Show there may be three kinds of relations, for example, A and/or B, can be represented:Individualism A, while there is A and B, individualism B this three The situation of kind.In addition, character "/" herein, it is a kind of relation of "or" to typically represent forward-backward correlation object.It is right below in conjunction with the accompanying drawings The preferred embodiment of the present invention is described in detail.
Embodiment one
Refer to and a kind of method for adjusting color balance is provided in Fig. 1, the embodiment of the present invention, methods described can apply to In electronic equipment, the electronic equipment can include image acquisition units and image-display units, methods described can include with Lower step:
Step 101:By described image collecting unit, the first figure with the first color temperature value in an area of visual field is obtained Picture.
In the embodiment of the present invention, described image collecting unit can be used for obtaining the object institute being located in the area of visual field The image of composition.
For example, in the embodiment of the present invention, described image collecting unit can be camera, or can be that other have image The functional unit of acquisition function.Described image collecting unit can be arranged in the electronic equipment, or described image collection Unit and the electronic equipment can also be two separate equipment, and described image collecting unit can be set with the electronics Standby to be communicated, the specific present invention is not restricted.
In the embodiment of the present invention, user can control described image collecting unit to carry out adopting for image as needed Collection.If for example, the electronic equipment is digital camera, then user can be regarded by the camera lens of digital camera to shoot difference Object in wild region, it is hereby achieved that different images.
In the embodiment of the present invention, colour temperature(colour temperature)The photochromic yardstick of light source can be represented.Colour temperature is Defined by absolute black body, the radiation of light source is when the radiation of visual field and absolute black body is identical, the now temperature of black matrix Degree just claims the colour temperature of this light source.During low color temperature light sources are characterized in Energy distribution, red radiation is relative to be said some more, is commonly referred to as " warm light ", after colour temperature is improved, in Energy distribution, the ratio increase of indigo plant radiation, commonly referred to as " cold light ".
In the embodiment of the present invention, first color temperature value can be used for being characterized in described the obtained in the area of visual field Eye impressions of the color of one image to beholder, when first color temperature value is different, described first image is presented to user Visual effect may also can be different.
If for example, user obtains described first image under intense light source irradiation, then described first image overall color White inner blue visual effect partially can may be showed, a kind of more sombre atmosphere may be presented, the tone is properly termed as cold Tone.If user gathers described first image under weak light source irradiation, then described first image overall color may be in Reveal partially red visual effect, a kind of warm atmosphere can be given people, the tone is properly termed as warm tones.As a rule, colour temperature is worked as Value is in 3000-5000K, and image can show partially white visual effect.
Preferably, in the embodiment of the present invention, after described image collecting unit obtains described first image, described image shows Show that unit can be shown described first image, now, user can see described with first color temperature value One image, while the electronic equipment can continue to gather next image by described image collecting unit, or passes through the figure As display unit continues to show next image.
Or, in the embodiment of the present invention, after described image collecting unit obtains described first image, described image is shown Unit can not also show described first image, and the electronic equipment can continue to gather next by described image collecting unit Image, or display next image is continued by described image display unit.
Step 102:Second image is shown by described image display unit, detects whether exist to enter second image The capable determination operation for being used to determine reference image vegetarian refreshments.
In the embodiment of the present invention, the electronic equipment, can also be aobvious by described image after described first image is obtained Show unit to show second image, so as to determine the reference image vegetarian refreshments from second image.
Optionally, in the embodiment of the present invention, second image can be passed through by described image collecting unit it is described In area of visual field or the image by being collected in other area of visual field, such as described image collecting unit is in collection described first Image can continue collection second image after finishing, and, after collection finishes described first image, described the can be shown One image, or described first image can not also be shown, and after collection finishes second image, described can be shown Two images.
Optionally, in the embodiment of the present invention, second image can also be the figure being stored in the electronic equipment Picture, the electronic equipment directly can obtain described second after collection described first image from each image of itself storage Image.
Preferably, in the embodiment of the present invention, second image and described first image can be same image.That is, institute Described first image can be gathered first by stating electronic equipment, and described first image can be shown after collection is finished, when by described in When first image is shown, described first image is just properly termed as second image.
Preferably, in the embodiment of the present invention, second image can be different images from described first image, i.e. The electronic equipment can gather described first image first, and described first image, Huo Zheye can be shown after collection is finished Second image can not be shown, while the electronic equipment can continue to obtain and show second image, described Two images are different images from described first image.
If described first image is different images from second image, then the electronic equipment can select color The image that temperature value is closer to reference colour temperature value is used as second image, you can to select the preferable image of blank level adjustment It is used as second image, so, the color-values for the reference image vegetarian refreshments determined from second image can be more To approach true standard color-values.
If described first image is identical image with second image, then the electronic equipment is described in collection The reference image vegetarian refreshments can be directly determined after first image in described first image, the other image conduct without obtaining again Second image, operating process is relatively simple, saves operating procedure and time.
In the embodiment of the present invention, after second image is shown by described image display unit, the electronic equipment It can detect whether that there is the determination for being used to determine the reference image vegetarian refreshments carried out to second image operates.
Preferably, in the embodiment of the present invention, it is described to determine that operation be to determine the M picture that second image is included The pixel that difference in vegetarian refreshments between color-values and true standard color-values meets a threshold value is used as the reference image vegetarian refreshments, M For positive integer.
Preferably, in the embodiment of the present invention, the RGB of the true standard color-values can be:1:1:1.By the color Value is compared with the true standard color-values, can make the color-values of the reference image vegetarian refreshments of selection closer to described True standard color-values, then when being modified by the reference image vegetarian refreshments to other pixels, also can just obtain more accurate True correction result.
For example, user typically can be more sensitive to white point, the color-values of the white point that user is perceived typically all can be compared with To approach the true standard color-values.So, in the embodiment of the present invention, the determination operation can be carried out by user.
For example, user may think that pixel in a region in second image closest to white point, such as User can carry out the operation for selecting the region to the region, then the operation can just regard described as and determine to operate.
Such as, user may think that a pixel in second image closest to white point, such as user The operation for selecting the region can be carried out to the pixel, then the operation can just regard described as and determine to operate.
Step 103:When there is the determination operation, the determination operation is responded, institute is determined in second image State reference image vegetarian refreshments.
It is described to determine that operation be the operation that user is carried out to second image in the embodiment of the present invention, for example, with Family can carry out the determination operation by the different mode such as touch-control, button, voice in second image.
Preferably, in the embodiment of the present invention, when it is determined that obtaining the determination operation, the electronic equipment can respond institute Determination operation is stated, so as to determine the reference image vegetarian refreshments in second image.
In the embodiment of the present invention, if user carry out the determination operates selection is a region, then, respond institute Determination operation is stated, the reference image vegetarian refreshments is determined in second image, can be specifically:When user determines to grasp by described Make to determine after a reference area in second image, the electronic equipment can determine the appointed reference region Domain.It is determined that after the reference area, the electronic equipment can determine at least one pixel included in the reference area The color-values of each pixel, can determine at least one color-values altogether in point., can it is determined that after at least one described color-values Therefrom to determine that the difference between the true standard color-values meets the color-values of the threshold value, color-values correspondence Pixel can serve as the reference image vegetarian refreshments.
Wherein, if it is determined that the difference gone out between multiple color-values and the true standard color-values is satisfied by described Threshold value, then, it can therefrom select the pixel corresponding to the minimum color-values of the difference between the true standard color-values Select as the reference image vegetarian refreshments, can so make selection result more accurate.
In the embodiment of the present invention, the difference between a color-values and the true standard color-values meets the threshold value, example It can such as refer to the difference between a color-values and the true standard color-values in a threshold range.
In the embodiment of the present invention, the threshold values can be pre-set in the electronic equipment or user's root According to the self-defined setting of needs, the invention is not limited in this regard.
For example, it is known that white light is made up of seven kinds of coloured light of red, orange, yellow, green, cyan, blue, purple, and this seven kinds Coloured light is to have Red Green Blue to be mixed to form by different proportion again, when trichromatic color-values ratio is R:G:B=1:1:1 When, it is believed that be benchmark white point, i.e., described true standard color-values.
The color of each pixel in the M pixel, the M pixel can be included in second image Coloured silk value can use R (red), G(It is green)、B(It is blue)Trichromatic ratio is represented.
The R of such as the first pixel in described M pixel:G:B=1.1:1:0.9, the R of the second pixel:G:B= 1.2:1:0.9, if for example, the threshold values is 0.1, hence it is evident that, the color-values of first pixel and the true quasi- color of the mark Difference between color value can meet the threshold values, and the color-values of second pixel and the true standard color-values it Between difference be unsatisfactory for the threshold values, then first pixel can be assign as the reference image vegetarian refreshments.
Preferably, in the embodiment of the present invention, it is determined that after the reference image vegetarian refreshments of second image, the electronics is set It is standby to obtain the reference color-values of the reference image vegetarian refreshments, it is possible to which that the reference color-values are modified to institute State actual standard color-values.
In the embodiment of the present invention, the actual standard color-values can be by the reference of the reference image vegetarian refreshments The approximate multiple that exists between color-values and the true standard color-values is determined.
For example, the true standard color-values can be R:G:B=1:1:1, the reference color-values can be R:G: B=0.9:1:1.1, then, it is possible to use the RGB of the RGB of the true standard color-values divided by the reference pixel, It is 1.1 that the actual color value ratio between the reference color-values and the true standard color-values, which can be drawn,:1: 0.9, then the reference color-values are multiplied by into the actual color value ratio can obtain R:G:B=0.99:1:0.99 The actual standard color-values, hence it is evident that, the actual standard color-values reference color-values are more nearly described true Real standard color value.
Step 104:It is each in N number of pixel that amendment described first image is included based on the reference image vegetarian refreshments The color-values of pixel, obtain the 3rd image with second color temperature value different from first color temperature value, wherein, N is just Integer.
In the embodiment of the present invention, after the electronic equipment determines the reference image vegetarian refreshments in second image, The electronic equipment can correct the color-values of each pixel included in described first image according to the reference image vegetarian refreshments, So as to obtain the 3rd image.
Preferably, in the embodiment of the present invention, based on the reference image vegetarian refreshments, it is N number of that amendment described first image is included The color-values of each pixel in pixel, can be specifically:Based on the benchmark color value and the actual standard color The color-values of ith pixel point in N number of pixel are modified to the i-th actual standard color-values by value from the i-th color-values, its In, i can take the integer from 1 to N successively, so, and N number of revised actual standard color-values can be obtained altogether.
For example, the reference color-values ratio of the reference image vegetarian refreshments determined in second image can be with It is R:G:B=0.9:1:1.1, then, the benchmark color value multiplies ratio 1.1:1:0.9 can obtain the actual standard color Value, i.e., described actual standard color-values are R:G:B=0.99:1:0.99.
Likewise, can be by the color-values of each pixel in the N number of pixel included in described first image Handled in the same way, i.e., ratio 1.1 is multiplied by the basis of each color-values:1:0.9, each actual mark can be obtained Quasi- color-values.
Wherein, the processing procedure to N number of pixel can be parallel processing, or can also be serial process.Compared with Good, processing speed can more be improved by carrying out parallel processing, and error probability can be reduced by carrying out serial process.
In the embodiment of the present invention, the electronic equipment can be shown after the 3rd image is obtained by described image Unit shows the 3rd image.After the display unit shows the 3rd image, what user saw is exactly with described The 3rd image of second color temperature value.
Embodiment two
In the embodiment of the present invention, the electronic equipment is digital camera.
The electronic equipment can be provided with image acquisition units and image-display units, and the electronic equipment can pass through Described image collecting unit obtains the first image in an area of visual field.
Preferably, in the embodiment of the present invention, described first image can have the first color temperature value, and first color temperature value can For being characterized in eye impressions of the color to beholder of the described first image obtained in the area of visual field.
If for example, gathering the described first image of acquisition in the area of visual field for having candle and flame, then, institute It can be 1900K to state the first color temperature value, and now, described first image can be that color is partially red to the visual effect of observer, i.e., Warm tones image;If described first image is gathered at the cloudy day, then first color temperature value can be 6000~ 7000K, now, described first image overall color are partially blue, i.e. cool tone image.
In the embodiment of the present invention, after the electronic equipment obtains described first image, it can be shown by described image Unit shows the second image.
Preferably, in the embodiment of the present invention, second image can after described first image is collected, continue logical Cross what described image collecting unit was collected, or, second image can also be stored in the electronic equipment Image, the invention is not limited in this regard.
In the embodiment of the present invention, described first image is same image with second image, i.e. the electronic equipment exists Gather after described first image, it is shown that described first image.
In the embodiment of the present invention, after second image is shown, the electronic equipment, which can be detected, to be determined whether In the presence of the determination for the being determined for reference image vegetarian refreshments operation carried out to second image.
It is described to determine that operation is to determine in the M pixel that second image is included in the embodiment of the present invention Difference between color-values and true standard color-values meets the pixel of a threshold value as the reference image vegetarian refreshments, and M is just whole Number.
Wherein, the threshold values can be pre-set in the electronic equipment or user make by oneself as needed What justice was set, the invention is not limited in this regard.
For example, user may think that pixel in a region in second image closest to white point, such as User can carry out the operation for selecting the region to the region, then the operation can just regard described as and determine to operate.
In the embodiment of the present invention, the electronic equipment determines to there may be the determination operation, then can respond described It is determined that operation, determines the reference image vegetarian refreshments in second image.
In the embodiment of the present invention, because user carry out the determination operates selection is a region, then, response is described It is determined that operation, the reference image vegetarian refreshments is determined in second image, can be specifically:User determines that operation exists by described A reference area is determined in second image, the electronic equipment can determine the appointed reference area. Determine after the reference area, the electronic equipment can determine every at least one pixel for being included in the reference area The color-values of individual pixel, can determine at least one color-values altogether., can be therefrom it is determined that after at least one described color-values It is determined that the difference between the true standard color-values meets the color-values of the threshold value, the corresponding pixel of the color-values Select and can serve as the reference image vegetarian refreshments.
If for example, determining that operation have selected a reference region containing white in second image by described Domain, and the reference area contains K pixel, K for example can be 3200, and M pixel, M are contained in second image For example can be 5600, then, the electronic equipment response is described to determine operation, can determine one in the K pixel Individual color-values closest to the true standard color-values pixel as the reference image vegetarian refreshments, i.e., described reference image vegetarian refreshments Color most proximity reference white.For example, the color-values for the reference image vegetarian refreshments that the electronic equipment is determined are R:G:B=1.1: 1:0.9。
Threshold value described in the embodiment of the present invention is 0.2, therefore the color-values and the true standard of the reference image vegetarian refreshments Color-values meet the threshold value.
Preferably, in the embodiment of the present invention, when it is determined that after the reference image vegetarian refreshments, the quasi- pixel of the benchmark can be obtained Reference color-values, and the reference color-values can be modified to actual standard color-values.
For example, the color-values ratio of the true standard color-values is R:G:B=1:1:1, the reference image vegetarian refreshments of acquisition Color-values ratio can be R:G:B=1.1:1:0.9, then needs multiply the color-values ratio of the reference color-values With the actual color value ratio 0.9:1:1.1, the available actual standard color-values closest to white, the reality The color-values ratio of border standard color value is R:G:B=0.99:1:0.99.
In the embodiment of the present invention, the reference image vegetarian refreshments is modified to after the official portrait vegetarian refreshments, the base can be based on The color of each pixel in quasi- pixel and true standard color-values, N number of pixel that amendment described first image is included Coloured silk value, obtains the 3rd image with second color temperature value different from first color temperature value, wherein, N is positive integer.
Wherein, the color-values of each pixel in N number of pixel can be multiplied by the actual standard color Value ratio 0.9:1:1.1, then, described first image can be corrected, so as to obtain with second color temperature value The 3rd image, second color temperature value can be differently configured from first color temperature value.
, can be aobvious by described image after described first image is modified to the 3rd image in the embodiment of the present invention Show that unit shows the 3rd image.
Embodiment three
Fig. 2 is referred to, the embodiment of the present invention, which provides a kind of electronic equipment for adjusting color balance, can include the first acquisition Unit 201, detection unit 202, determining unit 203, processing unit 204.
Preferably, the electronic equipment can also include second acquisition unit 205, operating unit 206.
The first acquisition unit 201 can be used for, by described image collecting unit, obtaining the tool in an area of visual field There is the first image of the first color temperature value.
The detection unit 202 can be used for showing the second image by described image display unit, detect whether exist The determination operation for being used to determine reference image vegetarian refreshments carried out to second image.
The determining unit 203 can be used for when exist it is described determine operation when, respond it is described determine operation, described the Reference image vegetarian refreshments is determined in two images.
The processing unit 204 can be used for being based on the reference image vegetarian refreshments, and it is N number of that amendment described first image is included The color-values of each pixel of pixel, obtain the 3rd figure with second color temperature value different from first color temperature value Picture, wherein, N is positive integer.
In the embodiment of the present invention, described first image can be same image, or first figure with second image Picture and second image are different images.
In the embodiment of the present invention, the determination operation is specially:Determine M pixel included in second image Difference between middle color-values and true standard color-values meets the pixel of a threshold value as the reference image vegetarian refreshments, and M is just Integer.
The second acquisition unit 205, which can be used for obtaining, to be used to characterize reference image vegetarian refreshments described in second image The color-values are adjusted to the actual standard color-values by the first color-values of color-values from first color-values.
In the embodiment of the present invention, the processing unit 204 specifically can be used for being based on first color-values and described true The ith pixel point in addition to the reference image vegetarian refreshments in real standard color value, N number of pixel that described first image is included Color-values be adapted to the i-th standard color value from the i-th color-values, wherein, i gets N from 1 successively.
In the embodiment of the present invention, the operating unit 206 can be used for showing described by described image display unit Three images.
The method of regulation color balance in the embodiment of the present invention can apply in an electronic equipment, the electronic equipment Image acquisition units and image-display units can be included, methods described includes:By described image collecting unit, obtain one and regard The first image with the first color temperature value in wild region;Second image is shown by described image display unit, detected whether In the presence of the determination operation for being used to determine reference image vegetarian refreshments carried out to second image;When there is the determination operation, ring The determination operation is answered, the reference image vegetarian refreshments is determined in second image;Based on the reference image vegetarian refreshments, amendment is described The color-values of each pixel in N number of pixel that first image is included, are obtained with different from first color temperature value The second color temperature value the 3rd image, wherein, N is positive integer.
In the embodiment of the present invention, the reference image vegetarian refreshments can be determined from second image, second image can To be the preferable image of blank level adjustment, therefore, the reference image vegetarian refreshments is therefrom determined, the reference image vegetarian refreshments can be made more Be near the mark pixel, and the color-values of each pixel in described first image, i.e. root are corrected by the reference image vegetarian refreshments The color-values of rest of pixels point are corrected according to the pixel of a more standard, can make second colour temperature obtained after amendment Value is more accurate, meets required color temperature value, so as to improve the picture quality of acquisition.In the embodiment of the present invention, without as existing A color temperature value must equally be selected from the several color temperature values set by having in technology, and, second image can also be One image for truly showing, and not preview image, can improve the degree of accuracy of the reference image vegetarian refreshments.
It is apparent to those skilled in the art that, for convenience and simplicity of description, only with above-mentioned each function The division progress of module is for example, in practical application, as needed can distribute above-mentioned functions by different function moulds Block is completed, i.e., the internal structure of device is divided into different functional modules, to complete all or part of work(described above Energy.The specific work process of the system, apparatus, and unit of foregoing description, may be referred to corresponding in preceding method embodiment Journey, will not be repeated here.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method can be with Realize by another way.For example, device embodiment described above is only schematical, for example, the module or The division of unit, only a kind of division of logic function, can there is other dividing mode when actually realizing, such as multiple units Or component can combine or be desirably integrated into another system, or some features can be ignored, or not perform.It is another, institute Display or the coupling each other discussed or direct-coupling or communication connection can be by some interfaces, device or unit INDIRECT COUPLING or communication connection, can be electrical, machinery or other forms.
The unit illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in the application each embodiment can be integrated in a processing unit, can also That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list Member can both be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
If the integrated unit is realized using in the form of SFU software functional unit and as independent production marketing or used When, it can be stored in a computer read/write memory medium.Understood based on such, the technical scheme of the application is substantially The part contributed in other words to prior art or all or part of the technical scheme can be in the form of software products Embody, the computer software product is stored in a storage medium, including some instructions are to cause a computer Equipment(Can be personal computer, server, or network equipment etc.)Or processor(processor)Perform the application each The all or part of step of embodiment methods described.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), random access memory(RAM, Random Access Memory), magnetic disc or CD Etc. it is various can be with the medium of store program codes.
Described above, above example is only described in detail to the technical scheme to the application, but implements above The explanation of example is only intended to the method and its core concept for helping to understand the present invention, should not be construed as limiting the invention.This Those skilled in the art the invention discloses technical scope in, the change or replacement that can be readily occurred in should all be covered Within protection scope of the present invention.

Claims (10)

1. a kind of method for adjusting color balance, applied in an electronic equipment, the electronic equipment includes image acquisition units And image-display units, methods described includes:
By described image collecting unit, the first image with the first color temperature value in an area of visual field is obtained;
Second image is shown by described image display unit, detects whether to exist to second image progress for determining The determination operation of reference image vegetarian refreshments;It is described to determine that operation is specially:Determine in M pixel included in second image Difference between color-values and true standard color-values meets the pixel of a threshold value as the reference image vegetarian refreshments, and M is just whole Number;
When there is the determination operation, the determination operation is responded, the reference image vegetarian refreshments is determined in second image;
Based on the reference image vegetarian refreshments, the color of each pixel in N number of pixel that amendment described first image is included Value, obtains the 3rd image with second color temperature value different from first color temperature value, wherein, N is positive integer.
2. the method as described in claim 1, it is characterised in that described first image and second image are same image, Or described first image and second image are different images.
3. the method as described in claim 1, it is characterised in that it is determined that after the reference image vegetarian refreshments, in addition to:Obtain institute The benchmark color value of reference image vegetarian refreshments is stated, the benchmark color value is modified to actual standard color-values.
4. method as claimed in claim 3, it is characterised in that based on the reference image vegetarian refreshments, amendment described first image institute Comprising N number of pixel in each pixel color-values, be specially:
Based on the benchmark color value and the actual standard color-values, by the color of the ith pixel point in N number of pixel Value is modified to the i-th actual standard color-values from the i-th color-values, wherein, i takes the integer from 1 to N successively.
5. the method as described in claim 1, it is characterised in that obtaining with different from first color temperature value described the After 3rd image of two color temperature values, in addition to:3rd image is shown by described image display unit.
6. a kind of electronic equipment, the electronic equipment includes image acquisition units and image-display units, it is characterised in that described Electronic equipment also includes:
First acquisition unit, for by described image collecting unit, obtaining first color temperature value that has in an area of visual field First image;
Detection unit, for showing the second image by described image display unit, detects whether to exist to second image The determination operation for being used to determine reference image vegetarian refreshments carried out;It is described to determine that operation is specially:Determine to be wrapped in second image Difference in the M pixel contained between color-values and true standard color-values meets the pixel of a threshold value as the benchmark Pixel, M is positive integer;
Determining unit, for when there is the determination operation, responding the determination operation, base is determined in second image Quasi- pixel;
Processing unit, for each picture of the N number of pixel included based on the reference image vegetarian refreshments, amendment described first image The color-values of vegetarian refreshments, obtain the 3rd image with second color temperature value different from first color temperature value, wherein, N is just whole Number.
7. electronic equipment as claimed in claim 6, it is characterised in that described first image and second image are same figure Picture, or described first image and second image are different images.
8. electronic equipment as claimed in claim 6, it is characterised in that the electronic equipment also includes second acquisition unit, is used In:The first color-values for characterizing the color-values of reference image vegetarian refreshments described in second image are obtained, by the color-values Actual standard color-values are adjusted to from first color-values.
9. electronic equipment as claimed in claim 8, it is characterised in that the processing unit specifically for:Based on described first The benchmark pixel is removed in color-values and the actual standard color-values, N number of pixel that described first image is included The color-values of ith pixel point outside point are adapted to the i-th actual standard color-values from the i-th color-values, wherein, i gets N from 1 successively.
10. electronic equipment as claimed in claim 6, it is characterised in that the electronic equipment also includes operating unit, for leading to Cross described image display unit and show the 3rd image.
CN201310349785.9A 2013-08-12 2013-08-12 A kind of method and electronic equipment for adjusting color balance Active CN104378612B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310349785.9A CN104378612B (en) 2013-08-12 2013-08-12 A kind of method and electronic equipment for adjusting color balance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310349785.9A CN104378612B (en) 2013-08-12 2013-08-12 A kind of method and electronic equipment for adjusting color balance

Publications (2)

Publication Number Publication Date
CN104378612A CN104378612A (en) 2015-02-25
CN104378612B true CN104378612B (en) 2017-09-29

Family

ID=52557229

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310349785.9A Active CN104378612B (en) 2013-08-12 2013-08-12 A kind of method and electronic equipment for adjusting color balance

Country Status (1)

Country Link
CN (1) CN104378612B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106061054B (en) * 2016-05-27 2018-12-14 联想(北京)有限公司 A kind of information processing method and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1806449A (en) * 2004-05-27 2006-07-19 索尼株式会社 Image processing apparatus, image processing method, and computer program
CN101212693A (en) * 2006-12-27 2008-07-02 兆宏电子股份有限公司 White balancing method and image adjusting device
CN101371271A (en) * 2006-01-10 2009-02-18 松下电器产业株式会社 Color correction device, color correction method, dynamic camera color correction device, and video search device using the same
CN101711482A (en) * 2007-03-23 2010-05-19 摩托罗拉公司 Apparatus and method for image color correction in a portable device
CN101227623B (en) * 2008-01-31 2012-07-04 炬力集成电路设计有限公司 White balance adjustment method, system and camera
CN102685513A (en) * 2012-05-21 2012-09-19 信利光电(汕尾)有限公司 White balance processing method and device
CN103037224A (en) * 2012-12-07 2013-04-10 珠海全志科技股份有限公司 Image white balance processing method and device
CN103179322A (en) * 2011-12-20 2013-06-26 联想(北京)有限公司 Image color correction method and electronic device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4471373B2 (en) * 2004-12-27 2010-06-02 キヤノン株式会社 Imaging apparatus and control method thereof
CN101110963B (en) * 2006-07-21 2010-05-12 帆宣系统科技股份有限公司 Image adjusting device
CN101242476B (en) * 2008-03-13 2010-09-29 北京中星微电子有限公司 Automatic correction method of image color and digital camera system
CN101651770A (en) * 2008-08-14 2010-02-17 北京书生国际信息技术有限公司 Color correcting method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1806449A (en) * 2004-05-27 2006-07-19 索尼株式会社 Image processing apparatus, image processing method, and computer program
CN101371271A (en) * 2006-01-10 2009-02-18 松下电器产业株式会社 Color correction device, color correction method, dynamic camera color correction device, and video search device using the same
CN101212693A (en) * 2006-12-27 2008-07-02 兆宏电子股份有限公司 White balancing method and image adjusting device
CN101711482A (en) * 2007-03-23 2010-05-19 摩托罗拉公司 Apparatus and method for image color correction in a portable device
CN101227623B (en) * 2008-01-31 2012-07-04 炬力集成电路设计有限公司 White balance adjustment method, system and camera
CN103179322A (en) * 2011-12-20 2013-06-26 联想(北京)有限公司 Image color correction method and electronic device
CN102685513A (en) * 2012-05-21 2012-09-19 信利光电(汕尾)有限公司 White balance processing method and device
CN103037224A (en) * 2012-12-07 2013-04-10 珠海全志科技股份有限公司 Image white balance processing method and device

Also Published As

Publication number Publication date
CN104378612A (en) 2015-02-25

Similar Documents

Publication Publication Date Title
CN110447051B (en) Perceptually preserving contrast and chroma of a reference scene
CN105187810B (en) A kind of auto white balance method and electronic medium device based on face color character
CN106030665B (en) Realistic colour is created for the virtual objects in augmented reality environment
US20200051225A1 (en) Fast Fourier Color Constancy
US20150332636A1 (en) Image display device and method
CN109151426A (en) A kind of white balance adjustment method, device, camera and medium
CN101272508A (en) Imaging device and method of processing imaging result in imaging device
CN105940673B (en) Image processing apparatus and image processing method
CN106791468A (en) A kind of mobile terminal and its shooting light compensation method
CN110675839A (en) Screen adjusting method, electronic equipment and related device
CN108234971A (en) White balance parameter determines method, white balance adjustment method and device, storage medium, terminal
Maali Amiri et al. A strategy toward spectral and colorimetric color reproduction using ordinary digital cameras
CN107424117A (en) Image U.S. face method, apparatus, computer-readable recording medium and computer equipment
Hertzmann The choices hidden in photography
CN106604009A (en) Method and device for achieving automatic white balance function
WO2021179142A1 (en) Image processing method and related apparatus
CN104378612B (en) A kind of method and electronic equipment for adjusting color balance
CN108270914A (en) A kind of Intelligent photographing method and device, intelligent terminal
CN107251554A (en) Color table creating device, camera review correction/control device and its method
CN114266694A (en) Image processing method, apparatus and computer storage medium
CN117692788B (en) Image processing method and electronic equipment
CN106875356A (en) The method and terminal of a kind of image procossing
CN108132935B (en) Image classification method and image display method
US8922580B2 (en) Method and system to modify a color lookup table
CN114531521B (en) Image processing method, device, storage medium and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant