CN110458823A - The production method in real training vision-based detection defect library - Google Patents
The production method in real training vision-based detection defect library Download PDFInfo
- Publication number
- CN110458823A CN110458823A CN201910726508.2A CN201910726508A CN110458823A CN 110458823 A CN110458823 A CN 110458823A CN 201910726508 A CN201910726508 A CN 201910726508A CN 110458823 A CN110458823 A CN 110458823A
- Authority
- CN
- China
- Prior art keywords
- image
- defect
- region
- carried out
- vision
- 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
- 230000007547 defect Effects 0.000 title claims abstract description 45
- 238000001514 detection method Methods 0.000 title claims abstract description 17
- 238000012549 training Methods 0.000 title claims abstract description 17
- 238000004519 manufacturing process Methods 0.000 title claims abstract description 16
- 230000011218 segmentation Effects 0.000 claims abstract description 11
- 230000009466 transformation Effects 0.000 claims abstract description 10
- 238000005457 optimization Methods 0.000 claims abstract description 4
- 230000002950 deficient Effects 0.000 claims description 6
- 238000010276 construction Methods 0.000 claims description 5
- 230000000877 morphologic effect Effects 0.000 claims description 5
- 238000000034 method Methods 0.000 abstract description 6
- 241001292396 Cirrhitidae Species 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 208000033985 Device component issue Diseases 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 238000004321 preservation Methods 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
- G06T7/0008—Industrial image inspection checking presence/absence
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/155—Segmentation; Edge detection involving morphological operators
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/168—Segmentation; Edge detection involving transform domain methods
-
- 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/20048—Transform domain processing
- G06T2207/20056—Discrete and fast Fourier transform, [DFT, FFT]
-
- 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/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30164—Workpiece; Machine component
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The present invention relates to a kind of vision-based detection, especially the real training production methods in vision-based detection defect library, comprising the following steps: S1, takes pictures and obtains defect image;S2, fft speed optimization is carried out;S3, defect image is handled by Gaussian filter to obtain Gaussian image;S4, gray value is taken;S5, operation is iterated to error image;S6, Fast Fourier Transform (FFT) is carried out to the image after interative computation;S7, inverse transformation is carried out to the picture after Fourier transformation;S8, Threshold segmentation is carried out to transformed image, takes and is most worth, the region after being divided;S9, connected region, according to designated modality feature selecting region;S10, the rejected region in the region are drawn a circle, and calculate several centers of its area.Real training provided by the invention can easily carry out the foundation in defect library with the production method in vision-based detection defect library to the defect of workpiece, versatile, and real training personnel can be made to understand specific process.
Description
Technical field
The present invention relates to a kind of vision-based detection, especially the real training production methods in vision-based detection defect library.
Background technique
Defect detecting technique is always the Typical Representative of machine vision industry.It can replace human eye to it is qualified with it is unqualified
Product carry out classification to substantially reducing cost of labor.Current manual's intelligence industry is saved up strength to start out, machine vision industry it is quick-fried
Hair is also when the water comes, a channel is formed trend.
Oriented towards education training for industry is also like a raging fire at present, and the system for establishing a set of oriented towards education training and examination can make
It obtains more students to go to grasp artificial intelligence, grasps machine vision technique.
But current vision detection software be it is configured, student does not know about shooting image and being handled and is tied
The process of fruit.
Summary of the invention
To solve the above problems, the defect that the present invention provides a kind of pair of workpiece is taken pictures, and the real training in defect library is made
With the production method in vision-based detection defect library, the specific technical proposal is:
The production method in real training vision-based detection defect library, comprising the following steps:
S1, it takes pictures to defective workpiece, obtains defect image;
S2, fft speed optimization is carried out according to the size of specified image;
One S3, construction Gaussian filter, handle defect image by Gaussian filter to obtain Gaussian image;
S4, gray value is taken, and subtracts each other the gray value of defect image and Gaussian image to obtain error image;
S5, operation is iterated to error image, for is recycled from 1 to N-1, step-length 1;
S6, Fast Fourier Transform (FFT) is carried out to the image after interative computation, Fourier's running parameter includes exporting after converting
Image, transformation direction, generate image width;
S7, inverse transformation is carried out to the picture after Fourier transformation;
S8, Threshold segmentation is carried out to transformed image, takes and is most worth, the region after being divided;
S9, connected region, according to designated modality feature selecting region, parameter includes morphological feature, the feature that will be calculated
Maximum and minimum limitation;
S10, the rejected region in the region are drawn a circle, and calculate several centers of its area.
Preferably, in the step S8 Threshold segmentation segmentation range 0-255, and chosen according to gray value.
Preferably, the parameter of Gaussian filter described in the step S3 includes standard deviation, Gauss of the Gauss in principal direction
In the angle of the standard deviation, filter principal direction that are orthogonal to principal direction, DC terms in the position of frequency domain;
Production defect library is mainly that Gaussian filter constructs a suitable filter, then by the filtering of original image and construction
Device carries out Fast Fourier Transform (FFT), shows on the image defect part using morphological operator, obtains defect image.
The program in above-mentioned production defect library is exported, is written as software in conjunction with Visual Studio2012.The software can be with
Different schemes are selected, select different schemes for different background.Substantially steps are as follows for the software programming:
Step 1: button is added in forms and connects control with Halcon for display defect testing result;
Step 2: in conjunction with basler camera SDK programming camera capture, time for exposure and real-time button program, consummating function;
Step 3: writing camera and Robot calibration program, generates demarcating file;
Step 4: camera and robot are communicated, data can be sent in real time.
Robot and camera communication after the completion of, by the end PC run program, camera take pictures identify defective screw or
Person is plastic products, and sends this data to robot, and robot makes corresponding sort operation.
The purpose of software of the invention is the operation logic for allowing trainer really to understand camera and robot from bottom, including benefit
Image is handled with camera SDK capture and in conjunction with Halcon operator, result is obtained by communication transfer to robot, passes through
Robotic programming makes robot that defective product is classified, and understandable can not only more allow trainer to generate dense emerging
Interest.
Compared with prior art the invention has the following advantages:
Real training provided by the invention can easily carry out the defect of workpiece with the production method in vision-based detection defect library
The foundation in defect library, it is versatile, and real training personnel can be made to understand specific process.
Specific embodiment
It is existing that the invention will be further described.
The production method in real training vision-based detection defect library, comprising the following steps:
S1, it takes pictures to defective workpiece, obtains defect image, the adjusting camera exposure time makes camera when taking pictures
The image of shooting clear and preservation;
S2, fft speed optimization is carried out according to the size of specified image;
One S3, construction Gaussian filter GaussFilter, handle defect image by Gaussian filter to obtain Gauss
Image, the parameter of the Gaussian filter include Gauss the standard deviation of principal direction, Gauss the standard deviation for being orthogonal to principal direction,
The angle of filter principal direction, DC terms are in the position of frequency domain;
S4, gray value is taken, and subtracts each other the gray value of defect image and Gaussian image to obtain error image;
S5, operation is iterated to error image, for is recycled from 1 to N-1, step-length 1;
S6, Fast Fourier Transform (FFT) is carried out to the image after interative computation, Fourier's running parameter includes exporting after converting
Image, transformation direction, generate image width;
S7, inverse transformation is carried out to the picture after Fourier transformation;
S8, Threshold segmentation is carried out to transformed image, takes and is most worth, the region after being divided, the segmentation of Threshold segmentation
Range 0-255, and chosen according to gray value;
S9, connected region, according to designated modality feature selecting region, parameter includes morphological feature, the feature that will be calculated
Maximum and minimum limitation;
S10, the rejected region in the region are drawn a circle, and calculate several centers of its area.
Connected region is to be split the image after binaryzation with original image, the image after obtaining Threshold segmentation.
Optimize quality by Gaussian filter, more preferably, image procossing is more preferable for value, and detection error is smaller.
Rejected region detects defective workpiece position.
Fft calculation formula is as follows
Wherein
The formula is the formula principle of fast Fourier algorithm, and the present invention is using Fast Fourier Transform (FFT), function
Function carries operator by halcon and realizes.
Production defect library is mainly that Gaussian filter constructs a suitable filter, then by the filtering of original image and construction
Device carries out Fast Fourier Transform (FFT), shows on the image defect part using morphological operator, obtains defect image.
Defects detection is mainly building up for defect library, is matched according to defect library contrasting detection workpiece position.
The program in above-mentioned production defect library is exported, is written as software in conjunction with Visual Studio2012.The software can be with
Different schemes are selected, select different schemes for different background.Substantially steps are as follows for the software programming:
Step 1: button is added in forms and connects control with Halcon for display defect testing result;
Step 2: in conjunction with basler camera SDK programming camera capture, time for exposure and real-time button program, consummating function;
Step 3: writing camera and Robot calibration program, generates demarcating file;
Step 4: camera and robot are communicated, data can be sent in real time.
Robot and camera communication after the completion of, by the end PC run program, camera take pictures identify defective screw or
Person is plastic products, and sends this data to robot, and robot makes corresponding sort operation.
The purpose of software of the invention is the operation logic for allowing trainer really to understand camera and robot from bottom, including benefit
Image is handled with camera SDK capture and in conjunction with Halcon operator, result is obtained by communication transfer to robot, passes through
Robotic programming makes robot that defective product is classified, and understandable can not only more allow trainer to generate dense emerging
Interest.
Certainly different schemes are changed according to different defect template libraries, if the products scheme can be not direct
Defect template library is added, so as to reach standard universal type purpose to real training personnel.
Claims (3)
1. the real training production method in vision-based detection defect library, which comprises the following steps:
S1, it takes pictures to defective workpiece, obtains defect image;
S2, fft speed optimization is carried out according to the size of specified image;
One S3, construction Gaussian filter, handle defect image by Gaussian filter to obtain Gaussian image;
S4, gray value is taken, and subtracts each other the gray value of defect image and Gaussian image to obtain error image;
S5, operation is iterated to error image, for is recycled from 1 to N-1, step-length 1;
S6, Fast Fourier Transform (FFT) is carried out to the image after interative computation, Fourier's running parameter includes the figure exported after converting
Picture, the direction converted, the width for generating image;
S7, inverse transformation is carried out to the picture after Fourier transformation;
S8, Threshold segmentation is carried out to transformed image, takes and is most worth, the region after being divided;
S9, connected region, according to designated modality feature selecting region, parameter include will calculate morphological feature, feature most
Big and minimum limitation;
S10, the rejected region in the region are drawn a circle, and calculate several centers of its area.
2. the real training according to claim 1 production method in vision-based detection defect library, which is characterized in that
The segmentation range 0-255 of Threshold segmentation in the step S8, and chosen according to gray value.
3. the real training according to claim 1 production method in vision-based detection defect library, which is characterized in that
The parameter of Gaussian filter described in the step S3 includes that Gauss in standard deviation, the Gauss of principal direction is being orthogonal to main side
To standard deviation, the angle of filter principal direction, DC terms are in the position of frequency domain.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910726508.2A CN110458823A (en) | 2019-08-07 | 2019-08-07 | The production method in real training vision-based detection defect library |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910726508.2A CN110458823A (en) | 2019-08-07 | 2019-08-07 | The production method in real training vision-based detection defect library |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110458823A true CN110458823A (en) | 2019-11-15 |
Family
ID=68485356
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910726508.2A Pending CN110458823A (en) | 2019-08-07 | 2019-08-07 | The production method in real training vision-based detection defect library |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110458823A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111145156A (en) * | 2019-12-27 | 2020-05-12 | 创新奇智(南京)科技有限公司 | Rapid screw surface defect detection method |
CN115254674A (en) * | 2022-09-28 | 2022-11-01 | 南通思诺船舶科技有限公司 | Bearing defect sorting method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106204614A (en) * | 2016-07-21 | 2016-12-07 | 湘潭大学 | A kind of workpiece appearance defects detection method based on machine vision |
CN109993745A (en) * | 2019-04-15 | 2019-07-09 | 苏州研路智能科技有限公司 | It is a kind of for detecting the detection method of OLED display module undesirable feature |
-
2019
- 2019-08-07 CN CN201910726508.2A patent/CN110458823A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106204614A (en) * | 2016-07-21 | 2016-12-07 | 湘潭大学 | A kind of workpiece appearance defects detection method based on machine vision |
CN109993745A (en) * | 2019-04-15 | 2019-07-09 | 苏州研路智能科技有限公司 | It is a kind of for detecting the detection method of OLED display module undesirable feature |
Non-Patent Citations (1)
Title |
---|
飞鹰再现: "Halcon学习笔记之缺陷检测(二)", 《HTTPS://BLOG.CSDN.NET/FEIYING008/ARTICLE/DETAILS/44616681》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111145156A (en) * | 2019-12-27 | 2020-05-12 | 创新奇智(南京)科技有限公司 | Rapid screw surface defect detection method |
CN115254674A (en) * | 2022-09-28 | 2022-11-01 | 南通思诺船舶科技有限公司 | Bearing defect sorting method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11741367B2 (en) | Apparatus and method for image processing to calculate likelihood of image of target object detected from input image | |
CN107657603B (en) | Industrial appearance detection method based on intelligent vision | |
CN110232675B (en) | Texture surface defect detection and segmentation device and method in industrial environment | |
CN104156726B (en) | A kind of workpiece identification method and device based on geometric characteristic | |
DE102015101710B4 (en) | A method of calibrating a moveable gripping member using a remote digital camera | |
CN104992449B (en) | Information identification and surface defect online test method based on machine vision | |
WO2019243897A3 (en) | System and method for detection and classification of objects of interest in microscope images by supervised machine learning | |
CN111062915A (en) | Real-time steel pipe defect detection method based on improved YOLOv3 model | |
CN106204618A (en) | Product surface of package defects detection based on machine vision and sorting technique | |
CN115816460B (en) | Mechanical arm grabbing method based on deep learning target detection and image segmentation | |
EP3913532A3 (en) | Object area measurement method, apparatus, storage medium and computer product | |
CN110458823A (en) | The production method in real training vision-based detection defect library | |
CN109934221A (en) | Power equipment based on attention mechanism automatically analyzes identification monitoring method and system | |
CN116673962B (en) | Intelligent mechanical arm grabbing method and system based on Faster R-CNN and GRCNN | |
CN113592813B (en) | New energy battery welding defect detection method based on deep learning semantic segmentation | |
CN115861780B (en) | Robot arm detection grabbing method based on YOLO-GGCNN | |
CN111539927A (en) | Detection process and algorithm of automobile plastic assembly fastening buckle lack-assembly detection device | |
Sanders et al. | Improving automatic robotic welding in shipbuilding through the introduction of a corner-finding algorithm to help recognise shipbuilding parts | |
CN110956656A (en) | Spindle positioning method based on depth target detection | |
CN117022971B (en) | Intelligent logistics stacking robot control system | |
CN117733851A (en) | Automatic workpiece grabbing method based on visual detection | |
CN113145473A (en) | Intelligent fruit sorting system and method | |
CN105184244B (en) | Video human face detection method and device | |
Zarkasi et al. | Implementation color filtering and Harris corner method on pattern recognition system | |
Feng et al. | Research on disorderly grasping system based on binocular vision |
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: 20191115 |