CN109525828A - A kind of discrepancy tunnel or driving recording auto white balance method when going out walking in the night - Google Patents
A kind of discrepancy tunnel or driving recording auto white balance method when going out walking in the night Download PDFInfo
- Publication number
- CN109525828A CN109525828A CN201811382870.4A CN201811382870A CN109525828A CN 109525828 A CN109525828 A CN 109525828A CN 201811382870 A CN201811382870 A CN 201811382870A CN 109525828 A CN109525828 A CN 109525828A
- Authority
- CN
- China
- Prior art keywords
- white balance
- histogram
- night
- tunnel
- similarity
- 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
- 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/75—Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
- G06V10/758—Involving statistics of pixels or of feature values, e.g. histogram matching
Abstract
Driving recording auto white balance method when the invention discloses a kind of discrepancy tunnel or going out walking in the night.The present invention is based on the improved automatic white balance algorithms of Histogram Matching, tunnel or night flight or navigation are entered and left according to distinguish to judge the similarity degree of image RGB channel histogram, automatically select the correction which kind of algorithm should carry out white balance with, it is violent in the variation of actual environment condition to overcome existing algorithm, the problem of automatic white balance is performed poor in the single situation of color content, it realizes and efficiently the white balance of video image is automatically calibrated in real time, even if automobile data recorder is allowed to enter and leave tunnel, the content recorded during driving at night still has higher identification, ensure the precise record of travelling data.
Description
Technical field
The present invention relates to computer visions and field of video image processing, and in particular to a kind of discrepancy tunnel or row when going out walking in the night
Vehicle records auto white balance method.
Background technique
When observing jobbie, current light source property can be used to adjust the color of observed object human eye.And work as
When the picture pick-up devices such as digital camera shoot object, it is but often difficult to realize general automatic white balance function.In general, right
It is all the white balance module of equipment to carry out the color rendition operation to white object for digital camera equipment.It is taken the photograph in number
As technology widely applied today, people need white balance to solve the problems, such as the color distortion of image.
White balance is a kind of process for removing improper color.Under a variety of different colour temperatures, the color of object can be produced
Changing.Wherein, white object is alternatively the most obvious.In order to reduce external light shadow caused by color of object as far as possible
It rings, target subject original color can be restored under the conditions of different-colour, needs to carry out colour correction, to reach correct
Color balance.This process is exactly so-called white balance.At the same time, because of the identical (R=G=B of RGB component intensity in white light
=255), so can also correct the light of other colors if white light can be corrected.
The automatic white balance algorithm applied in engineering at present mainly has gray world method and perfect reflection.In gray scale generation
In boundary's method, it is assumed that shooting image has color change abundant enough, and assumes the assembly average phase of tri- kinds of color components of R, G, B
Deng, and the foundation by the modification to mean value as white balance calibration.This method has good color on coloury image
Color reducing power, but then will appear colour cast when there is the single image of color.Perfect reflection then thinks most bright in image
Pixel corresponds to certain smooth or mirror article, thus may be assumed that available anti-to greatest extent under such pixel
The spectral information mirrored makees color information statistics to the point of this part and using them as the foundation of color instruction.With gray scale generation
Boundary's method is different, and perfect reflection then occurs the significant effect of the image white balance of single color to coloury image
It is clearly disadvantageous.
Existing white balance method has a kind of video figure of Luoyang Institute of Electro-Optical Equipment, Aviation Industry Corporation of China
As auto white balance method.Specific step is as follows:
1. calculating the accumulated value of tri- kinds of color gray values of R, G, B in this frame image;
2. calculating the maximum value of tri- kinds of color gray values of R, G, B in this frame image;
3. calculating square of two kinds of color gray values of R, B in this frame image;
4. calculating the accumulated value of two kinds of color gray values square of R, B in this frame image;
5. calculating the maximum value of two kinds of color gray value square accumulated values of R, B in this frame image;
6. calculating the regulation coefficient of two kinds of color gray values of R, B of next frame image;
7. calculating tri- kinds of color gray values of R, G, B in next frame image using the regulation coefficient obtained and being used as output image
Three kinds of color gray values.
The disadvantages of this method is:
1. the universal resolution ratio with higher of current automobile data recorder, this method is in the image and video of high-resolution
It needs using a large amount of computing resource, real-time still has deficiency;
2. vehicle going at night or light variation and its acutely when being entered and left from tunnel, and in both environmental conditions
The color of lower image is relatively simple, and this method has been difficult to good effect under this use environment.
Summary of the invention
The purpose of the present invention is overcoming the shortcomings of existing methods, when proposing a kind of discrepancy tunnel or going out walking in the night driving recording from
Dynamic white balance method.The present invention program mainly solves the problems, such as it is to become in current existing method in face of ultrahigh resolution, light
Change acutely, the problem of conventional white balance scheme duration in the single situation of image color, computing resource consumption is big, poor in timeliness.
To solve the above-mentioned problems, the driving recording automatic white balance side the invention proposes a kind of discrepancy tunnel or when going out walking in the night
Method, which comprises
Step 1 obtains the present frame of driving recording, calculates the form similarity of the RGB channel histogram of present frame.If
Similarity is high, thens follow the steps two, otherwise executes step 3;
Step 2 shows that automobile is going out if histogram similarity is high according to the similarity of RGB channel histogram
Enter tunnel, by a Histogram Matching to another histogram in frame, so that the location and shape of two histograms are most
May be similar, the correction of white balance is carried out with this;
Step 3, if histogram similarity is low, shows automobile just at night according to the similarity of RGB channel histogram
Row, does not change the form of histogram, the histogram of RGB channel is made translation, only changes its center, and as
Realize the correction of white balance in basis.
Driving recording auto white balance method when a kind of discrepancy tunnel proposed by the present invention or night flight or navigation, is utilized histogram
Characteristic is realized and is efficiently automatically calibrated to the white balance of video image in real time, even if automobile data recorder is allowed to enter and leave
The content recorded during tunnel, driving at night still has higher identification, ensures the accurate of travelling data
It records.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the white balance method overall flow figure of the embodiment of the present invention;
Fig. 2 is the discrepancy tunnel white balance flow chart of the embodiment of the present invention;
Fig. 3 is the night flight or navigation white balance flow chart of the embodiment of the present 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.
Fig. 1 is the white balance method overall flow figure of the embodiment of the present invention, as shown in Figure 1, this method comprises:
S1 obtains the present frame of driving recording, calculates the form similarity of the RGB channel histogram of present frame.If similar
Degree is high, then executes S2, otherwise execute S3;
S2 shows that automobile is entering and leaving tunnel if histogram similarity is high according to the similarity of RGB channel histogram
Road, by a Histogram Matching to another histogram in frame, so that the location and shape of two histograms are as far as possible
It is similar, the correction of white balance is carried out with this;
S3, if histogram similarity is low, shows that automobile is being gone out walking in the night, no according to the similarity of RGB channel histogram
The form for changing histogram, makees translation for the histogram of RGB channel, only changes its center, and based on this
Realize the correction of white balance.
Step S1, specific as follows:
0 to 255 gray levels are divided into 5 different sections first by S1-1;
S1-2 calculates wherein x-th of interval B channel histogram and is obtaining the maximum value of the section summation after translation
BxMaxAnd R, G channel histogram are respectively in the summation R in this sectionxSum, GxSum;
S1-3 calculates ratio r (RB), the r of the pixel percentage in each section using channel B histogram as standard
(GB), and maximum ratio r (Max) therein is found;
S1-4 shows three channel histograms if maximum ratio r (Max) is greater than pre-set threshold value thres1
Difference it is excessively greatly different, for the not applicable scene of the present invention, present frame is not dealt with, and only retains storage;
S1-5, if maximum ratio r (Max) between thres1 and thres2, shows three channel histogram phases
It is relatively low like spending, it is judged as that automobile is being gone out walking in the night at this time, therefore translate to avoid excessive correction using histogram, jumps to
S3。
S1-6 shows that the similarity-rough set of RGB channel histogram is high if maximum ratio r (Max) is less than thres2,
It is judged as that automobile is entering and leaving tunnel at this time, therefore best white balance correction effect should be reached using histogram matching
Fruit jumps to S2.
Step S2 carries out Histogram Matching, as shown in Fig. 2, specific as follows:
S2-1 is calculated the channel histogram H in the channel R, channel B by formula (1)R[i], HB[i]。
In formula, HD[i] indicates channel histogram, and D can be R, G, any one channel in channel B, herein, we
Only choose D=R, D=B.W and H indicates the width and height of image;
S2-2 calculates the channel accumulation histogram in the channel R, channel B with formula (2).
In formula, SDIndicate that D channel histogram gray level is cumulative from 0 to D.
By the available required transfer function of channel B accumulation histogram.
The channel accumulative histogram in the channel R is substituted into transfer function, obtains the new channel R accumulation histogram by S2-3.Such as formula
(3):
In formula, ZRFor the new gray value of the required channel R accumulation histogram.
Step S3 carries out histogram translation, as shown in figure 3, specific as follows:
S3-1 counts the histogram of RGB channel according to formula (1).
S3-2 calculates the overlapping area of three channel histograms according to formula (4):
In formula (4), IA indicates the overlapping area of three channel histogram, HR(i),HG(i),HB(i) RGB is shown respectively
The quantitative value of i-th of channel gray level;
S3-3 maximizes overlapping area to obtain optimal correction coefficient.
In above-mentioned formula, required coefficient can be acquired in IA maximum, coefficient of correspondence kr,kg,kb.According to
Obtained coefficient also can be obtained by new RGB numerical value.Histogram after correction maintains during original shape but changes
The heart has reached desired calibration result.
A kind of discrepancy tunnel that the embodiment of the present invention proposes or driving recording auto white balance method when going out walking in the night, are utilized straight
The characteristic of square figure is realized and is efficiently automatically calibrated to the white balance of video image in real time, even if allowing automobile data recorder
The content recorded during entering and leaving tunnel, driving at night still has higher identification, ensures travelling data
Precise record.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can
It is completed with instructing relevant hardware by program, which can be stored in a computer readable storage medium, storage
Medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random
Access Memory), disk or CD etc..
In addition, driving recording automatic white balance when being provided for the embodiments of the invention a kind of discrepancy tunnel above or going out walking in the night
Method is described in detail, and used herein a specific example illustrates the principle and implementation of the invention, with
The explanation of upper embodiment is merely used to help understand method and its core concept of the invention;Meanwhile for the general of this field
Technical staff, according to the thought of the present invention, there will be changes in the specific implementation manner and application range, in conclusion
The contents of this specification are not to be construed as limiting the invention.
Claims (1)
1. driving recording auto white balance method when a kind of discrepancy tunnel or night flight or navigation, which is characterized in that the described method includes:
Step 1 obtains the present frame of driving recording, calculates the form similarity of the RGB channel histogram of present frame.If similar
Degree is high, thens follow the steps two, otherwise executes step 3;
Step 2 shows that automobile is entering and leaving tunnel if histogram similarity is high according to the similarity of RGB channel histogram
Road, by a Histogram Matching to another histogram in frame, so that the location and shape of two histograms are as far as possible
It is similar, the correction of white balance is carried out with this;
Step 3, if histogram similarity is low, shows that automobile is being gone out walking in the night, no according to the similarity of RGB channel histogram
The form for changing histogram, makees translation for the histogram of RGB channel, only changes its center, and based on this
Realize the correction of white balance.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811382870.4A CN109525828A (en) | 2018-11-20 | 2018-11-20 | A kind of discrepancy tunnel or driving recording auto white balance method when going out walking in the night |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811382870.4A CN109525828A (en) | 2018-11-20 | 2018-11-20 | A kind of discrepancy tunnel or driving recording auto white balance method when going out walking in the night |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109525828A true CN109525828A (en) | 2019-03-26 |
Family
ID=65776557
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811382870.4A Pending CN109525828A (en) | 2018-11-20 | 2018-11-20 | A kind of discrepancy tunnel or driving recording auto white balance method when going out walking in the night |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109525828A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115131349A (en) * | 2022-08-30 | 2022-09-30 | 新泰市中医医院 | White balance adjusting method and system based on endocrine test paper color histogram |
WO2023035124A1 (en) * | 2021-09-07 | 2023-03-16 | 华为技术有限公司 | Image processing method and apparatus |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102340673A (en) * | 2011-10-25 | 2012-02-01 | 杭州藏愚科技有限公司 | White balance method for video camera aiming at traffic scene |
WO2014093042A1 (en) * | 2012-12-13 | 2014-06-19 | Google Inc. | Determining an image capture payload burst structure based on metering image capture sweep |
-
2018
- 2018-11-20 CN CN201811382870.4A patent/CN109525828A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102340673A (en) * | 2011-10-25 | 2012-02-01 | 杭州藏愚科技有限公司 | White balance method for video camera aiming at traffic scene |
WO2014093042A1 (en) * | 2012-12-13 | 2014-06-19 | Google Inc. | Determining an image capture payload burst structure based on metering image capture sweep |
Non-Patent Citations (1)
Title |
---|
魏超 等: "基于直方图的白平衡算法的研究", 《微电子学与计算机》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023035124A1 (en) * | 2021-09-07 | 2023-03-16 | 华为技术有限公司 | Image processing method and apparatus |
CN115131349A (en) * | 2022-08-30 | 2022-09-30 | 新泰市中医医院 | White balance adjusting method and system based on endocrine test paper color histogram |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103400150B (en) | A kind of method and device that road edge identification is carried out based on mobile platform | |
CN103353982B (en) | A kind of tone mapping method based on histogram equalization | |
US9036047B2 (en) | Apparatus and techniques for image processing | |
CN104581105B (en) | Based on the auto white balance method of colour temperature range conversion weight map and the correction of block reliability | |
CN105069801A (en) | Method for preprocessing video image based on image quality diagnosis | |
CN102739953B (en) | Image processing equipment, image processing method | |
CN106303483B (en) | A kind of image processing method and device | |
CN103327220B (en) | With green channel for the denoising method guided on low-light (level) Bayer image | |
US20060290706A1 (en) | Terrain map summary elements | |
CN109525828A (en) | A kind of discrepancy tunnel or driving recording auto white balance method when going out walking in the night | |
US9449375B2 (en) | Image processing apparatus, image processing method, program, and recording medium | |
CN105578081A (en) | Imaging method, image sensor, imaging device and electronic device | |
CN110740314B (en) | Method and system for correcting defective pixel of color line array camera | |
LU101298B1 (en) | Target Tracking Method Based on Improved Particle Swarm Optimization Algorithm | |
CN110047052A (en) | A kind of strong Xanthophyll cycle night vision Enhancement Method based on FPGA | |
JP5149858B2 (en) | Color image representative color determination device and operation control method thereof | |
CN103546729B (en) | Gray-color dual-mode TDI-CMOS image sensor and control method | |
JP5776481B2 (en) | Image processing apparatus, imaging apparatus, image processing method, and image processing program | |
CN113421195B (en) | Image processing method, device and equipment | |
KR100886323B1 (en) | Methord and apparatus for real-time object tracking using color histograms | |
CN109672874A (en) | A kind of consistent three-dimensional video-frequency color calibration method of space-time | |
CN104780322A (en) | Imaging device, imaging method, image processing device | |
CN106339988B (en) | A kind of image defogging method and device | |
CN103313066A (en) | Interpolation method and device | |
CN109510936A (en) | Continuous Atomatic focusing method and system |
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 |
Application publication date: 20190326 |
|
WD01 | Invention patent application deemed withdrawn after publication |