CN106454305A - White balance correcting method and device - Google Patents

White balance correcting method and device Download PDF

Info

Publication number
CN106454305A
CN106454305A CN201611021238.8A CN201611021238A CN106454305A CN 106454305 A CN106454305 A CN 106454305A CN 201611021238 A CN201611021238 A CN 201611021238A CN 106454305 A CN106454305 A CN 106454305A
Authority
CN
China
Prior art keywords
point
green
value
maximum
statistics
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.)
Granted
Application number
CN201611021238.8A
Other languages
Chinese (zh)
Other versions
CN106454305B (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.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co 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 Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201611021238.8A priority Critical patent/CN106454305B/en
Publication of CN106454305A publication Critical patent/CN106454305A/en
Application granted granted Critical
Publication of CN106454305B publication Critical patent/CN106454305B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/73Colour balance circuits, e.g. white balance circuits or colour temperature control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Color Television Image Signal Generators (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

The invention provides a white balance correcting method and device. The method comprises the following steps: determining statistical points falling into a preset reference white area of an image to be corrected, and acquiring the number of the statistical points; determining a white balance gain according to the statistical points, and correcting the statistical points by using the white balance gain; determining green points from the corrected statistical points according to an RGB value, and acquiring the number of the green points; judging whether a ratio of the number of the green points to the number of the statistical points exceeds a first preset threshold value or not; and if so, drawing a green area according to the green points, removing the green area from the preset reference white area to obtain an updated white area, and performing white balance correction on the image to be corrected according to the updated white area. Through adoption of the white balance correcting method and device, the statistical points are acquired through the acquired image to be corrected, the green points are sieved from the statistical points, and finally the green area formed by the green points is removed from the preset reference white area, so that the aim of dynamically updating the preset reference white area according to an actual scene is fulfilled, and the correctness of the white balance correction is ensured.

Description

White balance correcting and device
Technical field
The application is related to technical field of image processing, more particularly, to a kind of white balance correcting and device.
Background technology
Current image modalities, when treating correction chart picture and carrying out white balance correction, typically set according to practical experience The reference white area put carries out white balance correction, first determines that image to be corrected falls into the white point in preset reference white area, Ran Hougen Calculate white balance gains according to these white points, and treat correction chart picture using white balance gains and carry out white balance correction, thus will treat The white that White Reduction in correction chart picture perceives for human eye, makes the effect that the image restoring after correction perceives for human eye.But Existing white area delimit be fixing it is impossible to white area is dynamically updated according to actual scene, be difficult to rule so in different scenes Keep away the impact of green, especially in large area green scene when (for example, the large-area woods, greenbelt etc.), have substantial amounts of Green point falls in white area, and these green points can be taken as in the calculating that white point participates in white balance gains, after ultimately causing correction Image color colour cast.
Content of the invention
In view of this, the application provides a kind of white balance correcting and device, to solve existing white balance correction side Formula is difficult to avoid the problem of green impact.
According to the embodiment of the present application in a first aspect, providing a kind of white balance correcting, methods described includes:
Determine that image to be corrected falls into the statistics point in preset reference white area, and obtain the quantity of statistics point;
White balance gains are determined according to described statistics point, and using described white balance gains, school is carried out to described statistics point Just;
Green point is determined from the statistics point after correction according to rgb value, and obtains the quantity of green point;
Whether the ratio judging the quantity that the quantity of described green point is put with described statistics is more than the first predetermined threshold value;
If so, then according to described green point-rendering Green Zone, and remove described Green Zone from described preset reference white area, obtain more White area after new, and white balance correction is carried out to described image to be corrected according to the white area after described renewal.
According to the second aspect of the embodiment of the present application, provide a kind of white balance correction device, described device includes:
First determining unit, for determining that image to be corrected falls into the statistics point in preset reference white area, and obtains statistics The quantity of point;
Correction unit, for determining white balance gains according to described statistics point, and using described white balance gains to described Statistics point is corrected;
Second determining unit, for determining green point according to rgb value from the statistics point after correction, and obtains the number of green point Amount;
Whether the first judging unit, for judging the ratio of the quantity of described green point and the quantity of described statistics point more than the One predetermined threshold value;
Updating block, for when judged result is to be, according to described green point-rendering Green Zone and white from described preset reference Described Green Zone is removed in area, the white area after being updated, and according to the white area after described renewal, described image to be corrected is carried out White balance correction.
Application the embodiment of the present application, image modalities can first determine that image to be corrected falls in preset reference white area Statistics point, and obtain the quantity of statistics point;Then determine white balance gains according to these statistics points, and utilize white balance gains pair Each statistics point is corrected, and determines green point according to rgb value from the statistics point after correction, and obtains the quantity of green point;? Whether the ratio of the quantity judging green point afterwards and the quantity counting point is more than the first predetermined threshold value;If so, then according to green point-rendering Green Zone, and remove Green Zone from preset reference white area, the white area after being updated, and correction chart is treated according to the white area after updating As carrying out white balance correction.Based on above-mentioned implementation, statistics point is obtained by the image to be corrected of collection in actual scene, And filter out green point from these statistics points, green point quantity ratio more than the first predetermined threshold value in the case of, from default With reference to the Green Zone removing green point formation in white area, thus, reach the purpose dynamically updating preset reference white area according to actual scene, Ensure that the accuracy of white balance correction, especially under large area green scene, can accurately go back the original color of original image. Additionally, this implementation only need to update a preset reference white area in one scenario, as long as scene does not change, subsequently adopt The image of collection all can carry out white balance correction using the white area after updating.
Brief description
Figure 1A is a kind of embodiment flow chart of white balance correcting according to an exemplary embodiment for the application;
A kind of preset reference white area schematic diagram that Figure 1B exemplifies for enforcement according to Figure 1A for the application;
One kind that Fig. 1 C exemplifies for enforcement according to Figure 1A for the application falls into preset reference white area statistics and puts and white Balancing gain point schematic diagram;
The another kind that Fig. 1 D exemplifies for enforcement according to Figure 1A for the application fall into preset reference white area statistics point and White balance gains point schematic diagram;
Fig. 2A is a kind of embodiment flow process of white balance correcting according to an exemplary embodiment one for the application Figure;
Fig. 2 B is the distribution schematic diagram of the statistics point after a kind of correction according to Fig. 2A illustrated embodiment for the application;
Fig. 3 A is a kind of embodiment flow process of white balance correcting according to an exemplary embodiment one for the application Figure;
Fig. 3 B is a kind of Green Zone schematic diagram according to Fig. 3 A illustrated embodiment for the application;
Fig. 3 C is the Green Zone schematic diagram after a kind of extension according to Fig. 3 A illustrated embodiment for the application;
Fig. 4 is a kind of hardware structure diagram of image modalities according to an exemplary embodiment for the application;
Fig. 5 is a kind of example structure figure of white balance correction device according to an exemplary embodiment for the application.
Specific embodiment
Here will in detail exemplary embodiment be illustrated, its example is illustrated in the accompanying drawings.Explained below is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with such as appended The example of the consistent apparatus and method of some aspects being described in detail in claims, the application.
It is the purpose only merely for description specific embodiment in term used in this application, and be not intended to be limiting the application. " a kind of ", " described " and " being somebody's turn to do " of singulative used in the application and appended claims is also intended to including most Form, unless context clearly shows that other implications.It is also understood that term "and/or" used herein refers to and wraps Containing one or more associated any or all possible combination listing project.
It will be appreciated that though various information may be described using term first, second, third, etc. in the application, but this A little information should not necessarily be limited by these terms.These terms are only used for same type of information is distinguished from each other out.For example, without departing from In the case of the application scope, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as One information.Depending on linguistic context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determining ".
Figure 1A is a kind of embodiment flow chart of white balance correcting according to an exemplary embodiment for the application; A kind of preset reference white area schematic diagram that Figure 1B exemplifies for enforcement according to Figure 1A for the application;Fig. 1 C be the application according to One kind that enforcement shown in Figure 1A exemplifies falls into preset reference white area statistics point and white balance gains point schematic diagram;Fig. 1 D is this The another kind that enforcement according to Figure 1A for the application exemplifies falls into preset reference white area statistics point and white balance gains point is illustrated Figure, this embodiment can apply to image modalities, and as shown in Figure 1A, this white balance correcting comprises the following steps:
Step 101:Determine that image to be corrected falls into the statistics point in preset reference white area, and obtain the quantity of statistics point.
Wherein, the statistics point falling into preset reference white area is all processed as white point.In one embodiment, using a fixation Color temperature light sources irradiate white object it may be determined that a white area subregion, and the shape of this white area subregion is set by this image collection The characteristic of the ccd image sensor in standby determines, the preset reference white area in the application can be, using different fixing colour temperatures Light source irradiates one reference white area of multiple white areas subregion common combination formation that white object determines, as shown in Figure 1B, is one The preset reference white area determining under individual fixing colour temperature, this preset reference white area is with G/R as transverse axis, and G/B is the coordinate system of the longitudinal axis In, wherein, G/R refers to the ratio of G value and R value, and G/B refers to the ratio of G value and B value, this reference white area be shaped as eight Side shape.
Step 102:White balance gains are determined according to this statistics point, and using this white balance gains, school is carried out to statistics point Just.
In one embodiment, the statistical information of statistics point before determining white balance gains, can first be obtained, formula is such as Under:
Wherein, n is the quantity of the statistics point falling into preset reference white area, ri、gi、biThe R value of respectively i-th statistics point, G value, B value.
White balance gains are determined according to the statistical information of statistics point, formula is as follows:
As shown in Figure 1 C, under normal conditions, falling into the statistics point in preset reference white area, that is, it is real white Point, is A point according to the white balance gains point that these white points determine.
Using white balance gains, statistics point is corrected, formula is as follows:
Ri=rgain×ri, Gi=gi, Bi=bgain×bi
Wherein, ri、gi、biIt is respectively the R value before i-th statistics point calibration, G value, B value, Ri、Gi、BiIt is respectively i-th system R value after enumeration correction, G value, B value.
In an exemplary scene, as shown in figure ip, it is under large area green scene, have green point in a large number to fall into default In reference white area, and it is treated as white point and processes, because the G value of green point is larger relative to R value and B value meeting ratio, and the G value of white point, R Value, B value difference are not very big, and therefore in G/R, in the coordinate system of G/B, green point is usually located at the upper right side of white point.Now, according to Fall into the green point in preset reference white area and the white balance gains point of white point determination can move to B point by A point, if utilizing B point Go each pixel treating correction chart picture to carry out white balance correction, then will certainly cause image color cast.
Step 103:Green point is determined from the statistics point after correction according to rgb value, and obtains the quantity of green point.
Due under green scene collection image to be corrected have much green points fall into preset reference white area it is therefore desirable to These green points are screened.
Step 104:Judge the quantity of green point and whether count the ratio of the quantity put more than the first predetermined threshold value, if it is not, Then execution step 105, if so, then execution step 106.
First predetermined threshold value can be configured according to practical experience, and for example, the first predetermined threshold value can be 95%.If The quantity of green point has exceeded the first predetermined threshold value with the ratio of the quantity of statistics point, represents the green point meter to white balance gains Calculate and cause very big impact, need to remove these green points when calculating white balance gains, such as the quantity of light green point and statistics point Quantity ratio not less than the first predetermined threshold value, represent that green point does not also impact to the calculating of white balance gains, Ke Yican In the calculating to white balance gains.
Step 105:Treat correction chart picture using this white balance gains and carry out white balance correction.
If the ratio that the quantity falling into the green point in preset reference white area accounts for is not above the first predetermined threshold value, can be straight Connect the white balance gains using determining to treat each pixel in correction chart picture and carry out white balance correction, will each pixel R value be multiplied by rgain, B value is multiplied by bgain.
Step 106:According to this green point-rendering Green Zone, and remove this Green Zone from preset reference white area, after being updated White area, and treat correction chart picture and carry out white balance correction according to the white area after updating.
In one embodiment, behind the white area after being updated, can redefine after image to be corrected falls into renewal The statistics point in white area, now, the statistics point falling into the white area after renewal is white point, is then determined using these statistics points and puts down in vain Weighing apparatus gain, and carries out white balance correction using each pixel that white balance gains treat correction chart picture, thus by figure to be corrected The color rendition of picture is original color.
Before execution step 101, can first obtain the current aperture yield value of image modalities and fast gate value, and sentence Whether disconnected aperture yield value is more than the second predetermined threshold value and whether fast gate value is more than the 3rd predetermined threshold value;If so, then judge image Whether the image to be corrected of collecting device collection is coloured image;If coloured image, then the process of execution step 101.
Wherein, the second predetermined threshold value and the 3rd predetermined threshold value are configured according to practical experience, for example, the second predetermined threshold value Can be 3 decibels, the 3rd predetermined threshold value can be 125 microseconds.Generally, in aperture yield value more than the second predetermined threshold value and shutter In the case that value is more than the 3rd predetermined threshold value, the scene of expression is outdoor scene, and outdoor scene be easy to run into large-area Green scene, therefore, the scheme of the application can be directed to outdoor scene.Judge whether image to be corrected is that coloured image can lead to The photo resistance value crossed in image modalities is judged with aperture yield value, if photo resistance value is more than the first present count It is worth and aperture yield value is less than the second default value, then for coloured image, need to carry out white balance correction, otherwise, be artwork master As it is not necessary to carry out white balance correction.
What deserves to be explained is, after the white area after being updated, as long as the aperture yield value of image modalities and fast Gate value does not change, then every frame image to be corrected of subsequent acquisition all can be carried out white flat using the white area after updating Weighing apparatus correction.
From above-described embodiment, image modalities can first determine that image to be corrected falls in preset reference white area Statistics point, and obtain the quantity of statistics point;Then determine white balance gains according to these statistics points, and utilize white balance gains pair Each statistics point is corrected, and determines green point according to rgb value from the statistics point after correction, and obtains the quantity of green point;? Whether the ratio of the quantity judging green point afterwards and the quantity counting point is more than the first predetermined threshold value;If so, then according to green point-rendering Green Zone, and remove Green Zone from preset reference white area, the white area after being updated, and correction chart is treated according to the white area after updating As carrying out white balance correction.Based on above-mentioned implementation, statistics point is obtained by the image to be corrected of collection in actual scene, And filter out green point from these statistics points, green point quantity ratio more than the first predetermined threshold value in the case of, from default With reference to the Green Zone removing green point formation in white area, thus, reach the purpose dynamically updating preset reference white area according to actual scene, Ensure that the accuracy of white balance correction, especially under large area green scene, can accurately go back the original color of original image. Additionally, this implementation only need to update a preset reference white area in one scenario, as long as scene does not change, subsequently adopt The image of collection all can carry out white balance correction using the white area after updating.
Fig. 2A is a kind of embodiment flow process of white balance correcting according to an exemplary embodiment one for the application Figure;Fig. 2 B is the distribution schematic diagram of the statistics point after a kind of correction according to Fig. 2A illustrated embodiment for the application, this enforcement The said method that example is provided using the embodiment of the present application, taking determine green point according to rgb value from the statistics point after correction as a example enters Row exemplary illustration, as shown in Figure 2 A, comprises the following steps:
Step 201:For the statistics point after each correction, the G value obtaining the point of the statistics after this correction is poor with the first of R value Value, and obtain the G value of the point of the statistics after this correction and the second difference of B value.
Under normal circumstances, the rgb value of corrected statistics point meets G/R=1, G/B=1, and that is, rgb value is all equal. However, under actual scene, when having at green in statistics point, because green point has also assisted in the calculating of white balance gains, The rgb value of the white point after therefore correcting may be not completely equivalent, but between R value, B value and G value, difference is not very big, and Between the rgb value of green point after correction, the meeting of difference is more much larger than the rgb value before correction, therefore can be after obtaining this correction Statistics point the mode that compares with threshold value respectively with the second difference of B value with the first difference and the G value of R value of G value, from correction In statistics point afterwards, green point is screened, concrete comparison procedure refers to described in step 202.
It should be noted that because the G value of white point after correction is connect with the ratio of B value substantially with the ratio of R value and G value It is bordering on 1, and the ratio of the G value of green point after correcting and the ratio of R value and G value and B value is still above 1, and can be than correction Front ratio is much larger, accordingly it is also possible to the G value of statistics point after obtaining this correction and the ratio of R value and G value and B Green point is screened from the statistics point after correction by the mode that the ratio of value is compared with threshold value respectively.Those skilled in the art It is understood that the selection of threshold value can be determined by the empirical value that many experiments obtain, the application here is no longer detailed State.
Additionally, in G/R, the coordinate system of G/B, the green point after correction is still located on the upper right side of the white point after correction.As Shown in Fig. 2 B, A block be corrected after white point distributed areas, B block be corrected after green distributed areas, B block be located at A The upper right side of block, C block is the white point distributed areas before correction, and D block is green distributed areas before correction, and D block is located at C block Upper right side.
Step 202:Judge the first difference whether more than the 4th predetermined threshold value and whether the second difference presets threshold more than the 5th Value, if so, then execution step 203, otherwise, continue executing with step 201.
In order to guarantee to filter out green point from the statistics point after correction, the 4th predetermined threshold value and the 5th predetermined threshold value can Determined with the empirical value being obtained according to many experiments, for example, after many experiments, the 4th predetermined threshold value and the 5th presets threshold Value can be 25.
Step 203:Determine that the statistics after this correction is put as green point.
In the present embodiment, the statistics point falling into preset reference white area is carried out after white balance correction, after to correction The rgb value of statistics point comparison, that is, G value compare with the 4th predetermined threshold value with the difference of R value, the difference and the 5th of G value and B value Predetermined threshold value compares, and determines whether the point of the statistics after this correction is green point, thus, reach the mesh screening green point from statistics point 's.
Fig. 3 A is a kind of embodiment flow process of white balance correcting according to an exemplary embodiment one for the application Figure;Fig. 3 B is a kind of Green Zone schematic diagram according to Fig. 3 A illustrated embodiment for the application;Fig. 3 C is for the application according to Fig. 3 A institute Show the Green Zone schematic diagram after a kind of extension that enforcement exemplifies;The present embodiment utilizes the said method that the embodiment of the present application provides, Taking according to this green point-rendering Green Zone as a example illustrative, as shown in Figure 3A, comprise the following steps:
Step 301:With G/R, G/B sets up coordinate system for axle, obtains this green point central point in a coordinate system.
As the coordinate system set up for axle with G/R, G/B in step 101, the formula of these green point central points in a coordinate system Can be:
Wherein, RcenWith BcenCentered on point, N is the quantity falling into the green point in preset reference white area, Ri, Gi, BiFor i-th The R value of individual green point, G value and B value.
Step 302:Obtain each green point distance away from central point, and this distance is ranked up from big to small.
The formula of the distance away from central point can be:
Step 303:According to ranking results, from the beginning of the green point maximum away from central point distance, exclude the 6th predetermined threshold value number The green point of amount.
Wherein, as shown in Figure 2 B, because green point or white point are all generally piecemeal distributions, at a distance of very little between each green point, May also have overlapping on a small quantity, therefore, after the distance away from central point for the point green to each sorts from big to small, default according to the 6th Threshold value determines green quantity needing exclusion, and from the beginning of the initial position of ranking results, exclusion needs the green point of exclusion, from And realize excluding away from central point apart from big green point, reach the purpose of the green point that exclusion is misjudged, the 6th predetermined threshold value can root According to practical experience setting, for example, the 6th predetermined threshold value can be 5%, if there are 100 green points, then can exclude 5 Ge Ju centers The distant green point of point.
Step 304:First maximum of G/R and the second maximum of the first minimum of a value, G/B is obtained from remaining green point With the second minimum of a value.
Step 305:The first maximum according to G/R and the first minimum of a value, second maximum of G/B and the second minimum of a value exist Green Zone is drawn in coordinate system.
For described in step 304 and step 305, in one embodiment, according to first maximum and first of the G/R obtaining Minimum of a value, second maximum of G/B and the second minimum of a value, can draw Green Zone in a coordinate system with the shape of quadrangle, such as scheme Shown in 3B, it is the Green Zone of quadrangle form.
It should be noted that image modalities can also determine a distance away from central point from remaining green point Big green point, and with central point as the center of circle, this distance draws a circle as Green Zone for radius, and this circle comprises all remaining Green point.
After step 305, image modalities can be extended to the Green Zone drawn, to increase the many scenes in Green Zone Applicability.In a coordinate system, the 3rd maximum of G/R and the 4th maximum of G/B in preset reference white area can be obtained;If First maximum is less than the 3rd maximum, then utilize the 3rd maximum to update the first maximum;If the second maximum is less than the 4th Maximum, then utilize the 4th maximum to update the second maximum;According to the first maximum after updating and after updating second Big value extends this Green Zone.
Wherein, the 3rd maximum is mapped in the maximum on G/B axle for preset reference white area, and the 4th maximum is default ginseng Examine the maximum that white area is mapped on G/R axle, if the Green Zone drawn is included in preset reference white area, Green Zone can be entered Row extension, that is, update first maximum of G/R and second maximum of G/B.As shown in Figure 3 C, it is through the Green Zone of extension.
It should be noted that after determining the shape of Green Zone, increasing by way of default straight line by the border in Green Zone, Make the shape of this Green Zone similar to the shape in preset reference white area, remove the operating process of Green Zone in order to image modalities. Preset reference white area as shown in Figure 1B is to be combined by eight sides to be formed, and the Green Zone shown in Fig. 3 C is to be combined by four edges to be formed , therefore, it can increase by 4 straight lines on four summits of the Green Zone shown in Fig. 3 C, so that Green Zone is also made up of eight sides.
In the present embodiment, obtain the central point of green point first, and exclude the distant green point of distance center point, to arrange Except the green point misjudged, then further according to remaining green point the first maximum in a coordinate system, the first minimum of a value, second maximum Value and the second minimum of a value draw Green Zone, and if the Green Zone drawn is included in preset reference white area, can also be according to default With reference to the 3rd maximum on G/B axle for the white area, and the 4th maximum extension Green Zone on G/R axle, to increase Green Zone Duo Chang The applicability of scape.Additionally, after finally determining the shape of Green Zone, default straight line can be increased by the border in Green Zone Mode, makes the shape of Green Zone similar to the shape in described preset reference white area, thus, facilitate image modalities and remove Green Zone Operating process.
Corresponding with the embodiment of aforementioned white balance correcting, present invention also provides the enforcement of white balance correction device Example.
The embodiment of the application white balance correction device can be applied in image modalities.Device embodiment can be led to Cross software to realize it is also possible to realize by way of hardware or software and hardware combining.As a example implemented in software, as a logic Device in meaning, is to be read computer program instructions corresponding in nonvolatile memory by the processor of its place equipment Get and in internal memory, run formation.For hardware view, as shown in figure 4, being illustrated according to an exemplary embodiment for the application A kind of image modalities hardware structure diagram, except the processor shown in Fig. 4, internal memory, network interface and non-volatile Outside memory, the equipment that in embodiment, device is located, generally according to the actual functional capability of this equipment, can also include other hardware, This is repeated no more.
Fig. 5 is a kind of example structure figure of white balance correction device according to an exemplary embodiment for the application, This embodiment can be applied in image modalities, as shown in figure 5, this device includes:First determining unit 510, correction unit 520th, the second determining unit 530, the first judging unit 540, updating block 550.
First determining unit 510, for determining that image to be corrected falls into the statistics point in preset reference white area, and obtains system The quantity of enumeration;
Correction unit 520, for determining white balance gains according to described statistics point, and using described white balance gains to institute State statistics point to be corrected;
Second determining unit 530, for determining green point according to rgb value from the statistics point after correction, and obtains green point Quantity;
First judging unit 540, whether the quantity for judging described green point is surpassed with the ratio of the quantity of described statistics point Cross the first predetermined threshold value;
Updating block 550, for when judged result is to be, according to described green point-rendering Green Zone, and from described default ginseng Examine and in white area, remove described Green Zone, the white area after being updated, and according to the white area after described renewal to described image to be corrected Carry out white balance correction.
In an optional implementation, described device also includes (not shown in Fig. 5):
Acquiring unit, for obtaining the current aperture yield value of image modalities and fast gate value;
Whether the second judging unit, for judging described aperture yield value more than the second predetermined threshold value and described fast gate value is No more than the 3rd predetermined threshold value;
3rd judging unit, for when judged result is to be, judging the figure to be corrected of described image modalities collection Seem no for coloured image;
Performance element, for when judged result is to be, execution determines that image to be corrected falls in preset reference white area The process of statistics point.
In another optional implementation, described second determining unit 530, specifically for according to rgb value from school During determining green point in statistics point after just, for the statistics point after each correction, obtain the G of the point of the statistics after this correction Value and the first difference of R value;Obtain the G value of the point of the statistics after this correction and the second difference of B value;Judge that described first difference is No more than the 4th predetermined threshold value and whether described second difference more than the 5th predetermined threshold value;If it is determined that the system after this correction Enumeration is green point.
In another optional implementation, described updating block 550, specifically for green according to described green point-rendering During area, with G/R, G/B sets up coordinate system for axle, obtains central point in described coordinate system for the described green point;Obtain every The distance away from described central point for the individual green point, and described distance is ranked up from big to small;According to ranking results, from away from described The maximum green point of the distance of heart point starts, the green point of exclusion the 6th pre-set threshold numbers;The of G/R is obtained from remaining green point One maximum and the first minimum of a value, second maximum of G/B and the second minimum of a value;The first maximum according to described G/R and One minimum of a value, second maximum of described G/B and the second minimum of a value draw Green Zone in described coordinate system.
In another optional implementation, described device also includes (not shown in Fig. 5):
Green Zone expanding element, for, in described coordinate system, obtaining the 3rd maximum of the G/R in described preset reference white area And the 4th maximum of G/B;If described first maximum is less than described 3rd maximum, using described 3rd maximum more Newly described first maximum;If described second maximum is less than described 4th maximum, updated using described 4th maximum Described second maximum;Described Green Zone is extended according to the first maximum after updating and the second maximum after renewal.
In another optional implementation, described device also includes (not shown in Fig. 5):
Increase straight line units, for removing described Green Zone in described updating block 550 from described preset reference white area Before, increased by way of default straight line by the border in Green Zone, make the shape of described Green Zone and described preset reference white area Shape is similar.
In said apparatus, the process of realizing of the function of unit and effect specifically refers to corresponding step in said method Realize process, will not be described here.
For device embodiment, because it corresponds essentially to embodiment of the method, thus real referring to method in place of correlation The part applying example illustrates.Device embodiment described above is only schematically, wherein said as separating component The unit illustrating can be or may not be physically separate, as the part that unit shows can be or can also It is not physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can be according to actual Need to select the purpose to realize application scheme for some or all of module therein.Those of ordinary skill in the art are not paying In the case of going out creative work, you can to understand and to implement.
From above-described embodiment, image modalities can first determine that image to be corrected falls in preset reference white area Statistics point, and obtain the quantity of statistics point;Then determine white balance gains according to these statistics points, and utilize white balance gains pair Each statistics point is corrected, and determines green point according to rgb value from the statistics point after correction, and obtains the quantity of green point;? Whether the ratio of the quantity judging green point afterwards and the quantity counting point is more than the first predetermined threshold value;If so, then according to green point-rendering Green Zone, and remove Green Zone from preset reference white area, the white area after being updated, and correction chart is treated according to the white area after updating As carrying out white balance correction.Based on above-mentioned implementation, statistics point is obtained by the image to be corrected of collection in actual scene, And filter out green point from these statistics points, green point quantity ratio more than the first predetermined threshold value in the case of, from default With reference to the Green Zone removing green point formation in white area, thus, reach the purpose dynamically updating preset reference white area according to actual scene, Ensure that the accuracy of white balance correction, especially under large area green scene, can accurately go back the original color of original image. Additionally, this implementation only need to update a preset reference white area in one scenario, as long as scene does not change, subsequently adopt The image of collection all can carry out white balance correction using the white area after updating.
The foregoing is only the preferred embodiment of the application, not in order to limit the application, all essences in the application Within god and principle, any modification, equivalent substitution and improvement done etc., should be included within the scope of the application protection.

Claims (12)

1. a kind of white balance correcting is it is characterised in that methods described includes:
Determine that image to be corrected falls into the statistics point in preset reference white area, and obtain the quantity of statistics point;
White balance gains are determined according to described statistics point, and using described white balance gains, described statistics point is corrected;
Green point is determined from the statistics point after correction according to rgb value, and obtains the quantity of green point;
Whether the ratio judging the quantity that the quantity of described green point is put with described statistics is more than the first predetermined threshold value;
If so, then according to described green point-rendering Green Zone, and remove described Green Zone from described preset reference white area, after being updated White area, and according to described update after white area white balance correction is carried out to described image to be corrected.
2. method according to claim 1 is it is characterised in that methods described also includes:
Obtain the current aperture yield value of image modalities and fast gate value;
Judge described aperture yield value whether more than the second predetermined threshold value and whether described fast gate value is more than the 3rd predetermined threshold value;
If so, then judge whether the image to be corrected that described image modalities gather is coloured image;
If coloured image, then execution determines that image to be corrected falls into the process of the point of the statistics in preset reference white area.
3. method according to claim 1 is it is characterised in that described determine from the statistics point after correction according to rgb value Green, including:
For the statistics point after each correction, obtain the G value of the point of the statistics after this correction and the first difference of R value;
Obtain the G value of the point of the statistics after this correction and the second difference of B value;
Judge described first difference whether more than the 4th predetermined threshold value and whether described second difference is more than the 5th predetermined threshold value;
If it is determined that the statistics after this correction is put as green point.
4. method according to claim 1 it is characterised in that described according to described green point-rendering Green Zone, including:
With G/R, G/B sets up coordinate system for axle, obtains central point in described coordinate system for the described green point;
Obtain each green point distance away from described central point, and described distance is ranked up from big to small;
According to ranking results, from the beginning of the maximum green point of the distance away from described central point, exclude the green of the 6th pre-set threshold numbers Point;
The first maximum and the first minimum of a value, second maximum of G/B and second that obtain G/R from remaining green point are minimum Value;
The first maximum according to described G/R and the first minimum of a value, second maximum of described G/B and the second minimum of a value are described Green Zone is drawn in coordinate system.
5. method according to claim 4 is it is characterised in that methods described also includes:
In described coordinate system, obtain the 3rd maximum of G/R and the 4th maximum of G/B in described preset reference white area;
If described first maximum is less than described 3rd maximum, update described first using described 3rd maximum maximum Value;
If described second maximum is less than described 4th maximum, update described second using described 4th maximum maximum Value;
Described Green Zone is extended according to the first maximum after updating and the second maximum after renewal.
6. method according to claim 1 it is characterised in that remove from described preset reference white area described Green Zone it Before, methods described also includes:
Increased by way of default straight line by the border in Green Zone, make the shape of described Green Zone and the shape in described preset reference white area Shape is similar.
7. a kind of white balance correction device is it is characterised in that described device includes:
First determining unit, for determining that image to be corrected falls into the statistics point in preset reference white area, and obtains statistics point Quantity;
Correction unit, for determining white balance gains according to described statistics point, and using described white balance gains to described statistics Point is corrected;
Second determining unit, for determining green point according to rgb value from the statistics point after correction, and obtains the quantity of green point;
First judging unit, whether the quantity for judging described green point is pre- more than first with the ratio of the quantity of described statistics point If threshold value;
Updating block, for when judged result is to be, according to described green point-rendering Green Zone, and from described preset reference white area Remove described Green Zone, the white area after being updated, and according to the white area after described renewal, described image to be corrected is carried out white flat Weighing apparatus correction.
8. according to claim 7 device it is characterised in that described device also includes:
Acquiring unit, for obtaining the current aperture yield value of image modalities and fast gate value;
Whether the second judging unit, for judging described aperture yield value more than the second predetermined threshold value and whether described fast gate value surpasses Cross the 3rd predetermined threshold value;
3rd judging unit, for when judged result is to be, judging that the image to be corrected of described image modalities collection is No for coloured image;
Performance element, for when judged result is to be, execution determines that image to be corrected falls into the statistics in preset reference white area The process of point.
9. according to claim 7 device it is characterised in that described second determining unit, specifically for according to rgb value from During determining green point in statistics point after correction, for the statistics point after each correction, obtain the statistics point after this correction G value and R value the first difference;Obtain the G value of the point of the statistics after this correction and the second difference of B value;Judge that described first is poor Whether value is more than the 4th predetermined threshold value and whether described second difference is more than the 5th predetermined threshold value;If it is determined that after this correction Statistics put as green point.
10. according to claim 7 device it is characterised in that described updating block, specifically for being painted according to described green point During Green Zone processed, with G/R, G/B sets up coordinate system for axle, obtains central point in described coordinate system for the described green point;Obtain Take each green point distance away from described central point, and described distance is ranked up from big to small;According to ranking results, from away from institute The green point stating the distance maximum of central point starts, the green point of exclusion the 6th pre-set threshold numbers;G/R is obtained from remaining green point The first maximum and the first minimum of a value, second maximum of G/B and the second minimum of a value;The first maximum according to described G/R Draw Green Zone with the first minimum of a value, second maximum of described G/B and the second minimum of a value in described coordinate system.
11. according to claim 10 device it is characterised in that described device also includes:
Green Zone expanding element, in described coordinate system, obtain described preset reference white area the 3rd maximum of G/R and 4th maximum of G/B;If described first maximum is less than described 3rd maximum, update institute using described 3rd maximum State the first maximum;If described second maximum is less than described 4th maximum, updated described using described 4th maximum Second maximum;Described Green Zone is extended according to the first maximum after updating and the second maximum after renewal.
12. according to claim 7 device it is characterised in that described device also includes:
Increase straight line units, before removing described Green Zone from described preset reference white area, lead to in described updating block Cross the mode increasing default straight line on the border of Green Zone, make the shape of described Green Zone and the shape phase in described preset reference white area Seemingly.
CN201611021238.8A 2016-11-14 2016-11-14 White balance correcting and device Active CN106454305B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611021238.8A CN106454305B (en) 2016-11-14 2016-11-14 White balance correcting and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611021238.8A CN106454305B (en) 2016-11-14 2016-11-14 White balance correcting and device

Publications (2)

Publication Number Publication Date
CN106454305A true CN106454305A (en) 2017-02-22
CN106454305B CN106454305B (en) 2018-09-18

Family

ID=58221230

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611021238.8A Active CN106454305B (en) 2016-11-14 2016-11-14 White balance correcting and device

Country Status (1)

Country Link
CN (1) CN106454305B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107610180A (en) * 2017-09-12 2018-01-19 上海小蚁科技有限公司 AWB calibration methods and device, computer-readable recording medium, terminal
CN108337496A (en) * 2018-04-25 2018-07-27 普联技术有限公司 White balancing treatment method, processing unit, processing equipment and storage medium
CN108377372A (en) * 2018-03-13 2018-08-07 普联技术有限公司 A kind of white balancing treatment method, device, terminal device and storage medium
CN109005397A (en) * 2018-08-31 2018-12-14 建荣半导体(深圳)有限公司 A kind of method of adjustment, device, picture processing chip and the storage device of image white balance
CN111955004A (en) * 2018-06-18 2020-11-17 Jvc建伍株式会社 Color correction device
CN112055191A (en) * 2020-08-25 2020-12-08 浙江大华技术股份有限公司 White balance adjustment method, image acquisition device and storage medium
CN113055665A (en) * 2019-12-27 2021-06-29 Oppo广东移动通信有限公司 Image processing method, terminal and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004282133A (en) * 2003-03-12 2004-10-07 Seiko Epson Corp Automatic white balance processor and method, and image signal processor
CN101917633A (en) * 2010-09-01 2010-12-15 杭州海康威视软件有限公司 Image white balance processing method, device and camera thereof
CN102300100A (en) * 2010-06-28 2011-12-28 比亚迪股份有限公司 White balance control device and method
CN103297789A (en) * 2013-05-20 2013-09-11 周宇 White balance correcting method and white balance correcting device
CN103929632A (en) * 2014-04-15 2014-07-16 浙江宇视科技有限公司 Automatic white balance correcting method and device
CN105681775A (en) * 2016-03-08 2016-06-15 福州瑞芯微电子股份有限公司 White balance method and device
CN105872499A (en) * 2016-03-31 2016-08-17 乐视控股(北京)有限公司 Green area judging method based on RGB sensor

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004282133A (en) * 2003-03-12 2004-10-07 Seiko Epson Corp Automatic white balance processor and method, and image signal processor
CN102300100A (en) * 2010-06-28 2011-12-28 比亚迪股份有限公司 White balance control device and method
CN101917633A (en) * 2010-09-01 2010-12-15 杭州海康威视软件有限公司 Image white balance processing method, device and camera thereof
CN103297789A (en) * 2013-05-20 2013-09-11 周宇 White balance correcting method and white balance correcting device
CN103929632A (en) * 2014-04-15 2014-07-16 浙江宇视科技有限公司 Automatic white balance correcting method and device
CN105681775A (en) * 2016-03-08 2016-06-15 福州瑞芯微电子股份有限公司 White balance method and device
CN105872499A (en) * 2016-03-31 2016-08-17 乐视控股(北京)有限公司 Green area judging method based on RGB sensor

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107610180A (en) * 2017-09-12 2018-01-19 上海小蚁科技有限公司 AWB calibration methods and device, computer-readable recording medium, terminal
CN107610180B (en) * 2017-09-12 2020-03-13 上海小蚁科技有限公司 AWB calibration method and device, computer-readable storage medium and terminal
CN108377372A (en) * 2018-03-13 2018-08-07 普联技术有限公司 A kind of white balancing treatment method, device, terminal device and storage medium
CN108377372B (en) * 2018-03-13 2019-10-29 普联技术有限公司 A kind of white balancing treatment method, device, terminal device and storage medium
CN108337496A (en) * 2018-04-25 2018-07-27 普联技术有限公司 White balancing treatment method, processing unit, processing equipment and storage medium
CN108337496B (en) * 2018-04-25 2020-01-31 普联技术有限公司 White balance processing method, processing device, processing equipment and storage medium
CN111955004B (en) * 2018-06-18 2022-02-25 Jvc建伍株式会社 Color correction device
CN111955004A (en) * 2018-06-18 2020-11-17 Jvc建伍株式会社 Color correction device
CN109005397A (en) * 2018-08-31 2018-12-14 建荣半导体(深圳)有限公司 A kind of method of adjustment, device, picture processing chip and the storage device of image white balance
CN113055665A (en) * 2019-12-27 2021-06-29 Oppo广东移动通信有限公司 Image processing method, terminal and storage medium
CN113055665B (en) * 2019-12-27 2023-04-07 Oppo广东移动通信有限公司 Image processing method, terminal and storage medium
CN112055191A (en) * 2020-08-25 2020-12-08 浙江大华技术股份有限公司 White balance adjustment method, image acquisition device and storage medium
CN112055191B (en) * 2020-08-25 2022-08-09 浙江大华技术股份有限公司 White balance adjustment method, image acquisition device and storage medium

Also Published As

Publication number Publication date
CN106454305B (en) 2018-09-18

Similar Documents

Publication Publication Date Title
CN106454305A (en) White balance correcting method and device
US9390475B2 (en) Backlight detection method and device
CN103297789B (en) White balance correcting method and white balance correcting device
JP6874208B2 (en) White balance processing methods, electronic devices, and computer-readable storage media
US20190082509A1 (en) Color temperature adjustment method and device, light source, display apparatus
US20230230204A1 (en) Image processing method and apparatus, and method and apparatus for training image processing model
WO2020010638A1 (en) Method and device for detecting defective pixel in image
CN113239875B (en) Method, system and device for acquiring face characteristics and computer readable storage medium
CN108337496A (en) White balancing treatment method, processing unit, processing equipment and storage medium
CN109286758A (en) A kind of generation method of high dynamic range images, mobile terminal and storage medium
CN111210764A (en) LED screen correction method and correction device
CN102196153B (en) Image scene brightness difference judgment device and brightness difference judgment method
CN111369471A (en) Image processing method, device, equipment and storage medium
CN108055486A (en) A kind of brightness correcting method and device
CN108377372B (en) A kind of white balancing treatment method, device, terminal device and storage medium
CN109816720B (en) Road center detection method, airborne equipment and storage medium
CN109949250B (en) Image processing method and device
CN107027017A (en) A kind of method of adjustment, device, picture processing chip and the storage device of image white balance
CN110876072A (en) Batch registered user identification method, storage medium, electronic device and system
JP2007043919A (en) Image processor for working vehicle
CN112243119B (en) White balance processing method and device, electronic equipment and storage medium
CN102215323A (en) Repairing scratch impairments to an image
CN110750681B (en) Account similarity calculation method, storage medium, electronic device and system
DE102017125037A1 (en) Method and device for processing image data of an object in a household appliance
CN106028138A (en) Live broadcast video processing method and device

Legal Events

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