CN108090950A - A kind of method for optimizing the high light pollution of go image - Google Patents
A kind of method for optimizing the high light pollution of go image Download PDFInfo
- Publication number
- CN108090950A CN108090950A CN201611049052.3A CN201611049052A CN108090950A CN 108090950 A CN108090950 A CN 108090950A CN 201611049052 A CN201611049052 A CN 201611049052A CN 108090950 A CN108090950 A CN 108090950A
- Authority
- CN
- China
- Prior art keywords
- value
- image
- pixel
- gray
- maximum
- 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
- 238000000034 method Methods 0.000 title claims abstract description 24
- 238000001914 filtration Methods 0.000 claims abstract description 13
- 230000002146 bilateral effect Effects 0.000 claims abstract description 12
- 238000012545 processing Methods 0.000 claims abstract description 8
- 230000008569 process Effects 0.000 claims abstract description 7
- 235000002918 Fraxinus excelsior Nutrition 0.000 claims 1
- 239000002956 ash Substances 0.000 claims 1
- 238000005457 optimization Methods 0.000 abstract description 6
- 230000008859 change Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 241000209202 Bromus secalinus Species 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000149 penetrating effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000000644 propagated effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/50—Lighting effects
- G06T15/80—Shading
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/10—Image enhancement or restoration using non-spatial domain filtering
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Graphics (AREA)
- Image Processing (AREA)
Abstract
The invention discloses it is a kind of optimize the high light pollution of go image method, including:The image of the high light pollution of go image is taken by video camera;It reads and stores the color data of the image of the high light pollution of go image;The maximum diffusing reflection chromatic value of estimation is calculated, and saves as gray level image;Image is subjected to bilateral filtering processing, the diffusing reflection chromatic value after filtered device is calculated, and saves as gray level image;It corresponds and compares the maximum diffusing reflection chromatic value of estimation and the diffusing reflection chromatic value after filtered device, take its maximum, and save as gray level image;The image after removal mirror-reflection (i.e. bloom part) is calculated, image is preserved, that is, obtains the go image after optimizing high light pollution.It is suitable for the go picture optimization process before being identified to go.
Description
Technical field
The present invention relates to field of image recognition and machine intelligence field.
Background technology
With the development of the society, people can also carry out the processing work(of go result in the machine intelligences such as mobile phone, computer
Energy.However the reflective mistake for but easily causing chess piece recognizer of chessboard, it is impossible to black and white is correctly identified, so as to influence
The judgement of chess piece, has an impact result.
Up to the present, handle jobbie its reflective technology still developing, however all objects go reflective technology
The problem of can not applying to remove checkerboard image high light pollution, if by its approach application in checkerboard image processing, it will
Image is made to generate unexpected change.Its reason is not only containing reflector segment in the go image there are high light pollution,
And white chessman part is also close with reflector segment.
Therefore, a kind of go image for being suitable for handling high light pollution is studied, and is made at its undistorted non-warping image
Reason method is very necessary.
The content of the invention
The purpose of the present invention:Meet the go image for being not only suitable for handling high light pollution, and make its undistorted non-warping
Under the requirement of image processing method, a kind of method for being used to optimize the high light pollution of go image is proposed.
A kind of method for being used to optimize the high light pollution of go image, it comprises the following steps:
Step 1: the image of the high light pollution of go image is taken by video camera;
Step 2: it reads and stores the RGB data of the image of the high light pollution of go image;
Step 3: calculating the maximum diffusing reflection chromatic value c of estimation, and 2-D gray image is saved as, the gray level image conduct
The reference picture of bilateral filtering is carried out to image;
The maximum diffusing reflection chromatic value of estimation is calculated in step 3, and saves as 2-D gray image, the gray level image conduct
The reference picture of bilateral filtering is carried out to image, detailed process is:
R, G, B value of a pixel are read, compares the size of three gray values of pixel, that is, compares pixel R passages
The gray value of gray value, the gray value of G passages and channel B.Three gray value sizes of the pixel are compared two-by-two, are compared
Cheng Wei:
If the gray value of R passages is more than the gray value of G passages, continue to compare the gray value of R passages and the gray scale of channel B
Value;
If the gray value of R passages is more than the gray value of channel B, the gray value of R passages is preserved;
If the gray value of R passages is less than the gray value of channel B, the gray value of channel B is preserved;
If the gray value of R passages is less than the gray value of G passages, continue to compare the gray value of G passages and the gray scale of channel B
Value;
If the gray value of G passages is more than the gray value of channel B, the gray value of G passages is preserved;
If the gray value of G passages is less than the gray value of channel B, the gray value of channel B is preserved;
The maximum in the grey scale pixel value is found, i.e.,
Wherein, imax (x) is the maximum in the grey scale pixel value;ic(x) it is each pixel value of the passage of RGB tri-;r
For red, g is green, and b is blueness;X is nth pixel, and n is positive integer;
By the maximum in the grey scale pixel value compared with level threshold value;
If the maximum in grey scale pixel value is more than level threshold value, RGB gray value summations isum is calculated;Calculate the pixel
Chromaticity c is the maximum imax divided by RGB gray value summation isum in the grey scale pixel value;Calculate R passages gray value divided by
RGB gray values summation, the gray value of G passages divided by RGB gray values summation and the gray value of channel B divided by RGB gray value summations,
Compare the size of these three values, note chromaticity maximum is cmax, and chromaticity minimum value is cmin, and it is maximum unrestrained anti-to calculate pixel estimation
Penetrating chromatic value is
If the maximum in grey scale pixel value is less than level threshold value, the estimation maximum diffusing reflection chromaticity for remembering the pixel is 0;
Xun Huan proceeds as described above to be finished until the pixel of this pictures all calculates;
At this point, the maximum diffusing reflection chromaticity correspondence of each pixel estimation in picture is saved as into 2-D gray image.
Step 4: image is carried out bilateral filtering processing, the diffusing reflection chromatic value σ after filtered device is calculated, and is saved as
Gray level image;
Step 5: compared with step 3 is corresponded with the result in step 4, wherein maximum is taken, saves as ash
Spend image;
Step 6: calculating the image after removal mirror-reflection, that is, obtain the go image after optimizing high light pollution;
The image method calculated in step 6 after removal mirror-reflection is as follows:
It is in read step five as a result, itself and result in step 3 are carried out computing;If its result is less than threshold value, that
The pixel is identical with original pixel;If its result is more than threshold value, then calculating the pixel diffuse reflectance value isThe specular reflectance values of the pixel are at this timeMirror is individually subtracted in R, G, B of the pixel
Face reflected value obtains the rgb value of the pixel after removal bloom, is preserved.
The present invention is used for accurately identifying chess piece, splits chessboard, basis is provided for several chess functions.
Advantageous effect:By the method for the invention, the high light pollution of go image can be optimized, it, can be accurate after optimization
Identify chess piece.It meets to that can optimize the high light pollution of go image and make the non-warping distortionless demand of image, to cut out
It is more convenient to sentence several chesses, need not take a significant amount of time.
Description of the drawings
Fig. 1 is a kind of flow chart for the method for optimizing the high light pollution of go image;
Fig. 2 is the maximum diffusing reflection chromatic value flow chart of estimation;
Fig. 3 is the flow chart of image after optimization;
Specific embodiment
Specific embodiment one illustrates present embodiment with reference to figure one to figure X, and one kind described in present embodiment is excellent
Change the method for the high light pollution of go image, it comprises the following steps:
Step 1: the image of the high light pollution of go image is taken by video camera;
Step 2: it reads and stores the RGB data of the image of the high light pollution of go image;
Step 3: calculating the maximum diffusing reflection chromatic value c of estimation, and 2-D gray image is saved as, the gray level image conduct
The reference picture of bilateral filtering is carried out to image;
Step 4: image is carried out bilateral filtering processing, the diffusing reflection chromatic value σ after filtered device is calculated, and is saved as
Gray level image;
Step 5: compared with step 3 is corresponded with the result in step 4, wherein maximum is taken, saves as ash
Spend image;
Step 6: calculating the image after removal mirror-reflection, that is, obtain the go image after optimizing high light pollution;
Specific embodiment two, present embodiment are to a kind of high light pollution of optimization go image described in embodiment one
Algorithm further explanation, the maximum diffusing reflection chromatic value c of estimation is calculated in present embodiment, in step 3, and is preserved
For 2-D gray image, which is as the reference picture that bilateral filtering is carried out to image, detailed process:
R, G, B value of a pixel are read, compares the size of three gray values of pixel, that is, compares pixel R passages
The gray value of gray value, the gray value of G passages and channel B.Three gray value sizes of the pixel are compared two-by-two, are compared
Cheng Wei:
If the gray value of R passages is more than the gray value of G passages, continue to compare the gray value of R passages and the gray scale of channel B
Value;
If the gray value of R passages is more than the gray value of channel B, the gray value of R passages is preserved;
If the gray value of R passages is less than the gray value of channel B, the gray value of channel B is preserved;
If the gray value of R passages is less than the gray value of G passages, continue to compare the gray value of G passages and the gray scale of channel B
Value;
If the gray value of G passages is more than the gray value of channel B, the gray value of G passages is preserved;
If the gray value of G passages is less than the gray value of channel B, the gray value of channel B is preserved;
The maximum in the grey scale pixel value is found, i.e.,
Wherein, imax (x) is the maximum in the grey scale pixel value;ic(x) it is each pixel value of the passage of RGB tri-;r
For red, g is green, and b is blueness;X is nth pixel, and n is positive integer;
By the maximum in the grey scale pixel value compared with level threshold value;
Black picture element threshold value d ∈ (0,10) are set, if the maximum in grey scale pixel value is less than black picture element threshold value, that
The gray value of the pixel is considered as (0,0,0), that is, black picture element, then the estimation maximum diffusing reflection chromaticity of the pixel is
0;If the maximum in grey scale pixel value is more than black picture element threshold value, RGB gray value summations isum is calculated;Calculate the pixel color
Product c is the maximum imax divided by RGB gray value summation isum in the grey scale pixel value;Calculate the gray value divided by RGB of R passages
Gray value summation, the gray value of G passages divided by RGB gray values summation and the gray value of channel B divided by RGB gray value summations, than
Compared with the size of these three values, note chromaticity maximum is cmax, and chromaticity minimum value is cmin, calculates the maximum diffusing reflection of pixel estimation
Chromatic value is
Xun Huan proceeds as described above to be finished until the pixel of this pictures all calculates;
At this point, the maximum diffusing reflection chromaticity correspondence of each pixel estimation in picture is saved as into 2-D gray image.
Specific embodiment three, present embodiment are to a kind of high light pollution of optimization go image described in embodiment one
Algorithm further explanation, in present embodiment, image is subjected to bilateral filtering processing in step 4, is calculated filtered
Diffusing reflection chromatic value σ after device, and gray level image is saved as, detailed process is:
The formula of two-sided filter isWherein, Herein,For space gaussian filtering transmission function,For luminous intensity gaussian filtering transmission function;P is the pixel for wanting filtered device, and q is its adjacent picture
Element generally takes the pixel on the right, σSFor Geometrical propagation, generally fixed value, it is set as in the method between (16,25);σRFor
Luminosity is propagated, and is also fixed value, is set as in the methodBetween;AndRespectively pixel
The maximum diffuse reflectance value of p, q;For the diffuse reflectance value of neighborhood pixels;The result calculated at this time is corresponding to each pixel
The filtered device of the pixel treated diffuse reflectance value;
Specific embodiment three, present embodiment are to a kind of high light pollution of optimization go image described in embodiment one
Algorithm further explanation, the image after removal mirror-reflection is calculated in present embodiment, in step 6, that is, is obtained excellent
Change the go image after high light pollution, detailed process is:
It is in read step five as a result, itself and result in step 3 are carried out computing, be specially (3 × σmax-1)×c;
(i.e. if result is less than 10 to its result close to 0-6), then the gray value of the pixel is identical with original pixel;If its result is big
In threshold value, then calculating the pixel diffuse reflectance value isSince reflector segment approximation confirms as white light, because
The specular reflectance values of this pixel at this time areThe gray value of the R passages of the pixel is subtracted into mirror-reflection
Value obtains the gray value of the R passages of the pixel after removal bloom;The gray value of the G passages of the pixel subtracts specular reflectance values, obtains
The gray value of the R passages of pixel after to removal bloom;The gray value of the channel B of the pixel subtracts specular reflectance values, is gone
Except the gray value of the channel B of the pixel after bloom.Judge whether above three value is more than 255 or less than 0;If it no, keeps
It is constant, if going beyond the scope, it is revised as 255 or 0;This three-dimensional array is preserved, and preserves image.
The present invention relates to the processing for the diffuse reflectance value that its pixel is extracted to image progress bilateral filtering, wherein, σSWith σRCertainly
Determine the error of image, in this example, image pixel has been read out first, set σSWith σRInfluence filter result.If σSIt crosses
Small, then image does not optimize high optical noise completely in last result;If σRIt is excessive, it can cause to export result images distortion.
The present invention proposes a kind of method for optimizing the high light pollution of go image, it is noted that the type of required video camera
Number this patent is not construed as limiting;Handled processor is not construed as limiting this patent;Result caused by go is not to this
Patent is construed as limiting.It should be pointed out that for the ordinary person of the art, on the premise of inventive principle is not departed from also
Several improvements and modifications can be made, these also should be regarded as protection scope of the present invention.
Claims (3)
- A kind of 1. method for being used to optimize the high light pollution of go image, which is characterized in that it comprises the following stepsStep 1: the image of the high light pollution of go image is taken by video camera;Step 2: it reads and stores the RGB data of the image of the high light pollution of go image;Step 3: calculating the maximum diffusing reflection chromatic value c of estimation, and 2-D gray image is saved as, which is used as to figure Reference picture as carrying out bilateral filtering;Step 4: image is carried out bilateral filtering processing, the diffusing reflection chromatic value σ after filtered device is calculated, and saves as gray scale Image;Step 5: compared with step 3 is corresponded with the result in step 4, wherein maximum is taken, saves as gray-scale map Picture.Step 6: calculating the image after removal mirror-reflection, that is, obtain the go image after optimizing high light pollution;
- A kind of 2. method for being used to optimize the high light pollution of go image according to claim 1, which is characterized in that step 3 In, the maximum diffusing reflection chromatic value c of estimation is calculated, and gray level image is saved as, which is used as carries out bilateral filter to image The reference picture of ripple, detailed process are:R, G, B value of a pixel are read, compares the size of three gray values of pixel, that is, compares the gray scale of pixel R passages The gray value of value, the gray value of G passages and channel B, three gray value sizes of the pixel are compared two-by-two, comparison procedure For:The maximum in the grey scale pixel value is found, i.e.,Wherein, imax (x) is the maximum in the grey scale pixel value;ic(x) it is each pixel value of the passage of RGB tri-;R is red Color, g are green, and b is blueness;X is nth pixel, and n is positive integer;By the maximum in the grey scale pixel value compared with level threshold value;If the maximum in grey scale pixel value is more than level threshold value, RGB gray value summations isum is calculated;Calculate the pixel chromaticity C is the maximum imax divided by RGB gray value summation isum in the grey scale pixel value;Calculate the gray value of R passages divided by RGB ashes Angle value summation, the gray value of G passages divided by RGB gray values summation and the gray value of channel B divided by RGB gray value summations, compare The size of these three values, note chromaticity maximum are cmax, and chromaticity minimum value is cmin, calculate the maximum diffusing reflection color of pixel estimation Performance number isIf the maximum in grey scale pixel value is less than level threshold value, the estimation maximum diffusing reflection chromaticity for remembering the pixel is 0;Xun Huan proceeds as described above to be finished until the pixel of this pictures all calculates, and result is preserved one by one.
- A kind of 3. method for being used to optimize the high light pollution of go image according to claim 1, which is characterized in that step 6 The middle image calculated after removal mirror-reflection, that is, obtain the go image after optimizing high light pollution, and detailed process is:It is in read step five as a result, itself and result in step 3 are carried out computing, be specially (3 × σmax-1)×c;If Its result (sets result less than 10 close to 0-6), then the gray value of the pixel is identical with original pixel;If its result is more than threshold Value, then calculate the pixel diffuse reflectance value;Since reflector segment approximation confirms as white light, the minute surface of the pixel is anti-at this time It penetrates the gray value summation that value is the pixel and subtracts the value divided by three that diffuse reflectance value obtains;The gray value of the R passages of the pixel is subtracted Specular reflectance values are removed, obtain the gray value of the R passages of the pixel after removal bloom;The gray value of the G passages of the pixel subtracts mirror Face reflected value obtains the gray value of the R passages of the pixel after removal bloom;It is anti-that the gray value of the channel B of the pixel subtracts minute surface Value is penetrated, the gray value of the channel B of the pixel after removal bloom is obtained, obtained three-dimensional array is saved as into image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611049052.3A CN108090950A (en) | 2016-11-18 | 2016-11-18 | A kind of method for optimizing the high light pollution of go image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611049052.3A CN108090950A (en) | 2016-11-18 | 2016-11-18 | A kind of method for optimizing the high light pollution of go image |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108090950A true CN108090950A (en) | 2018-05-29 |
Family
ID=62171795
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611049052.3A Pending CN108090950A (en) | 2016-11-18 | 2016-11-18 | A kind of method for optimizing the high light pollution of go image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108090950A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110930323A (en) * | 2019-11-07 | 2020-03-27 | 华为技术有限公司 | Method and device for removing light reflection of image |
CN111754425A (en) * | 2020-06-05 | 2020-10-09 | 北京有竹居网络技术有限公司 | Image highlight removing processing method and device and electronic equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105678240A (en) * | 2015-12-30 | 2016-06-15 | 哈尔滨工业大学 | Image processing method for removing the reflect light of roads |
CN105741249A (en) * | 2016-02-03 | 2016-07-06 | 哈尔滨理工大学 | Highlight removal method for high reflective surface |
-
2016
- 2016-11-18 CN CN201611049052.3A patent/CN108090950A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105678240A (en) * | 2015-12-30 | 2016-06-15 | 哈尔滨工业大学 | Image processing method for removing the reflect light of roads |
CN105741249A (en) * | 2016-02-03 | 2016-07-06 | 哈尔滨理工大学 | Highlight removal method for high reflective surface |
Non-Patent Citations (2)
Title |
---|
QINGXIONG YANG 等: "Real-time Specular Highlight Removal Using Bilateral Filtering", 《HTTP://VISION.AI.ILLINOIS.EDU/PUBLICATIONS/ECCV-10-QINGXIONG-YANG.PDF》 * |
卢桂荣等: "基于快速双边滤波的图像高光去除研究", 《计算机工程与应用》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110930323A (en) * | 2019-11-07 | 2020-03-27 | 华为技术有限公司 | Method and device for removing light reflection of image |
CN110930323B (en) * | 2019-11-07 | 2023-09-12 | 华为技术有限公司 | Method and device for removing reflection of image |
CN111754425A (en) * | 2020-06-05 | 2020-10-09 | 北京有竹居网络技术有限公司 | Image highlight removing processing method and device and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Shafarenko et al. | Histogram-based segmentation in a perceptually uniform color space | |
CN101421748B (en) | Automatic detection and correction of non-red eye flash defects | |
WO2019205290A1 (en) | Image detection method and apparatus, computer device, and storage medium | |
CN108876768B (en) | Shadow defect detection method for light guide plate | |
CN102779330A (en) | Image reinforcement method, image reinforcement device and display device | |
CN108090950A (en) | A kind of method for optimizing the high light pollution of go image | |
CN105678240B (en) | It is a kind of to remove reflective image processing method for road | |
CN107256539B (en) | Image sharpening method based on local contrast | |
CN115731166A (en) | High-voltage cable connector polishing defect detection method based on deep learning | |
Miyata et al. | Vectorized total variation defined by weighted L infinity norm for utilizing inter channel dependency | |
CN113052768A (en) | Method for processing image, terminal and computer readable storage medium | |
CN110599553A (en) | Skin color extraction and detection method based on YCbCr | |
CN112991329A (en) | Image shadow detection and elimination method based on GAN | |
CN111445402B (en) | Image denoising method and device | |
WO2024016791A1 (en) | Method and apparatus for processing graphic symbol, and computer-readable storage medium | |
Shi et al. | Historical document image segmentation using background light intensity normalization | |
CN109657544B (en) | Face detection method and device | |
CN110633705A (en) | Low-illumination imaging license plate recognition method and device | |
CN107845080A (en) | Card image enhancement method | |
CN110688999B (en) | Mach-band effect simulated point light source metal steel seal character detection method | |
Liu et al. | Fast image visibility enhancement based on active polarization and color constancy for operation in turbid water | |
CN115235335A (en) | Intelligent detection method for size of running gear of high-speed rail motor train unit | |
CN114266803A (en) | Image processing method, image processing device, electronic equipment and storage medium | |
CN109934190B (en) | Self-adaptive highlight face image texture recovery method based on deformed Gaussian kernel function | |
CN108335296B (en) | Polar plate identification device and method |
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: 20180529 |