CN109596620A - Product surface shape defect detection method and system based on machine vision - Google Patents

Product surface shape defect detection method and system based on machine vision Download PDF

Info

Publication number
CN109596620A
CN109596620A CN201811334974.8A CN201811334974A CN109596620A CN 109596620 A CN109596620 A CN 109596620A CN 201811334974 A CN201811334974 A CN 201811334974A CN 109596620 A CN109596620 A CN 109596620A
Authority
CN
China
Prior art keywords
image
target image
sample image
sample
target
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
CN201811334974.8A
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 Net Into Polytron Technologies Inc
Original Assignee
Jiangsu Net Into Polytron Technologies Inc
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 Net Into Polytron Technologies Inc filed Critical Jiangsu Net Into Polytron Technologies Inc
Priority to CN201811334974.8A priority Critical patent/CN109596620A/en
Publication of CN109596620A publication Critical patent/CN109596620A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques

Landscapes

  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The present invention proposes a kind of product surface shape defect detection method based on machine vision, comprising the following steps: the sample image and target image of product to be detected are obtained by Image Acquisition;The sample image and target image are pre-processed, obtain the binary map of sample image and target image respectively;The binary map of binary map and the target image to the sample image carries out difference operation, obtains poor shadow figure and defective value, judges whether the target image is defective according to the defective value.The quality of the contactless automatic testing product picture on surface of the present invention, is not required to fetch faulty goods and compares one by one, greatly reduces the workload of staff.And this method is easy to extend, and if desired also checks color, and color contrast algorithm need to only be added in the image comparison and analysis in image processing module.

Description

Product surface shape defect detection method and system based on machine vision
Technical field
The present invention relates to product defects detection field, in particular to a kind of product surface shape defect based on machine vision Detection method and system field of image processing.
Background technique
Industrial products surface can be printed on many decorative pattern, pattern and some necessary care labels, when these patterns, mark It is signed with defect, that whether can all generate adverse effect to the aesthetics of product, comfort or practicability.Traditional detection Method is typically all artificial detection, it has, and low efficiency, at high cost, accuracy rate is general, real-time is low, and general artificial detection can also Sampling observation method is taken, inevitably has fish that has escape the net in this way, reduces accuracy rate, and the method based on machine vision will overcome significantly These drawbacks.The detection in face of well-regulated surface profile is substantially about the method for this respect so far, such as wall The detection of the surface defects of products such as paper, steel, solar battery, and it is then seldom to the detection on random pattern surface.
Chinese invention patent 200910232677.7 discloses a kind of copper strip surface quality that view-based access control model is bionical intelligently inspection Survey device and method.But since the probability of surface defects of products appearance is less than 5%, current Computer Vision Detection method pair The operations such as each frame image obtained is all split, surface defects characteristic extracts, spend a large amount of time in normal picture In processing, the real-time of system is reduced, the deficiencies such as that there are detection efficiencies is not high, Classifcation of flaws accuracy is low.
Summary of the invention
Based on the above issues, the purpose of the present invention aims to solve at least one of described technological deficiency.The present invention proposes one kind Product surface shape defect detection method based on machine vision, method includes the following steps:
The sample image and target image of product to be detected are obtained by Image Acquisition;
The sample image and target image are pre-processed, obtain the two-value of sample image and target image respectively Figure;
The binary map of binary map and the target image to the sample image carries out difference operation, obtains poor shadow figure and lacks Value is fallen into, judges whether the target image is defective according to the defective value.
Preferably, described that the sample image and target image are pre-processed, sample image and target are obtained respectively The step of binary map of image includes:
Gray proces are carried out to the sample image and target image, treated sample image and target image are passed through Median filtering is denoised;
Whether the image after judging denoising is target image;
If so, finding out sample image respectively to sample image and target image progress hough change detection after denoising With the boundary of target image, boundary set is obtained;
The boundary of the boundary set of target image and sample image is subjected to matching treatment, image carries out to treated The edge detection of canny operator respectively obtains the binary map of sample image and target image.
Preferably, the described the step of boundary of the boundary set of target image and sample image is carried out matching treatment, includes:
The boundary of the boundary set of target image and sample image is compared, then target image is rotated and contracted Operation is put, the boundary on the boundary and sample image that make target image coincide.
Preferably, described the step of carrying out gray proces to the sample image and target image, includes:
Gray proces are carried out to the sample image and target image by weighted mean method.
Preferably, described to judge that the whether defective step of the target image includes: according to the defective value
Target image is defective if defective value is greater than threshold value, and otherwise, target image does not have defect.
The embodiment of the present invention also provides a kind of product surface shape defect detection system based on machine vision, the system Include:
Image capture module obtains the sample image and target image of product to be detected;
Image processing module pre-processes the sample image and target image, obtains sample image and mesh respectively The binary map of logo image;
The binary map of image analysis module, binary map and the target image to the sample image carries out difference operation, Poor shadow figure and defective value are obtained, judges whether the target image is defective according to the defective value.
It preferably, further include memory module, the memory module connects described image analysis module, for storing image point Analyse the analysis result and difference shadow figure of module.
Preferably, image capture module shoots product to be detected by industrial camera, obtains the sample graph of product to be detected Picture and target image.
Scheme in compared with the existing technology, advantages of the present invention:
The product surface shape defect detection method based on machine vision that the embodiment of the present invention proposes, using Image Acquisition Module capturing sample image and target image carry out edge by hough variation and canny algorithm in image processing module Detection obtains the binary map of sample image and target image, obtains defective value, contactless automatic testing product table by calculating The quality of face pattern, is not required to fetch faulty goods and compares one by one, greatly reduces the workload of staff.And this method is easy to expand Exhibition, if desired also checks color, only color contrast need to be added in the image comparison and analysis in image processing module Algorithm.
Detailed description of the invention
The invention will be further described with reference to the accompanying drawings and embodiments:
Fig. 1 is a kind of flow diagram of the product surface shape defect detection method based on machine vision of the present invention.
Fig. 2 is the specific flow chart of step S2 in Fig. 1 of the present invention.
Fig. 3 is a kind of structural schematic diagram of the product surface shape defect detection system based on machine vision of the present invention.
Specific embodiment
Above scheme is described further below in conjunction with specific embodiment.It should be understood that these embodiments are for illustrating The present invention and be not limited to limit the scope of the invention.Implementation condition used in the examples can be done such as the condition of specific producer into One successive step, the implementation condition being not specified are usually the condition in routine experiment.
The product surface shape defect detection method based on machine vision that this application discloses a kind of, please refers to shown in Fig. 1 For a kind of flow diagram of the product surface shape defect detection method based on machine vision of the present invention, comprising the following steps:
Step S1: the sample image and target image of product to be detected are obtained by Image Acquisition.It is of the invention wherein In one embodiment, product is transported to by conveyer belt and formulates position, CMOS industrial camera is used to shoot the image of product, together When, it is used using LED come light filling.Specifically, product should be transported to Position Approximate by conveyer belt every time, while conveyer belt and camera Relative position is also fixed as far as possible, error brought by the rotation, scaling when can reduce picture match in this way.
Step S2: pre-processing sample image and target image, obtains the two of sample image and target image respectively Value figure.
Gray proces are carried out to the collected sample image of step S1 and target image first, then by median filtering into Row denoising, makes it be suitable for subsequent processing.
Hough variation is first carried out to the image after denoising and canny algorithm carries out edge detection, finds out production to be detected Then the edge of product rule is rotated, is scaled, cut and match after sequence of operations target image and sample image, finally Two figures are subjected to difference operation and opening operation, obtain poor shadow figure and defective value, when defective value be more than threshold value be then it is defective, otherwise then Zero defect.
In a wherein embodiment of the invention, please refer to shown in Fig. 2, step S2 is specifically further comprising the steps of:
Step S21: carrying out gray proces to sample image and target image, to treated sample image and target image It is denoised by median filtering.Median filtering method uses a kind of common Nonlinear Smoothing Filter, the basic principle is that handle The intermediate value of each point value its major function that replaces is to allow in one field of the value of any in the digital picture or Serial No. point The pixel that the difference of surrounding pixel gray value is bigger changes to take the value close with the pixel value of surrounding, so as to eliminate isolated make an uproar Sound point.
Step S22: whether the image after judging denoising is target image;If so, thening follow the steps S23.
Step S23: to the sample image and target image progress hough change detection after denoising, sample graph is found out respectively The boundary of picture and target image obtains boundary set.If the image after denoising is target image, the target image after denoising is carried out Hough change detection finds out the boundary (rectangle, diamond shape, circle, ellipse) of image, obtains boundary set.
Hough transformation with the transformation between two coordinate spaces by a space with same shape curve or Straight line is mapped on a point of another coordinate space and forms peak value, so that the problem of detection arbitrary shape is converted into statistics Spike problem.It is required when recognition matrix, circle, ellipse using different parameters.
Step S24: the boundary of the boundary set of target image and sample image is subjected to matching treatment, to treated image The edge detection for carrying out canny operator, respectively obtains the binary map of sample image and target image.
It is described by the progress of the boundary of the boundary set of target image and sample image in a wherein embodiment of the invention Include: with the step of processing
The boundary of the boundary set of target image and sample image is compared, then target image is rotated and contracted Operation is put, the boundary on the boundary and sample image that make target image coincide.
Step S3: the binary map of binary map and target image to sample image carries out difference operation, obtains poor shadow figure and lacks Value is fallen into, judges whether target image is defective according to defective value.
In a wherein embodiment of the invention, image capture module shoots product to be detected by industrial camera, obtains The sample image and target image of product to be detected, it is collected with the camera in image capture module after above-mentioned steps S3 Picture judges whether there is subsequent product, if so, then repeating the above steps 1 to step 3.
It please refers to Fig. 3 and show a kind of structure of the product surface shape defect detection system based on machine vision of the present invention Schematic diagram, the detection system include: image capture module 10, for obtaining the sample image and target image of product to be detected; Image processing module 11 obtains sample image and target for pre-processing to the sample image and target image respectively The binary map of image;Image analysis module 30, for the binary map of binary map and the target image to the sample image Difference operation is carried out, obtains poor shadow figure and defective value, and judge whether the target image is defective according to the defective value.
In a wherein embodiment of the invention, image capture module 10 includes industrial camera 11 and transmission belt 12, industry Camera 11 obtains the sample image and target image of product to be detected for shooting product to be detected.Specifically, conveyer belt 12 will Product to be detected, which is transported to, formulates position, and CMOS industrial camera 12 shoots the image of product to be detected, obtains the sample of product to be detected This image and target image, wherein specifically, the dark bright degree of each acquired image can also be made by LED come light filling It is similar;Product is transported to Position Approximate, while the phase of conveyer belt 12 and industrial camera 11 every time in transmission process by conveyer belt 12 It is also fixed as far as possible to position, error brought by the rotation, scaling when can reduce picture match in this way.
Image processing module 20 connects image capture module 10, the sample image and target obtain to image capture module 10 Image is pre-processed, and obtains the binary map of sample image and target image respectively;Specifically, image processing module 20 is to image 10 acquired image of acquisition module carries out gray processing, is then denoised with median filtering method, allows to adapt to subsequent Processing;First carry out hough variation and canny algorithm to the image after denoising and carry out edge detection, obtain respectively sample image and The binary map of target image.
Image analysis module 30 connects image processing module 20, to the two-value for the sample image that image processing module 20 transmits The binary map of figure and target image carries out difference operation, obtains poor shadow figure and defective value, judges the target according to the defective value Whether image is defective.In a wherein embodiment of the invention, image analysis module 30 transmits image processing module 20 The binary map of sample image and the binary map of target image first rotated, scaled, cut sequence of operations after make target image It is matched with sample image, two figures is finally subjected to difference operation and opening operation, obtain poor shadow figure and defective value, when defective value is more than threshold Value is then to be defective, otherwise then zero defect.
It further include memory module in a wherein embodiment of the invention, which connects image analysis module 30, For storing the analysis result and difference shadow figure of image analysis module 30.Memory module simultaneously will analysis result and poor shadow figure feedback to visitor Family end.
The present invention uses product surface shape defect detection method and system based on machine vision, passes through computer and work The mode that industry camera combines, the quality of contactless automatic testing product picture on surface, without fetching faulty goods one by one Comparison, greatly reduces the workload of staff.And this method is easy to extend, and if desired also checks color, it only need to be Color contrast algorithm is added in image comparison and analysis in image processing module.
The above embodiments merely illustrate the technical concept and features of the present invention, and its object is to allow person skilled in the art It is to can understand the content of the present invention and implement it accordingly, it is not intended to limit the scope of the present invention.All such as present invention essences The equivalent transformation or modification that refreshing essence is done, should be covered by the protection scope of the present invention.

Claims (8)

1. a kind of product surface shape defect detection method based on machine vision, which comprises the following steps:
The sample image and target image of product to be detected are obtained by Image Acquisition;
The sample image and target image are pre-processed, obtain the binary map of sample image and target image respectively;
The binary map of binary map and the target image to the sample image carries out difference operation, obtains poor shadow figure and defect Value, judges whether the target image is defective according to the defective value.
2. the product surface shape defect detection method according to claim 1 based on machine vision, which is characterized in that institute It states and the sample image and target image is pre-processed, respectively the step of binary map of acquisition sample image and target image Include:
Gray proces are carried out to the sample image and target image, intermediate value is passed through to treated sample image and target image Filtering is denoised;
Whether the image after judging denoising is target image;
If so, finding out sample image and mesh respectively to sample image and target image progress hough change detection after denoising The boundary of logo image obtains boundary set;
The boundary of the boundary set of target image and sample image is subjected to matching treatment, image carries out canny calculation to treated The edge detection of son, respectively obtains the binary map of sample image and target image.
3. the product surface shape defect detection method according to claim 2 based on machine vision, which is characterized in that institute Stating the step of boundary of the boundary set of target image and sample image is carried out matching treatment includes:
The boundary of the boundary set of target image and sample image is compared, rotation then is carried out to target image and scales behaviour Make, the boundary on the boundary and sample image that make target image coincide.
4. the product surface shape defect detection method according to claim 2 based on machine vision, which is characterized in that institute Stating the step of carrying out gray proces to the sample image and target image includes:
Gray proces are carried out to the sample image and target image by weighted mean method.
5. the product surface shape defect detection method according to claim 1 based on machine vision, which is characterized in that institute It states and judges that the whether defective step of the target image includes: according to the defective value
Target image is defective if defective value is greater than threshold value, and otherwise, target image does not have defect.
6. a kind of product surface shape defect detection system based on machine vision, which is characterized in that the system comprises:
Image capture module obtains the sample image and target image of product to be detected;
Image processing module pre-processes the sample image and target image, obtains sample image and target figure respectively The binary map of picture;
The binary map of image analysis module, binary map and the target image to the sample image carries out difference operation, obtains Poor shadow figure and defective value judge whether the target image is defective according to the defective value.
7. the product surface shape defect detection system according to claim 6 based on machine vision, which is characterized in that also Including memory module, the memory module connects described image analysis module, for storing the analysis result of image analysis module With poor shadow figure.
8. the product surface shape defect detection system according to claim 6 based on machine vision, which is characterized in that figure As acquisition module shoots product to be detected by industrial camera, the sample image and target image of product to be detected are obtained.
CN201811334974.8A 2018-11-10 2018-11-10 Product surface shape defect detection method and system based on machine vision Pending CN109596620A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811334974.8A CN109596620A (en) 2018-11-10 2018-11-10 Product surface shape defect detection method and system based on machine vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811334974.8A CN109596620A (en) 2018-11-10 2018-11-10 Product surface shape defect detection method and system based on machine vision

Publications (1)

Publication Number Publication Date
CN109596620A true CN109596620A (en) 2019-04-09

Family

ID=65957652

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811334974.8A Pending CN109596620A (en) 2018-11-10 2018-11-10 Product surface shape defect detection method and system based on machine vision

Country Status (1)

Country Link
CN (1) CN109596620A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109738448A (en) * 2018-12-28 2019-05-10 佛山科学技术学院 A kind of industrial products intelligent detection device and method
CN110567983A (en) * 2019-09-09 2019-12-13 深圳市三宝创新智能有限公司 Method and system for detecting appearance problem of robot
CN111242888A (en) * 2019-12-03 2020-06-05 中国人民解放军海军航空大学 Image processing method and system based on machine vision

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03214640A (en) * 1990-01-19 1991-09-19 Hitachi Ltd Pattern recognition
CN102509300A (en) * 2011-11-18 2012-06-20 深圳市宝捷信科技有限公司 Defect detection method and system
CN102590218A (en) * 2012-01-16 2012-07-18 安徽中科智能高技术有限责任公司 Device and method for detecting micro defects on bright and clean surface of metal part based on machine vision
CN103439348A (en) * 2013-08-16 2013-12-11 中国科学院半导体研究所 Remote controller key defect detection method based on difference image method
CN106546603A (en) * 2016-10-29 2017-03-29 图麟信息科技(上海)有限公司 A kind of TP, the industrial vision detection means of glass cover-plate and detection method
CN107301637A (en) * 2017-05-22 2017-10-27 南京理工大学 Nearly rectangle plane shape industrial products surface flaw detecting method
CN107782733A (en) * 2017-09-30 2018-03-09 中国船舶重工集团公司第七〇九研究所 Image recognition the cannot-harm-detection device and method of cracks of metal surface
CN105654461B (en) * 2014-12-02 2018-03-20 中国科学院沈阳自动化研究所 A kind of machine vision detection method of multiple fission conductor conductor spacer fracture
CN108107051A (en) * 2017-12-19 2018-06-01 无锡先导智能装备股份有限公司 lithium battery defect detecting system and method based on machine vision

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03214640A (en) * 1990-01-19 1991-09-19 Hitachi Ltd Pattern recognition
CN102509300A (en) * 2011-11-18 2012-06-20 深圳市宝捷信科技有限公司 Defect detection method and system
CN102590218A (en) * 2012-01-16 2012-07-18 安徽中科智能高技术有限责任公司 Device and method for detecting micro defects on bright and clean surface of metal part based on machine vision
CN103439348A (en) * 2013-08-16 2013-12-11 中国科学院半导体研究所 Remote controller key defect detection method based on difference image method
CN105654461B (en) * 2014-12-02 2018-03-20 中国科学院沈阳自动化研究所 A kind of machine vision detection method of multiple fission conductor conductor spacer fracture
CN106546603A (en) * 2016-10-29 2017-03-29 图麟信息科技(上海)有限公司 A kind of TP, the industrial vision detection means of glass cover-plate and detection method
CN107301637A (en) * 2017-05-22 2017-10-27 南京理工大学 Nearly rectangle plane shape industrial products surface flaw detecting method
CN107782733A (en) * 2017-09-30 2018-03-09 中国船舶重工集团公司第七〇九研究所 Image recognition the cannot-harm-detection device and method of cracks of metal surface
CN108107051A (en) * 2017-12-19 2018-06-01 无锡先导智能装备股份有限公司 lithium battery defect detecting system and method based on machine vision

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109738448A (en) * 2018-12-28 2019-05-10 佛山科学技术学院 A kind of industrial products intelligent detection device and method
CN110567983A (en) * 2019-09-09 2019-12-13 深圳市三宝创新智能有限公司 Method and system for detecting appearance problem of robot
CN110567983B (en) * 2019-09-09 2022-05-10 深圳市三宝创新智能有限公司 Method and system for detecting appearance problem of robot
CN111242888A (en) * 2019-12-03 2020-06-05 中国人民解放军海军航空大学 Image processing method and system based on machine vision

Similar Documents

Publication Publication Date Title
CN107782733B (en) Image recognition nondestructive detection device and method for metal surface defects
CN104361314B (en) Based on infrared and transformer localization method and device of visual image fusion
CN108596880A (en) Weld defect feature extraction based on image procossing and welding quality analysis method
CN104574353B (en) The surface defect decision method of view-based access control model conspicuousness
CN108491788A (en) A kind of intelligent extract method and device for financial statement cell
CN111383209A (en) Unsupervised flaw detection method based on full convolution self-encoder network
CN108230315B (en) Mask belt loss detection method based on machine vision
CN110059663A (en) A kind of visual identity of adhesion mushroom and measurement method based on characteristic point detection
CN109596620A (en) Product surface shape defect detection method and system based on machine vision
CN110889837A (en) Cloth flaw detection method with flaw classification function
CN111754538B (en) Threshold segmentation method for USB surface defect detection
CN107490582A (en) A kind of streamline Work Piece Verification System Based
CN111178177A (en) Cucumber disease identification method based on convolutional neural network
CN105389581A (en) Germinated rice germ integrity intelligent identification system and identification method thereof
CN108197521A (en) A kind of leggy Quick Response Code obtains identification device and method
CN106228541A (en) Screen positioning method and device in visual inspection
Yusuf et al. Blob analysis for fruit recognition and detection
CN111739003B (en) Machine vision method for appearance detection
CN116363505A (en) Target picking method based on picking robot vision system
CN109781737A (en) A kind of detection method and its detection system of hose surface defect
CN110687122A (en) Method and system for detecting surface cracks of ceramic tile
CN111583193A (en) Pistachio nut framework extraction device based on geometric contour template matching and algorithm thereof
CN111539927A (en) Detection process and algorithm of automobile plastic assembly fastening buckle lack-assembly detection device
CN102788806B (en) Fruit peel defect detection method based on spheroidic brightness transformation
CN111178405A (en) Similar object identification method fusing multiple neural networks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190409

WD01 Invention patent application deemed withdrawn after publication