CN116452598A - Axle production quality rapid detection method and system based on computer vision - Google Patents

Axle production quality rapid detection method and system based on computer vision Download PDF

Info

Publication number
CN116452598A
CN116452598A CN202310730065.0A CN202310730065A CN116452598A CN 116452598 A CN116452598 A CN 116452598A CN 202310730065 A CN202310730065 A CN 202310730065A CN 116452598 A CN116452598 A CN 116452598A
Authority
CN
China
Prior art keywords
scratch
connected domain
pixel point
boundary
axle
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.)
Granted
Application number
CN202310730065.0A
Other languages
Chinese (zh)
Other versions
CN116452598B (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.)
Mandeville Shandong Intelligent Manufacturing Co ltd
Original Assignee
Mandeville Shandong Intelligent Manufacturing 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 Mandeville Shandong Intelligent Manufacturing Co ltd filed Critical Mandeville Shandong Intelligent Manufacturing Co ltd
Priority to CN202310730065.0A priority Critical patent/CN116452598B/en
Publication of CN116452598A publication Critical patent/CN116452598A/en
Application granted granted Critical
Publication of CN116452598B publication Critical patent/CN116452598B/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
    • 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/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/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • 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

Abstract

The invention relates to the technical field of image data processing, in particular to a method and a system for rapidly detecting the production quality of an axle based on computer vision. Obtaining a scratch damage degree coefficient representing the scratch saliency of the defect connected domain, and finally screening out a real scratch area according to the scratch damage degree coefficient and detecting the bridge production quality. The invention has higher identification accuracy on scratch areas and more accurate detection on axle production quality.

Description

Axle production quality rapid detection method and system based on computer vision
Technical Field
The invention relates to the technical field of image data processing, in particular to a method and a system for rapidly detecting axle production quality based on computer vision.
Background
The axle is an important vehicle component for bearing the load of the automobile and also plays a role in transmitting the power of the engine to wheels, so that the production quality detection of the axle is very important. The axle may be influenced by the factor of unreliability in the production process, so that defects, especially scratch defects, exist on the surface of the axle, and the scratch defects can lead to the falling of a coating on the surface of the axle, so that the metal in the coating is exposed, the rust speed of the metal on the surface of the axle is accelerated, and the quality of the axle is influenced. The traditional axle quality detection method mainly adopts manual detection or eddy current detection, but has the defects of detection efficiency and accuracy for the axle of automatic production, so in order to improve the detection efficiency and accuracy, a computer vision technology is generally introduced in the production process to detect scratch defects in the axle.
In the prior art, scratch defects in an axle are detected through a trained deep learning model, but the detection accuracy of the deep learning method is determined by historical data of the training model, and the corresponding operation is complex and the accuracy is uncertain, so that scratches are usually detected through image processing with simple operation. In the prior art, when scratches are detected through image processing, a defect connected domain is usually detected through edge detection and connected domain analysis, and the shape of the defect connected domain is analyzed and further scratch defects are detected. However, the surface of the axle may have some irregularly shaped dirt, and the corresponding defect connected domain may be detected, so that the accuracy of the method for analyzing the scratch defect only according to the shape of the defect connected domain is lower, and the accuracy of the corresponding axle production quality detection is also lower.
Disclosure of Invention
In order to solve the technical problem of lower axle production quality detection accuracy caused by detecting the scratch defect on the axle surface according to the shape of the defect connected domain in the prior art, the invention aims to provide an axle production quality rapid detection method and system based on computer vision, and the adopted technical scheme is as follows:
the invention provides a method for rapidly detecting axle production quality based on computer vision, which comprises the following steps:
acquiring an axle surface image;
obtaining a defect connected domain according to gray level difference distribution characteristics in a gray level image corresponding to the axle surface image; obtaining at least two bottom concave pixel points according to the gray distribution characteristics of the pixel points in the defect connected domain and the position distribution characteristics of the pixel points on the boundary; obtaining scratch depression corresponding to the defect connected domain according to the color difference between the bottom depression pixel point and the pixel point on the boundary of the defect connected domain in the RGB image corresponding to the axle surface image;
obtaining scratch expansion degree of the defect connected domain according to the position distribution rule of the pixel points in the defect connected domain; obtaining the scratch slender regularity of the defect connected domain according to the change rule of the extending direction of the pixel points on the boundary of the defect connected domain and the quantity distribution characteristics of the pixel points between the boundaries; obtaining a scratch damage degree coefficient of the defect connected domain according to the scratch dishing degree, the scratch expansion degree and the scratch slender regularity;
Screening out a real scratch area according to the scratch damage degree coefficient, and detecting the axle production quality according to the real scratch area;
the method for acquiring the bottom concave pixel point comprises the following steps:
taking two edge pixel points farthest from the defect connected domain as characteristic end points, connecting the two characteristic end points along the boundary of the defect connected domain to obtain a first boundary and a second boundary, and determining at least two matching tuples according to the pixel point positions on the first boundary and the second boundary, wherein the matching tuples consist of a first boundary pixel point and a second boundary pixel point, and the connecting line between the first boundary pixel point and the second boundary pixel point is perpendicular to the line segment between the characteristic end points;
in the defect connected domain, a set formed by all pixel points between a first boundary pixel point and a second boundary pixel point in each matched binary group is used as an inter-boundary pixel point set corresponding to each matched binary group, and a pixel point with the minimum gray value in each inter-boundary pixel point set is used as a bottom concave pixel point.
Further, the method for obtaining the defect connected domain includes:
and detecting the gray level image corresponding to the axle surface image by adopting an edge detection algorithm to obtain an edge image corresponding to the axle surface image, and analyzing the edge image by adopting a connected domain analysis and boundary tracking algorithm to obtain a defect connected domain in the axle surface image.
Further, the method for obtaining the scratch dishing degree comprises the following steps:
optionally selecting one bottom concave pixel point as a target bottom concave pixel point, and taking a matching binary set corresponding to the target bottom concave pixel point as a target matching binary set;
in the RGB image corresponding to the axle surface image, taking Euclidean distance between a first boundary pixel point in a target matching binary set and the target bottom concave pixel point in an RGB space as a first color space difference value; the Euclidean distance between a second boundary pixel point in the target matching binary set and the target bottom concave pixel point in the RGB space is used as a second color space difference value; taking the average value between the first color space difference value and the second color space difference value as a color difference characteristic value corresponding to the concave pixel point at the bottom of the target;
changing the target bottom concave pixel points to obtain color difference characteristic values corresponding to all the bottom concave pixel points, and taking the average value of the color difference characteristic values corresponding to all the bottom concave pixel points as the scratch concave degree corresponding to the defect connected domain.
Further, the method for obtaining the scratch expansion degree comprises the following steps:
in the defect connected domain, taking the numerical value of the number of the pixel points corresponding to each boundary pixel point set as the number characteristic value corresponding to each boundary pixel point set; and taking the same quantity characteristic value as a quantity characteristic value type, calculating the quantity characteristic value average value corresponding to all the boundary pixel point sets, counting the quantity of the quantity characteristic value types, and obtaining the scratch expansion degree corresponding to the defect connected domain according to the quantity characteristic value average value and the quantity characteristic value type quantity, wherein the scratch expansion degree is positively correlated with the quantity characteristic value average value, and the scratch expansion degree is negatively correlated with the quantity characteristic value type quantity.
Further, the method for obtaining the elongated regularity of the scratch comprises the following steps:
taking the direction from any one feature endpoint to the other feature endpoint on the first boundary and the second boundary as a sequence, and taking the included angle between the line segment between each boundary pixel point and the adjacent next boundary pixel point and the horizontal direction as the feature angle corresponding to each boundary pixel point; based on a gray scale run matrix construction principle, substituting gray values for characteristic angles of boundary pixel points as input to obtain characteristic angle run matrixes corresponding to all the boundary pixel points; taking the average value of the corresponding wandering lengths of all non-0 elements in the characteristic angle run-length matrix as a scratch length characteristic value, and obtaining the scratch slender regularity corresponding to the defect connected domain according to the scratch length characteristic value and the quantity characteristic value average value, wherein the scratch slender regularity is positively correlated with the scratch length characteristic value, and the scratch slender regularity is negatively correlated with the quantity characteristic value average value.
Further, the scratch dishing degree is positively correlated with the scratch damage degree coefficient, the scratch expansion degree is negatively correlated with the scratch damage degree coefficient, and the scratch slender regularity is positively correlated with the scratch damage degree coefficient.
Further, the method for acquiring the real scratch area comprises the following steps:
and taking the defect connected domain with the scratch damage degree coefficient larger than or equal to a preset scratch threshold value as a real scratch area.
Further, the axle production quality detection according to the real scratch area comprises:
counting all real scratch areas in the axle surface image, and taking the accumulated sum of the areas of all the real scratch areas as the total scratch area; when the total scratch area is smaller than a preset scratch area threshold value and the number of real scratch areas is smaller than a preset scratch number threshold value, the axle production quality is qualified; otherwise, the axle production quality is unqualified.
The invention also provides a system for rapidly detecting the axle production quality based on computer vision, which comprises a memory, a processor and a computer program which is stored in the memory and can run on the processor, wherein the processor realizes any one of the steps of the rapid axle production quality detection method based on computer vision when executing the computer program.
The invention has the following beneficial effects:
considering that the coating on the surface of the axle is thicker, the scratch defect which affects the quality of the axle is usually concave inwards and has a certain depth, and the two scratch boundaries from the bottommost part to the upper side of the scratch are in a slope shape, so that the scratch concave degree of each defect connected domain is obtained according to the characteristics that the scratch area in the image on the surface of the axle has obvious difference in gray level distribution with other areas and obvious chromatic aberration exists between the bottom of the defect and pixel points of the defect boundary. Further obtaining the scratch expansion degree of the defect connected domain according to the position distribution rule of the pixel points in the defect connected domain according to the characteristic of smaller width of the real scratch region; and combining the characteristics of slender and regular extending directions of the real scratch areas to obtain the slender regularity of scratches of the defect connected areas. Finally, the scratch damage degree coefficient obtained by combining the scratch dishing degree, the scratch expansion degree and the scratch slender regularity characterizes the scratch remarkable characteristics of each defect connected domain, so that the real scratch area is detected, the identification accuracy of the scratch area is higher, and the axle production quality detection is more accurate. In summary, the method for detecting the scratch area on the axle surface by analyzing and calculating the scratch damage degree coefficient of each defect connected domain has higher identification accuracy on the scratch area and more accurate detection on the axle production quality.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for rapidly detecting axle production quality based on computer vision according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a defect connected domain according to an embodiment of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following is a detailed description of specific implementation, structure, characteristics and effects thereof according to the method and system for rapidly detecting axle production quality based on computer vision provided by the invention with reference to the accompanying drawings and the preferred embodiment. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The invention provides a method and a system for rapidly detecting axle production quality based on computer vision.
Referring to fig. 1, a flowchart of a method for quickly detecting axle production quality based on computer vision according to an embodiment of the invention is shown, where the method includes:
step S1: an axle surface image is acquired.
The embodiment of the invention aims to provide a method and a system for rapidly detecting the production quality of an axle based on computer vision, which are used for processing an axle surface image, screening out a real scratch area according to the characteristics of the scratch on the axle surface in the axle surface image, and finally detecting the production quality of a vehicle according to the real scratch area. The embodiment of the present invention focuses on extracting the features of the true scratch area in the vehicle surface image, but the image processing object of the embodiment of the present invention, that is, the axle surface image, needs to be acquired first.
The embodiment of the invention firstly acquires the axle surface image. In the axle automated production process, firstly, an axle surface is shot by a camera to obtain an initial image of the axle surface, and specifically: considering the shape of an axle, a complete axle surface cannot be shot by only one camera, and the embodiment of the invention sets up cameras for shooting the axle surface at all angles of the axle to ensure that all images shot can completely contain the axle surface, and splice the images shot by different cameras at the same shooting time to obtain the complete image of the axle surface, namely an initial image of the axle surface. In the embodiment of the present invention, the axle surface is photographed by the CCD camera, and it should be noted that an operator may use other kinds of cameras to photograph the axle surface according to a specific implementation environment, but it is required to ensure that the image photographed by the camera contains RGB image information, which is not further described herein.
Due to the influence of external environment and shooting equipment, such as uneven illumination of a production workshop, camera parameters and hardware factors, the image quality of the collected axle surface initial image is poor, namely the axle surface initial image contains more noise points, so that denoising pretreatment is required for the collected axle surface initial image. Considering that the initial image of the axle surface has more noise points, the embodiment of the invention adopts a median filtering mode to denoise the initial image of the axle surface to obtain the image of the axle surface similar to Gaussian noise. It should be noted that, the median filtering is a prior art well known to those skilled in the art, and the purpose of the embodiment of the present invention is to keep the edge information in the initial image of the axle surface as much as possible while removing noise, so that the subsequent detection result of the scratch area in the image of the axle surface is more accurate, and the practitioner may also use other filtering denoising methods according to the specific implementation situation, but need to avoid the edge information from being damaged, which is not further described herein.
Step S2: obtaining a defect connected domain according to gray level difference distribution characteristics in a gray level image corresponding to the axle surface image; obtaining at least two bottom concave pixel points according to the gray distribution characteristics of the pixel points in the defect connected domain and the position distribution characteristics of the pixel points on the boundary; and obtaining the scratch depression degree corresponding to the defect connected domain according to the color difference between the bottom depression pixel point and the pixel point on the boundary of the defect connected domain in the RGB image corresponding to the axle surface image.
Considering that when scratches appear on the surface of the axle, the edges of the scratch defect areas in the corresponding axle surface images and other areas can show obvious gray scale differences, namely the scratch areas have certain edge characteristics, so that defect connected areas corresponding to the scratches can be further screened out from the axle surface images according to the edge characteristics, the essence of the edge characteristics in image processing is that gray scale changes are discontinuous, namely the gray scale differences exist, and the defect connected areas are obtained according to the gray scale difference distribution characteristics in the gray scale images corresponding to the axle surface images.
Preferably, the method for obtaining the defect connected domain includes:
and detecting the gray level image corresponding to the axle surface image by adopting an edge detection algorithm to obtain an edge image corresponding to the axle surface image, and analyzing the edge image by adopting a connected domain analysis and boundary tracking algorithm to obtain a defect connected domain in the axle surface image. When the scratch defect occurs on the surface of the axle, gray level jump occurs on the boundary of the corresponding scratch area and other areas. The edge detection algorithm can accurately detect the region with the gray value changed or discontinuous in the vehicle bridge surface image, so that the position of the gray jump in the vehicle bridge surface image can be clearly detected, the boundary of the defect region is obtained, and the corresponding defect connected domain is further constructed through the connected domain analysis and the boundary tracking algorithm according to the boundary of the defect region. In the embodiment of the present invention, the edge detection algorithm adopts Canny edge detection, and it should be noted that Canny edge detection, connected domain analysis and boundary tracking algorithms are well known in the art, and an implementer may select other edge detection methods according to a specific implementation environment, which are not further limited and described herein.
However, when the surface of the axle is stained, the corresponding stained area and the normal area of the surface of the axle have obvious gray scale difference, and when the stained color is relatively uniform, a defect connected area can be corresponding, so that not all the defect connected areas are the scratch defect areas, and further analysis is performed according to the characteristic difference between the surface of the axle and the scratches.
In the production process of the axle, in order to slow down the rust speed of the metal surface of the axle, a protective layer is coated on the surface of the axle generally, the protective layer has a certain thickness, the protective layer is damaged by the existence of scratches, the coating on the surface of the axle can be dropped off due to the fact that the scratches with deeper pits, the rust speed of the metal of the axle is increased, and therefore the integral quality of the axle is influenced. Therefore, when scratches affecting the whole quality of the axle appear on the surface of the axle, due to the fact that the protective layer has a certain thickness, the corresponding scratch area can be sunken, and the deeper the sunken pixel point is, the smaller the corresponding gray value is. Therefore, in the axle surface image, the boundary corresponding to the scratch defect area has a significant difference from other normal axle surface images, the gray values of the pixels inside the scratch area also have a certain difference, and the corresponding gray values gradually decrease from the boundary to the inside due to the fact that the recess corresponding to the scratch is inclined. According to the embodiment of the invention, at least two bottom concave pixel points are obtained according to the gray level distribution characteristics of the pixel points in the defect connected domain and the position distribution characteristics of the pixel points on the boundary. The gray scale difference inside the scratch defect area is further characterized by the undercut pixel.
Preferably, the method for obtaining the bottom concave pixel point includes:
and taking two edge pixel points farthest from the defect connected domain as characteristic end points, connecting the two characteristic end points along the boundary of the defect connected domain to obtain a first boundary and a second boundary, and determining at least two matching binary groups according to the pixel point positions on the first boundary and the second boundary, wherein the matching binary groups are composed of a first boundary pixel point and a second boundary pixel point, and the connecting line between the first boundary pixel point and the second boundary pixel point is perpendicular to the line segment between the characteristic end points. If the corresponding defect connected domain is the region corresponding to the real scratch, the connecting line between the first boundary pixel point and the second boundary pixel point is perpendicular to the whole extending direction of the scratch. Since the score is generally elongated and approximates a straight line, if the entire region corresponding to the score is fitted with a straight line, the corresponding feature end points are the two end points of the line segment corresponding to the fitted straight line. And the boundary of the defect connected domain is closed loop, and the feature end points are at both sides of the boundary of the defect connected domain, so that two paths, namely a first boundary and a second boundary, where the two feature end points are connected to each other at the boundary of the defect connected domain are necessarily present.
Taking a transverse scratch defect as an example, two edge pixel points with the farthest distance in a defect communication domain, namely a leftmost edge pixel point and a rightmost edge pixel point, namely the leftmost edge pixel point and the rightmost edge pixel point of the defect communication domain corresponding to the transverse scratch defect are taken as characteristic endpoints; and because the scratches are distributed transversely, the extending direction corresponding to the scratches is horizontal, and for transverse scratch defects, the straight line between the leftmost edge pixel point and the rightmost edge pixel point should be parallel or nearly parallel to the extending direction, i.e. the connecting line between the first boundary pixel point and the second boundary pixel point is parallel or nearly parallel to the vertical direction. The corresponding first boundary and second boundary are the upper boundary and lower boundary of the defect connected domain corresponding to the transverse scratch defect respectively.
Referring to fig. 2, a schematic diagram of a defect connected domain according to an embodiment of the present invention is shown, in which a corresponding prolate graphic region in fig. 2 is a defect connected domain, two edge pixels farthest from each other on two sides of a corresponding image are feature endpoints, and a first boundary and a second boundary are two boundaries separated by the two feature endpoints on the basis of all boundaries of the defect connected domain. It is obvious that the width of the defect connected domain is irregular, that is, the number of pixels in each column is different in the direction perpendicular to the line segment between the feature endpoints, so that in order to obtain the distribution of pixels on the corresponding width of the defect connected domain, further analysis is required according to the first boundary and the second boundary.
Considering the characteristic that the boundary pixel points of the scratch area and the pixel points in the area have obvious chromatic aberration, the first boundary pixel point and the second boundary pixel point in the matched binary group are acquired so as to facilitate the subsequent comparison analysis of the pixel points in the defect connected area. The connecting line between the first boundary pixel point and the second boundary pixel point is perpendicular to the line segment between the characteristic endpoints, and the line segment between the characteristic endpoints can represent the whole direction of the defect communication domain, so that the connecting line between the first boundary pixel point and the second boundary pixel point can represent the width of the defect communication domain, and the width distribution characteristic of the defect communication domain can be further determined according to the number of the pixel points corresponding to the connecting line between the first boundary pixel point and the second boundary pixel point.
In the defect connected domain, a set formed by all pixel points between a first boundary pixel point and a second boundary pixel point in each matching binary group is used as an inter-boundary pixel point set corresponding to each matching binary group, and a pixel point with the minimum gray value in each inter-boundary pixel point set is used as a bottom concave pixel point. Considering that the defect area corresponding to the scratch is usually concave, a certain gray level difference exists between the boundary and the inside of the defect connected domain corresponding to the scratch, and the gray level value in the defect connected domain corresponding to the dirt is relatively uniform, so that the gray level characteristics of the defect connected domain can be further analyzed. Since the scratch defects are inclined, the gray values corresponding to the defect connected domains gradually decrease from the boundary to the inside, and the deeper the scratch pits are, the smaller the gray values are; and because the depressions corresponding to the scratches are generally uniform, the occurrence of potholes is rare, a bottom depression pixel point with the minimum gray value can be found in the boundary pixel point set for representing the width of the defect connected domain, and a larger color difference generally exists between the bottom depression pixel point and the boundary pixel point.
Therefore, the significance of scratches of the defect connected domain can be further analyzed according to the characteristic of larger chromatic aberration between the bottom concave pixel point and the boundary pixel point. In the embodiment of the invention, in an RGB image corresponding to an axle surface image, the scratch recess degree corresponding to a defect connected domain is obtained according to the color difference between a bottom recess pixel point and a pixel point on the boundary of the defect connected domain. The dent characteristics of the scratches are characterized by the dent of the scratches.
Preferably, the method for obtaining the scratch dishing degree comprises the following steps:
optionally selecting one bottom concave pixel point as a target bottom concave pixel point, and taking a matching binary set corresponding to the target bottom concave pixel point as a target matching binary set; in an RGB image corresponding to the axle surface image, taking Euclidean distance between a first boundary pixel point in the target matching binary set and a concave pixel point at the bottom of the target in an RGB space as a first color space difference value; the Euclidean distance between the second boundary pixel point in the target matching binary set and the concave pixel point at the bottom of the target in the RGB space is used as a second color space difference value; taking the average value between the first color space difference value and the second color space difference value as a color difference characteristic value corresponding to the concave pixel point at the bottom of the target; changing the target bottom concave pixel points to obtain color difference characteristic values corresponding to all the bottom concave pixel points, and taking the average value of the color difference characteristic values corresponding to all the bottom concave pixel points as the scratch concave degree corresponding to the defect connected domain. It should be noted that, the calculation of the euclidean distance between two pixels in the RGB space is well known to those skilled in the art, and is not further limited and described herein.
Based on the inclination characteristic of the scratch defect, when the scratch saliency corresponding to the defect connected domain is higher, namely the defect connected domain is more likely to be a scratch defect region, the color difference between the bottom concave pixel point and the boundary pixel point in the corresponding defect connected domain is larger, namely the pixel value difference between the bottom concave pixel point and the boundary pixel point is larger in an RGB image corresponding to the axle surface image; the euclidean distance in RGB space between the boundary pixel point and the bottom-concave pixel point is calculated. Considering that each bottom concave pixel point can correspond to two boundary pixel points, the average value of the first color space difference value and the second color space difference value is taken as a color difference characteristic value. And further combining the color difference characteristic values of all the bottom concave pixel points, and obtaining the scratch concave degree of the whole defect connected domain in a mean value mode. When the scratch recess degree corresponding to the defect connected domain is larger, the corresponding scratch recess feature is more obvious, and the corresponding scratch saliency is higher, namely the scratch defect area is more likely to be. It should be noted that, the practitioner may calculate the scratch dishing degree by other methods according to the specific implementation environment, for example, the difference between the average value of the pixel values of the bottom concave pixel point and the average value of the pixel values of all the boundary pixel points is used as the scratch dishing degree, which is not further described herein.
In the embodiment of the invention, the defect connected domainThe scratch dishing degree obtaining method of (1) is expressed as follows in terms of a formula:
wherein, the liquid crystal display device comprises a liquid crystal display device,is a defect connected domainThe corresponding degree of dishing of the scratch is,is a defect connected domainThe number of pixels with concave middle bottom,is a defect connected domainMiddle (f)First color space differences corresponding to the bottom concave pixel pointsThe value of the sum of the values,is a defect connected domainMiddle (f)Second color space difference values corresponding to the bottom concave pixel points,is a defect connected domainMiddle (f)Color difference characteristic values corresponding to the bottom concave pixel points. Further according to the defect connected domainThe scratch dishing degree of other defect connected domains is obtained.
Step S3: obtaining scratch expansion degree of the defect connected domain according to the position distribution rule of the pixel points in the defect connected domain; obtaining the scratch slender regularity of the defect connected domain according to the change rule of the extending direction of the pixel points on the boundary of the defect connected domain and the quantity distribution characteristics of the pixel points between the boundaries; and obtaining the scratch damage degree coefficient of the defect connected domain according to the scratch dishing degree, the scratch expansion degree and the scratch slender regularity.
And obtaining the scratch depression degree corresponding to the defect connected domain in the axle surface image, and representing the depression characteristic of the defect connected domain formed by the scratch region on the axle surface by the scratch depression degree. Further, considering that the overall shape of the scratch is relatively slender, that is, the width of the defect connected domain corresponding to the scratch is generally smaller, the significance of the corresponding scratch can be further characterized by the width characteristic of the defect connected domain. However, considering that the defect connected domain is generally irregular, if the corresponding width feature needs to be calculated, the characterization needs to be performed by the distance between the pixel points on the boundary of the defect connected domain. According to the embodiment of the invention, the scratch expansion degree of the defect connected domain is obtained according to the position distribution rule of the pixel points in the defect connected domain. The width characteristics of the scratch are characterized by scratch spread.
Preferably, the method for obtaining the scratch expansion degree comprises the following steps:
and in the defect connected domain, taking the numerical value of the number of the pixel points corresponding to each boundary pixel point set as the number characteristic value corresponding to each boundary pixel point set. Since the width distribution of the scratch defect area is not uniform, that is, the widths of the defect connected domains corresponding to scratches at different lengths in the line segment direction corresponding to the feature end points are different, in order to represent the whole width of the defect connected domains, the widths corresponding to the different lengths need to be analyzed, that is, the number feature values corresponding to each boundary pixel point set are calculated, and the widths corresponding to each length are represented by the number feature values. Since the scratch defect is elongated as a whole, the width of the defect connected domain corresponding to the scratch is smaller, i.e. the corresponding number characteristic value is generally smaller. Therefore, as the number of feature values is smaller as a whole, the greater the scratch significance of the corresponding defect connected domain, that is, the more likely to be a scratch region.
And taking the same number characteristic value as a number characteristic value category, calculating the average value of the number characteristic values corresponding to all the boundary pixel point sets, and counting the number of the number characteristic value category. Considering that the scratch defect is generated under the influence of external factors such as unreliability, the defect connected domain corresponding to the scratch defect is elongated and has uneven width distribution, the embodiment of the invention further introduces the characteristic of uneven width distribution of the scratch area through the quantity of the quantity characteristic value types, and the smaller the quantity of the quantity characteristic value types is, the more even the corresponding width distribution is, namely the less the scratch significance of the corresponding defect connected domain is, namely the less likely to be a scratch area.
And obtaining scratch expansion degree corresponding to the defect connected domain according to the number characteristic value average value and the number characteristic value variety number, wherein the scratch expansion degree and the number characteristic value average value are in positive correlation, and the scratch expansion degree and the number characteristic value variety number are in negative correlation. Because images with different scales and scratches with different lengths have different numbers of corresponding quantity characteristic values, the embodiment of the invention adopts the mean value of the quantity characteristic values to represent the width characteristic of the corresponding defect connected domain. According to the embodiment of the invention, the overall width rule characteristics of the scratch area are represented by the scratch expansion degree, namely, the smaller the overall width of the corresponding defect connected domain is, the more uneven the width distribution is, the larger the corresponding scratch expansion degree is, namely, the more likely the corresponding defect connected domain is the scratch area, so that the scratch expansion degree is positively correlated with the average value of the quantity characteristic values, and the scratch expansion degree is negatively correlated with the quantity of the quantity characteristic value types. In the embodiment of the invention, the product of the number characteristic value types and the preset adjusting parameter is calculated, and the ratio of the number characteristic value mean value to the product is used as the scratch expansion degree of the corresponding defect connected domain. It should be noted that, the operator may also obtain the scratch expansion degree according to the number of the number feature value means and the number of the number feature value types by other methods besides the ratio, for example, calculate the product of the number feature value types and the preset adjustment parameter, and use the exponential function mapping value of the difference between the number feature value means and the product as the scratch expansion degree, which is not further described herein.
In the embodiment of the invention, the defect connected domainThe scratch expansion degree obtaining method of the device is expressed as the following formula:
wherein, the liquid crystal display device comprises a liquid crystal display device,is a defect connected domainIs used for the scratch expansion of the glass substrate,is a defect connected domainThe number of corresponding bottom concave pixel points, namely the defect connected domainThe number of corresponding number of characteristic values,is a defect connected domainThe first of (3)The characteristic value of the number of quantities,is a defect connected domainThe number of corresponding number of classes of the number of characteristic values,in order to preset the adjustment parameters, to adjust the influence degree of the number feature value types on the scratch expansion degree, in the embodiment of the present invention, the preset adjustment parameters are set to 0.2, and it should be noted that an operator can adjust the magnitude of the preset adjustment parameters according to a specific implementation environment, but needs to ensure that the preset adjustment parameters are greater than 0, which is not further described herein. Further according to the defect connected domainThe scratch expansion degree of other defect connected domains is obtained by the scratch expansion degree obtaining method.
In addition, the practitioner can obtain the defect connected domain through other forms of formulasFor example:
wherein, the liquid crystal display device comprises a liquid crystal display device,the other parameters are the exponential function based on the natural constant e, and the other parameters are the defect connected domain in the embodiment of the invention The corresponding formulas of the scratch expansion degree obtaining method are the same, and are not further described herein.
The dent characteristic and the width characteristic of the scratch are respectively characterized by the dent degree and the expansion degree of the scratch, but for the overall shape of the scratch, the length corresponding to the defect connected domain corresponding to the scratch should be longer besides the smaller width, namely the defect connected domain corresponding to the scratch should be slender, and the shape characteristic of the scratch cannot be completely characterized only by the expansion degree of the scratch, so that the length characteristic of the defect connected domain needs to be further introduced for further analysis. However, simply calculating the length of the defect connected domain, that is, calculating the distance between the farthest edge pixels in the defect connected domain, cannot embody the characteristics of the defect connected domain corresponding to the scratch. Considering that the scratches are generally elongated and although the width is not uniform, there should be a certain tendency for the boundaries of the corresponding defect connected domains to change in the extending direction of the edge pixel points of the defect connected domains to which the scratches correspond, i.e., the scratches generally do not turn at a large angle or frequently turn, for example, the overall profile of the scratches is right-angled or the edges of the scratches are potholes. And it is further considered that the length of the score is characterized by a relatively long length, i.e. the length of the score is not necessarily long, however, the corresponding aspect ratio must be large, so that when the length characteristics of the defect connected domain are further analyzed, the corresponding width characteristics need to be introduced. According to the embodiment of the invention, the elongated rule of scratches of the defect connected domain is obtained according to the change rule of the extending direction of the pixel points on the boundary of the defect connected domain and the quantity distribution characteristics of the pixel points between the boundaries. The elongated features of the scratches are characterized by a scratch elongation regularity.
Preferably, the method for acquiring the scratch slender regularity comprises the following steps:
and taking the direction from any one feature endpoint to the other feature endpoint on the first boundary and the second boundary as a sequence, and taking the included angle between the line segment between each boundary pixel point and the adjacent next boundary pixel point and the horizontal direction as the feature angle corresponding to each boundary pixel point. The purpose of calculating the characteristic angle in the embodiment of the invention is to observe the change condition of the characteristic angle, and the magnitude of the characteristic angle does not influence the subsequent analysis process, so that when the characteristic angle is obtained, an operator can also obtain the characteristic angle according to the specific implementation condition and other directions outside the horizontal direction, such as the vertical direction, and further description is omitted herein.
Based on the gray scale run matrix construction principle, substituting gray scale values for characteristic angles of boundary pixel points to obtain characteristic angle run matrices corresponding to all the boundary pixel points. The gray scale run matrix can observe the distribution characteristics of adjacent pixel points with the same gray scale value in the same direction in the dimension corresponding to the gray scale. The characteristic angle run matrix constructed based on the gray scale run matrix in the embodiment of the invention is that the distribution characteristics of the adjacent pixels with the same characteristic angle are observed through the characteristic angle run matrix, and the corresponding run direction naturally changes when the characteristic angle changes, so that the characteristic angle run matrix corresponding to the embodiment of the invention does not need to limit the same direction relative to the gray scale run matrix. In the embodiment of the invention, if the number of the adjacent pixels with the same characteristic angle is recorded as the running length, each row of the characteristic angle running matrix is the frequency that different characteristic angles correspond to the same running length; each column of the characteristic angle run matrix is the frequency of the same characteristic angle corresponding to different running lengths, and the element value of each element represents the frequency of the corresponding running length under the corresponding characteristic angle. It should be noted that, the construction of the gray scale run matrix is well known in the art, and is not further limited and described herein.
Taking the average value of the length values corresponding to all non-0 elements in the characteristic angle run-length matrix as a scratch length characteristic value, and obtaining the scratch slender regularity corresponding to the defect connected domain according to the scratch length characteristic value and the number characteristic value average value, wherein the scratch slender regularity is positively correlated with the scratch length characteristic value, and the scratch slender regularity is negatively correlated with the number characteristic value average value. Since the scratch boundary is consistent with the length direction only in the overall trend, but the characteristic angle corresponding to the detail is slightly changed in some parts, but since the overall trend is consistent, the characteristic angle continues to be changed along the corresponding pixel point after the characteristic angle is changed, so that the overall trend is consistent, and since the condition of the slight change of the characteristic angle is random, the frequency of occurrence of the corresponding run length is very small, wherein most of the values are 0, the element values corresponding to the rest non-0 elements are also usually 1, and the frequency of occurrence of the rest element values is basically negligible, therefore, the embodiment of the invention takes the average value of the length values corresponding to the non-0 elements as the characteristic value of the scratch length, namely the average value of the corresponding run length of the characteristic angle. For example, in the characteristic angle run-length matrix, if an element value corresponding to a certain non-0 element is 2, a corresponding run-length is 3, and a corresponding characteristic angle is 90 degrees, it is explained that the occurrence frequency of the run-length of 3 is 2 when the characteristic angle is 90 degrees, and when the calculation of the scratch length characteristic value is participated, the run-length of 3 corresponding to the element is calculated only once.
The length characteristics of the defect connected domain are combined while the change rule of the corresponding extending direction of the defect connected domain is represented by the characteristic value of the length of the scratch, namely, the larger the characteristic value of the length of the scratch is, the larger the significance of the scratch of the corresponding defect connected domain is. In the further embodiment of the present invention, the number distribution features, that is, the width features, of the pixel points between the boundaries are represented by the number feature value average value, and it should be noted that an implementer may also represent the number distribution features of the pixel points between the boundaries by the number feature value maximum value corresponding to the defect connected domain, which is not further described herein. Since the elongated rule of the scratch characterizes the elongated feature of the scratch, namely, the larger the elongated rule of the scratch is, the greater the scratch saliency of the corresponding defect connected domain is, namely, the more likely the scratch area is. And combining the relation among the scratch length characteristic value, the quantity characteristic value average value and the scratch significance, namely, the larger the scratch length characteristic value is, the smaller the quantity characteristic value average value is, the larger the corresponding scratch significance is, the larger the corresponding scratch slender regularity is, and the more likely the corresponding defect connected domain is a scratch. In the embodiment of the invention, a normalized value of a corresponding ratio between a scratch length characteristic value and a mean value of a quantity characteristic value is used as the scratch slender regularity of a corresponding defect connected domain.
In the embodiment of the invention, the defect connected domainThe method for obtaining the scratch slender regularity is expressed as the following formula:
wherein, the liquid crystal display device comprises a liquid crystal display device,is a defect connected domainIs characterized by the long and thin regularity of scratches,is a defect connected domainIn the characteristic angle run matrixThe run lengths corresponding to the individual non-0 elements,is a defect connected domainThe number of non-0 elements in the feature angle run matrix of (c),is a defect connected domainThe corresponding number characteristic value average value is calculated,is a defect connected domainIs characterized by the scratch length characteristic value of (a),in order to normalize the function, in the embodiment of the present invention, the normalization method adopts linear normalization, and it should be noted that an implementer may adopt other normalization methods according to specific implementation environments, and the linear normalization is a prior art well known to those skilled in the art, and is not further limited and described herein. Further according to the defect connected domainThe method for obtaining the elongated regularity of the scratches of the connected domain of other defects is used for obtaining the elongated regularity of the scratches of the connected domain of other defects.
The scratch dishing degree for representing the scratch dishing characteristics, the scratch expansion degree for representing the scratch width smaller characteristics and the scratch slender regularity for representing the scratch slender characteristics are obtained, and the scratch saliency of the defect connected domain can be comprehensively represented by further combining the scratch dishing degree, the scratch expansion degree and the scratch slender regularity. According to the embodiment of the invention, the scratch damage degree coefficient of the defect connected domain is obtained according to the scratch dishing degree, the scratch expansion degree and the scratch slender regularity. And characterizing the scratch significance of the defect connected domain by using the scratch damage degree coefficient, namely the probability that the defect connected domain is a scratch area.
Preferably, the greater the scratch dishing degree of the scratch defect connected domain is, the smaller the scratch expansion degree is, and the smaller the scratch slender regularity is, the greater the scratch significance of the corresponding defect connected domain is, so the scratch dishing degree is positively correlated with the scratch damage degree coefficient, the scratch expansion degree is negatively correlated with the scratch damage degree coefficient, and the scratch slender regularity is positively correlated with the scratch damage degree coefficient. In the embodiment of the invention, the product between the slender concave degree of the scratch and the slender regularity of the scratch is calculated, and the normalized value of the ratio between the product and the expansion degree of the scratch is used as the scratch damage degree coefficient of the corresponding defect connected domain. In addition, the implementer can obtain the scratch damage degree coefficient according to the scratch dishing degree, the scratch expansion degree and the scratch slender regularity by adopting a method according to the specific implementation environment, but the corresponding relation among parameters needs to be ensured, and further description is omitted here.
In the embodiment of the invention, the defect connected domainThe method for obtaining the scratch damage degree coefficient is expressed as follows in terms of a formula:
wherein, the liquid crystal display device comprises a liquid crystal display device,is a defect connected domainIs a scratch damage degree coefficient of (a),is a defect connected domainIs characterized by the scratch dishing degree of (2),is a defect connected domain Is characterized by the long and thin regularity of scratches,is a defect connected domainIs used for the scratch expansion of the glass substrate,in order to normalize the function, in the embodiment of the present invention, the normalization method adopts linear normalization, and it should be noted that the implementer may rootOther normalization methods are adopted according to the specific implementation environment, and linear normalization is a prior art well known to those skilled in the art, and is not further limited and described herein. Further according to the defect connected domainThe scratch damage degree coefficient of other defect connected domains is obtained by the scratch damage degree coefficient obtaining method.
In addition, the practitioner can calculate the defect connected domain through other forms of formulasScratch damage degree coefficient of (c), for example:
wherein, the liquid crystal display device comprises a liquid crystal display device,the other parameters are the exponential function based on the natural constant e, and the other parameters are the defect connected domain in the embodiment of the inventionThe corresponding formulas of the scratch damage degree coefficient acquisition method are the same, and are not further described herein.
Step S4: and screening out a real scratch area according to the scratch damage degree coefficient, and detecting the axle production quality according to the real scratch area.
And obtaining scratch damage degree coefficients corresponding to all the defect connected domains in the axle surface image, namely the probability that the defect connected domains are scratch defect areas. The true scratch area can be further screened out according to the scratch damage degree coefficient.
Preferably, the method for acquiring the real scratch area includes:
and taking the defect connected domain with the scratch damage degree coefficient larger than or equal to a preset scratch threshold value as a real scratch area. In the embodiment of the present invention, the preset scratch threshold is set to 0.8, that is, the embodiment of the present invention uses the defect connected domain with the scratch damage degree coefficient greater than or equal to 0.8 as the real scratch area. It should be noted that, the implementer can adjust the preset scratch threshold according to the specific implementation environment, which will not be further described herein.
And finally, detecting the axle production quality according to the real scratch areas.
Preferably, the axle production quality detection according to the real scratch area comprises:
counting all real scratch areas in the axle surface image, and taking the accumulated sum of the areas of all the real scratch areas as the total scratch area; when the total area of scratches is smaller than a preset scratch area threshold value and the number of real scratch areas is smaller than a preset scratch number threshold value, the axle production quality is qualified; otherwise, the axle production quality is unqualified. And when any one of the parameters of the total scratch area and the number of the real scratch areas is larger than the corresponding threshold value, the corresponding axle production quality is unqualified. In the embodiment of the invention, the preset scratch area threshold is set to 10, and the preset scratch number threshold is set to 3. It should be noted that, the implementer can adjust the preset scratch number threshold and the preset scratch area threshold according to the specific implementation environment, which will not be further described herein.
The real scratch area is the number of pixels in the corresponding real scratch area, and the method for calculating the real scratch area according to the embodiment of the invention comprises the following steps: based on the principle of image moment, calculating zero-order moment of the real scratch area according to boundary pixel points of the real scratch area, and taking a result corresponding to the zero-order moment as the area of the real scratch area. It should be noted that, the method for calculating the zero-order moment in the image moment is well known in the art, and is not further limited and described herein.
In summary, the method comprises the steps of firstly obtaining a defect connected domain in an axle surface image, obtaining a scratch depression degree according to depression characteristics of scratch defects through chromatic aberration between a bottom depression pixel point and a pixel point on a boundary of the defect connected domain, calculating scratch expansion degree of the defect connected domain according to width characteristics of the scratch, calculating scratch slender regularity of the defect connected domain according to scratch extending direction change and slender characteristics, and further combining the scratch depression degree, scratch expansion degree and scratch slender regularity. Obtaining a scratch damage degree coefficient representing the scratch saliency of the defect connected domain, and finally screening out a real scratch area according to the scratch damage degree coefficient and detecting the bridge production quality. The invention has higher identification accuracy on scratch areas and more accurate detection on axle production quality.
The invention also provides a system for rapidly detecting the axle production quality based on computer vision, which comprises a memory, a processor and a computer program which is stored in the memory and can run on the processor, wherein the processor realizes any one of the steps of the rapid axle production quality detection method based on computer vision when executing the computer program.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.

Claims (9)

1. The axle production quality rapid detection method based on computer vision is characterized by comprising the following steps of:
acquiring an axle surface image;
obtaining a defect connected domain according to gray level difference distribution characteristics in a gray level image corresponding to the axle surface image; obtaining at least two bottom concave pixel points according to the gray distribution characteristics of the pixel points in the defect connected domain and the position distribution characteristics of the pixel points on the boundary; obtaining scratch depression corresponding to the defect connected domain according to the color difference between the bottom depression pixel point and the pixel point on the boundary of the defect connected domain in the RGB image corresponding to the axle surface image;
Obtaining scratch expansion degree of the defect connected domain according to the position distribution rule of the pixel points in the defect connected domain; obtaining the scratch slender regularity of the defect connected domain according to the change rule of the extending direction of the pixel points on the boundary of the defect connected domain and the quantity distribution characteristics of the pixel points between the boundaries; obtaining a scratch damage degree coefficient of the defect connected domain according to the scratch dishing degree, the scratch expansion degree and the scratch slender regularity;
screening out a real scratch area according to the scratch damage degree coefficient, and detecting the axle production quality according to the real scratch area;
the method for acquiring the bottom concave pixel point comprises the following steps:
taking two edge pixel points farthest from the defect connected domain as characteristic end points, connecting the two characteristic end points along the boundary of the defect connected domain to obtain a first boundary and a second boundary, and determining at least two matching tuples according to the pixel point positions on the first boundary and the second boundary, wherein the matching tuples consist of a first boundary pixel point and a second boundary pixel point, and the connecting line between the first boundary pixel point and the second boundary pixel point is perpendicular to the line segment between the characteristic end points;
In the defect connected domain, a set formed by all pixel points between a first boundary pixel point and a second boundary pixel point in each matched binary group is used as an inter-boundary pixel point set corresponding to each matched binary group, and a pixel point with the minimum gray value in each inter-boundary pixel point set is used as a bottom concave pixel point.
2. The method for quickly detecting the production quality of the axle based on computer vision according to claim 1, wherein the method for acquiring the defect connected domain comprises the following steps:
and detecting the gray level image corresponding to the axle surface image by adopting an edge detection algorithm to obtain an edge image corresponding to the axle surface image, and analyzing the edge image by adopting a connected domain analysis and boundary tracking algorithm to obtain a defect connected domain in the axle surface image.
3. The method for rapidly detecting the production quality of the axle based on computer vision according to claim 1, the method for acquiring the scratch dishing degree is characterized by comprising the following steps:
optionally selecting one bottom concave pixel point as a target bottom concave pixel point, and taking a matching binary set corresponding to the target bottom concave pixel point as a target matching binary set;
In the RGB image corresponding to the axle surface image, taking Euclidean distance between a first boundary pixel point in a target matching binary set and the target bottom concave pixel point in an RGB space as a first color space difference value; the Euclidean distance between a second boundary pixel point in the target matching binary set and the target bottom concave pixel point in the RGB space is used as a second color space difference value; taking the average value between the first color space difference value and the second color space difference value as a color difference characteristic value corresponding to the concave pixel point at the bottom of the target;
changing the target bottom concave pixel points to obtain color difference characteristic values corresponding to all the bottom concave pixel points, and taking the average value of the color difference characteristic values corresponding to all the bottom concave pixel points as the scratch concave degree corresponding to the defect connected domain.
4. The method for quickly detecting the production quality of the axle based on computer vision according to claim 1, wherein the method for acquiring the scratch expansion degree comprises the following steps:
in the defect connected domain, taking the numerical value of the number of the pixel points corresponding to each boundary pixel point set as the number characteristic value corresponding to each boundary pixel point set; and taking the same quantity characteristic value as a quantity characteristic value type, calculating the quantity characteristic value average value corresponding to all the boundary pixel point sets, counting the quantity of the quantity characteristic value types, and obtaining the scratch expansion degree corresponding to the defect connected domain according to the quantity characteristic value average value and the quantity characteristic value type quantity, wherein the scratch expansion degree is positively correlated with the quantity characteristic value average value, and the scratch expansion degree is negatively correlated with the quantity characteristic value type quantity.
5. The method for quickly detecting the production quality of the axle based on computer vision according to claim 4, wherein the method for acquiring the elongated regularity of scratches comprises the following steps:
taking the direction from any one feature endpoint to the other feature endpoint on the first boundary and the second boundary as a sequence, and taking the included angle between the line segment between each boundary pixel point and the adjacent next boundary pixel point and the horizontal direction as the feature angle corresponding to each boundary pixel point; based on a gray scale run matrix construction principle, substituting gray values for characteristic angles of boundary pixel points as input to obtain characteristic angle run matrixes corresponding to all the boundary pixel points; taking the average value of the corresponding wandering lengths of all non-0 elements in the characteristic angle run-length matrix as a scratch length characteristic value, and obtaining the scratch slender regularity corresponding to the defect connected domain according to the scratch length characteristic value and the quantity characteristic value average value, wherein the scratch slender regularity is positively correlated with the scratch length characteristic value, and the scratch slender regularity is negatively correlated with the quantity characteristic value average value.
6. The method for quickly detecting the production quality of the axle based on computer vision according to claim 1, wherein the scratch dishing degree is positively correlated with the scratch damage degree coefficient, the scratch expansion degree is negatively correlated with the scratch damage degree coefficient, and the scratch slender regularity is positively correlated with the scratch damage degree coefficient.
7. The method for quickly detecting axle production quality based on computer vision according to claim 1, wherein the method for acquiring the real scratch area comprises the following steps:
and taking the defect connected domain with the scratch damage degree coefficient larger than or equal to a preset scratch threshold value as a real scratch area.
8. The method for quickly detecting axle production quality based on computer vision according to claim 1, wherein the detecting axle production quality according to the real scratch area comprises:
counting all real scratch areas in the axle surface image, and taking the accumulated sum of the areas of all the real scratch areas as the total scratch area; when the total scratch area is smaller than a preset scratch area threshold value and the number of real scratch areas is smaller than a preset scratch number threshold value, the axle production quality is qualified; otherwise, the axle production quality is unqualified.
9. A quick axle production quality detection system based on computer vision, comprising a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor implements the steps of the method according to any one of claims 1-8 when executing the computer program.
CN202310730065.0A 2023-06-20 2023-06-20 Axle production quality rapid detection method and system based on computer vision Active CN116452598B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310730065.0A CN116452598B (en) 2023-06-20 2023-06-20 Axle production quality rapid detection method and system based on computer vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310730065.0A CN116452598B (en) 2023-06-20 2023-06-20 Axle production quality rapid detection method and system based on computer vision

Publications (2)

Publication Number Publication Date
CN116452598A true CN116452598A (en) 2023-07-18
CN116452598B CN116452598B (en) 2023-08-29

Family

ID=87122390

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310730065.0A Active CN116452598B (en) 2023-06-20 2023-06-20 Axle production quality rapid detection method and system based on computer vision

Country Status (1)

Country Link
CN (1) CN116452598B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116664557A (en) * 2023-07-28 2023-08-29 无锡市明通动力工业有限公司 Visual detection method for surface defects of fan blade
CN116818830A (en) * 2023-08-29 2023-09-29 山东津庭名企建材有限公司 Thermal insulation performance detection method for low-carbon building material
CN117372436A (en) * 2023-12-08 2024-01-09 红叶风电设备(营口)有限公司 Wind power blade fault detection method based on image data
CN117455870A (en) * 2023-10-30 2024-01-26 太康精密(中山)有限公司 Connecting wire and connector quality visual detection method
CN117745724A (en) * 2024-02-20 2024-03-22 高唐县瑞景精密机械有限公司 Stone polishing processing defect region segmentation method based on visual analysis
CN117745724B (en) * 2024-02-20 2024-04-26 高唐县瑞景精密机械有限公司 Stone polishing processing defect region segmentation method based on visual analysis

Citations (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007315967A (en) * 2006-05-26 2007-12-06 Sharp Corp Defect detection apparatus, defect detection method, defect detection program, and computer-readable recording medium stored with the progtram
US20080175476A1 (en) * 2007-01-24 2008-07-24 Samsung Electronics Co., Ltd. Apparatus and method of segmenting an image and/or receiving a signal representing the segmented image in an image coding and/or decoding system
CN103345632A (en) * 2013-06-25 2013-10-09 宁波成电泰克电子信息技术发展有限公司 Method for detecting surface scratch defects of battery tail end
WO2017006314A1 (en) * 2015-07-05 2017-01-12 THE WHOLLYSEE.Ltd. Optical identification and characterization system and tagss
CN109454006A (en) * 2018-10-08 2019-03-12 杭州慧知连科技有限公司 Chemical fiber wire ingot is stumbled the device and its detection stage division of a defect on-line checking and classification
CN209708175U (en) * 2019-03-27 2019-11-29 仲恺农业工程学院 A kind of reservoir dam slope protection surface damage vision-based detection bionic device
WO2020133046A1 (en) * 2018-12-27 2020-07-02 深圳配天智能技术研究院有限公司 Defect detection method and device
US20200271591A1 (en) * 2019-02-26 2020-08-27 Aaron C. Havener Apparatus and method for inspection of a film on a substrate
CN111833324A (en) * 2020-07-09 2020-10-27 中国计量大学 Optical fiber ferrule defect detection method based on deep learning
CN111882541A (en) * 2020-07-28 2020-11-03 广州柔视智能科技有限公司 Defect detection method, device, equipment and computer readable storage medium
CN111951237A (en) * 2020-08-04 2020-11-17 上海微亿智造科技有限公司 Visual appearance detection method
CN113139927A (en) * 2020-01-02 2021-07-20 深圳怡化电脑股份有限公司 Banknote crack detection method, device, equipment and readable medium
WO2021166161A1 (en) * 2020-02-20 2021-08-26 株式会社日立ハイテク Defect inspection system, defect inspection method, and method for creating teacher data
WO2022065621A1 (en) * 2020-09-28 2022-03-31 (주)미래융합정보기술 Vision inspection system using distance learning of product defect image
CN114897853A (en) * 2022-05-23 2022-08-12 长江存储科技有限责任公司 Detection method and detection device for wafer and storage medium
CN115063422A (en) * 2022-08-18 2022-09-16 建首(山东)钢材加工有限公司 Intelligent detection method for container welding quality
CN115184359A (en) * 2022-06-01 2022-10-14 贵州开放大学(贵州职业技术学院) Surface defect detection system and method capable of automatically adjusting parameters
WO2022236064A2 (en) * 2021-05-06 2022-11-10 Strong Force Iot Portfolio 2016, Llc Quantum, biological, computer vision, and neural network systems for industrial internet of things
CN115398214A (en) * 2020-02-05 2022-11-25 斯玛特克斯欧洲一人有限公司 System and method for defect detection
CN115639200A (en) * 2022-09-21 2023-01-24 广州超音速自动化科技股份有限公司 Battery cell appearance defect detection equipment and method
CN115760805A (en) * 2022-11-24 2023-03-07 中山大学 Positioning method for processing surface depression of element based on visual touch sense
CN115953398A (en) * 2023-03-13 2023-04-11 无锡斯达新能源科技股份有限公司 Defect identification method for strip steel surface
US20230152781A1 (en) * 2021-11-15 2023-05-18 MIRAE CIT Inc. Manufacturing intelligence service system connected to mes in smart factory

Patent Citations (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007315967A (en) * 2006-05-26 2007-12-06 Sharp Corp Defect detection apparatus, defect detection method, defect detection program, and computer-readable recording medium stored with the progtram
US20080175476A1 (en) * 2007-01-24 2008-07-24 Samsung Electronics Co., Ltd. Apparatus and method of segmenting an image and/or receiving a signal representing the segmented image in an image coding and/or decoding system
CN103345632A (en) * 2013-06-25 2013-10-09 宁波成电泰克电子信息技术发展有限公司 Method for detecting surface scratch defects of battery tail end
WO2017006314A1 (en) * 2015-07-05 2017-01-12 THE WHOLLYSEE.Ltd. Optical identification and characterization system and tagss
CN109454006A (en) * 2018-10-08 2019-03-12 杭州慧知连科技有限公司 Chemical fiber wire ingot is stumbled the device and its detection stage division of a defect on-line checking and classification
WO2020133046A1 (en) * 2018-12-27 2020-07-02 深圳配天智能技术研究院有限公司 Defect detection method and device
US20200271591A1 (en) * 2019-02-26 2020-08-27 Aaron C. Havener Apparatus and method for inspection of a film on a substrate
CN209708175U (en) * 2019-03-27 2019-11-29 仲恺农业工程学院 A kind of reservoir dam slope protection surface damage vision-based detection bionic device
CN113139927A (en) * 2020-01-02 2021-07-20 深圳怡化电脑股份有限公司 Banknote crack detection method, device, equipment and readable medium
CN115398214A (en) * 2020-02-05 2022-11-25 斯玛特克斯欧洲一人有限公司 System and method for defect detection
WO2021166161A1 (en) * 2020-02-20 2021-08-26 株式会社日立ハイテク Defect inspection system, defect inspection method, and method for creating teacher data
CN111833324A (en) * 2020-07-09 2020-10-27 中国计量大学 Optical fiber ferrule defect detection method based on deep learning
CN111882541A (en) * 2020-07-28 2020-11-03 广州柔视智能科技有限公司 Defect detection method, device, equipment and computer readable storage medium
CN111951237A (en) * 2020-08-04 2020-11-17 上海微亿智造科技有限公司 Visual appearance detection method
WO2022065621A1 (en) * 2020-09-28 2022-03-31 (주)미래융합정보기술 Vision inspection system using distance learning of product defect image
WO2022236064A2 (en) * 2021-05-06 2022-11-10 Strong Force Iot Portfolio 2016, Llc Quantum, biological, computer vision, and neural network systems for industrial internet of things
US20230152781A1 (en) * 2021-11-15 2023-05-18 MIRAE CIT Inc. Manufacturing intelligence service system connected to mes in smart factory
CN114897853A (en) * 2022-05-23 2022-08-12 长江存储科技有限责任公司 Detection method and detection device for wafer and storage medium
CN115184359A (en) * 2022-06-01 2022-10-14 贵州开放大学(贵州职业技术学院) Surface defect detection system and method capable of automatically adjusting parameters
CN115063422A (en) * 2022-08-18 2022-09-16 建首(山东)钢材加工有限公司 Intelligent detection method for container welding quality
CN115639200A (en) * 2022-09-21 2023-01-24 广州超音速自动化科技股份有限公司 Battery cell appearance defect detection equipment and method
CN115760805A (en) * 2022-11-24 2023-03-07 中山大学 Positioning method for processing surface depression of element based on visual touch sense
CN115953398A (en) * 2023-03-13 2023-04-11 无锡斯达新能源科技股份有限公司 Defect identification method for strip steel surface

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
CHUNYUAN SHI: "Computer Vision-Based Grasp Pattern Recognition With Application to Myoelectric Control of Dexterous Hand Prosthesis", 《IEEE TRANSACTIONS ON NEURAL SYSTEMS AND REHABILITATION ENGINEERING》 *
檀甫贵;邹复民;刘丽桑;李建兴;: "基于机器视觉的软包锂电池表面缺陷检测", 福建工程学院学报, no. 03 *
陈麒麟: "阀板表面缺陷视觉检测技术研究", 《 中国优秀硕士论文电子期刊网》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116664557A (en) * 2023-07-28 2023-08-29 无锡市明通动力工业有限公司 Visual detection method for surface defects of fan blade
CN116664557B (en) * 2023-07-28 2023-09-22 无锡市明通动力工业有限公司 Visual detection method for surface defects of fan blade
CN116818830A (en) * 2023-08-29 2023-09-29 山东津庭名企建材有限公司 Thermal insulation performance detection method for low-carbon building material
CN116818830B (en) * 2023-08-29 2023-12-01 山东津庭名企建材有限公司 Thermal insulation performance detection method for low-carbon building material
CN117455870A (en) * 2023-10-30 2024-01-26 太康精密(中山)有限公司 Connecting wire and connector quality visual detection method
CN117455870B (en) * 2023-10-30 2024-04-16 太康精密(中山)有限公司 Connecting wire and connector quality visual detection method
CN117372436A (en) * 2023-12-08 2024-01-09 红叶风电设备(营口)有限公司 Wind power blade fault detection method based on image data
CN117372436B (en) * 2023-12-08 2024-02-13 红叶风电设备(营口)有限公司 Wind power blade fault detection method based on image data
CN117745724A (en) * 2024-02-20 2024-03-22 高唐县瑞景精密机械有限公司 Stone polishing processing defect region segmentation method based on visual analysis
CN117745724B (en) * 2024-02-20 2024-04-26 高唐县瑞景精密机械有限公司 Stone polishing processing defect region segmentation method based on visual analysis

Also Published As

Publication number Publication date
CN116452598B (en) 2023-08-29

Similar Documents

Publication Publication Date Title
CN116452598B (en) Axle production quality rapid detection method and system based on computer vision
CN108629775B (en) Thermal state high-speed wire rod surface image processing method
CN108876768B (en) Shadow defect detection method for light guide plate
CN116645367B (en) Steel plate cutting quality detection method for high-end manufacturing
CN117173189A (en) Visual inspection system for polishing effect of aluminum alloy surface
CN115619793B (en) Power adapter appearance quality detection method based on computer vision
CN116228768B (en) Method for detecting scratches on surface of electronic component
CN116309537A (en) Defect detection method for oil stain on surface of tab die
CN114998198A (en) Injection molding surface defect identification method
CN113781446B (en) Method and device for detecting greasy dirt on glass fiber surface, storage medium and electronic equipment
CN116152242B (en) Visual detection system of natural leather defect for basketball
CN116883408B (en) Integrating instrument shell defect detection method based on artificial intelligence
CN116091499A (en) Abnormal paint production identification system
CN116416252B (en) Method for detecting sedimentation image of wastewater in boehmite production process
CN115131359A (en) Method for detecting pitting defects on surface of metal workpiece
CN114612345A (en) Light source detection method based on image processing
CN114549441A (en) Sucker defect detection method based on image processing
CN115861320A (en) Intelligent detection method for automobile part machining information
CN115346126A (en) Side slope crack identification method
CN112200808A (en) Strip steel surface defect detection method based on local Gini coefficient
CN116883412B (en) Graphene far infrared electric heating equipment fault detection method
CN116612112B (en) Visual inspection method for surface defects of bucket
CN116402810B (en) Image processing-based lubricating oil anti-abrasive particle quality detection method
CN115511814A (en) Image quality evaluation method based on region-of-interest multi-texture feature fusion
CN114332079A (en) Plastic lunch box crack detection method, device and medium based on image processing

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