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 PDF

Info

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
Application number
CN201910726508.2A
Other languages
Chinese (zh)
Inventor
崔晓辉
许辉
黄婷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Huibo Robot Technology Co Ltd
Original Assignee
Jiangsu Huibo Robot Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Jiangsu Huibo Robot Technology Co Ltd filed Critical Jiangsu Huibo Robot Technology Co Ltd
Priority to CN201910726508.2A priority Critical patent/CN110458823A/en
Publication of CN110458823A publication Critical patent/CN110458823A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/0008Industrial image inspection checking presence/absence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/155Segmentation; Edge detection involving morphological operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/168Segmentation; Edge detection involving transform domain methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20048Transform domain processing
    • G06T2207/20056Discrete and fast Fourier transform, [DFT, FFT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30164Workpiece; 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

The production method in real training vision-based detection defect library
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.
CN201910726508.2A 2019-08-07 2019-08-07 The production method in real training vision-based detection defect library Pending CN110458823A (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (2)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Title
飞鹰再现: "Halcon学习笔记之缺陷检测(二)", 《HTTPS://BLOG.CSDN.NET/FEIYING008/ARTICLE/DETAILS/44616681》 *

Cited By (2)

* Cited by examiner, † Cited by third party
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