CN114638833B - Non-ferrous metal calendering quality detection method and system based on machine vision - Google Patents
Non-ferrous metal calendering quality detection method and system based on machine vision Download PDFInfo
- Publication number
- CN114638833B CN114638833B CN202210548501.8A CN202210548501A CN114638833B CN 114638833 B CN114638833 B CN 114638833B CN 202210548501 A CN202210548501 A CN 202210548501A CN 114638833 B CN114638833 B CN 114638833B
- Authority
- CN
- China
- Prior art keywords
- defect
- gray
- scratch
- binary image
- branch path
- 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
Links
- 239000002184 metal Substances 0.000 title claims abstract description 73
- 229910052751 metal Inorganic materials 0.000 title claims abstract description 73
- 238000001514 detection method Methods 0.000 title claims description 14
- 238000003490 calendering Methods 0.000 title description 3
- 230000007547 defect Effects 0.000 claims abstract description 248
- CWYNVVGOOAEACU-UHFFFAOYSA-N Fe2+ Chemical compound [Fe+2] CWYNVVGOOAEACU-UHFFFAOYSA-N 0.000 claims abstract description 53
- 108091026890 Coding region Proteins 0.000 claims abstract description 38
- 238000005096 rolling process Methods 0.000 claims abstract description 32
- 238000004898 kneading Methods 0.000 claims abstract description 28
- 230000006378 damage Effects 0.000 claims abstract description 21
- 238000000034 method Methods 0.000 claims abstract description 17
- 230000011218 segmentation Effects 0.000 claims abstract description 7
- 230000002950 deficient Effects 0.000 claims description 28
- 239000011159 matrix material Substances 0.000 claims description 27
- 208000027418 Wounds and injury Diseases 0.000 claims description 11
- 208000014674 injury Diseases 0.000 claims description 11
- 238000004364 calculation method Methods 0.000 claims description 9
- 230000008569 process Effects 0.000 claims description 4
- 238000003908 quality control method Methods 0.000 abstract description 2
- 150000002739 metals Chemical class 0.000 abstract 1
- 238000004519 manufacturing process Methods 0.000 description 5
- -1 ferrous metals Chemical class 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 244000145845 chattering Species 0.000 description 3
- 239000000470 constituent Substances 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000003708 edge detection Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000013441 quality evaluation Methods 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30136—Metal
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
Abstract
The invention relates to the technical field of machine vision, in particular to a method and a system for detecting the rolling quality of nonferrous metals based on machine vision, which comprises the following steps: acquiring a surface image of a rolled finished product of the nonferrous metal to obtain a gray image of the surface image, and performing threshold segmentation on the gray image to obtain a defect texture binary image; determining a gray extension direction search tree of each defect point to obtain an encoding sequence of each branch path of the gray extension direction search tree; and calculating the confidence sequence of each element in the coding sequence of each branch path, and further calculating the component proportion of scratches, kneading injuries and vibration marks in the defect texture binary image, thereby obtaining the defect components of the non-ferrous metal rolled finished product. The invention can accurately obtain the defect components of the rolled non-ferrous metal finished product by detecting the rolled non-ferrous metal finished product, and provides reliable basis for the subsequent quality control of the rolled non-ferrous metal finished product.
Description
Technical Field
The invention relates to the technical field of machine vision, in particular to a method and a system for detecting the rolling quality of non-ferrous metal based on machine vision.
Background
With the rapid advance of modern chemical industry, agriculture and scientific technology, the position of non-ferrous metals in human development is more and more important. The nonferrous metal is not only important strategic material and production data in the world, but also important material of consumption data indispensable in human life.
The rolling process of nonferrous metal is the most widely applied one in the modern nonferrous metal processing process, and has some product quality defects. The appearance quality of a rolled product is a main quality evaluation criterion, and if an appearance defect is present, the value of the rolled product is greatly affected, and the defect which appears most frequently and commonly in the appearance quality is a surface mark. The surface traces are represented by various thin linear traces with different directions and different gloss on the metal surface, wherein three of the traces are surface scratches, surface scratches and surface vibration marks, the gloss characteristics of the traces are all high-brightness linear traces, and the traces have respective differences in the trace directions. In complex practical production conditions, surface scratches and surface chatter marks can occur in a mixed manner on the surface of the rolled product, i.e. simultaneously.
In the prior art, the method for detecting the surface defects of the rolled finished products of the non-ferrous metals is generally canny edge detection or Hough line detection, but the two methods can only detect the general defects, can not detect the surface defect components of the rolled finished products of the non-ferrous metals, and are not suitable for the complex working conditions in the rolling production of the non-ferrous metals.
Disclosure of Invention
The invention aims to provide a non-ferrous metal rolling quality detection method and system based on machine vision, which are used for solving the problem that the surface defect components of a rolled finished product of non-ferrous metal cannot be detected.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
the invention provides a non-ferrous metal rolling quality detection method based on machine vision, which comprises the following steps:
acquiring a surface image of a rolled finished product of the nonferrous metal to obtain a gray image of the surface image, and performing threshold segmentation on the gray image to obtain a defect texture binary image;
determining a gray extension direction search tree of each defective point according to each defective point in the defective texture binary image to obtain an encoding sequence of each branch path of the gray extension direction search tree;
searching coding sequences of all branch paths of the tree according to the gray extension direction, and calculating confidence sequences of all elements in the coding sequences of all branch paths to obtain a direction extension co-occurrence matrix of all defect points;
extending the symbiotic matrix according to the direction of each defect point, and calculating the probability value of each defect point belonging to scratch, kneading and vibration mark;
and calculating the component proportion of the scratch, the kneading damage and the vibration mark in the defect texture binary image according to the probability value of the scratch, the kneading damage and the vibration mark belonging to each defect point, thereby obtaining the defect component of the non-ferrous metal rolled finished product.
Further, the step of determining the gray extension direction search tree of each defect point comprises:
determining an initial point of an extension path in each defective point according to each defective point in the defective texture binary image, and judging whether pixel points in eight neighborhoods around the initial point of extension are defective points or not;
if the pixel points of the eight neighborhoods around the starting point of the extended path are defect points, taking the defect points as path nodes, determining target pixel points of the eight neighborhoods around the path nodes, continuously judging the target pixel points of the eight neighborhoods around the path nodes, if the target pixel points of the eight neighborhoods around the path nodes are defect points, taking the defect points as the path nodes, and repeating the steps until the target pixel points of the eight neighborhoods around the path nodes are not defect points, thereby obtaining various paths of the starting point of the extended path;
and determining the gray extension direction search tree of each defect point according to various paths of the starting point of the extension path.
Further, the step of obtaining the code sequence of each branch path of the gray extension direction search tree comprises:
searching the tree according to the gray extension direction of each defect point, and acquiring each branch path of the search tree in the gray extension direction of each defect point;
and coding each branch path of the gray extension direction search tree, and combining the codes of each branch path of the gray extension direction search tree to obtain the code sequence of each branch path of the gray extension direction search tree.
Further, the calculation formula of the confidence sequence of each element in the coding sequence of each branch path is as follows:
wherein,for each branch path in the code sequenceThe confidence level of each of the elements is,is the sum of all element coefficients in the coding sequence of the respective branch path,for the corresponding front of the code sequence of each branch pathThe sum of the coefficients of the individual elements,。
further, the step of obtaining the direction extension co-occurrence matrix of each defect point comprises:
searching the confidence sequence of each element in the coding sequence of each branch path of the tree according to the gray extension direction, and grading the confidence of each element in the coding sequence of each branch path to obtain each level of the confidence of the element corresponding to the coding sequence of each branch path;
searching the coding sequence of each branch path of the tree according to the gray extension direction, and acquiring elements of each branch path of the search tree in the gray extension direction;
and searching each level of the confidence degree of the corresponding element of the coding sequence of each branch path of the tree and the element of each branch path according to the gray extension direction to obtain the direction extension co-occurrence matrix of each defect point.
Further, the probability value of each defect point belonging to the scratch, the rolling damage and the vibration mark is calculated by the following formula:
wherein,is composed ofThe defect point belongs to the probability value of the scratch,is composed ofThe defect point belongs to the probability value of the kneading injury,is composed ofThe defect point at (a) belongs to the probability value of the chatter mark,for the confidence level of each defective dot,is composed ofIn a direction extending co-occurrence matrix of defect pointsThe value of the element(s) at (a),is composed ofIn a direction extending co-occurrence matrix of defect pointsThe value of the element(s) at (a),is composed ofIn a co-existing matrix extending in the direction of the defective spotThe value of the element(s) at (a),for the first element on the branch path,for the second element on the branch path,is the third element on the branch path,is the fourth element on the branch path.
Further, the calculation formula of the component proportion of the scratch, the rubbing and the vibration mark in the defect texture binary image is as follows:
wherein,composition of scratch in binary image of defect textureThe ratio of the water to the oil,the proportion of the components of the kneading injury in the defect texture binary image,the component proportion of the vibration marks in the defect texture binary image,for the total number of defective points in the defective texture binary image,the probability values of all defect points belonging to the scratch in the defect texture binary image,the probability values of all defect points belonging to the scratch in the defect texture binary image,the probability values of all defect points belonging to the chattering marks in the defect texture binary image are obtained.
Further, the step of obtaining the defect components of the rolled finished nonferrous metal product comprises the following steps:
according to the component proportion of the scratch, the rubbing and the vibration mark in the defect texture binary image, if the component proportion of the scratch in the defect texture binary image is more than or equal to the sum of the component proportion of the rubbing and the vibration mark, the defect component of the non-ferrous metal rolled finished product is the scratch;
if the proportion of the components for the scratch and the vibration mark in the defect texture binary image is greater than or equal to the sum of the proportions of the components for the scratch and the vibration mark, the defect components of the non-ferrous metal rolled finished product are the scratch;
if the ratio of vibration mark components in the defect texture binary image is greater than or equal to the sum of the ratios of scratch components and rub components, the defect components of the non-ferrous metal rolled finished product are vibration marks;
and if the component proportion of one of the scratch, the rubbing and the vibration mark in the defect texture binary image is less than the sum of the remaining two component proportions, the defect components of the non-ferrous metal rolled finished product are the scratch, the rubbing and the vibration mark.
The invention also provides a non-ferrous metal rolling quality detection system based on machine vision, which comprises a processor and a memory, wherein the processor is used for processing instructions stored in the memory to realize the non-ferrous metal rolling quality detection method based on machine vision.
The invention has the following beneficial effects:
the method comprises the steps of obtaining a surface image of a rolled non-ferrous metal finished product, obtaining a gray level image of the surface image, carrying out threshold segmentation on the gray level image, obtaining a defect texture binary image, determining a gray level extending direction search tree of each defect point, determining the gray level extending direction search tree according to texture characteristics of the defect point, obtaining a coding sequence of each branch path of the gray level extending direction search tree, calculating a confidence sequence of each element in the coding sequence of each branch path, obtaining a direction extending symbiotic matrix of each defect point, calculating a probability value of each defect point belonging to scratch, kneading and chatter marks, obtaining a probability value of each defect point belonging to scratch, kneading and chatter marks, calculating component proportions of the scratch, kneading and chatter marks in the defect texture binary image, and further obtaining defect components of the rolled non-ferrous metal finished product. According to the method, the component proportion of scratches, scratches and vibration marks in the defect texture binary image is obtained by analyzing the texture characteristics around each defect point, the defect components of the rolled non-ferrous metal finished product are accurately obtained, and a reliable basis is provided for the subsequent quality control of the rolled non-ferrous metal finished product.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of the steps of the method for detecting the rolling quality of nonferrous metal based on machine vision of the invention;
FIG. 2 is a schematic diagram of a defect texture binary image according to the present invention;
FIG. 3 is a schematic diagram of a gray extension search tree according to the present invention;
FIG. 4 is a schematic view of a directionally extending co-occurrence matrix of the present invention.
Detailed Description
To further explain the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description of the embodiments, structures, features and effects of the technical solutions according to the present invention will be given with reference to the accompanying drawings and preferred embodiments. In the following description, the different references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
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 specific scheme of the non-ferrous metal rolling quality detection method and system based on machine vision is described in detail below with reference to the accompanying drawings.
Referring to fig. 1, a flow chart of the steps of a method for detecting the rolling quality of non-ferrous metal based on machine vision according to an embodiment of the present invention is shown, the method includes the following steps:
step 1: and acquiring a surface image of the rolled non-ferrous metal finished product, acquiring a gray image of the surface image, and performing threshold segmentation on the gray image to acquire a defect texture binary image.
Set up the camera at the shipment mouth of non ferrous metal calendering finished product assembly line, roll the finished product to non ferrous metal and shoot, need explain that because there is strict demand to the angle of camera in this embodiment, the angle of camera is fixed angle all the time at the in-process of shooting. Because the image shot by the camera comprises the surface image and the background image of the rolled nonferrous metal finished product, the image of the rolled nonferrous metal finished product is extracted, and further the surface image of the rolled nonferrous metal finished product is obtained. And converting the surface image of the rolled non-ferrous metal finished product into a gray image according to the surface image of the rolled non-ferrous metal finished product, thereby obtaining the gray image of the rolled non-ferrous metal finished product. Acquiring a gray histogram of a gray image of a rolled finished product of the nonferrous metal according to the gray image, performing threshold segmentation otsu based on the gray histogram on the gray image, acquiring a highlight part in the gray image after threshold segmentation, setting pixel points of the highlight part in the gray image to be 1, and setting the rest pixel points to be 0, and acquiring a defect texture binary image. And if the defect points in the defect texture binary image account for less than 10% of the whole image, judging the defect texture binary image as a qualified product image, and if the defect points in the defect texture binary image account for more than 10% of the whole image, judging the defect texture binary image as an unqualified product image, and further analyzing the unqualified product image.
Step 2: and determining a gray extension direction search tree of each defective point according to each defective point in the defective texture binary image to obtain an encoding sequence of each branch path of the gray extension direction search tree.
Because the gray features of three defect components forming the defect are all high brightness, the shape features are all scratch shapes which are approximate to straight lines, and only the directions of the scratch shapes are different, for each defect point in the defect texture binary image, the defect point is taken as a root node of a tree, and an extension path of the defect point is searched for by an outer layer, the method comprises the following specific steps:
(2-1) determining an extension path starting point in each defect point according to each defect point in the defect texture binary image, and judging whether pixel points in eight neighborhoods around the extension starting point are defect points or not.
According to each defect point in the defect texture binary image, one defect point is used as an extended path starting point, for example, a central defect point is selected from the defect texture binary image as an extended path starting point, the defect point is firstly searched in eight neighborhoods around the extended path starting point, and whether pixel points in the eight neighborhoods around the extended starting point are defect points or not is judged.
(2-2) if the pixel points of the eight neighborhoods around the initial point of the extension path are defect points, taking the defect points as path nodes, determining target pixel points of the eight neighborhoods around the path nodes, continuously judging the target pixel points of the eight neighborhoods around the path nodes, taking the defect points as the path nodes if the target pixel points of the eight neighborhoods around the path nodes are defect points, repeating the steps until the target pixel points of the eight neighborhoods around the path nodes are not defect points, and thus obtaining various paths of the initial point of the extension path.
Searching for a defect point in eight neighborhoods around the starting point of the extended path, if the defect point is searched in the eight neighborhoods around the starting point of the extended path, using the searched defect point as a path node, searching for target pixel points in the eight neighborhoods around the path node, wherein the target pixel points do not contain the starting point of the extended path and the searched path node, if the target pixel points in the eight neighborhoods around the path node are defect points, using the defect point as a path node, continuing searching for the defect point in the eight neighborhoods around the path node until the eight neighborhoods around the searched path node have no defect points, and stopping searching for the path to obtain various paths of the starting point of the extended path. As shown in fig. 2, 6 paths are searched in twenty-four neighborhoods of the central defect point, and then, for any defect point in the defect texture binary image, a plurality of paths can be obtained by taking the defect point as the starting point of the extended path.
And (2-3) determining a gray extension direction search tree of each defect point according to various paths extending from the starting point of the path.
According to various paths of the starting point of the extended path, each step of forming the path is a direction, namely a path node from the starting point of the extended path to eight neighborhoods around the extended path is a direction, the directions are divided into four radial directions, and the four radial directions are obtained by taking the rolling direction as a reference directionIt should be noted that two opposite directions on the same straight line are directed toA radial direction, i.e. the relative relationship between all adjacent path nodes, can be expressed by these four radial directions, taking the path of the defect texture binary image as shown in fig. 2 as an example, to construct a gray extension direction search tree, as shown in fig. 3, and determine the gray extension direction search tree of each defect point.
And (2-4) obtaining each branch path of the search tree in the gray extension direction of each defect point according to the search tree in the gray extension direction of each defect point.
Since the search tree of gray extension direction is composed of branch paths, the branch paths of the search tree of gray extension direction can be obtained according to the search tree of gray extension direction. For each defect point in the defect texture binary image, the search tree corresponds to a gray extension direction, and one gray extension direction search tree represents all paths taking one defect point as an extension path starting point.
And (2-5) coding each branch path of the gray extension direction search tree, and combining the codes of each branch path of the gray extension direction search tree to obtain the code sequence of each branch path of the gray extension direction search tree.
Taking the gray extending direction search tree shown in fig. 3 as an example, which has 6 branch paths in total, six branch paths representing the gray extending direction search tree are encoded, starting from the root node of the gray extending direction search tree to the next path node, and taking the value on the connecting line of the root node and the previous path node as a coefficient, the gray extending direction search tree will be divided into four pathsRespectively corresponding to A, B, C, D. Then, as shown in fig. 3, the gray extension direction search tree has the following corresponding path encoding sequence from left to right:
merging the codes of each path to obtain a merged code sequence:
and combining the codes of all branch paths of the gray extension direction search tree to obtain the code sequence of all branch paths of the gray extension direction search tree.
And step 3: and searching the coding sequence of each branch path of the tree according to the gray extension direction, and calculating the confidence sequence of each element in the coding sequence of each branch path to obtain the direction extension co-occurrence matrix of each defect point.
Searching a coding sequence corresponding to a branch path of the tree according to the gray extension direction, wherein the length of the sequence is the sum of each coefficient, and then distributing confidence coefficients to each element of the sequence according to the sum of the coefficients, specifically:
take the code sequence of one branch path of the search tree in the gray extension direction as an example:
for the above-mentioned coding sequenceWhich indicates the second one corresponding to the defect point in the defect texture binary imageIn a sequence encoding branch pathsThe number of the elements is one,indicating the sequence numbers of its elements.
The confidence corresponding to a branch path coding sequence corresponding to the defect point in the defect texture binary image is represented as follows:
in order to clearly explain the way of calculating the confidence sequence, this embodiment re-enumerates the code sequence of a branch path corresponding to the gray extension direction search tree of the defect point in the defect texture binary image:
the calculation formula of the confidence sequence of each element in the coding sequence of the branch path is:
wherein,is the first in the coding sequence of the branch pathThe confidence of the individual elements is calculated,is the sum of all element coefficients in the coding sequence of the branch path,corresponding to the coding sequence of the branch pathThe sum of the coefficients of the individual elements,。
obtaining a confidence sequence of each element in the branch path coding sequence corresponding to the defect point in the enumerated defect texture binary image:
thus, a branch path coding sequence and a confidence sequence of the corresponding element are obtained. The confidence sequences of the respective branch path encoding sequences and their corresponding elements may be obtained according to the method described above.
And (3-1) searching the confidence sequence of each element in the coding sequence of each branch path of the tree according to the gray extension direction, and grading the confidence of each element in the coding sequence of each branch path to obtain each level of the confidence of the corresponding element of the coding sequence of each branch path.
Searching the confidence sequence of each element in the coding sequence of each branch path of the tree according to the gray extension direction, wherein the range of the confidence is [0,1 ]]Then, divide it into ten levels of 1,2,3, ·, 10, which correspond to confidence level ranges [0,0.1 ] respectively],(0.1,0.2],…,(0.9,1]Ten confidence value intervals. The confidence sequence of each element in a branch path coding sequence corresponding to the defect point in the defect texture binary imageFor example, a confidence level of 10 corresponds to a confidence of 1, a confidence level of 7 corresponds to a confidence of 0.7, a confidence level of 5 corresponds to a confidence of 0.5, a confidence level of 4 corresponds to a confidence of 0.4, a confidence level of 3 corresponds to a confidence of 0.3, and a confidence level of 1 corresponds to a confidence of 0.1.
And (3-2) obtaining elements of each branch path of the search tree in the gray extension direction according to the coding sequence of each branch path of the search tree in the gray extension direction.
Coding sequence of a branch path corresponding to the defect point in the defect texture binary imageFor example, the elements D, a, C, a, B, D of the branch paths of the gray extension direction search tree are obtained, and since the meaning of the element is the path direction of the branch paths constituting the gray extension direction search tree, the element is divided into a, B, C, D in different directions, it should be noted that in this embodiment, the element B and the element D are combined and regarded as the same type. The elements of a branch path of the gray extension direction search tree are obtained.
And (3-3) searching each level of the confidence degree of the corresponding element of the coding sequence of each branch path of the tree and the element of each branch path according to the gray extension direction to obtain a direction extension co-occurrence matrix of each defect point.
According to the step (3-1) in the step (3), obtaining each level of confidence of corresponding elements of the coding sequence of the multiple branch paths of the search tree in the gray extension direction, according to the step (3-2) in the step (3), obtaining elements of the multiple branch paths of the search tree in the gray extension direction, and constructing a direction extension co-occurrence matrix of the defect point, as shown in fig. 4. For one of the positions in the direction-extending co-occurrence matrix, which corresponds to a confidence level, and an element of one of the branches of a gray-extending direction search tree, the value in the position is a coefficient of the element of one of the branches of a gray-extending direction search tree.
And 4, step 4: and (4) extending the symbiotic matrix according to the direction of each defect point, and calculating the probability value of the scratch, the kneading injury and the vibration mark of each defect point.
In the rolling process of the non-ferrous metal, three defects commonly existing in the rolling process of the non-ferrous metal are surface scratch, surface rubbing and surface vibration mark respectively, wherein the surface scratch is caused by the contact of rolling equipment in the rolling process and is represented as high bright mark parallel to the rolling direction, namely an element A, the surface rubbing is generated by the friction between overlapped plates and is represented as high bright mark with different directions, namely an element B and an element D, and the surface vibration mark is formed by the friction between a rolling roller and the surface of the non-ferrous metal when the rolling roller vibrates and is perpendicular to the rolling direction, namely an element C. The specific steps for acquiring the probability values of the scratch, the kneading damage and the vibration mark of each defect point are as follows:
and extending the co-occurrence matrix according to the direction of each defect point to obtain the confidence level in the direction extending co-occurrence matrix of each defect point and the coefficient sum of the constituent elements. Calculating the probability value of each defect point belonging to scratch, kneading damage and vibration mark according to the confidence level in the direction extension symbiotic matrix of each defect point and the sum of coefficients of the constituent elements, wherein the calculation formula of the probability value of each defect point belonging to scratch, kneading damage and vibration mark is as follows:
wherein,is composed ofThe defect point at (a) belongs to the probability value of the scratch,is composed ofThe defect point belongs to the probability value of the kneading injury,is composed ofThe defect point at (a) belongs to the probability value of the chatter mark,for the confidence level of each defective dot,is composed ofIn a direction extending co-occurrence matrix of defect pointsThe value of the element(s) at (a),is composed ofIn a direction extending co-occurrence matrix of defect pointsThe value of the element(s) at (a),is composed ofIn a direction extending co-occurrence matrix of defect pointsThe value of the element(s) of (b),for the first element on the branch path,for the second element on the branch path,for the third element on the branch path,is the fourth element on the branch path. And calculating probability values of scratches, scratches and vibration marks for each defect point in the defect texture binary image to obtain the probability values of the scratches, the scratches and the vibration marks corresponding to each defect point.
And 5: and calculating the component proportion of the scratch, the kneading and the vibration marks in the defect texture binary image according to the probability value of the scratch, the kneading and the vibration marks of each defect point, and further obtaining the defect components of the non-ferrous metal rolled finished product.
According to the step (4), obtaining probability values of scratches, kneading injuries and vibration marks of each defect point, and calculating component proportions of the scratches, the kneading injuries and the vibration marks in the defect texture binary image, wherein a calculation formula of the component proportions of the scratches, the kneading injuries and the vibration marks in the defect texture binary image is as follows:
wherein,the proportion of the components of the scratch in the defect texture binary image,the proportion of the components of the kneading injury in the defect texture binary image,the composition ratio of the chattering marks in the defect texture binary image,for the total number of defective points in the defective texture binary image,the probability values of all defect points belonging to the scratch in the defect texture binary image,is the probability value of all defect points belonging to the kneading injury in the defect texture binary image,the probability values of all defect points belonging to the chattering marks in the defect texture binary image are obtained.
And obtaining the component ratios of scratches, scratches and vibration marks in the defect texture binary image through the calculation process.
(5-1) according to the component proportion of the scratch, the rubbing scratch and the chatter mark in the defect texture binary image, if the component proportion of the scratch in the defect texture binary image is more than or equal to the sum of the component proportion of the rubbing scratch and the chatter mark, the defect component of the non-ferrous metal rolled finished product is the scratch.
According to the component proportion of the scratch, the rubbing and the vibration mark in the defect texture binary image, if the scratch component in the defect texture binary image is 50%, the sum of the component proportion of the rubbing and the vibration mark in the defect texture binary image is 50%, and the scratch component proportion in the defect texture binary image is equal to the sum of the component proportion of the rubbing and the vibration mark, the defect component in the defect texture binary image is the scratch, and further the defect component of the non-ferrous metal rolled finished product is the scratch.
(5-2) if the proportion of the components of the scratch and the vibration mark in the defect texture binary image is more than or equal to the sum of the proportions of the components of the scratch and the vibration mark, the defect components of the non-ferrous metal rolled finished product are the scratch.
According to the component proportion of the scratch, the rubbing and the vibration mark in the defect texture binary image, if the rubbing component proportion in the defect texture binary image is 64 percent, the sum of the component proportion of the scratch and the vibration mark in the defect texture binary image is 36 percent, and the rubbing component proportion in the defect texture binary image is greater than the sum of the component proportion of the scratch and the vibration mark, the defect component in the defect texture binary image is the rubbing, and further the defect component of the non-ferrous metal rolled finished product is the rubbing.
(5-3) if the ratio of the vibration mark components in the defect texture binary image is more than or equal to the sum of the ratios of the scratch components and the rubbing components, the defect components of the rolled non-ferrous metal finished product are vibration marks.
According to the component proportion of the scratch, the rubbing and the chatter marks in the defect texture binary image, if the chatter mark component in the defect texture binary image is 88 percent, the sum of the scratch component proportion and the rubbing component proportion in the defect texture binary image is 12 percent, and the chatter mark component proportion in the defect texture binary image is greater than the sum of the scratch component proportion and the rubbing component proportion, the defect component in the defect texture binary image is the chatter mark, and further the defect component of the non-ferrous metal rolled finished product is the chatter mark.
And (5-4) if the ratio of one of the scratch, the rubbing and the chatter mark in the defect texture binary image is less than the sum of the ratios of the rest two components, the defect components of the non-ferrous metal rolled finished product are the scratch, the rubbing and the chatter mark.
According to the defect components of the non-ferrous metal rolled finished product, if the scratch component in the defect texture binary image is 25%, the rubbing component in the defect texture binary image is 34%, and the vibration mark component in the defect texture binary image is 41%, the ratio of the scratch component to the rubbing component to the vibration mark component in the defect texture binary image is smaller than the sum of the ratios of the rest two components, so that the defects of scratch, rubbing and vibration marks exist, the rolling finished product production line has multiple problems, the rolling finished product production line needs to be stopped for complete maintenance, if the defect component of the non-ferrous metal rolled finished product is a scratch, the height of a rolling line of rolling equipment needs to be correspondingly adjusted, and if the defect component of the non-ferrous metal rolled finished product is a rubbing or vibration mark, the rolling equipment also needs to be correspondingly adjusted to ensure the quality of the rolled product.
The embodiment also provides a non-ferrous metal rolling quality detection system based on machine vision, which comprises a processor and a memory, wherein the processor is used for processing instructions stored in the memory to realize a non-ferrous metal rolling quality detection method based on machine vision, and as the non-ferrous metal rolling quality detection method based on machine vision is described in detail above, the description is omitted here.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And that specific embodiments have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the scope of the present invention, which is intended to cover any modifications, equivalents, improvements, etc. within the spirit and scope of the present invention.
Claims (2)
1. A non-ferrous metal rolling quality detection method based on machine vision is characterized by comprising the following steps:
acquiring a surface image of a rolled finished product of the nonferrous metal to obtain a gray image of the surface image, and performing threshold segmentation on the gray image to obtain a defect texture binary image;
determining a gray extension direction search tree of each defective point according to each defective point in the defective texture binary image to obtain a coding sequence of each branch path of the gray extension direction search tree;
searching coding sequences of all branch paths of the tree according to the gray extension direction, and calculating confidence sequences of all elements in the coding sequences of all branch paths to obtain a direction extension co-occurrence matrix of all defect points;
extending the symbiotic matrix according to the direction of each defect point, and calculating the probability value of each defect point belonging to scratch, kneading and vibration mark;
calculating the component proportion of the scratch, the kneading damage and the vibration mark in the defect texture binary image according to the probability value of the scratch, the kneading damage and the vibration mark belonging to each defect point, and further obtaining the defect component of the non-ferrous metal rolled finished product;
the step of determining the gray extension direction search tree of each defect point comprises:
determining an initial point of an extension path in each defective point according to each defective point in the defective texture binary image, and judging whether pixel points in eight neighborhoods around the initial point of extension are defective points or not;
if the pixel points of the eight neighborhoods around the initial point of the extended path are defect points, the defect points are used as path nodes, target pixel points of the eight neighborhoods around the path nodes are determined, the target pixel points of the eight neighborhoods around the path nodes are continuously judged, if the target pixel points of the eight neighborhoods around the path nodes are defect points, the defect points are used as path nodes, the steps are repeated until the target pixel points of the eight neighborhoods around the path nodes are not defect points, and therefore various paths of the initial point of the extended path are obtained;
determining a gray extension direction search tree of each defect point according to various paths of the initial point of the extension path;
the step of obtaining the coding sequence of each branch path of the gray extension direction search tree comprises:
searching the tree according to the gray extending direction of each defect point, and acquiring each branch path of the search tree of the gray extending direction of each defect point;
coding each branch path of the gray extension direction search tree, and combining the codes of each branch path of the gray extension direction search tree, thereby obtaining the coded sequence of each branch path of the gray extension direction search tree;
the calculation formula of the confidence sequence of each element in the coding sequence of each branch path is as follows:
wherein,for each branch path in the code sequenceThe confidence of the individual elements is calculated,is the sum of all element coefficients in the coding sequence of the respective branch path,for the corresponding front of the code sequence of each branch pathThe sum of the coefficients of the individual elements,;
the step of obtaining the direction extension co-occurrence matrix of each defect point comprises the following steps:
searching a confidence sequence of each element in the coding sequence of each branch path of the tree according to the gray extension direction, and grading the confidence of each element in the coding sequence of each branch path to obtain each level of the confidence of the element corresponding to the coding sequence of each branch path;
searching the coding sequence of each branch path of the tree according to the gray extension direction, and acquiring elements of each branch path of the search tree in the gray extension direction;
searching each level of confidence of corresponding elements of the coding sequence of each branch path of the tree and elements of each branch path according to the gray extension direction to obtain a direction extension co-occurrence matrix of each defect point;
the calculation formula of the probability value of each defect point belonging to the scratch, the kneading and the vibration mark is as follows:
wherein,is composed ofThe defect point belongs to the probability value of the scratch,is composed ofThe defect point at (b) belongs to the probability value of the kneading injury,is composed ofThe defect point at (a) belongs to the probability value of the chatter mark,for the confidence level of each defect point,is composed ofIn a co-existing matrix extending in the direction of the defective spotThe value of the element(s) of (b),is composed ofIn a direction extending co-occurrence matrix of defect pointsThe value of the element(s) of (b),is composed ofIn a co-existing matrix extending in the direction of the defective spotThe value of the element(s) of (b),for the first element on the branch path,for the second element on the branch path,for the third element on the branch path,is the fourth element on the branch path;
the calculation formula of the component proportion of the scratch, the kneading damage and the vibration mark in the defect texture binary image is as follows:
wherein,the proportion of the components of the scratch in the defect texture binary image,the proportion of the components of the kneading injury in the defect texture binary image,the component proportion of the vibration marks in the defect texture binary image,for the total number of defective points in the defective texture binary image,is the probability value of all defect points belonging to the scratch in the defect texture binary image,the probability values of all defect points belonging to the scratch in the defect texture binary image,probability values of all defect points belonging to the vibration marks in the defect texture binary image are obtained;
the method for obtaining the defect components of the non-ferrous metal rolled finished product comprises the following steps:
according to the component proportion of the scratch, the rubbing and the vibration mark in the defect texture binary image, if the component proportion of the scratch in the defect texture binary image is more than or equal to the sum of the component proportion of the rubbing and the vibration mark, the defect component of the non-ferrous metal rolled finished product is the scratch;
if the proportion of the components of the scratch and the vibration mark in the defect texture binary image is greater than or equal to the sum of the proportions of the components of the scratch and the vibration mark, the defect components of the non-ferrous metal rolled finished product are the scratch;
if the ratio of vibration mark components in the defect texture binary image is greater than or equal to the sum of the ratios of scratch components and rub components, the defect components of the non-ferrous metal rolled finished product are vibration marks;
and if the component proportion of one of the scratch, the rubbing and the vibration mark in the defect texture binary image is less than the sum of the remaining two component proportions, the defect components of the non-ferrous metal rolled finished product are the scratch, the rubbing and the vibration mark.
2. A machine vision based non-ferrous metal rolling quality detection system, comprising a processor and a memory, the processor being configured to process instructions stored in the memory to implement a machine vision based non-ferrous metal rolling quality detection method of claim 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210548501.8A CN114638833B (en) | 2022-05-20 | 2022-05-20 | Non-ferrous metal calendering quality detection method and system based on machine vision |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210548501.8A CN114638833B (en) | 2022-05-20 | 2022-05-20 | Non-ferrous metal calendering quality detection method and system based on machine vision |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114638833A CN114638833A (en) | 2022-06-17 |
CN114638833B true CN114638833B (en) | 2022-07-26 |
Family
ID=81953288
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210548501.8A Active CN114638833B (en) | 2022-05-20 | 2022-05-20 | Non-ferrous metal calendering quality detection method and system based on machine vision |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114638833B (en) |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014203366A1 (en) * | 2013-06-20 | 2014-12-24 | 三菱電機株式会社 | Image processing device, method, and program, and image display device |
CN104794491B (en) * | 2015-04-28 | 2018-01-23 | 重庆大学 | Based on the fuzzy clustering Surface Defects in Steel Plate detection method presorted |
CN111833324A (en) * | 2020-07-09 | 2020-10-27 | 中国计量大学 | Optical fiber ferrule defect detection method based on deep learning |
CN114202541B (en) * | 2022-02-17 | 2022-04-29 | 湖北中海电线电缆有限公司 | Cable defect detection method based on artificial intelligence |
CN114240942B (en) * | 2022-02-25 | 2022-04-26 | 武汉市雷成龙液压机械有限公司 | Metal part surface quality control method and system based on image processing |
-
2022
- 2022-05-20 CN CN202210548501.8A patent/CN114638833B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN114638833A (en) | 2022-06-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114529549B (en) | Cloth defect labeling method and system based on machine vision | |
CN115345885B (en) | Appearance quality detection method for metal fitness equipment | |
CN113239930B (en) | Glass paper defect identification method, system, device and storage medium | |
CN109682839B (en) | Online detection method for surface defects of metal arc-shaped workpiece | |
CN114638827B (en) | Visual detection method and device for impurities of lubricating oil machinery | |
CN116385439B (en) | Motor rubber shock pad quality detection method based on image processing | |
CN114219805B (en) | Intelligent detection method for glass defects | |
CN115147409B (en) | Mobile phone shell production quality detection method based on machine vision | |
CN116664569B (en) | Weld flash defect detection method | |
CN113706534A (en) | Injection molding product defect detection method based on multi-ray analysis | |
CN112085709A (en) | Image contrast method and equipment | |
CN116883408A (en) | Integrating instrument shell defect detection method based on artificial intelligence | |
CN116843692B (en) | Regenerated active carbon state detection method based on artificial intelligence | |
CN115082477B (en) | Semiconductor wafer processing quality detection method based on light reflection removing effect | |
CN113012157A (en) | Visual detection method and system for equipment defects | |
CN116993742A (en) | Nickel alloy rolling defect detection method based on machine vision | |
CN114638833B (en) | Non-ferrous metal calendering quality detection method and system based on machine vision | |
CN117237350A (en) | Real-time detection method for quality of steel castings | |
CN115222735B (en) | Metal mold quality detection method based on pockmark defects | |
CN116843618A (en) | Method for detecting shallow apparent appearance defects of metal parts | |
CN110838101B (en) | Image segmentation quality evaluation method based on edge characteristics | |
CN112862767B (en) | Surface defect detection method for solving difficult-to-distinguish unbalanced sample based on metric learning | |
CN115311287A (en) | Method for detecting production abnormity of common rail oil injector | |
CN112991395B (en) | Vision tracking method based on foreground condition probability optimization scale and angle | |
CN114359684A (en) | Image shadow evaluation method and device |
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 |