CN113516619B - Product surface flaw identification method based on image processing technology - Google Patents

Product surface flaw identification method based on image processing technology Download PDF

Info

Publication number
CN113516619B
CN113516619B CN202110386182.0A CN202110386182A CN113516619B CN 113516619 B CN113516619 B CN 113516619B CN 202110386182 A CN202110386182 A CN 202110386182A CN 113516619 B CN113516619 B CN 113516619B
Authority
CN
China
Prior art keywords
product
image
flaw
point
calculating
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.)
Active
Application number
CN202110386182.0A
Other languages
Chinese (zh)
Other versions
CN113516619A (en
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.)
Chongqing University
Xuchang University
Original Assignee
Chongqing University
Xuchang University
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 Chongqing University, Xuchang University filed Critical Chongqing University
Priority to CN202110386182.0A priority Critical patent/CN113516619B/en
Publication of CN113516619A publication Critical patent/CN113516619A/en
Application granted granted Critical
Publication of CN113516619B publication Critical patent/CN113516619B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/92Dynamic range modification of images or parts thereof based on global image properties
    • 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/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a product surface flaw identification method based on an image processing technology, which comprises the steps of firstly, setting product detection points on a product production line, and shooting products at the detection points by using a high-definition camera to obtain images of the products; secondly, performing gray level operation on the picture based on the obtained product image to obtain a gray level image; calculating and outputting the area of the flaw point and the coordinate of the central point on the image by using a flaw point identification algorithm aiming at the gray level image again; and finally, triggering a laser marking machine according to the output value, carrying out laser marking on the product, and identifying unqualified characters. The flaw identification method based on computer processing can well identify the flaw on the surface of the product, and does not generate misjudgment phenomenon on the product with smooth surface meeting the product quality requirement. The problem of whether the automobile parts are qualified or not in industrial production can be solved, the industrial production efficiency is improved, the cost is saved, and the method is suitable for being popularized to the product detection of a factory assembly line.

Description

Product surface flaw identification method based on image processing technology
Technical Field
The invention relates to the technical field of image processing, in particular to a product surface flaw identification method based on an image processing technology.
Background
In the production process of the automobile parts, the surface flaws of the automobile parts are mostly identified by naked eyes. The false detection rate detected by a manual method is high, the detection accuracy rate is influenced by subjective judgment of workers and fatigue, and a method for replacing the traditional human visual detection by machine vision is developed for improving the detection accuracy rate.
In actual work, the flaw points of the product belong to local features of the image, and the local feature values of the image do not change along with changes of rotation, translation, affine and the like of the image. At present, the main algorithms in the aspect of local feature detection include AKAZE, KAZE, BRISK or SIFT algorithms. Are all binary descriptor algorithms, each with its own advantages and disadvantages. AKAZE and KAZE are non-linear algorithms, which take a long time to process pictures and are not suitable for use in an industrial production line. The BRISK algorithm or the SIFT algorithm is a linear algorithm, the processing speed is high, and from the analysis on the pictures of the multiple experimental results, the non-defective parts are easily recognized as features, so that the probability of judgment errors is increased.
In addition, the texture of the product surface is a characteristic feature of the surface of the article, and the spatial dependence of the texture research image can be utilized to analyze the surface feature of the object. At present, the texture detection algorithm comprises a Tamura texture analysis method, a Gabor wavelet texture feature extraction method, an LBP texture statistical feature extraction method and the like. In the experimental process, a GABOR filter is constructed, multiple experiments are carried out on the surface image of the flaw product to verify, the original picture left image original is processed by the GABOR filter to obtain a gaBOR picture, and the product texture similarity is extremely high from the picture, so that the product flaw cannot be identified through the texture analysis of the image.
Disclosure of Invention
Aiming at the existing problems, the invention provides a product surface flaw identification method based on an image processing technology, which can quickly identify the product surface flaw without generating misjudgment phenomenon on the product with smooth surface meeting the product quality requirement.
The technical solution for realizing the purpose of the invention is as follows:
a product surface flaw identification method based on an image processing technology is characterized by comprising the following steps:
step 1: setting product detection points on a product production line, and shooting products at the monitoring points by using a high-definition camera to obtain images of the products;
step 2: performing gray scale operation on the picture based on the obtained product image to obtain a gray scale image;
and 3, step 3: calculating and outputting the area of the flaw point and the coordinate of the central point on the image by using a flaw point identification algorithm aiming at the gray level image;
and 4, step 4: and triggering a laser marking machine according to the output value, carrying out laser marking on the product, and identifying unqualified characters.
Further, the specific operation steps of the defective point identification algorithm in step 3 include:
step 31: carrying out normalization quantization processing on an input gray level image;
step 32: setting the size of a Gaussian filter, performing Gaussian convolution operation by using the Gaussian filter, and performing noise reduction processing on the image subjected to normalization quantization processing;
step 33: carrying out binarization operation on the noise-reduced images with different scales, and when the pixel is larger than a set threshold minThreshold for obtaining a pixel corner point of the image, obtaining the pixel corner point of the image, and filtering out the pixel value of a non-defective point in the image;
step 34: calculating a plurality of connected domains by using a library function findContours () of OpenCV for the obtained plurality of processed binary pictures, and calculating the center coordinate and the radius of each connected domain;
step 35: if the pixels are overlapped or connected according to the central coordinates and the radius obtained in the step 34, all the pixels are put together to form a large connected domain, and finally a plurality of connected domains are divided on the pixel level;
step 36: judging the distance between the edge points of the two connected regions, judging whether the two connected regions belong to a group, if so, taking the two connected regions as a block, otherwise, taking the two connected regions as separated connected regions;
step 37: and calculating the size of each block, and regarding the block characteristic as a product flaw when the value is greater than a set threshold value.
Further, the gaussian filter scale value is set to 5.
Compared with the prior art, the method has the following beneficial effects:
according to the method for identifying the product surface flaws based on the image processing technology, the number of the flaws can be well identified through the flaw point identification algorithm, accuracy is achieved, the problem that whether automobile parts are qualified or not in industrial production is solved, the problems that manual detection takes long time and the detection error rate is high are avoided, industrial production efficiency is improved, cost is saved, and the method is suitable for being popularized to factory assembly line product detection.
Drawings
FIG. 1 is a schematic view of a defect point identification algorithm processing flow of the present invention;
FIG. 2 shows the surface texture treatment effect of the product of the present invention;
FIG. 3 is a comparison graph of the experimental results of the eigenvalue detection algorithm of the present invention;
FIGS. 4 (a) - (b) are graphs showing the effect of sample 1 after treatment in the example of the present invention;
FIGS. 5 (a) - (b) are graphs showing the effect of sample 2 after treatment in the example of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the following further describes the technical solution of the present invention with reference to the drawings and the embodiments.
The invention provides a product surface flaw identification method based on an image processing technology, which comprises the following operation steps:
a product surface flaw identification method based on an image processing technology comprises the following steps:
step 1: setting product detection points on a product production line, setting the interval time for a camera to collect samples according to the production line speed, and shooting the products at the monitoring points by using a high-definition camera to obtain images of the products;
step 2: storing the obtained product image into a computer based on the obtained product image, and carrying out gray level operation on the image to obtain a gray level image;
and step 3: calculating and outputting the area of the flaw point and the coordinate of the central point on the image by using a flaw point identification algorithm aiming at the gray level image;
and 4, step 4: and triggering a laser marking machine according to the output value, carrying out laser marking on the product, and identifying unqualified characters.
Preferably, as can be seen with reference to fig. 1, the operation steps of the flaw identification algorithm include:
step 31: carrying out normalization quantization processing on an input gray level image, wherein the characteristics of the processed gray level image have invariant characteristics to affine transformation such as translation, rotation and scaling;
step 32: setting the size of a Gaussian filter, performing Gaussian convolution operation by using the Gaussian filter, and performing noise reduction processing on the image subjected to normalization quantization processing;
step 33: carrying out binarization operation on the noise-reduced images with different scales for multiple times, and acquiring pixel corner points (characteristic values) of the images when the pixels are larger than a threshold minThreshold of the set pixel corner points (characteristic values) of the images;
preferably, the value of minThreshold is set to 0.0001;
step 34: generating a plurality of connected domains by using a findContours function method for the processed binary image, and calculating the center of each connected domain;
the findContours function is a function method for identifying the outline of a target, is a library function of OpenCV, and obtains a plurality of connected domains by setting parameters of the library function; the prototype of the findContours function is findContours (image, constraints, hierarchy, mode, method, offset = Point ()), and the input of each parameter in the present application is:
image: inputting a processed binary image;
the constants: the vector is a vector of a Point set formed by Point points, each group of Point sets is a contour, and the vector constants have elements according to the number of contours;
hierarchy: the elements of the vector and the elements in the contour vectors are in one-to-one correspondence, with a default value of-1;
mode: the search mode for the contour is selected from the following values: CV _ RETR _ EXTERNAL, CV _ RETR _ LIST, CV _ RETR _ CCOMP and CV _ RETR _ TREE, wherein the parameter is set as CV _ RETR _ EXTERNAL;
a method: an approximation method for defining a contour, which can be selected as: CV _ CHAIN _ APPROX _ NONE, CV _ CHAIN _ APPROX _ SIMPLE, CV _ CHAIN _ APPROX _ TC89_ L1, CV _ CHAIN _ APPROX _ TC89_ KCOS, wherein the parameter is set as CV _ CHAIN _ APPROX _ NONE;
point: the offset of all the contour information relative to the corresponding points of the original image is equivalent to adding the offset to each detected contour Point, and Point can also be a negative value;
step 35: in the binarized image obtained after multiple binarizing operations in step 34, if the image has values, the pixels are considered to be connected, a pixel connected region can be formed, each region has a central coordinate and a radius, and according to the central coordinate and the radius, if the pixels are overlapped or connected, the pixels are all put together to form a large connected region, and finally, a plurality of connected regions are divided on the pixel level;
after processing in step 35, the defect point is composed of a plurality of connected pixels at the pixel level;
step 36: judging the distance between edge points of two connected areas on the image coordinate, if the shortest distance is less than minDist (the shortest distance on the identified flaw point outline), then the two connected areas are considered to be continuous, thus judging whether the two connected areas are classified as a group, if so, the two connected areas are taken as a block, otherwise, the two connected areas are considered to be separated connected areas;
step 37: and calculating the size of each block, and regarding the block characteristic as a product flaw point when the value is greater than a set threshold value, wherein the value of the threshold value is 1280 in the application.
Examples
1. Experimental Environment
Operating the system: WIN 10; a development platform: python3.8+ Opencv + Jupyternotebook;
a CPU: quad Core (TM) _ i7, geForce RTX2060SUPER.
2. Performance analysis and comparison effects
And (3) performing experiments according to the steps 1-4 in the technical scheme, and comparing the algorithm with a local feature recognition algorithm and a texture extraction algorithm according to results. In the aspect of extracting the defect point features, the local feature recognition algorithm extracts too many feature values, and as shown in table 1, some non-product defect points are also extracted as features. Referring to fig. 3, the color circles or dots on the graph are the identified feature values, and it can be seen from the graph that, in the aspect of extracting the defect feature of some mainstream local feature value extraction algorithms at present, the local feature value extraction algorithm extracts too many feature values, and the defect cannot be correctly identified. Since the texture of the defect point on the product is very similar to the texture of the background, it is very difficult for the texture algorithm to extract the feature of the defect point, and the defect point of the product cannot be identified, as shown in fig. 2.
Table 1: the algorithm of the invention is compared with the characteristic point extracted by the characteristic value algorithm
Figure BDA0003013980220000071
Sample 1 in table 1 is a video camera capture picture of 92.9K resolution 665 × 1037, 24 bit true color, as shown in fig. 4 (a). After processing, the effect shown in fig. 4 (b) is obtained, and marked by a computer program, and a red circle in the picture is a flaw of the product.
Sample 2 is a photograph taken with a camera of size 1.16M, with resolution 4032 x 3024, 24 bit true color, as shown in fig. 5 (a). After the algorithm processing of the invention, the effect of the figure 5 (b) is obtained. And (4) marking by a computer program, wherein a red circle in the picture is a flaw point of the product.
Those not described in detail in this specification are within the skill of the art. Although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that various changes in the embodiments and modifications of the invention can be made, and equivalents of some features of the invention can be substituted, and any changes, equivalents, improvements and the like, which fall within the spirit and principle of the invention, are intended to be included within the scope of the invention.

Claims (2)

1. A product surface flaw identification method based on an image processing technology is characterized by comprising the following steps:
step 1: setting product detection points on a product production line, and shooting the products at the monitoring points by using a high-definition camera to obtain images of the products;
and 2, step: performing gray scale operation on the picture based on the obtained product image to obtain a gray scale image;
and step 3: calculating and outputting the area of the flaw point and the coordinate of the central point on the image by using a flaw point identification algorithm aiming at the gray level image;
and 4, step 4: triggering a laser marking machine according to the output value, carrying out laser marking on the product, and marking an unqualified typeface;
the specific operation steps of the fault point identification algorithm in the step 3 comprise:
step 31: carrying out normalization quantization processing on an input gray level image;
step 32: setting the scale size of a Gaussian filter, performing Gaussian convolution operation by using the Gaussian filter, and performing noise reduction processing on the image subjected to normalization quantization processing;
step 33: carrying out binarization operation on the noise-reduced images with different scales, and when the pixel is larger than a set threshold minThreshold for obtaining a pixel corner point of the image, obtaining the pixel corner point of the image, and filtering out the pixel value of a non-defective point in the image;
step 34: calculating a plurality of connected domains by using a library function findContours () of OpenCV for the obtained plurality of processed binary pictures, and calculating the center coordinate and the radius of each connected domain;
step 35: if the pixels are overlapped or connected according to the central coordinates and the radius obtained in the step 34, all the pixels are put together to form a large connected domain, and finally a plurality of connected domains are divided on the pixel level;
step 36: judging the distance between the edge points of the two connected regions, judging whether the two connected regions belong to a group, if so, taking the two connected regions as a block, otherwise, taking the two connected regions as separated connected regions;
step 37: and calculating the size of each block, and regarding the block characteristic as a product flaw when the value is larger than a set threshold value.
2. The method of claim 1, wherein the gaussian filter scale value is set to 5.
CN202110386182.0A 2021-04-09 2021-04-09 Product surface flaw identification method based on image processing technology Active CN113516619B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110386182.0A CN113516619B (en) 2021-04-09 2021-04-09 Product surface flaw identification method based on image processing technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110386182.0A CN113516619B (en) 2021-04-09 2021-04-09 Product surface flaw identification method based on image processing technology

Publications (2)

Publication Number Publication Date
CN113516619A CN113516619A (en) 2021-10-19
CN113516619B true CN113516619B (en) 2023-03-17

Family

ID=78062565

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110386182.0A Active CN113516619B (en) 2021-04-09 2021-04-09 Product surface flaw identification method based on image processing technology

Country Status (1)

Country Link
CN (1) CN113516619B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114689591A (en) * 2021-12-06 2022-07-01 浙江大学台州研究院 Coiled material detection device, system and detection method based on line scanning camera
CN114486903B (en) * 2021-12-06 2024-05-14 浙江大学台州研究院 Gray-scale self-adaptive coiled material detection system, device and algorithm
CN116630325B (en) * 2023-07-25 2023-10-13 苏州赫芯科技有限公司 Method, equipment and storage medium for detecting UV glue based on circuit board

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104240252A (en) * 2014-09-22 2014-12-24 电子科技大学 Detecting Algorithm for cracks of surface of high-temperature billet of machine vision bar
JP2019200775A (en) * 2018-05-10 2019-11-21 国立大学法人岩手大学 Surface defect inspection device and surface defect inspection method

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4562126B2 (en) * 2004-09-29 2010-10-13 大日本スクリーン製造株式会社 Defect detection apparatus and defect detection method
JP5238465B2 (en) * 2008-11-25 2013-07-17 株式会社東芝 Pattern shape evaluation method and pattern shape evaluation apparatus using the same
CN106683099A (en) * 2016-11-17 2017-05-17 南京邮电大学 Product surface defect detection method
JP6658711B2 (en) * 2017-10-25 2020-03-04 Jfeスチール株式会社 Surface defect detection method and surface defect detection device
CN108154510A (en) * 2018-01-17 2018-06-12 深圳市亿图视觉自动化技术有限公司 Method for detecting surface defects of products, device and computer readable storage medium
CN108596880A (en) * 2018-04-08 2018-09-28 东南大学 Weld defect feature extraction based on image procossing and welding quality analysis method
CN108760747B (en) * 2018-04-28 2019-12-10 浙江大学 visual detection method for surface defects of 3D printing model
CN109738450B (en) * 2019-01-09 2021-06-29 合肥联宝信息技术有限公司 Method and device for detecting notebook keyboard
CN109949291A (en) * 2019-03-19 2019-06-28 苏州润智和智能科技有限公司 A kind of defect inspection method of Cast Aluminum Auto-parts Abroad radioscopic image
CN110503633A (en) * 2019-07-29 2019-11-26 西安理工大学 A kind of applique ceramic disk detection method of surface flaw based on image difference
CN110473201A (en) * 2019-09-10 2019-11-19 江南大学 A kind of automatic testing method and device of disc surface defect
CN110672620B (en) * 2019-10-08 2022-08-26 英特尔产品(成都)有限公司 Chip defect detection method and system
CN111325728B (en) * 2020-02-19 2023-05-30 南方科技大学 Product defect detection method, device, equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104240252A (en) * 2014-09-22 2014-12-24 电子科技大学 Detecting Algorithm for cracks of surface of high-temperature billet of machine vision bar
JP2019200775A (en) * 2018-05-10 2019-11-21 国立大学法人岩手大学 Surface defect inspection device and surface defect inspection method

Also Published As

Publication number Publication date
CN113516619A (en) 2021-10-19

Similar Documents

Publication Publication Date Title
CN108562589B (en) Method for detecting surface defects of magnetic circuit material
CN113516619B (en) Product surface flaw identification method based on image processing technology
CN111292305B (en) Improved YOLO-V3 metal processing surface defect detection method
CN108898610B (en) Object contour extraction method based on mask-RCNN
CN111582294B (en) Method for constructing convolutional neural network model for surface defect detection and application thereof
CN110148130B (en) Method and device for detecting part defects
Hassanin et al. A real-time approach for automatic defect detection from PCBs based on SURF features and morphological operations
Martins et al. Automatic detection of surface defects on rolled steel using computer vision and artificial neural networks
Chen et al. Is overfeat useful for image-based surface defect classification tasks?
Mujeeb et al. Unsupervised surface defect detection using deep autoencoders and data augmentation
CN114972326A (en) Defective product identification method for heat-shrinkable tube expanding process
CN106709524B (en) Element symbol detection and identification method in electrical engineering drawing
JP2013167596A (en) Defect inspection device, defect inspection method, and program
US20140301608A1 (en) Chemical structure recognition tool
Huang et al. Implementation of workpiece recognition and location based on opencv
Ghosh et al. Counterfeit IC detection by image texture analysis
CN116309532A (en) Method, device, equipment and medium for detecting quality of target object
CN110288040B (en) Image similarity judging method and device based on topology verification
CN114863464A (en) Second-order identification method for PID drawing picture information
Fang et al. Towards real-time crack detection using a deep neural network with a Bayesian fusion algorithm
CN117036342B (en) Chip defect identification method and system
CN112614094B (en) Insulator string abnormity positioning and identifying method based on sequence state coding
CN112200789A (en) Image identification method and device, electronic equipment and storage medium
CN115082449B (en) Electronic component defect detection method
CN116580006A (en) Bottled product labeling quality detection method based on machine 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
GR01 Patent grant
GR01 Patent grant