CN108833870A - A kind of white balance algorithm based on oblique photograph camera - Google Patents
A kind of white balance algorithm based on oblique photograph camera Download PDFInfo
- Publication number
- CN108833870A CN108833870A CN201811103991.0A CN201811103991A CN108833870A CN 108833870 A CN108833870 A CN 108833870A CN 201811103991 A CN201811103991 A CN 201811103991A CN 108833870 A CN108833870 A CN 108833870A
- Authority
- CN
- China
- Prior art keywords
- gain
- mean value
- white balance
- pixel
- calculates
- 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
Links
Classifications
-
- 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/10—Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
-
- 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
- H04N23/84—Camera processing pipelines; Components thereof for processing colour signals
- H04N23/88—Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control
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 discloses a kind of white balance algorithms based on oblique photograph camera, include the following steps:Step 1 reads picture data;Step 2 calculates subchannel mean value;Step 3 calculates grand mean;Step 4 calculates subchannel gain;Step 5 calculates overall gain;Step 6 generates new pixel;Step 7, pixel are anti-spilled;Wherein in above-mentioned step one, oblique photograph camera photographing unit acquires multiple image datas, and reads image data;Wherein in above-mentioned step two, the RGB monochromatic component mean value of every photo, i.e. R, G, the mean value Raver, Gaver, Baver in tri- channels B are calculated;Wherein in above-mentioned step three;The present invention effectively avoids data error by carrying out multiple mean value computation to RGB monochromatic component, the precision of RGB monochromatic component is improved, so that synchronism is high in the implementation procedure for the task of taking pictures, postpone small, and white balance consistency is good, and the 3-D image light and shade of generation is uniform.
Description
Technical field
It is specially a kind of white flat based on oblique photograph camera the present invention relates to unmanned plane low-altitude aerial camera work field
Account method.
Background technique
White balance is mainly for being adjusted in coloration, the color of the subject under various different light source color temperatures,
Shoot the color being reduced under standard color temperature;White balance is adjusted, is the needs for guaranteeing accurate reproduction object true colors.
The white balance of five photographing units is not identical in existing inclined camera, and in same photographing unit in flight
In different destinations image white balance it is also not identical, cause the 3D rendering of synthesis there are color light and shade is inconsistent in this way, be easy
There is color spot.
Meanwhile there are many kinds of automatic white balance algorithms:Gray world hair, perfect reflection, dynamic thresholding method and colour temperature are estimated
Meter method etc.;In view of finally needing to realize by FPGA, thus algorithm calculating process it is simple and direct be very necessary.
Existing camera is all based on single image data to the white balance processing of photo and carries out white balance algorithm processing, and
The white balance processing of multiple camera photos is also not quite similar, and therefore, designs a kind of white balance algorithm based on oblique photograph camera
It is necessary.
Summary of the invention
The purpose of the present invention is to provide a kind of white balance algorithms based on oblique photograph camera, to solve above-mentioned background skill
The problem of being proposed in art.
To achieve the above object, the present invention provides the following technical solutions:
A kind of white balance algorithm based on oblique photograph camera, includes the following steps:Step 1 reads picture data;Step
Rapid two, calculate subchannel mean value;Step 3 calculates grand mean;Step 4 calculates subchannel gain;Step 5 calculates total increase
Benefit;Step 6 generates new pixel;Step 7, photo synthesis;
Wherein in above-mentioned step one, oblique photograph camera photographing unit acquires multiple image datas, and reads image
Data;
Wherein in above-mentioned step two, the RGB monochromatic component mean value of every photo of calculating, i.e. R, G, tri- channels B
Mean value Raver, Gaver, Baver;
Wherein in above-mentioned step three, variance calculating is carried out to the RGB monochrome proportionality coefficient of calculating, it is equal to calculate triple channel
Value K, i.e.,:
K=(Raver+Gaver+Baver)/3;
Wherein in above-mentioned step four, R is calculated separately, the gain in tri- channels G, B, i.e.,:
Gr=K/Raver;
Gg=K/Gaver;
Gb=K/Baver;
Wherein in above-mentioned step five, all photos are calculated into each R by step 4, each channel G, B
Gain rejects some larger or smaller data, and calculates each R, the gain mean value in each channel G, B, i.e.,:
Graver=(Gr1+Gr2+Gr3+…+Grn)/n;
Ggaver=(Gg1+Gg2+Gg3+…+Ggn)/n;
Gbaver=(Gb1+Gb2+Gb3+…+Gbn)/n;
Wherein in above-mentioned step six, all pixels R in image, G, B are multiplied by gain mean value computation and obtain new pixel,
I.e.:
Rnew=Graver*R;
Gnew=Ggaver*G;
Bnew=Gbaver*B;
Wherein in above-mentioned step seven, new pixel calculated for above formula may have the case where overflowing, for
Such case directly sets 255 for the pixel of spilling, so that new photo be synthesized.
According to the above technical scheme, in the step 1, R, G, B respectively represent three channel colors of red, green, blue.
According to the above technical scheme, in the step 5, n is the data amount check rejected after larger or smaller data.
According to the above technical scheme, in the step 6, Rnew means the red channel pixel after gain, and Gnew means gain
Green channel pixel afterwards, Bnew mean the blue channel pixel after gain.
According to the above technical scheme, in the step 7, pixel spilling refers to the calculated number of Rnew, Gnew, Bnew
Value is higher than 255.
Compared with prior art, the beneficial effects of the invention are as follows:The present invention, it is repeatedly equal by being carried out to RGB monochromatic component
Value calculates, and effectively avoids data error, improves the precision of RGB monochromatic component, so that in the implementation procedure for the task of taking pictures
In, synchronism is high, and delay is small, and white balance consistency is good, and the 3-D image light and shade of generation is uniform.
Detailed description of the invention
Fig. 1 is algorithm flow chart of the invention;
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
Referring to Fig. 1, the present invention provides a kind of technical solution:
A kind of white balance algorithm based on oblique photograph camera, includes the following steps:Step 1 reads picture data;Step
Rapid two, calculate subchannel mean value;Step 3 calculates grand mean;Step 4 calculates subchannel gain;Step 5 calculates total increase
Benefit;Step 6 generates new pixel;Step 7, photo synthesis;
Wherein in above-mentioned step one, oblique photograph camera photographing unit acquires multiple image datas, and reads image
Data;
Wherein in above-mentioned step two, the RGB monochromatic component mean value of every photo of calculating, i.e. R, G, tri- channels B
Mean value Raver, Gaver, Baver;
Wherein in above-mentioned step three, variance calculating is carried out to the RGB monochrome proportionality coefficient of calculating, it is equal to calculate triple channel
Value K, i.e.,:
K=(Raver+Gaver+Baver)/3;
Wherein in above-mentioned step four, R is calculated separately, the gain in tri- channels G, B, i.e.,:
Gr=K/Raver;
Gg=K/Gaver;
Gb=K/Baver;
Wherein in above-mentioned step five, all photos are calculated into each R by step 4, each channel G, B
Gain rejects some larger or smaller data, and calculates each R, the gain mean value in each channel G, B, i.e.,:
Graver=(Gr1+Gr2+Gr3+…+Grn)/n;
Ggaver=(Gg1+Gg2+Gg3+…+Ggn)/n;
Gbaver=(Gb1+Gb2+Gb3+…+Gbn)/n;
Wherein in above-mentioned step six, all pixels R in image, G, B are multiplied by gain mean value computation and obtain new pixel,
I.e.:
Rnew=Graver*R;
Gnew=Ggaver*G;
Bnew=Gbaver*B;
Wherein in above-mentioned step seven, new pixel calculated for above formula may have the case where overflowing, for
Such case directly sets 255 for the pixel of spilling, so that new photo be synthesized.
According to the above technical scheme, in step 1, R, G, B respectively represent three channel colors of red, green, blue.
According to the above technical scheme, in step 5, n is the data amount check rejected after larger or smaller data.
According to the above technical scheme, in step 6, Rnew means the red channel pixel after gain, after Gnew means gain
Green channel pixel, Bnew mean the blue channel pixel after gain.
According to the above technical scheme, in step 7, pixel spilling refers to that the calculated numerical value of Rnew, Gnew, Bnew is high
In 255.
Based on above-mentioned, it is an advantage of the current invention that it is of the invention, multiple images are acquired by oblique photograph camera photographing unit
Data, and read image data;Calculate the RGB monochromatic component mean value of every photo, i.e. R, G, the mean value Raver in tri- channels B,
Gaver, Baver, R, G, B respectively represent three channel colors of red, green, blue;Variance is carried out to the RGB monochrome proportionality coefficient of calculating
It calculates, calculates triple channel mean value K, i.e.,:K=(Raver+Gaver+Baver)/3;Calculate separately R, the gain in tri- channels G, B,
I.e.:Gr=K/Raver;Gg=K/Gaver;Gb=K/Baver;All photos are calculated into each R, the increasing in each channel G, B
Benefit rejects some larger or smaller data, and calculates each R, the gain mean value in each channel G, B:Graver=(Gr1+Gr2+
Gr3+…+Grn)/n;Ggaver=(Gg1+Gg2+Gg3+ ...+Ggn)/n;Gbaver=(Gb1+Gb2+Gb3+ ...+Gbn)/n, n
To reject the data amount check after larger or smaller data;All pixels in image are multiplied by gain, new pixel is calculated, i.e.,:
Rnew=Graver*R;Gnew=Ggaver*G;Bnew=Gbaver*B;New pixel calculated for above formula may exist
The case where spilling, pixel spilling refer to that the calculated numerical value of Rnew, Gnew, Bnew is higher than 255, directly will in this case
The pixel of spilling is set as 255, so that new photo be synthesized.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.
It although an embodiment of the present invention has been shown and described, for the ordinary skill in the art, can be with
A variety of variations, modification, replacement can be carried out to these embodiments without departing from the principles and spirit of the present invention by understanding
And modification, the scope of the present invention is defined by the appended.
Claims (5)
1. a kind of white balance algorithm based on oblique photograph camera, includes the following steps:Step 1 reads picture data;Step
Two, calculate subchannel mean value;Step 3 calculates grand mean;Step 4 calculates subchannel gain;Step 5 calculates overall gain;
Step 6 generates new pixel;Step 7, photo synthesis;It is characterized in that:
Wherein in above-mentioned step one, oblique photograph camera photographing unit acquires multiple image datas, and reads image data;
Wherein in above-mentioned step two, the RGB monochromatic component mean value of every photo, i.e. R, G, the mean value in tri- channels B are calculated
Raver, Gaver, Baver;
Wherein in above-mentioned step three, variance calculating is carried out to the RGB monochrome proportionality coefficient of calculating, calculates triple channel mean value K,
I.e.:
K=(Raver+Gaver+Baver)/3;
Wherein in above-mentioned step four, R is calculated separately, the gain in tri- channels G, B, i.e.,:
Gr=K/Raver;
Gg=K/Gaver;
Gb=K/Baver;
Wherein in above-mentioned step five, all photos are calculated into each R by step 4, the gain in each channel G, B,
Some larger or smaller data are rejected, and calculate each R, the gain mean value in each channel G, B, i.e.,:
Graver=(Gr1+Gr2+Gr3+…+Grn)/n;
Ggaver=(Gg1+Gg2+Gg3+…+Ggn)/n;
Gbaver=(Gb1+Gb2+Gb3+…+Gbn)/n;
Wherein in above-mentioned step six, all pixels R in image, G, B are multiplied by gain mean value computation and obtain new pixel, i.e.,:
Rnew=Graver*R;
Gnew=Ggaver*G;
Bnew=Gbaver*B;
Wherein in above-mentioned step seven, new pixel calculated for above formula may have the case where overflowing, for this
Situation directly sets 255 for the pixel of spilling, so that new photo be synthesized.
2. a kind of white balance algorithm based on oblique photograph camera according to claim 1, it is characterised in that:The step
In one, R, G, B respectively represent three channel colors of red, green, blue.
3. a kind of white balance algorithm based on oblique photograph camera according to claim 1, it is characterised in that:The step
In five, n is the data amount check rejected after larger or smaller data.
4. a kind of white balance algorithm based on oblique photograph camera according to claim 1, it is characterised in that:The step
In six, Rnew means the red channel pixel after gain, and Gnew means the green channel pixel after gain, and Bnew means the indigo plant after gain
Channel pixel.
5. a kind of white balance algorithm based on oblique photograph camera according to claim 1, it is characterised in that:The step
In seven, pixel spilling refers to that the calculated numerical value of Rnew, Gnew, Bnew is higher than 255.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811103991.0A CN108833870A (en) | 2018-09-20 | 2018-09-20 | A kind of white balance algorithm based on oblique photograph camera |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811103991.0A CN108833870A (en) | 2018-09-20 | 2018-09-20 | A kind of white balance algorithm based on oblique photograph camera |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108833870A true CN108833870A (en) | 2018-11-16 |
Family
ID=64149436
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811103991.0A Pending CN108833870A (en) | 2018-09-20 | 2018-09-20 | A kind of white balance algorithm based on oblique photograph camera |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108833870A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110740306A (en) * | 2019-10-24 | 2020-01-31 | 深圳市视特易智能科技有限公司 | White balance statistical correction template and method for color camera |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102447912A (en) * | 2010-10-08 | 2012-05-09 | 奥林巴斯映像株式会社 | Image processing device, white balance correction method, and imaging device |
CN104320641A (en) * | 2013-03-13 | 2015-01-28 | 全视技术有限公司 | Apparatus and method for automated self-training of white balance by electronic cameras |
CN107205118A (en) * | 2017-06-27 | 2017-09-26 | 中国地质环境监测院 | Seven camera lens unmanned plane panoramic cameras and its image processing method |
CN107395953A (en) * | 2017-05-30 | 2017-11-24 | 深圳晨芯时代科技有限公司 | A kind of imaging parameters optimization method of panorama camera |
CN107948617A (en) * | 2017-12-06 | 2018-04-20 | 广东欧珀移动通信有限公司 | Image processing method, device, computer-readable recording medium and computer equipment |
-
2018
- 2018-09-20 CN CN201811103991.0A patent/CN108833870A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102447912A (en) * | 2010-10-08 | 2012-05-09 | 奥林巴斯映像株式会社 | Image processing device, white balance correction method, and imaging device |
CN104320641A (en) * | 2013-03-13 | 2015-01-28 | 全视技术有限公司 | Apparatus and method for automated self-training of white balance by electronic cameras |
CN107395953A (en) * | 2017-05-30 | 2017-11-24 | 深圳晨芯时代科技有限公司 | A kind of imaging parameters optimization method of panorama camera |
CN107205118A (en) * | 2017-06-27 | 2017-09-26 | 中国地质环境监测院 | Seven camera lens unmanned plane panoramic cameras and its image processing method |
CN107948617A (en) * | 2017-12-06 | 2018-04-20 | 广东欧珀移动通信有限公司 | Image processing method, device, computer-readable recording medium and computer equipment |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110740306A (en) * | 2019-10-24 | 2020-01-31 | 深圳市视特易智能科技有限公司 | White balance statistical correction template and method for color camera |
CN110740306B (en) * | 2019-10-24 | 2021-05-11 | 深圳市视特易智能科技有限公司 | Color white balance statistical correction method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105185314B (en) | LED display uniformity compensation method | |
RU2193798C2 (en) | Image processing method | |
CN109068025B (en) | Lens shadow correction method and system and electronic equipment | |
EP3416369A1 (en) | Image processing method and apparatus for terminal, and terminal | |
CN108055452A (en) | Image processing method, device and equipment | |
CN108712608A (en) | Terminal device image pickup method and device | |
CN108154514A (en) | Image processing method, device and equipment | |
CA3016428C (en) | Devices and methods for high dynamic range video | |
CN108734651A (en) | Image splicing method and image splicing device thereof | |
CN110322830B (en) | LED screen brightness correction method and device | |
CN107396079B (en) | White balance adjustment method and device | |
CN105791783B (en) | Camera imaging color adjustment method and system | |
CN108053438A (en) | Depth of field acquisition methods, device and equipment | |
CN111462693A (en) | Method and system for performing external optical compensation on AMO L ED curved screen | |
CN106973279A (en) | A kind of camera module white balance debugging method and device | |
CN104933706A (en) | Imaging system color information calibration method | |
CN108495115A (en) | Imaging sensor and its pixel groups and pel array, the method for obtaining image information | |
CN108833870A (en) | A kind of white balance algorithm based on oblique photograph camera | |
CN102946501B (en) | Color distortion correction method and device in imaging system or image output system | |
CN108052883A (en) | User's photographic method, device and equipment | |
CN107734231A (en) | A kind of imaging system dynamic rage extension method based on optical filtering | |
CN111667446A (en) | Image processing method | |
EP2672718A1 (en) | Color calibration of an image capture device in a way that is adaptive to the scene to be captured | |
CN107770410A (en) | The adaptive corrective of colored area array CCD | |
CN105323568A (en) | Color reconstruction method of color filter array in digital camera |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181116 |
|
RJ01 | Rejection of invention patent application after publication |