CN109963134A - A kind of method and device correcting image - Google Patents

A kind of method and device correcting image Download PDF

Info

Publication number
CN109963134A
CN109963134A CN201711416706.6A CN201711416706A CN109963134A CN 109963134 A CN109963134 A CN 109963134A CN 201711416706 A CN201711416706 A CN 201711416706A CN 109963134 A CN109963134 A CN 109963134A
Authority
CN
China
Prior art keywords
corrected
point
white
image
belonging
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.)
Pending
Application number
CN201711416706.6A
Other languages
Chinese (zh)
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.)
Hefei Jun Zheng Science And Technology Ltd
Original Assignee
Hefei Jun Zheng Science And Technology 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 Hefei Jun Zheng Science And Technology Ltd filed Critical Hefei Jun Zheng Science And Technology Ltd
Priority to CN201711416706.6A priority Critical patent/CN109963134A/en
Publication of CN109963134A publication Critical patent/CN109963134A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control

Abstract

The present invention relates to field of image processing more particularly to a kind of method and devices for correcting image.In solving the problems, such as that white balance correction method can lead to image colour cast in the prior art.The described method includes: determining the first white area rule;The white point threshold value of each image to be corrected is found out using first white area rule;The image to be corrected for belonging to same color temperature is sorted out, determines point to be corrected according to all white point threshold values found out, white balance correction is carried out to the point to be corrected.It can be seen that method provided in an embodiment of the present invention can improve the difference due to the different white color status of colour temperature to greatest extent, and bring image colour cast problem.

Description

A kind of method and device correcting image
Technical field
The present invention relates to field of image processing more particularly to a kind of method and devices for correcting image.
Background technique
People carry out the shooting work of pictures or video usually using various intelligent capture apparatus at present, due to equipment with And the works that the influence of environment is shot more or less have some differences on color.And equipment needs in shooting process The adjustment of automatic white balance AWB is carried out, reason is:
Under different illumination conditions, the color difference of environment light is larger.For example the sunlight at high noon is than the sun of dusk Light is partially blue, and the vision system of people is capable of the ingredient of adjust automatically red, green, blue, how to be changed such that regardless of light source, white White is presented in color object always in vision.And for equipment, it is by this speciality apish in picture system Function carries out automatic white balance adjustment.
In general, all capture apparatus are for example, the image that camera, video camera take all needs to correct.It is existing Under some technologies, for mostly using the method for looking for white point to be corrected to correcting image.Correction image is treated to carry out point by point Analysis falls in point in white area and is taken as white point.The correction for carrying out tri- channels R, G, B to the white point that finds again makes to find White point becomes white, to complete white balance correction.Wherein white area refers to upper with one in color gamut space, such as RGB, YUV, HSV The region that fixed restrictive condition delimited.
White area is analyzed by acquiring the image under a large amount of different-colours, and different light sources has different light Ingredient and distribution are composed, this is referred to as colour temperature in colorimetry.
Under different-colour, the color characteristic difference of white point is larger.Such as white point is partially blue under high color temperature, under low color temperature White point is partially red, and white point is partially yellow on the image of certain neutral color temperatures.The prior art all uses all images to be corrected same set of Rule regulating, the blue dot in low color temperature image is just probably treated as white point by this, or the red on high color temperature image Point is corrected as white point, so as to cause the colour cast of image.
Summary of the invention
The embodiment of the present invention provides a kind of method for correcting image and device, for solving white balance correction side in the prior art Method can lead to the problem of image colour cast.
A kind of method of image rectification, which comprises
Determine the first white area rule;
The white point threshold value of each image to be corrected is found out using first white area rule;
The image to be corrected for belonging to same color temperature is sorted out, is determined according to all white point threshold values found out to be corrected Point carries out white balance correction to the point to be corrected.
A kind of device correcting image, described device include:
Determining module, for determining the first white area rule;
Searching module, for finding out the white point threshold value of each image to be corrected using first white area rule;
Correction module, for sorting out to the image to be corrected for belonging to same color temperature, according to all white point thresholds found out Value determines point to be corrected, carries out white balance correction to the point to be corrected.
As it can be seen that method provided in an embodiment of the present invention first pass through the first white area rule it is rough determine each width image Then white point threshold value is sorted out in the colour temperature according to belonging to the image, can to the image in the different-colour respectively into Row correction, can improve the difference due to the different white color status of colour temperature to greatest extent in this way, and bring image colour cast Problem.
Detailed description of the invention
It, below will be to embodiment or the prior art in order to illustrate more clearly of the present invention or technical solution in the prior art Attached drawing needed in description is briefly described.
Fig. 1 is schematic diagram in the prior art;
Fig. 2 is schematic diagram provided in an embodiment of the present invention;
Fig. 3 is schematic diagram provided in an embodiment of the present invention.
Specific embodiment
Technical solution in embodiment in order to enable those skilled in the art to better understand the present invention, and make of the invention Above objects, features, and advantages can be more obvious and easy to understand, makees with reference to the accompanying drawing to technical solution in the present invention further detailed Thin explanation.
Method provided in an embodiment of the present invention first passes through the rough white point for determining each width image of the first white area rule Then threshold value is sorted out in the colour temperature according to belonging to the image, can carry out respectively school to the image in different-colour Just, it can improve the difference due to the different white color status of colour temperature to greatest extent in this way, and bring image colour cast problem. As shown in Figure 1, detailed process is as follows:
Step 11, the first white area rule is determined;
Step 12, the white point threshold value of each image to be corrected is found out using first white area rule;
Step 13, the image to be corrected for belonging to same color temperature is sorted out, is determined according to all white point threshold values found out Point to be corrected out carries out white balance correction to the point to be corrected.
It is introduced below with specific embodiment:
As shown in Fig. 2, the embodiment of the present invention provides a kind of method for correcting image, detailed process is as follows:
Step 21, prepare image to be corrected;
A large amount of image to be corrected needs the picture under different-colour in this step;Such as high color temperature is greater than The picture of 5000k, neutral color temperature be greater than picture of the 3000k less than or equal to 5000k, low color temperature is less than or equal to the picture of 3000k;
Step 22, the first white area rule WA is determined;This rule is relatively coarse rule, makes every effort to include all colour temperatures Under white point;
General color science principle thinks that the reflectivity of white point is stronger, and brightness is higher.And no matter under what light source, White point is relative to color point, and comparatively more " light " is some for color.Therefore, for rough the first white area rule, it is only necessary to It is required that the value of chrominance component UV is not especially big in yuv space, luminance component Y is relatively high.
For example, image is changed into yuv format, WA only does Min-max limitation to Y-component, to the sum of U component+V component Do Min-max limitation i.e.:
(1)Ymin<Y<Ymax
(2)UVmin<U+V<UVmax
And Ymax, Ymin, UVmax here, the range of UVmin limit be usually it is more relaxed, can permit and look for The case where white point is confused, than assigning the red point under high color temperature as white point described above;
Step 23, the white point threshold value of each image to be corrected is found out using first white area rule;White point threshold value can To identify the white area of picture well;
Step 24, the image to be corrected for belonging to same color temperature is sorted out;The white point threshold value of same color temperature will be belonged to It is referred to together;
Using the second white area rule in this step, the image to be corrected for belonging to same color temperature is sorted out;
Second white area rule includes:
Y, and/or U+Y, and/or U, and/or V, and/or Y- are set | U+V | value range.Such as:
(1)Ymin<Y<Ymax
(2)UVmin<U+V<UVmax
(3)Umin<U<Umax
(3)Vmin<V<Vmax
(4)Dmin<Y-|U+V|<Dmax
The pixel for meeting above-mentioned one or more condition just can be considered as the white point under the colour temperature, that is, need to correct Picture point;
Above-mentioned threshold value is more stringent on Ymax, Ymin, UVmax, the restriction of UVmin value.Such as the UVmax limited in 2 =50, UVmin=-50.In 3 threshold value, UVmax=15, UVmin=-15.
Point to be corrected is determined according to all white point threshold values found out;It is specific to execute step 25;
Step 25, whether the white point threshold value that judgement belongs to same class image has lap, and lap is public White area, if so, executing step 26;It is no to then follow the steps 27;
Step 26, then using lap as point to be corrected;
Step 27, then point to be corrected is obtained according to the default method for taking point to be corrected;Taken using least square method from white The closer light areas in white point region that point threshold value is determined is as point to be corrected;
Step 28, white balance correction is carried out to the point to be corrected.
The embodiment of the present invention also provides a kind of device for correcting image, as shown in Figure 3:
Described device includes:
Determining module 31, for determining the first white area rule;
Searching module 32, for finding out the white point threshold value of each image to be corrected using first white area rule;
Correction module 33, for sorting out to the image to be corrected for belonging to same color temperature, according to all white points found out Threshold value determines point to be corrected, carries out white balance correction to the point to be corrected.
First white area rule includes:
The value range of luminance component Y and chrominance component UV are set.
The correction module is further used for;According to the second white area of setting rule, to belonging to the to be corrected of same color temperature Image is sorted out;
Second white area rule includes:
Y, and/or U+Y, and/or U, and/or V, and/or Y- are set | U+V | value range
The correction module 33 is also used to:
Judge belong to same class image white point threshold value whether have lap, if so, then using lap as to Check point;
If it is not, obtaining point to be corrected according to the default method for taking point to be corrected.
The default method for taking point to be corrected includes:
Least square method is used to take the closer light areas in white point region determined from white point threshold value as to school On schedule.
In conclusion the utility model has the advantages that
Method provided in an embodiment of the present invention first passes through the rough white point for determining each width image of the first white area rule Then threshold value is sorted out in the colour temperature according to belonging to the image, can carry out respectively school to the image in different-colour Just, it can improve the difference due to the different white color status of colour temperature to greatest extent in this way, and bring image colour cast problem. The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in the spirit and principles in the present invention Within made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention.

Claims (10)

1. a kind of method for correcting image, which is characterized in that the described method includes:
Determine the first white area rule;
The white point threshold value of each image to be corrected is found out using first white area rule;
The image to be corrected for belonging to same color temperature is sorted out, determines point to be corrected according to all white point threshold values found out, White balance correction is carried out to the point to be corrected.
2. the method as described in claim 1, which is characterized in that first white area rule includes:
The value range of luminance component Y and chrominance component UV are set.
3. the method as described in claim 1, which is characterized in that the described pair of image to be corrected for belonging to same color temperature is sorted out Including;
According to the second white area of setting rule, the image to be corrected for belonging to same color temperature is sorted out;
Second white area rule includes:
Y, and/or U+Y, and/or U, and/or V, and/or Y- are set | U+V | value range.
4. method as claimed in claim 3, which is characterized in that all white point threshold values that the basis is found out are determined to be corrected It puts and includes:
Judge whether the white point threshold value for belonging to same class image has lap, if so, then using lap as to be corrected Point;
If it is not, obtaining point to be corrected according to the default method for taking point to be corrected.
5. method as claimed in claim 4, which is characterized in that the default method for taking point to be corrected includes:
Least square method is used to take the closer light areas in white point region determined from white point threshold value as point to be corrected.
6. a kind of device for correcting image, which is characterized in that described device includes:
Determining module, for determining the first white area rule;
Searching module, for finding out the white point threshold value of each image to be corrected using first white area rule;
Correction module, it is true according to all white point threshold values found out for sorting out to the image to be corrected for belonging to same color temperature Point to be corrected is made, white balance correction is carried out to the point to be corrected.
7. device as claimed in claim 6, which is characterized in that first white area rule includes:
The value range of luminance component Y and chrominance component UV are set.
8. method as claimed in claim 6, which is characterized in that the correction module is further used for;According to the second of setting White area rule, sorts out the image to be corrected for belonging to same color temperature;
Second white area rule includes:
Y, and/or U+Y, and/or U, and/or V, and/or Y- are set | U+V | value range.
9. method according to claim 8, which is characterized in that the correction module is also used to:
Judge whether the white point threshold value for belonging to same class image has lap, if so, then using lap as to be corrected Point;
If it is not, obtaining point to be corrected according to the default method for taking point to be corrected.
10. device as claimed in claim 9, luminance component Y, chrominance component UV, which is characterized in that, described preset takes The method of point to be corrected includes:
Least square method is used to take the closer light areas in white point region determined from white point threshold value as point to be corrected.
CN201711416706.6A 2017-12-25 2017-12-25 A kind of method and device correcting image Pending CN109963134A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711416706.6A CN109963134A (en) 2017-12-25 2017-12-25 A kind of method and device correcting image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711416706.6A CN109963134A (en) 2017-12-25 2017-12-25 A kind of method and device correcting image

Publications (1)

Publication Number Publication Date
CN109963134A true CN109963134A (en) 2019-07-02

Family

ID=67020552

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711416706.6A Pending CN109963134A (en) 2017-12-25 2017-12-25 A kind of method and device correcting image

Country Status (1)

Country Link
CN (1) CN109963134A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6862012B1 (en) * 1999-10-18 2005-03-01 International Business Machines Corporation White point adjusting method, color image processing method, white point adjusting apparatus and liquid crystal display device
CN1694543A (en) * 2004-05-09 2005-11-09 天瀚科技股份有限公司 Method of automatic detection and processing main colour system of white balance
CN106211804A (en) * 2014-04-29 2016-12-07 英特尔公司 The colour measurement to raw image data is utilized to carry out AWB
CN107027017A (en) * 2017-04-25 2017-08-08 建荣半导体(深圳)有限公司 A kind of method of adjustment, device, picture processing chip and the storage device of image white balance

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6862012B1 (en) * 1999-10-18 2005-03-01 International Business Machines Corporation White point adjusting method, color image processing method, white point adjusting apparatus and liquid crystal display device
CN1694543A (en) * 2004-05-09 2005-11-09 天瀚科技股份有限公司 Method of automatic detection and processing main colour system of white balance
CN106211804A (en) * 2014-04-29 2016-12-07 英特尔公司 The colour measurement to raw image data is utilized to carry out AWB
CN107027017A (en) * 2017-04-25 2017-08-08 建荣半导体(深圳)有限公司 A kind of method of adjustment, device, picture processing chip and the storage device of image white balance

Similar Documents

Publication Publication Date Title
Ciurea et al. A large image database for color constancy research
US11277595B2 (en) White balance method for image and terminal device
US6788813B2 (en) System and method for effectively performing a white balance operation
US7949185B2 (en) Method of performing robust auto white balance
US8300930B2 (en) Method for statistical analysis of images for automatic white balance of color channel gains for image sensors
CN103310422B (en) Obtain the method and device of image
CN110136071A (en) A kind of image processing method, device, electronic equipment and storage medium
CN106503719A (en) A kind of object color is extracted and detection method and device
CN105828058B (en) A kind of method of adjustment and device of white balance
Wang et al. Fast automatic white balancing method by color histogram stretching
US20100321523A1 (en) Method, apparatus, and system for selecting pixels for automatic white balance processing
CN103065334A (en) Color cast detection and correction method and device based on HSV (Hue, Saturation, Value) color space
US10567723B2 (en) System and method for detecting light sources in a multi-illuminated environment using a composite RGB-IR sensor
CN105812674A (en) Signal lamp color correction method, monitoring method, and device thereof
KR20030021252A (en) Object tracking based on color distribution
CN107507142A (en) Signal lamp image processing method
US20050134702A1 (en) Sampling images for color balance information
CN107644437B (en) Color cast detection system and method based on blocks
US20070041064A1 (en) Image sampling method for automatic white balance
CN111107330A (en) Color cast correction method for Lab space
US20200029016A1 (en) Moving object monitoring device and moving object monitoring system
CN109963134A (en) A kind of method and device correcting image
CN106471565A (en) Image display device and for method to dimming light source
CN101222572B (en) White balance processing equipment
CN110335257A (en) A kind of image color detection method and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190702