CN111815575B - Bearing steel ball part detection method based on machine vision - Google Patents

Bearing steel ball part detection method based on machine vision Download PDF

Info

Publication number
CN111815575B
CN111815575B CN202010564947.0A CN202010564947A CN111815575B CN 111815575 B CN111815575 B CN 111815575B CN 202010564947 A CN202010564947 A CN 202010564947A CN 111815575 B CN111815575 B CN 111815575B
Authority
CN
China
Prior art keywords
image
edge
detection
steel ball
detecting
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
CN202010564947.0A
Other languages
Chinese (zh)
Other versions
CN111815575A (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.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
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 Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN202010564947.0A priority Critical patent/CN111815575B/en
Publication of CN111815575A publication Critical patent/CN111815575A/en
Application granted granted Critical
Publication of CN111815575B publication Critical patent/CN111815575B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • 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
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • 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/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • 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/30136Metal

Landscapes

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

Abstract

The bearing steel ball part detection method based on machine vision comprises steel ball circularity detection and part scratch detection, and comprises the following steps: firstly, detecting the roundness of the steel balls, wherein the process is as follows: 1.1 Pre-processing the input image; 1.2 Acquiring the outline of the steel ball; 1.3 Screening the obtained edges, and outputting the outline and the circle center radius of the steel ball which are qualified in detection; secondly, detecting scratches of parts: 2.1 Detecting the front edge of the part; 2.2 Side edge detection of the part. The invention provides a machine vision-based bearing steel ball part detection method, which can overcome various interference factors and establish a high-efficiency and stable detection system.

Description

Bearing steel ball part detection method based on machine vision
Technical Field
The invention relates to the field of part detection, in particular to a machine vision-based bearing steel ball part detection method.
Background
While mankind is pushing social progress, machine vision systems are in this category, which is done by giving many complex, highly repetitive tasks to machines. Generally, machine vision systems are industrial test monitoring systems. In some dangerous work situations or situations where human eyes are difficult to identify, machine vision systems are often used to improve the quality or automation of the production line. Machine vision technology is one direction in the field of inspection, and aims to replace human eyes with machines to perform tasks such as inspection, recognition, classification, and the like. The complete machine vision technology comprises the technologies of light source illumination, optical imaging, digital image processing, machine classification, industrial control and the like, and has high stability and accuracy. Machine vision is mainly used in the semiconductor, electronic and mechanical industries, such as integrated circuit fabrication, electronic molding, screen printing, component molding, and the like, abroad. In addition, machine vision is also widely used in product quality inspection systems, which are important in industrial production.
Existing part inspection methods are generally based on machine vision techniques. Researchers develop a set of circular part detection frame based on a machine vision technology, and realize the precise measurement of the circular part through simple camera calibration and sub-pixels, and an algorithm model mainly comprises four parts of system correction, preprocessing, image binarization and circular detection. The precise processing technology of the aspheric surface optical parts is analyzed and researched by other people, and a set of ultra-precise air compression main shaft system is developed, so that the detection precision is improved to the international level. The method comprises the steps of scanning an image of a computer hard disk sheet part to be detected through a linear array industrial camera, providing a new calibration algorithm and a contour vectorization algorithm according to the characteristic of image scanning, and combining calibration, binarization, edge detection, contour vectorization and the like to obtain the size parameter of the part to be detected. Some researchers detect defects on the surface of the part, accurately extract a target part detection area through a dynamic extraction algorithm performed twice, and then generate detection parameters based on a statistical map classification algorithm and edge information such as width, thickness, dispersity, deflection degree and the like of the part. On a modern automatic assembly line, the detection system can confirm the size, the number, the defects and the like of parts at any time and any place, and the industrial production efficiency is greatly improved. However, the problems of the current machine vision are also obvious, and the problems of system time lag, low precision, poor stability and the like need to be solved.
Disclosure of Invention
In order to solve the technical problem that parts cannot be detected rapidly and accurately in the prior art, the invention provides a bearing steel ball part detection method based on machine vision, which can overcome various interference factors and establish a high-efficiency and stable detection system.
The technical scheme adopted for solving the technical problems is as follows:
the detection method of the bearing steel ball part based on the machine vision is characterized by comprising the following steps of:
firstly, detecting the roundness of the steel balls, wherein the process is as follows:
1.1 Image preprocessing: preprocessing an input image by using Gaussian filtering, and removing high-frequency signals in the image;
1.2 Extraction of superior mesenteric artery: the image is converted through the methods of gray level conversion, threshold segmentation and the like, so that the image information is easier to distinguish by a subsequent algorithm; through this step, the system will get several closed edge profiles;
1.3 Screening edge contours: in order to obtain a better detection edge, three screening conditions were used: contour pixel domain detection, ellipse fitting detection and circularity detection, wherein the contour pixel domain detection is used for counting the pixel area of each contour; because the round outline of the steel ball can form an ellipse similar to a circle after imaging, the ellipse fitting is carried out, so that noise interference can be effectively eliminated; finally, after the edge profile information of the steel ball is obtained, detecting the roundness of the ellipse, wherein the aim of the step is to detect whether the appearance of the steel ball meets the production specification;
secondly, detecting scratches of the parts, wherein the process is as follows:
2.1 Part side scratch detection): detecting side scratches of the part by using an edge detection method, firstly determining edge pixels in an image, and then connecting the pixels together so as to form a required region boundary;
2.2 Front scratch detection of parts: because the front side has too much edge information, the classification result is seriously affected, and a redundant edge information removing method is adopted to remove high-frequency signals in the image.
Further, in 2.1), an image edge is a set of pixels representing the beginning of one region and another region in an image, and the set of pixels between adjacent regions in the image forms the edge of the image, so the edge of the image can be understood as a set of pixels whose gray level is spatially abrupt, and there are two important concepts of the image edge: the direction and gradient are such that the pixel change along the edge direction is smooth and the pixel change perpendicular to the edge direction is sharp, so that according to this feature, edge detection is usually performed by using first and second derivatives, so that edge detection in an image can be determined by deriving the gray value, and the derivative operation can be performed by a differential operator.
Further, the step of 2.2) is as follows:
2.2.1 Preprocessing the image by smoothing filtering to remove high-frequency signals in the image;
2.2.2 Detecting image edge information by adopting an edge detection method and extracting a closed contour of the image;
2.2.3 Ellipse fitting is performed on the contour using an ellipse fitting method, which is performed because the target area to be extracted by the present invention is a circular ring;
2.2.4 Selecting a proper threshold according to the fixed information of the image, screening the obtained elliptical profile to obtain the inner circle and the outer circle of the circular ring area, and finally obtaining the target area to be extracted by adopting an image subtraction method.
The beneficial effects of the invention are mainly shown in the following steps: based on machine vision, the problem that defective products are difficult to distinguish manually in the industrial production process is solved. The method has high stability and portability and wide application prospect.
Drawings
FIG. 1 is a machine vision inspection system of the present invention;
FIG. 2 is a schematic view of circularity detection of the present invention;
fig. 3 is a front inspection flow of a part of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
Referring to fig. 1 to 3, a machine vision-based bearing steel ball part detection method mainly solves the problems of steel ball circularity detection and part scratch detection, and comprises the following steps:
the first step, steel ball circularity detection, the flow of the detection method is shown in figure 2, and the process is as follows:
1.1 Preprocessing the input image, specifically comprising the following steps:
firstly, preprocessing an input image by using Gaussian filtering to remove high-frequency signals in the image;
1.2 The specific steps are as follows:
after the preprocessed information is obtained, the image is converted by the methods of gray level conversion, threshold segmentation and the like, so that the image information is easier to distinguish by a subsequent algorithm. Through this step, the system will get several closed edge profiles, of which only one is the edge profile of the steel ball, the other profiles are noise interference due to illumination;
1.3 Screening the obtained edge profile, and outputting the profile and the circle center radius of the steel ball which are qualified in detection, wherein the steps are as follows:
in order to obtain a better detection edge, the invention adopts three screening conditions: contour pixel domain detection, ellipse fitting detection, and circularity detection. Contour pixel domain detection is to count the pixel area of each contour. Because the circular outline of the steel ball can form an ellipse similar to a circle after imaging, the ellipse fitting is performed, and noise interference can be effectively eliminated. Finally, after the edge profile information of the steel ball is obtained, the roundness detection is carried out on the ellipse, the purpose of this step is to detect whether the appearance of the steel ball accords with the production standard, the roundness of the profile after the system imaging is changed within a certain error range, and the steel ball exceeding the range is likely to be a part with defects and needing to be removed. The pixel threshold herein is: 1600. 2000, a threshold of circularity of 0.980;
circularity is the complexity used to delineate the boundaries of an image object, and its value is minimal when the object is a perfect circle shape. The most commonly used circularity is the ratio of the square of the circumference to the area, the more complex the shape the greater the ratio, the circularity index taking a minimum value of 4pi when rounded. Taking C as a circularity index, P as a perimeter, A as an area, and the calculation formula is as follows:
the above calculation method is rough, and the invention adopts the boundary energy to measure. Taking p as the distance from any point on the boundary to a certain starting point. At any point, the boundary has an instantaneous radius of curvature r (p), which is known from geometrical relationships to be the radius of the circle that intersects the boundary at that point. The curvature function at point p is as follows:
the function K (p) is a periodic function with a period p. The average energy per unit boundary length is calculated as follows:
the radius of the circle is R. The curvature can be calculated from the chain code, so that the boundary energy can also be easily obtained. For fixed area boundaries, a minimum boundary energy E of a circle 0 The method comprises the following steps:
wherein p is the distance from any point on the boundary to a certain starting point, and R is the radius of a circle;
secondly, detecting scratches of the parts, wherein the process is as follows:
2.1 The basic steps are as follows:
the invention uses an edge detection method to detect the side scratches of the part, firstly determines edge pixels in the image, and then connects the pixels together to form the required region boundary. An image edge, which is the beginning of one region and another region in an image, is the set of pixels between adjacent pixels in the image that make up the edge of the image. Therefore, the edges of an image can be understood as a collection of pixels whose gray scale is spatially abrupt. There are two important concepts for image edges: direction and gradient. The pixel variation along the edge direction is smoother, while the pixel variation perpendicular to the edge direction is more severe. Thus, according to this feature, edge detection is typically performed using first and second derivatives. Therefore, edge detection in an image can be determined by deriving gray values, and derivative operation can be performed by a derivative operator;
the Sobel operator is a first-order differential operator that calculates the gradient of each pixel by the gradient value of the pixel's vicinity, and finally performs a rounding off according to a fixed threshold. The calculation formula is as follows:
the Sobel operator is a three-layer operator template, and is formed by two convolution kernels of dx and dy. One of the convolution kernels performs calculation of the vertical edge, one of the convolution kernels performs calculation of the horizontal convolution kernel, and the maximum value of the two convolution kernels is used as a final output result of the calculation.
In addition to the Sobel operator, the Canny operator is used for edge detection. The Canny operator is used herein to calculate local maxima of the image gradient, looking for strong and weak edges of the object by two thresholds. The method essentially comprises smoothing by means of a quasi-gaussian function, and then locating the maximum value of the derivative by means of a first-order derivative operator. The mean of the finite differences can be calculated within the second order square to find the partial derivative gradient at a point in the image. The direction angle and the amplitude can be calculated by a coordinate conversion formula from a rectangular coordinate system to a polar coordinate system:
where M [ i, j ] reflects the edge intensity of the image and θ [ i, j ] reflects the edge direction of the image. When M [ i, j ] obtains local maximum value, θ [ i, j ] is the edge direction at this time. For the gradient amplitude, extracting the pixel with the maximum gradient value in each gradient direction by adopting a non-maximum value inhibition method;
2.2 The detection flow is shown in figure 3, and the redundant edge information is removed because too much edge information on the front surface can seriously affect the classification result, so the invention provides a method for removing the redundant edge information, which comprises the following steps:
2.2.1 Preprocessing the image by smoothing filtering to remove high-frequency signals in the image;
2.2.2 Detecting image edge information by adopting an edge detection method and extracting a closed contour of the image;
2.2.3 Ellipse fitting is performed on the contour using an ellipse fitting method, which is performed because the target area to be extracted by the present invention is a circular ring;
2.2.4 Selecting a proper threshold according to the fixed information of the image, screening the obtained elliptical profile to obtain the inner circle and the outer circle of the circular ring area, and finally obtaining the target area to be extracted by adopting an image subtraction method.
The foregoing description is only illustrative of the present invention and is not intended to limit the scope of the invention, and all equivalent structures or equivalent processes or direct or indirect application in other related technical fields are included in the scope of the present invention.

Claims (2)

1. The detection method of the bearing steel ball part based on the machine vision is characterized by comprising the following steps of:
firstly, detecting the roundness of the steel balls, wherein the process is as follows:
1.1 Image preprocessing: preprocessing an input image by using Gaussian filtering, and removing high-frequency signals in the image;
1.2 Acquiring the profile of the steel ball): converting the image by a gray level conversion and threshold segmentation method, so that the image information can be more easily distinguished by a subsequent algorithm; through this step, the system will get several closed edge profiles;
1.3 Screening edge contours: in order to obtain a better detection edge, three screening conditions were used: contour pixel domain detection, ellipse fitting detection and circularity detection, wherein the contour pixel domain detection is used for counting the pixel area of each contour; because the round outline of the steel ball can form an ellipse similar to a circle after imaging, the ellipse fitting is carried out, so that noise interference can be effectively eliminated; finally, after the edge profile information of the steel ball is obtained, detecting the roundness of the ellipse, wherein the aim of the step is to detect whether the appearance of the steel ball meets the production specification;
secondly, detecting scratches of the parts, wherein the process is as follows:
2.1 Part side scratch detection): detecting side scratches of the part by using an edge detection method, firstly determining edge pixels in an image, and then connecting the pixels together so as to form a required region boundary;
2.2 Front scratch detection of parts: because the front side has too much edge information, the classification result is seriously affected, and a redundant edge information removing method is adopted to remove high-frequency signals in the image;
the step of 2.2) is as follows:
2.2.1 Preprocessing the image by smoothing filtering to remove high-frequency signals in the image;
2.2.2 Detecting image edge information by adopting an edge detection method and extracting a closed contour of the image;
2.2.3 Elliptical fitting of the contour using an elliptical fitting method;
2.2.4 Selecting a proper threshold according to the fixed information of the image, screening the obtained elliptical profile to obtain the inner circle and the outer circle of the circular ring area, and finally obtaining the target area to be extracted by adopting an image subtraction method.
2. The machine vision based bearing steel ball part detection method as claimed in claim 1, wherein in 2.1), the image edge is the edge representing the start of one region and the other region in the image, and the set of pixels between adjacent pixels in the image forms the image edge, so the image edge can be understood as the set of pixels with spatially abrupt gray scales of the image, and there are two important concepts of the image edge: the direction and gradient are such that the pixel change along the edge direction is smooth and the pixel change perpendicular to the edge direction is sharp, so that according to this feature, edge detection is usually performed by using first and second derivatives, so that edge detection in an image can be determined by deriving the gray value, and the derivative operation can be performed by a differential operator.
CN202010564947.0A 2020-06-19 2020-06-19 Bearing steel ball part detection method based on machine vision Active CN111815575B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010564947.0A CN111815575B (en) 2020-06-19 2020-06-19 Bearing steel ball part detection method based on machine vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010564947.0A CN111815575B (en) 2020-06-19 2020-06-19 Bearing steel ball part detection method based on machine vision

Publications (2)

Publication Number Publication Date
CN111815575A CN111815575A (en) 2020-10-23
CN111815575B true CN111815575B (en) 2024-03-26

Family

ID=72846239

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010564947.0A Active CN111815575B (en) 2020-06-19 2020-06-19 Bearing steel ball part detection method based on machine vision

Country Status (1)

Country Link
CN (1) CN111815575B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112613523B (en) * 2020-12-15 2023-04-07 中冶赛迪信息技术(重庆)有限公司 Method, system, medium and electronic terminal for identifying steel flow at converter steel tapping hole
CN116363136B (en) * 2023-06-01 2023-08-11 山东创元智能设备制造有限责任公司 On-line screening method and system for automatic production of motor vehicle parts

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103175844A (en) * 2012-03-16 2013-06-26 沈阳理工大学 Detection method for scratches and defects on surfaces of metal components
CN106053485A (en) * 2016-08-01 2016-10-26 苏州宙点自动化设备有限公司 Machine vision-based novel algorithm of intelligent circular inspection of steel ball surface defects
CN109003258A (en) * 2018-06-15 2018-12-14 广东工业大学 A kind of high-precision sub-pix circular pieces measurement method
CN111862037A (en) * 2020-07-17 2020-10-30 华中科技大学无锡研究院 Method and system for detecting geometric characteristics of precision hole type part based on machine vision

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103175844A (en) * 2012-03-16 2013-06-26 沈阳理工大学 Detection method for scratches and defects on surfaces of metal components
CN106053485A (en) * 2016-08-01 2016-10-26 苏州宙点自动化设备有限公司 Machine vision-based novel algorithm of intelligent circular inspection of steel ball surface defects
CN109003258A (en) * 2018-06-15 2018-12-14 广东工业大学 A kind of high-precision sub-pix circular pieces measurement method
CN111862037A (en) * 2020-07-17 2020-10-30 华中科技大学无锡研究院 Method and system for detecting geometric characteristics of precision hole type part based on machine vision

Also Published As

Publication number Publication date
CN111815575A (en) 2020-10-23

Similar Documents

Publication Publication Date Title
CN109490316B (en) Surface defect detection algorithm based on machine vision
CN109141232B (en) Online detection method for disc castings based on machine vision
CN109003258B (en) High-precision sub-pixel circular part measuring method
CN108921176B (en) Pointer instrument positioning and identifying method based on machine vision
CN109060836B (en) Machine vision-based high-pressure oil pipe joint external thread detection method
CN105334219B (en) A kind of bottle mouth defect detection method of residual analysis dynamic threshold segmentation
CN115018853B (en) Mechanical component defect detection method based on image processing
CN109658402B (en) Automatic detection method for geometric dimension of industrial profile based on computer vision imaging
CN109682839B (en) Online detection method for surface defects of metal arc-shaped workpiece
CN112001917B (en) Circular perforated part form and position tolerance detection method based on machine vision
CN108876860B (en) Image calibration method for measuring bubble offset of tube level
CN108960237B (en) Reading identification method for pointer type oil level indicator
CN107796826B (en) Micro duplicate gear broken tooth defect detection method based on tooth center distance curve analysis
CN112686920A (en) Visual measurement method and system for geometric dimension parameters of circular part
CN109115800B (en) Method for rapidly detecting burrs of product and accurately measuring length
CN111462066B (en) Thread parameter detection method based on machine vision
CN107742289A (en) One kind is based on machine vision revolving body workpieces detection method
CN111815575B (en) Bearing steel ball part detection method based on machine vision
CN114279357A (en) Die casting burr size measurement method and system based on machine vision
CN113077392B (en) High-accuracy automatic reading method for fuzzy photo of pointer table
CN115375686A (en) Glass edge flaw detection method based on image processing
CN109978940A (en) A kind of SAB air bag size vision measuring method
CN109359604B (en) Method for identifying instrument under shadow interference facing inspection robot
CN116539620A (en) On-machine detection method for surface defects of cutter
CN108986160A (en) A kind of image laser center line extraction method containing specular light interference

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