CN106454305B - White balance correcting and device - Google Patents
White balance correcting and device Download PDFInfo
- Publication number
- CN106454305B CN106454305B CN201611021238.8A CN201611021238A CN106454305B CN 106454305 B CN106454305 B CN 106454305B CN 201611021238 A CN201611021238 A CN 201611021238A CN 106454305 B CN106454305 B CN 106454305B
- Authority
- CN
- China
- Prior art keywords
- point
- green
- statistics
- maximum value
- value
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/64—Circuits for processing colour signals
- H04N9/73—Colour balance circuits, e.g. white balance circuits or colour temperature control
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera 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
A kind of white balance correcting of the application offer and device, method include:It determines that image to be corrected falls into the statistics point in preset reference white area, and obtains the quantity of statistics point;White balance gains are determined according to statistics point, and statistics point is corrected using white balance gains;Green point is determined from the statistics point after correction according to rgb value, and obtains the quantity of green point;Judge the quantity of green point and whether counts the ratio of the quantity of point more than the first predetermined threshold value;If so, according to green point-rendering Green Zone, and Green Zone is removed from preset reference white area, updated white area is obtained, and correction image is treated according to updated white area and carries out white balance correction.The application obtains statistics point by the image to be corrected of acquisition, and green point is filtered out in these statistics points, the Green Zone that green point is formed finally is removed from preset reference white area, to, achieve the purpose that, according to actual scene dynamic update preset reference white area, to ensure that the accuracy of white balance correction.
Description
Technical field
This application involves technical field of image processing more particularly to a kind of white balance correctings and device.
Background technology
Current image modalities are typically set according to practical experience when treating correction image progress white balance correction
The reference white area set carries out white balance correction, i.e., first determines that image to be corrected falls into the white point in preset reference white area, then root
White balance gains are calculated according to these white points, and treats correction image using white balance gains and carries out white balance correction, to wait for
The white that the White Reduction in image is human eye perception is corrected, it is the effect of human eye perception to make the image restoring after correction.However
It is fixed that existing white area, which delimited, cannot be difficult rule in this way in different scenes according to actual scene dynamic update white area
The influence for keeping away green especially in large area green scene when (for example, the woods of large area, greenbelt etc.), has a large amount of
Green point is fallen into white area, and these green points can be taken as white point to participate in the calculating of white balance gains, after ultimately causing correction
Image color colour cast.
Invention content
In view of this, a kind of white balance correcting of the application offer and device, to solve existing white balance correction side
Formula is difficult to avoid the problem that green influence.
According to the embodiment of the present application in a first aspect, provide a kind of white balance correcting, the method includes:
It determines that image to be corrected falls into the statistics point in preset reference white area, and obtains the quantity of statistics point;
White balance gains are determined according to the statistics point, and school is carried out to the statistics point using the white balance gains
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 of the quantity and the quantity for counting point that judge the green point is more than the first predetermined threshold value;
If so, according to the green point-rendering Green Zone, and the Green Zone is removed from the preset reference white area, it obtains more
White area after new, and white balance correction is carried out to the image to be corrected according to the updated white area.
According to the second aspect of the embodiment of the present application, a kind of white balance correction device is provided, described device includes:
First determination unit for determining that image to be corrected falls into the statistics point in preset reference white area, and is counted
The quantity of point;
Unit is corrected, for determining white balance gains according to the statistics point, and using the white balance gains to described
Statistics point is corrected;
Second determination unit for determining green point from the statistics point after correction according to rgb value, and obtains the number of green point
Amount;
First judging unit, for judging the ratio of the quantity of the green point and the quantity of the statistics point whether more than the
One predetermined threshold value;
Updating unit, for when judging result is to be, according to the green point-rendering Green Zone, and it is white from the preset reference
The Green Zone is removed in area, obtains updated white area, and carried out to the image to be corrected according to the updated white area
White balance correction.
Using the embodiment of the present application, image modalities can first determine that image to be corrected is fallen into preset reference white area
Point is counted, and obtains the quantity of statistics point;Then white balance gains are determined according to these statistics points, and utilizes white balance gains pair
Each statistics point is corrected, and green point is determined from the statistics point after correction according to rgb value, and obtains the quantity of green point;Most
The quantity of green point is judged afterwards and whether counts the ratio of the quantity of point more than the first predetermined threshold value;If so, according to green point-rendering
Green Zone, and Green Zone is removed from preset reference white area, updated white area is obtained, and correction chart is treated according to updated white area
As carrying out white balance correction.Based on above-mentioned realization method, statistics point is obtained by the image to be corrected acquired in actual scene,
And green point is filtered out in these statistics points, in the case where the ratio of the quantity of green point is more than the first predetermined threshold value, from default
With reference to the Green Zone for removing green point formation in white area, thus, achieve the purpose that according to actual scene dynamic update preset reference white area,
It ensure that the accuracy of white balance correction, especially under large area green scene, can accurately go back the original color of original image.
It is subsequently adopted in addition, this realization method need to only update a preset reference white area in one scenario as long as scene does not change
The image of collection can carry out white balance correction using updated white area.
Description of the drawings
Figure 1A is a kind of embodiment flow chart of white balance correcting of the application shown according to an exemplary embodiment;
Figure 1B is the application according to a kind of preset reference white area schematic diagram shown in figure 1A for implementing to exemplify;
Fig. 1 C are the application falls into preset reference white area statistics point and white according to one kind shown in figure 1A that exemplify implemented
Balancing gain point schematic diagram;
Fig. 1 D be the application according to it is shown in figure 1A implement the another kind that exemplifies fall into preset reference white area statistics point and
White balance gains point schematic diagram;
Fig. 2A is embodiment flow of the application according to a kind of white balance correcting shown in an exemplary embodiment one
Figure;
Fig. 2 B are the distribution schematic diagram for counting point after the application according to fig. 2 a kind of correction shown in A illustrated embodiments;
Fig. 3 A are embodiment flow of the application according to a kind of white balance correcting shown in an exemplary embodiment one
Figure;
Fig. 3 B are a kind of the application Green Zone schematic diagram shown in A illustrated embodiments according to fig. 3;
Fig. 3 C are the Green Zone schematic diagram after the application according to fig. 3 a kind of extension shown in A illustrated embodiments;
Fig. 4 is a kind of hardware structure diagram of image modalities of the application shown according to an exemplary embodiment;
Fig. 5 is a kind of example structure figure of white balance correction device of the application shown according to an exemplary embodiment.
Specific implementation mode
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended
The example of consistent device and method of some aspects be described in detail in claims, the application.
It is the purpose only merely for description specific embodiment in term used in this application, is not intended to be limiting the application.
It is also intended to including majority in the application and "an" of singulative used in the attached claims, " described " and "the"
Form, unless context clearly shows that other meanings.It is also understood that term "and/or" used herein refers to and wraps
Containing one or more associated list items purposes, any or all may be combined.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application
A little information should not necessarily be limited by these terms.These terms are only used for same type of information being distinguished from each other out.For example, not departing from
In the case of the application range, 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 context, word as used in this " if " can be construed to " ... when " or " when ...
When " or " in response to determination ".
Figure 1A is a kind of embodiment flow chart of white balance correcting of the application shown according to an exemplary embodiment;
Figure 1B is the application according to a kind of preset reference white area schematic diagram shown in figure 1A for implementing to exemplify;Fig. 1 C be the application according to
One kind shown in figure 1A for implementing to exemplify falls into preset reference white area statistics point and white balance gains point schematic diagram;Fig. 1 D are this
Application falls into preset reference white area statistics point according to the another kind shown in figure 1A for implementing to exemplify and white balance gains point is illustrated
Figure, the embodiment can be applied to image modalities, and as shown in Figure 1A, which includes the following steps:
Step 101:It determines that image to be corrected falls into the statistics point in preset reference white area, and obtains the quantity of statistics point.
Wherein, the statistics point in preset reference white area is fallen into as white point processing.In one embodiment, a fixation is utilized
Color temperature light sources irradiate white object, it may be determined that the shape of a white area subregion, the white area subregion is set by the image collection
The characteristic of ccd image sensor in standby determines that the preset reference white area in the application can utilize different fixation colour temperatures
Light source irradiates multiple white area subregion common combinations that white object determines and forms one with reference to white area, is one as shown in Figure 1B
The preset reference white area determined under a fixed colour temperature, the preset reference white area are using G/R as horizontal axis, and G/B is the coordinate system of the longitudinal axis
In, wherein G/R refers to that the ratio of G values and R values, G/B refer to the ratio of G values and B values, which is eight
Side shape.
Step 102:White balance gains are determined according to the statistics point, and school is carried out to statistics point using the white balance gains
Just.
In one embodiment, before determining white balance gains, the statistical information of statistics point can be first obtained, formula is such as
Under:
Wherein, n is the quantity for the statistics point for falling into preset reference white area, ri、gi、biThe R values of respectively i-th statistics point,
G values, B values.
Determine that white balance gains, formula are as follows according to the statistical information of statistics point:
As shown in Figure 1 C, it is under normal conditions, to fall into the statistics point in preset reference white area, that is, is really white
Point is A points according to the white balance gains point that these white points determine.
Statistics point is corrected using white balance gains, formula is as follows:
Ri=rgain×ri, Gi=gi, Bi=bgain×bi
Wherein, ri、gi、biR values, G values, B values before respectively i-th statistics point calibration, Ri、Gi、BiRespectively i-th system
R values, G values, B values after enumeration correction.
It is as shown in figure iD, default under large area green scene, to there is a large amount of green points to fall into an illustrative scene
With reference in white area, and it is treated as white point processing, since the G values of green point can be bigger with respect to R values and B values, and the G values of white point, R
Value, B values difference are not very big, therefore in G/R, the coordinate system of G/B, green point is usually located at the upper right side of white point.At this point, according to
The white balance gains point that the green point and white point fallen into preset reference white area determines can be moved to B points by A points, if utilizing B points
It goes each pixel for treating correction image 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.
Preset reference white area is fallen into since the image to be corrected acquired under green scene has many green points, it is therefore desirable to
These green points are screened.
Step 104:Whether the ratio for the quantity that the quantity of green point is put with statistics is judged more than the first predetermined threshold value, if it is not,
105 are thened follow the steps, if so, thening follow the steps 106.
First predetermined threshold value can be configured according to practical experience, for example, the first predetermined threshold value can be 95%.If
The quantity of green point and the ratio of the quantity of statistics point have been more than the first predetermined threshold value, indicate green point to the meter of white balance gains
Calculation causes prodigious influence, needs to remove these green points when calculating white balance gains, such as quantity of light green point and statistics point
The ratio of quantity be less than the first predetermined threshold value, indicate that green point does not impact the calculating of white balance gains also, Ke Yican
With in the calculating to white balance gains.
Step 105:Correction image, which is treated, using the white balance gains carries out white balance correction.
If the ratio that the quantity for the green point for falling into preset reference white area accounts for is not above the first predetermined threshold value, can be straight
The each pixel progress white balance correction treated using determining white balance gains in correction image is connect, i.e., by each pixel
R values be multiplied by rgain, B values are multiplied by bgain。
Step 106:According to the green point-rendering Green Zone, and the Green Zone is removed from preset reference white area, obtain updated
White area, and correction image is treated according to updated white area and carries out white balance correction.
In one embodiment, after obtaining updated white area, can redefine image to be corrected fall into it is updated
Then the statistics point in white area utilizes these statistics points to determine white flat at this point, the statistics point for falling into updated white area is white point
Weighing apparatus gain, and each pixel progress white balance correction for correcting image is treated using white balance gains, thus by figure to be corrected
The color rendition of picture is original color.
Before executing step 101, the current aperture yield value of image modalities and fast gate value can be first obtained, and sentence
Whether whether disconnected aperture yield value be more than the second predetermined threshold value and fast gate value more than third predetermined threshold value;If so, judging image
Whether the image to be corrected of collecting device acquisition is coloured image;If coloured image, 101 process is thened follow the steps.
Wherein, the second predetermined threshold value and third predetermined threshold value are configured according to practical experience, for example, the second predetermined threshold value
It can be 3 decibels, third predetermined threshold value can be 125 microseconds.In general, being more than the second predetermined threshold value and shutter in aperture yield value
In the case that value is more than third predetermined threshold value, the scene of expression is outdoor scene, and outdoor scene is easy to encounter large area
Green scene, therefore, the scheme of the application can be directed to outdoor scene.Judge whether image to be corrected is coloured image and 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, be then coloured image, need to carry out white balance correction, is artwork master otherwise
Picture need not carry out white balance correction.
It is worth noting that after obtaining updated white area, as long as the aperture yield value of image modalities and fast
Gate value does not change, then can in vain be put down using updated white area to every frame image to be corrected of subsequent acquisition
Weighing apparatus correction.
By above-described embodiment it is found that image modalities can first determine that image to be corrected is fallen into preset reference white area
Point is counted, and obtains the quantity of statistics point;Then white balance gains are determined according to these statistics points, and utilizes white balance gains pair
Each statistics point is corrected, and green point is determined from the statistics point after correction according to rgb value, and obtains the quantity of green point;Most
The quantity of green point is judged afterwards and whether counts the ratio of the quantity of point more than the first predetermined threshold value;If so, according to green point-rendering
Green Zone, and Green Zone is removed from preset reference white area, updated white area is obtained, and correction chart is treated according to updated white area
As carrying out white balance correction.Based on above-mentioned realization method, statistics point is obtained by the image to be corrected acquired in actual scene,
And green point is filtered out in these statistics points, in the case where the ratio of the quantity of green point is more than the first predetermined threshold value, from default
With reference to the Green Zone for removing green point formation in white area, thus, achieve the purpose that according to actual scene dynamic update preset reference white area,
It ensure that the accuracy of white balance correction, especially under large area green scene, can accurately go back the original color of original image.
It is subsequently adopted in addition, this realization method need to only update a preset reference white area in one scenario as long as scene does not change
The image of collection can carry out white balance correction using updated white area.
Fig. 2A is embodiment flow of the application according to a kind of white balance correcting shown in an exemplary embodiment one
Figure;Fig. 2 B are the distribution schematic diagram of the statistics point after the application according to fig. 2 a kind of correction shown in A illustrated embodiments, this implementation
Example utilizes the above method provided by the embodiments of the present application, by according to rgb value for determining green point in the statistics point after correction into
Row exemplary illustration includes the following steps as shown in Figure 2 A:
Step 201:For the statistics point after each correction, obtain the G values for counting point and R values after the correction first is poor
Value, and obtain the second difference of the G values and B values of the point of the statistics after the correction.
Under normal circumstances, the rgb value of corrected statistics point meets G/R=1, and G/B=1, i.e. rgb value are equal.
However, under actual scene, when in statistics point there are at green, in the calculating that white balance gains have been also assisted in due to green point,
Therefore the rgb value of white point after correcting may be not completely equivalent, but difference is nor very big between R values, B values and G values, and
The meeting differed between the rgb value of green point after correction is more much larger than the rgb value before correction, thus can be by obtaining the correction after
Statistics point G values and R values the first difference and G values and B values the second difference respectively with the mode of threshold value comparison, from correction
Green point is screened in statistics point afterwards, specific comparison procedure refers to described in step 202.
It should be noted that since the G values of the white point after correction and the ratio of R values and G values and the ratio of B values connect substantially
It is bordering on 1, and the ratio of the G values of green point after correcting and the ratio of R values and G values and B values is still above 1, and can be than correction
Preceding ratio is much larger, accordingly it is also possible to the ratio and G values and B of the G values and R values by obtaining the statistics point after the correction
The ratio of value with the mode of threshold value comparison, screens green point from the statistics point after correction respectively.Those skilled in the art
It is understood that the empirical value that the selection of threshold value can be obtained by many experiments is determined, the application is no longer detailed herein
It states.
In addition, in G/R, in 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.Such as
Shown in Fig. 2 B, A blocks be it is corrected after white point distributed areas, B blocks be it is corrected after green distributed areas, B blocks are located at A
The upper right side of block, C blocks are the white point distributed areas before correction, and D blocks are green distributed areas before correction, and D blocks are located at C blocks
Upper right side.
Step 202:Judge the first difference whether more than the 4th predetermined threshold value and whether the second difference is more than the 5th default threshold
Value, if so, thening follow the steps 203, otherwise, continues to execute 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
It is determined with the empirical value obtained according to many experiments, for example, after many experiments, the 4th predetermined threshold value and the 5th default threshold
Value can be 25.
Step 203:Determine that the statistics point after the correction is green point.
In the present embodiment, after carrying out white balance correction to the statistics point for falling into preset reference white area, after to correction
Statistics point rgb value comparison, i.e., G values with the difference of R values compared with the 4th predetermined threshold value, the difference and the 5th of G values and B values
Predetermined threshold value compares, and determines whether the point of the statistics after the correction is green point, to reach the mesh for screening green point from statistics point
's.
Fig. 3 A are embodiment flow of the application according to a kind of white balance correcting shown in an exemplary embodiment one
Figure;Fig. 3 B are a kind of the application Green Zone schematic diagram shown in A illustrated embodiments according to fig. 3;Fig. 3 C are the application A institutes according to fig. 3
Show the Green Zone schematic diagram after a kind of extension that implementation exemplifies;The present embodiment utilizes the above method provided by the embodiments of the present application,
It illustrates for according to the green point-rendering Green Zone, as shown in Figure 3A, includes the following steps:
Step 301:With G/R, G/B is that axis establishes coordinate system, obtains the central point of green point in a coordinate system.
Such as the coordinate system established for axis with G/R, G/B in step 101, the formula of these central points of green point in a coordinate system
Can be:
Wherein, RcenWith BcenCentered on point, N is the quantity for falling into the green point in preset reference white area, Ri, Gi, BiIt is i-th
R values, G values and the B values of a green point.
Step 302:Each green distance of the point away from central point is obtained, and the distance is ranked up from big to small.
The formula of distance away from central point can be:
Step 303:According to ranking results, since away from central point apart from maximum green point, the 6th predetermined threshold value number is excluded
The green point of amount.
Wherein, as shown in Figure 2 B, since green point or white point are usually all piecemeal distributions, at a distance of very little between each green point,
May also have and be overlapped on a small quantity, it is therefore, default according to the 6th after sorting from big to small to each green distance of the point away from central point
Threshold value determines green quantity for needing to exclude, and since the initial position of ranking results, excludes the green point for needing to exclude, from
And realize and exclude the green point big away from central point distance, achieve the purpose that the green point for excluding to be misjudged, the 6th predetermined threshold value can root
It is arranged according to practical experience, for example, the 6th predetermined threshold value can be 5%, if there is 100 green points, then can excludes 5 away from center
The distant green point of point.
Step 304:The first maximum value and the first minimum value, the second maximum value of G/B of G/R are obtained from remaining green point
With the second minimum value.
Step 305:Existed according to the first maximum value of G/R and the first minimum value, the second maximum value of G/B and the second minimum value
Green Zone is drawn in coordinate system.
Described in step 304 and step 305, in one embodiment, according to the first maximum value of the G/R of acquisition and first
Minimum value, the second maximum value of G/B and the second minimum value can draw Green Zone in a coordinate system with the shape of quadrangle, such as scheme
It is the Green Zone of quadrangle form shown in 3B.
It should be noted that image modalities can also determine a distance away from central point most from remaining green point
Big green point, and using central point as the center of circle, which is that radius draws a circle as Green Zone, which includes all remaining
Green point.
After step 305, image modalities can be extended the Green Zone of drafting, to increase the more scenes in Green Zone
Applicability.In a coordinate system, the third maximum value of the G/R in preset reference white area and the 4th maximum value of G/B can be obtained;If
First maximum value is less than third maximum value, then utilizes third maximum value to update the first maximum value;If the second maximum value is less than the 4th
Maximum value then utilizes the 4th maximum value to update the second maximum value;Most according to updated first maximum value and updated second
Big value extends the Green Zone.
Wherein, third maximum value is that preset reference white area is mapped in the maximum value on G/R axis, and the 4th maximum value is default ginseng
Examine the maximum value that white area is mapped on G/B axis, if draw Green Zone be included in preset reference white area in, can to Green Zone into
Row extension, that is, update the second maximum value of the first maximum value and G/B of G/R.As shown in Figure 3 C, it is the Green Zone by extension.
It should be noted that after determining the shape of Green Zone, by way of increasing on the boundary of Green Zone and presetting straight line,
Keep the shape of the Green Zone similar to the shape in preset reference white area, in order to which image modalities remove the operating process of Green Zone.
Preset reference white area as shown in Figure 1B is combined by eight sides to be formed, and Green Zone shown in Fig. 3 C is to be combined to be formed by four edges
, therefore, increases by 4 straight lines on four vertex of the Green Zone shown in Fig. 3 C, Green Zone is made also to be made of eight sides.
In the present embodiment, the central point of green point is obtained first, and excludes the distant green point of distance center point, with row
Except the green point misjudged, then further according to remaining green point the first maximum value in a coordinate system, the first minimum value, second maximum
Value and the second minimum value draw Green Zone, and if the Green Zone drawn is included in preset reference white area, it can also be according to default
The 4th maximum value with reference to third maximum value of the white area on G/R axis, and on G/B axis extends Green Zone, to increase Green Zone Duo Chang
The applicability of scape.In addition, after the shape that Green Zone is finally determined, straight line can be preset by increasing on the boundary of Green Zone
Mode keeps the shape of Green Zone similar to the shape in preset reference white area, to facilitate image modalities removal Green Zone
Operating process.
Corresponding with the embodiment of aforementioned white balance correcting, present invention also provides the implementations of white balance correction device
Example.
The embodiment of the application white balance correction device can be applied in image modalities.Device embodiment can lead to
Software realization is crossed, can also be realized by way of hardware or software and hardware combining.For implemented in software, as a logic
Device in meaning is to be read corresponding computer program instructions in nonvolatile memory by the processor of equipment where it
Get what operation in memory was formed.For hardware view, as shown in figure 4, being shown according to an exemplary embodiment for the application
A kind of image modalities hardware structure diagram, in addition to processor shown in Fig. 4, memory, network interface and non-volatile
Except memory, the equipment in embodiment where device can also include other hardware generally according to the actual functional capability of the equipment,
This is repeated no more.
Fig. 5 is a kind of example structure figure of white balance correction device of the application shown according to an exemplary embodiment,
The embodiment can be applied in image modalities, as shown in figure 5, the device includes:First determination unit 510, correction unit
520, the second determination unit 530, the first judging unit 540, updating unit 550.
First determination unit 510 for determining that image to be corrected falls into the statistics point in preset reference white area, and is united
The quantity of enumeration;
Unit 520 is corrected, for determining white balance gains according to the statistics point, and using the white balance gains to institute
Statistics point is stated to be corrected;
Second determination unit 530 for determining green point from the statistics point after correction according to rgb value, and obtains green point
Quantity;
First judging unit 540, for judging whether the ratio of the quantity and the quantity of the statistics point of the green point surpasses
Cross the first predetermined threshold value;
Updating unit 550, for when judging result is to be, according to the green point-rendering Green Zone, and from the default ginseng
It examines and removes the Green Zone in white area, obtain updated white area, and according to the updated white area to the image to be corrected
Carry out white balance correction.
In an optional realization method, described device further includes (being not shown in Fig. 5):
Acquiring unit, for obtaining the current aperture yield value of image modalities and fast gate value;
Second judgment unit, for judge the aperture yield value whether more than the second predetermined threshold value and the fast gate value be
No is more than third predetermined threshold value;
Third judging unit, for when judging result is to be, judging the figure to be corrected of the image modalities acquisition
Seem it is no be coloured image;
Execution unit, for when judging result is to be, executing and determining that image to be corrected is fallen into preset reference white area
Count the process of point.
In another optional realization method, second determination unit 530, be specifically used for according to rgb value from school
During determining green point in statistics point after just, for the statistics point after each correction, the G of the point of the statistics after the correction is obtained
First difference of value and R values;Obtain the second difference of the G values and B values of the point of the statistics after the correction;Judging first difference is
It is no more than the 4th predetermined threshold value and whether second difference more than the 5th predetermined threshold value;If so, determining the system after the correction
Enumeration is green point.
In another optional realization method, the updating unit 550 is specifically used for green according to the green point-rendering
During area, with G/R, G/B is that axis establishes coordinate system, obtains central point of the green point in the coordinate system;It obtains every
A green distance of the point away from the central point, and the distance is ranked up from big to small;According to ranking results, from away from described
The maximum green point of distance of heart point starts, and excludes the green point of the 6th pre-set threshold numbers;The of G/R is obtained from remaining green point
One maximum value and the first minimum value, the second maximum value of G/B and the second minimum value;According to the first maximum value of the G/R and
One minimum value, the second maximum value of the G/B and the second minimum value draw Green Zone in the coordinate system.
In another optional realization method, described device further includes (being not shown in Fig. 5):
Green Zone expanding element, in the coordinate system, obtaining the third maximum value of the G/R in the preset reference white area
And the 4th maximum value of G/B;If first maximum value is less than the third maximum value, more using the third maximum value
New first maximum value;If second maximum value is less than the 4th maximum value, updated using the 4th maximum value
Second maximum value;The Green Zone is extended according to updated first maximum value and updated second maximum value.
In another optional realization method, described device further includes (being not shown in Fig. 5):
Increase straight line units, for removing the Green Zone from the preset reference white area in the updating unit 550
Before, by way of increasing on the boundary of Green Zone and presetting straight line, make the shape of the Green Zone and the preset reference white area
Shape is similar.
The function of each unit and the realization process of effect specifically refer to and correspond to step in the above method in above-mentioned apparatus
Realization process, details are not described herein.
For device embodiments, since it corresponds essentially to embodiment of the method, so related place is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separating component
The unit of explanation may or may not be physically separated, and the component shown as unit can be or can also
It is not physical unit, you can be located at a place, or may be distributed over multiple network units.It can be according to actual
It needs that some or all of module therein is selected to realize the purpose of application scheme.Those of ordinary skill in the art are not paying
In the case of going out creative work, you can to understand and implement.
By above-described embodiment it is found that image modalities can first determine that image to be corrected is fallen into preset reference white area
Point is counted, and obtains the quantity of statistics point;Then white balance gains are determined according to these statistics points, and utilizes white balance gains pair
Each statistics point is corrected, and green point is determined from the statistics point after correction according to rgb value, and obtains the quantity of green point;Most
The quantity of green point is judged afterwards and whether counts the ratio of the quantity of point more than the first predetermined threshold value;If so, according to green point-rendering
Green Zone, and Green Zone is removed from preset reference white area, updated white area is obtained, and correction chart is treated according to updated white area
As carrying out white balance correction.Based on above-mentioned realization method, statistics point is obtained by the image to be corrected acquired in actual scene,
And green point is filtered out in these statistics points, in the case where the ratio of the quantity of green point is more than the first predetermined threshold value, from default
With reference to the Green Zone for removing green point formation in white area, thus, achieve the purpose that according to actual scene dynamic update preset reference white area,
It ensure that the accuracy of white balance correction, especially under large area green scene, can accurately go back the original color of original image.
It is subsequently adopted in addition, this realization method need to only update a preset reference white area in one scenario as long as scene does not change
The image of collection can carry out white balance correction using updated white area.
The foregoing is merely the preferred embodiments of the application, not limiting the application, all essences in the application
With within principle, any modification, equivalent substitution, improvement and etc. done should be included within the scope of the application protection god.
Claims (10)
1. a kind of white balance correcting, which is characterized in that the method includes:
It determines that image to be corrected falls into the statistics point in preset reference white area, and obtains the quantity of statistics point;
White balance gains are determined according to the statistics point, and the statistics point is corrected using the white balance gains;
Green point is determined from the statistics point after correction according to rgb value, and obtains the quantity of green point;
Whether the ratio of the quantity and the quantity for counting point that judge the green point is more than the first predetermined threshold value;
If so, according to the green point-rendering Green Zone, and the Green Zone is removed from the preset reference white area, after obtaining update
White area, and white balance correction is carried out to the image to be corrected according to the updated white area;
It is described according to the green point-rendering Green Zone, including:
With G/R, G/B is that axis establishes coordinate system, obtains central point of the green point in the coordinate system;
Each green distance of the point away from the central point is obtained, and the distance is ranked up from big to small;
According to ranking results, since the maximum green point of the distance away from the central point, the green of the 6th pre-set threshold numbers is excluded
Point;
Maximum value and minimum value, the maximum value of the G/B and minimum value of G/R are obtained from remaining green point;
It is drawn in the coordinate system according to the maximum value of the G/R and minimum value, the maximum value of the G/B and minimum value green
Area.
2. according to the method described in claim 1, it is characterized in that, the method further includes:
Obtain the current aperture yield value of image modalities and fast gate value;
Judge whether the aperture yield value be more than third predetermined threshold value more than the second predetermined threshold value and the fast gate value;
If so, judging whether the image to be corrected of the image modalities acquisition is coloured image;
If coloured image, then the process for determining that image to be corrected falls into the statistics point in preset reference white area is executed.
3. according to the method described in claim 1, it is characterized in that, described determine according to rgb value from the statistics point after correction
It is green, including:
For the statistics point after each correction, the first difference of the G values and R values of the point of the statistics after the correction is obtained;
Obtain the second difference of the G values and B values of the point of the statistics after the correction;
Judge first difference whether more than the 4th predetermined threshold value and whether second difference is more than the 5th predetermined threshold value;
If so, determining that the statistics point after the correction is green point.
4. according to the method described in claim 1, it is characterized in that, the method further includes:
In the coordinate system, the maximum value of the G/R in the preset reference white area and the maximum value of G/B are obtained;
If the maximum value of the G/R in the remaining green point is less than the maximum value of the G/R in the preset reference white area, institute is utilized
The maximum value for stating the G/R in preset reference white area updates the maximum value of the G/R in the remaining green point;
If the maximum value of the G/B in the remaining green point is less than the maximum value of the G/B in the preset reference white area, institute is utilized
The maximum value for stating the G/B in preset reference white area updates the maximum value of the G/B in the remaining green point;
According to the G/B in the maximum value of the G/R in the updated remaining green point and the updated remaining green point
Maximum value extend the Green Zone.
5. according to the method described in claim 1, it is characterized in that, removed from the preset reference white area Green Zone it
Before, the method further includes:
By way of increasing on the boundary of Green Zone and presetting straight line, make the shape of the shape and the preset reference white area of the Green Zone
Shape is similar.
6. a kind of white balance correction device, which is characterized in that described device includes:
First determination unit for determining that image to be corrected falls into the statistics point in preset reference white area, and obtains statistics point
Quantity;
Unit is corrected, for determining white balance gains according to the statistics point, and using the white balance gains to the statistics
Point is corrected;
Second determination unit for determining green point from the statistics point after correction according to rgb value, and obtains the quantity of green point;
Whether the first judging unit, the ratio for judging the quantity and the quantity of the statistics point of the green point are pre- more than first
If threshold value;
Updating unit, when for being when judging result, according to the green point-rendering Green Zone, and from the preset reference white area
The Green Zone is removed, obtains updated white area, and put down in vain to the image to be corrected according to the updated white area
Weighing apparatus correction;
The updating unit is specifically used for during according to the green point-rendering Green Zone, and with G/R, G/B is that axis establishes coordinate
System obtains central point of the green point in the coordinate system;Each green distance of the point away from the central point is obtained, and will be described
Distance is ranked up from big to small;According to ranking results, since the maximum green point of the distance away from the central point, the 6th is excluded
The green point of pre-set threshold numbers;Maximum value and minimum value, the maximum value of the G/B and minimum value of G/R are obtained from remaining green point;
According to the maximum value of the G/R and minimum value, the maximum value of the G/B and minimum value Green Zone is drawn in the coordinate system.
7. device according to claim 6, which is characterized in that described device further includes:
Acquiring unit, for obtaining the current aperture yield value of image modalities and fast gate value;
Second judgment unit, for judging whether the aperture yield value surpass more than the second predetermined threshold value and the fast gate value
Cross third predetermined threshold value;
Third judging unit, for when judging result is to be, judging that the image to be corrected that the image modalities acquire is
No is coloured image;
Execution unit, for when judging result is to be, executing and determining that image to be corrected falls into the statistics in preset reference white area
The process of point.
8. device according to claim 6, which is characterized in that second determination unit, be specifically used for according to rgb value from
During determining green point in statistics point after correction, for the statistics point after each correction, the statistics point after the correction is obtained
G values and R values the first difference;Obtain the second difference of the G values and B values of the point of the statistics after the correction;Judge that described first is poor
Whether value is more than the 4th predetermined threshold value and whether second difference is more than the 5th predetermined threshold value;If so, after determining the correction
Statistics point be green point.
9. device according to claim 6, which is characterized in that described device further includes:
Green Zone expanding element, in the coordinate system, obtaining the maximum value and G/B of the G/R in the preset reference white area
Maximum value;If the maximum value of the G/R in the remaining green point is less than the maximum value of the G/R in the preset reference white area,
The maximum value of the G/R in the remaining green point is updated using the maximum value of the G/R in the preset reference white area;If described remaining
Green point in G/B maximum value be less than the preset reference white area G/B maximum value, then utilize the preset reference white area
The maximum value of G/B update the maximum value of the G/B in the remaining green point;According in the updated remaining green point
The maximum value of G/R and the maximum value of the G/B in the updated remaining green point extend the Green Zone.
10. device according to claim 6, which is characterized in that described device further includes:
Increase straight line units, for, before removing the Green Zone in the preset reference white area, leading in the updating unit
It crosses the boundary in Green Zone and increases the mode for presetting straight line, make the shape phase of the shape and the preset reference white area of the Green Zone
Seemingly.
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 CN106454305A (en) | 2017-02-22 |
CN106454305B true 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) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107610180B (en) * | 2017-09-12 | 2020-03-13 | 上海小蚁科技有限公司 | AWB calibration method and device, computer-readable storage medium and terminal |
CN108377372B (en) * | 2018-03-13 | 2019-10-29 | 普联技术有限公司 | A kind of white balancing treatment method, device, terminal device and storage medium |
CN108337496B (en) * | 2018-04-25 | 2020-01-31 | 普联技术有限公司 | White balance processing method, processing device, processing equipment and storage medium |
JP6879268B2 (en) * | 2018-06-18 | 2021-06-02 | 株式会社Jvcケンウッド | Color correction device |
CN109005397B (en) * | 2018-08-31 | 2020-04-14 | 建荣半导体(深圳)有限公司 | Image white balance adjusting method and device, image processing chip and storage device |
CN113055665B (en) * | 2019-12-27 | 2023-04-07 | Oppo广东移动通信有限公司 | Image processing method, terminal and storage medium |
CN112055191B (en) * | 2020-08-25 | 2022-08-09 | 浙江大华技术股份有限公司 | White balance adjustment method, image acquisition device and storage medium |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4352730B2 (en) * | 2003-03-12 | 2009-10-28 | セイコーエプソン株式会社 | Auto white balance processing apparatus and method, and image signal processing apparatus |
CN102300100B (en) * | 2010-06-28 | 2015-03-04 | 比亚迪股份有限公司 | White balance control device and method |
CN101917633B (en) * | 2010-09-01 | 2012-09-05 | 杭州海康威视软件有限公司 | Image white balance processing method, device and camera thereof |
CN103297789B (en) * | 2013-05-20 | 2015-04-29 | 周宇 | White balance correcting method and white balance correcting device |
CN103929632B (en) * | 2014-04-15 | 2016-02-03 | 浙江宇视科技有限公司 | A kind of method for correcting automatic white balance and device |
CN105681775B (en) * | 2016-03-08 | 2017-12-19 | 福州瑞芯微电子股份有限公司 | A kind of white balance method and device |
CN105872499A (en) * | 2016-03-31 | 2016-08-17 | 乐视控股(北京)有限公司 | Green area judging method based on RGB sensor |
-
2016
- 2016-11-14 CN CN201611021238.8A patent/CN106454305B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN106454305A (en) | 2017-02-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106454305B (en) | White balance correcting and device | |
CN104486552B (en) | A kind of method and electronic equipment obtaining image | |
JP6160004B2 (en) | Scene recognition method and apparatus | |
WO2016206087A1 (en) | Low-illumination image processing method and device | |
CN105809630B (en) | A kind of picture noise filter method and system | |
US9342875B2 (en) | Method for generating image bokeh effect and image capturing device | |
US20230230204A1 (en) | Image processing method and apparatus, and method and apparatus for training image processing model | |
KR102084343B1 (en) | Background removal | |
JP2007312304A (en) | Image processing apparatus and image processing method | |
JP2011010162A5 (en) | ||
CN107240078A (en) | Lens articulation Method for Checking, device and electronic equipment | |
CN108230234A (en) | Image virtualization processing method, device, storage medium and electronic equipment | |
CN102867295A (en) | Color correction method for color image | |
CN108377372B (en) | A kind of white balancing treatment method, device, terminal device and storage medium | |
CN113496474A (en) | Image processing method, device, all-round viewing system, automobile and storage medium | |
CN113313645A (en) | Image processing method, image processing apparatus, terminal, and readable storage medium | |
CN104517264B (en) | Image processing method and device | |
CN104299195B (en) | A kind of image defogging method based on auto-adaptive doublethreshold and dark channel prior | |
CN109949250A (en) | A kind of image processing method and device | |
JP2007043919A (en) | Image processor for working vehicle | |
CN106028138A (en) | Live broadcast video processing method and device | |
CN106303309B (en) | Image correction system and method | |
CN103516951A (en) | Image creating device and image creating method | |
CN113035118B (en) | Method for correcting color temperature and brightness consistency of multiple display screens | |
CN105590299B (en) | A kind of noise variation judgment 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 |