CN108288260A - The image pre-processing method of real-time deep or light correction - Google Patents
The image pre-processing method of real-time deep or light correction Download PDFInfo
- Publication number
- CN108288260A CN108288260A CN201810089383.2A CN201810089383A CN108288260A CN 108288260 A CN108288260 A CN 108288260A CN 201810089383 A CN201810089383 A CN 201810089383A CN 108288260 A CN108288260 A CN 108288260A
- Authority
- CN
- China
- Prior art keywords
- value
- image
- defect
- deep
- processing method
- 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 19
- 238000007781 pre-processing Methods 0.000 title claims abstract description 14
- 230000007547 defect Effects 0.000 claims abstract description 32
- 238000004364 calculation method Methods 0.000 claims abstract description 9
- 238000000605 extraction Methods 0.000 claims description 4
- 238000003672 processing method Methods 0.000 claims 3
- 238000005286 illumination Methods 0.000 description 5
- 238000005498 polishing Methods 0.000 description 3
- 230000002950 deficient Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 241000208340 Araliaceae Species 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000000205 computational method Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20224—Image subtraction
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
Abstract
The present invention relates to technical field of machine vision, more particularly to a kind of method of image preprocessing.1. the image pre-processing method of real-time deep or light correction, it is characterised in that described image preprocess method includes the following steps:A., benchmark image and pending image are set;B. size and the processing direction of the defect of being extracted are specified;C. the object to be extracted as defect is selected;D. a reduced value is selected, a threshold value is set, a reference value of reduced value and standard picture to pending image carries out Difference Calculation, the defect point that absolute value is less than the threshold value is filtered off in the result of gained Difference Calculation;E. to the image setting yield value of step d processing gained, contrast is improved;F., one tone value, given filter tone value or tone value interference component below are set.The technical solution adopted by the present invention testing result is accurate, and False Rate is low.
Description
Technical field
The present invention relates to technical field of machine vision, more particularly to a kind of method of image preprocessing.
Background technology
In field of machine vision, be most difficult to realize is exactly product appearance class detection project.Its main cause has following three
Kind:Polishing is uneven, and product surface is reflective inconsistent, ambient light interference.The picture polishing quality ginseng got so as to cause camera
Difference is uneven, and it is difficult then so that camera software is dealt with.Camera is eventually led to much to judge by accident(Certified products are judged to not conform to
Lattice product), fail to judge(Defective work is judged to certified products).The former can cause yields very low, influence client's production capacity;The latter is exactly to cause
Life, defective work can be caused to flow directly to client over there, if mass defect is caused to lead to that accident occurs, it may occur that can not draw
The loss returned.
Invention content
In NI Vision Builder for Automated Inspection, each pixel transmits 256 level data according to luminous intensity(8).Carrying out monochrome(It is black
In vain)When processing, black is construed to " 0 ", and white is construed to " 255 ", to allow the luminous intensity for receiving each pixel conversion
For numeric data.That is, all pixels of image are 0(Black)To 255(White)Between value.For example, grey packet
The half white of black containing half, it will be converted into " 127 ".The image data captured using machine vision is composition image
The set of pixel data, and pixel data is reproduced as 256 grades of contrast-datas.Image data is arrived by each value 0
Pixel performance between 255 comes out.So-called image procossing exactly calculates the number of each pixel by following various computational methods
Value Data is to find out the processing procedure of characteristics of image.According to above principle, if product surface illuminance is consistent, image
Gray value can all be concentrated in some value.Conversely, if uneven illumination is even, gray value can be more dispersed.If polishing is uneven
Even or ambient light has interference, the gray value of the picture that shooting camera is got every time in this way, each pixel of image real
Border is all continually changing, but the threshold value of binaryzation that we set at the beginning is constant, is may result in this way in threshold
The pixel of gray value near value is changed into white a little while(255), it is changed into black a little while(0), and then cause erroneous judgement and
It fails to judge.
To solve the above problems, the present invention provides a kind of image pre-processing method of deep or light correction in real time, cancel workpiece table
Face due to illumination caused by image generate dash area either the even part of uneven illumination.The present invention uses following technology
Scheme:
The image pre-processing method of real-time deep or light correction, it is characterised in that described image preprocess method includes the following steps:
A., benchmark image and pending image are set;
B. size and the processing direction of the defect of being extracted are specified;
C. the object to be extracted as defect is selected;
D. a reduced value is selected, a threshold value is set, a reference value of reduced value and standard picture to pending image carries out
Difference Calculation filters off the defect point that absolute value is less than the threshold value in the result of gained Difference Calculation;
E. to the image setting yield value of step d processing gained, contrast is improved;
F., one tone value, given filter tone value or tone value interference component below are set.
Preferably, the size of the defect is 4-200 pixels, and the processing direction includes X-direction, Y direction,
And XY axis directions.
Preferably, the object extracted as defect includes:Bright, dark, light and shade.It is stated clearly:For only extracting than the back of the body
The also bright defect of scape;It is described dark:For only extracting the defect also darker than background;The light and shade is used to extract both bright, dark
Defect.
Preferably, a reference value, reduced value, tone value are the gray value within the scope of 0-255.
Preferably, the reduced value, a reference value are to extract the average value of gradation of image concentration value in range.
Preferably, the reduced value, a reference value are to extract the median of gray value of image concentration in range.
Preferably, the reduced value, a reference value are a certain size shade curved surface.
It may further be preferable that the processing side can be spaced extraction when being drawn up defect size.It in this way can be to image
High speed processing is carried out, processing speed is faster.
Advantageous effect:
In the technical solution adopted by the present invention, Difference Calculation is carried out to pending image and benchmark image, background can be eliminated in proper order
Progressive deep or light variation(Shade).The deep or light variation of the background changed is eliminated, contrast part jumpy is only extracted.And
More than simple binaryzation changes to distinguish background.Will not thus cause the gray value of Near Threshold pixel a little while
It is changed into white(255), it is changed into black a little while(0), and then cause to judge by accident and be generated the phenomenon that failing to judge.Meanwhile by setting
Determine yield value, improves contrast, corresponding defect can be highlighted, detect the defect that general detecting system is difficult to differentiate.
Specific implementation mode
Technical scheme of the present invention is clearly and completely described below in conjunction with specific embodiment, it is clear that described
Embodiment be only the present invention a part of the embodiment, instead of all the embodiments.Based on the embodiments of the present invention, ability
All other embodiment that domain those of ordinary skill is obtained without making creative work belongs to the present invention's
The range of protection.
The present invention proposes a kind of image pre-processing method of deep or light correction in real time, cancels workpiece surface and is led due to illumination
The dash area of the cause either even part of uneven illumination.The present invention uses following technical scheme:
The image pre-processing method of real-time deep or light correction, it is characterised in that described image preprocess method includes the following steps:
A., benchmark image and pending image are set;
B. size and the processing direction of the defect of being extracted are specified;
C. the object to be extracted as defect is selected;
D. a reduced value is selected, a threshold value is set, a reference value of reduced value and standard picture to pending image carries out
Difference Calculation filters off the defect point that absolute value is less than the threshold value in the result of gained Difference Calculation;
E. to the image setting yield value of step d processing gained, contrast is improved;
F., one tone value, given filter tone value or tone value interference component below are set.
Preferably, the size of the defect is 4-200 pixels, and the processing direction includes X-direction, Y direction,
And XY axis directions.
Preferably, the object extracted as defect includes:Bright, dark, light and shade.It is stated clearly:For only extracting than the back of the body
The also bright defect of scape;It is described dark:For only extracting the defect also darker than background;The light and shade is used to extract both bright, dark
Defect.
The a reference value, reduced value, tone value are the gray value within the scope of 0-255.
Reduced value, a reference value described in another embodiment of the present invention can be to extract gradation of image concentration in range
The average value of value.
Reduced value, a reference value described in the another embodiment of the present invention can be to extract gray value of image concentration in range
Median.
In the third embodiment of the present invention, the reduced value, a reference value can be a certain size shade curved surface.
It may further be preferable that the processing side can be spaced extraction when being drawn up defect size.It in this way can be to image
High speed processing is carried out, processing speed is faster.
In conclusion in the technical solution adopted by the present invention, Difference Calculation is carried out to pending image and benchmark image, it can
Eliminate the incremental deep or light variation of background(Shade).The deep or light variation of the background changed is eliminated, only extracts contrast drastically
The part of variation.And more than simple binaryzation changes to distinguish background.The gray scale in Near Threshold will not thus be caused
The pixel of value is changed into white a little while(255), it is changed into black a little while(0), and then cause to judge by accident and be produced the phenomenon that failing to judge
It is raw.Meanwhile by setting yield value, contrast is improved, corresponding defect can be highlighted, detects that general detecting system is difficult to point
The defect distinguished.
Claims (8)
1. the image pre-processing method of real-time deep or light correction, it is characterised in that described image preprocess method includes the following steps:
Benchmark image and pending image are set;
The size of the specified defect of being extracted and processing direction;
Select the object to be extracted as defect;
A reduced value is selected, a threshold value is set, a reference value progress of reduced value and standard picture to pending image is poor
Divide and calculate, the defect point that absolute value is less than the threshold value is filtered off in the result of gained Difference Calculation;
To the image setting yield value of step d processing gained, contrast is improved;
One tone value, given filter tone value or tone value interference component below are set.
2. the image pre-processing method of deep or light correction in real time as described in claim 1, it is characterised in that the size of the defect
For 4-200 pixels, the processing direction includes X-direction, Y direction and XY axis directions.
3. the image pre-processing method of deep or light correction in real time as described in claim 1, it is characterised in that described to be taken out as defect
The object taken includes:Bright, dark, light and shade.
4. the image pre-processing method of deep or light correction in real time as described in claim 1, it is characterised in that a reference value, comparison
Value, tone value are the gray value within the scope of 0-255.
5. implementing the image pre-processing method of deep or light correction as described in claim 1, it is characterised in that the reduced value, benchmark
Value is to extract the average value of gradation of image concentration value in range.
6. the image and processing method of deep or light correction in real time as described in claim 1, it is characterised in that the reduced value, benchmark
Value is to extract the median of gray value of image concentration in range.
7. the image and processing method of deep or light correction in real time as described in claim 1, it is characterised in that the reduced value, benchmark
Value is a certain size shade curved surface.
8. the image and processing method of deep or light correction in real time as claimed in claim 7, it is characterised in that in the processing direction
It can be spaced extraction when upper extraction defect size.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810089383.2A CN108288260A (en) | 2018-01-30 | 2018-01-30 | The image pre-processing method of real-time deep or light correction |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810089383.2A CN108288260A (en) | 2018-01-30 | 2018-01-30 | The image pre-processing method of real-time deep or light correction |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108288260A true CN108288260A (en) | 2018-07-17 |
Family
ID=62836260
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810089383.2A Pending CN108288260A (en) | 2018-01-30 | 2018-01-30 | The image pre-processing method of real-time deep or light correction |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108288260A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111665251A (en) * | 2019-03-08 | 2020-09-15 | 苏州元承科技有限公司 | Visual detection method for surface defects |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102393422A (en) * | 2011-08-22 | 2012-03-28 | 江苏省产品质量监督检验研究院 | Ultrasonic time of flight diffraction (TOFD)-based offline defect judgment method |
JP2015504536A (en) * | 2011-11-23 | 2015-02-12 | スリーエム イノベイティブ プロパティズ カンパニー | Optical stack with asymmetric diffuser |
CN107194919A (en) * | 2017-05-18 | 2017-09-22 | 南京大学 | The mobile phone screen defect inspection method rebuild based on rule grain background |
CN107622277A (en) * | 2017-08-28 | 2018-01-23 | 广东工业大学 | A kind of complex-curved defect classification method based on Bayes classifier |
-
2018
- 2018-01-30 CN CN201810089383.2A patent/CN108288260A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102393422A (en) * | 2011-08-22 | 2012-03-28 | 江苏省产品质量监督检验研究院 | Ultrasonic time of flight diffraction (TOFD)-based offline defect judgment method |
JP2015504536A (en) * | 2011-11-23 | 2015-02-12 | スリーエム イノベイティブ プロパティズ カンパニー | Optical stack with asymmetric diffuser |
CN107194919A (en) * | 2017-05-18 | 2017-09-22 | 南京大学 | The mobile phone screen defect inspection method rebuild based on rule grain background |
CN107622277A (en) * | 2017-08-28 | 2018-01-23 | 广东工业大学 | A kind of complex-curved defect classification method based on Bayes classifier |
Non-Patent Citations (1)
Title |
---|
候润石 等: ""基于局部曲面重构的焊缝X射线图像缺陷分割技术"", 《2008远东无损检测新技术论坛优秀论文选登》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111665251A (en) * | 2019-03-08 | 2020-09-15 | 苏州元承科技有限公司 | Visual detection method for surface defects |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022062812A1 (en) | Screen defect detection method, apparatus, and electronic device | |
Xu et al. | Fast image dehazing using improved dark channel prior | |
CN105158258B (en) | A kind of bamboo cane detection method of surface flaw based on computer vision | |
CN104749184B (en) | Automatic optical detection method and system | |
CN105453153B (en) | Traffic lights detects | |
CN102385753B (en) | Illumination-classification-based adaptive image segmentation method | |
CN111289538A (en) | PCB element detection system and detection method based on machine vision | |
CN102221559A (en) | Online automatic detection method of fabric defects based on machine vision and device thereof | |
CN106780464A (en) | A kind of fabric defect detection method based on improvement Threshold segmentation | |
CN105139391B (en) | A kind of haze weather traffic image edge detection method | |
CN108665458A (en) | Transparent body surface defect is extracted and recognition methods | |
CN101615241B (en) | Method for screening certificate photos | |
CN105812618B (en) | A kind of method for testing motion and motion detection apparatus | |
CN110807763A (en) | Method and system for detecting ceramic tile surface bulge | |
CN108520260B (en) | Method for identifying visible foreign matters in bottled oral liquid | |
CN111665251A (en) | Visual detection method for surface defects | |
CN102901735B (en) | System for carrying out automatic detections upon workpiece defect, cracking, and deformation by using computer | |
CN106057700B (en) | A kind of detection method on red of the side of solar battery sheet | |
CN109472779A (en) | A kind of yarn appearance characteristic parameter extraction and analysis method based on morphosis | |
CN109387524A (en) | Thread defect detection method and device based on linearly polarized photon | |
CN108288260A (en) | The image pre-processing method of real-time deep or light correction | |
CN106093051A (en) | Paper roll tangent plane burr detection method based on machine vision and device | |
CN104282013B (en) | A kind of image processing method and device for foreground target detection | |
CN110807406A (en) | Foggy day detection method and device | |
CN116721039B (en) | Image preprocessing method applied to automatic optical defect detection |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180717 |