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 PDF

Info

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
Application number
CN202210548501.8A
Other languages
Chinese (zh)
Other versions
CN114638833A (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.)
Haimen Boyang Foundry Co ltd
Original Assignee
Haimen Boyang Foundry 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 Haimen Boyang Foundry Co ltd filed Critical Haimen Boyang Foundry Co ltd
Priority to CN202210548501.8A priority Critical patent/CN114638833B/en
Publication of CN114638833A publication Critical patent/CN114638833A/en
Application granted granted Critical
Publication of CN114638833B publication Critical patent/CN114638833B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30136Metal

Landscapes

  • Engineering & Computer Science (AREA)
  • 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

Non-ferrous metal calendering quality detection method and system based on machine vision
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:
Figure 100002_DEST_PATH_IMAGE002
wherein,
Figure 100002_DEST_PATH_IMAGE004
for each branch path in the code sequence
Figure 100002_DEST_PATH_IMAGE006
The confidence level of each of the elements is,
Figure 100002_DEST_PATH_IMAGE008
is the sum of all element coefficients in the coding sequence of the respective branch path,
Figure 100002_DEST_PATH_IMAGE010
for the corresponding front of the code sequence of each branch path
Figure 100002_DEST_PATH_IMAGE012
The sum of the coefficients of the individual elements,
Figure 100002_DEST_PATH_IMAGE014
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:
Figure 100002_DEST_PATH_IMAGE016
Figure 100002_DEST_PATH_IMAGE018
Figure 100002_DEST_PATH_IMAGE020
wherein,
Figure 100002_DEST_PATH_IMAGE022
is composed of
Figure 100002_DEST_PATH_IMAGE024
The defect point belongs to the probability value of the scratch,
Figure 100002_DEST_PATH_IMAGE026
is composed of
Figure 952322DEST_PATH_IMAGE024
The defect point belongs to the probability value of the kneading injury,
Figure 100002_DEST_PATH_IMAGE028
is composed of
Figure 642191DEST_PATH_IMAGE024
The defect point at (a) belongs to the probability value of the chatter mark,
Figure 100002_DEST_PATH_IMAGE030
for the confidence level of each defective dot,
Figure 100002_DEST_PATH_IMAGE032
is composed of
Figure 496884DEST_PATH_IMAGE024
In a direction extending co-occurrence matrix of defect points
Figure 100002_DEST_PATH_IMAGE034
The value of the element(s) at (a),
Figure 100002_DEST_PATH_IMAGE036
is composed of
Figure 572287DEST_PATH_IMAGE024
In a direction extending co-occurrence matrix of defect points
Figure 100002_DEST_PATH_IMAGE038
The value of the element(s) at (a),
Figure 100002_DEST_PATH_IMAGE040
is composed of
Figure 719978DEST_PATH_IMAGE024
In a co-existing matrix extending in the direction of the defective spot
Figure 100002_DEST_PATH_IMAGE042
The value of the element(s) at (a),
Figure 100002_DEST_PATH_IMAGE044
for the first element on the branch path,
Figure 100002_DEST_PATH_IMAGE046
for the second element on the branch path,
Figure 100002_DEST_PATH_IMAGE048
is the third element on the branch path,
Figure 100002_DEST_PATH_IMAGE050
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:
Figure 100002_DEST_PATH_IMAGE052
Figure 100002_DEST_PATH_IMAGE054
Figure 100002_DEST_PATH_IMAGE056
wherein,
Figure 100002_DEST_PATH_IMAGE058
composition of scratch in binary image of defect textureThe ratio of the water to the oil,
Figure 100002_DEST_PATH_IMAGE060
the proportion of the components of the kneading injury in the defect texture binary image,
Figure 100002_DEST_PATH_IMAGE062
the component proportion of the vibration marks in the defect texture binary image,
Figure 100002_DEST_PATH_IMAGE064
for the total number of defective points in the defective texture binary image,
Figure 100002_DEST_PATH_IMAGE066
the probability values of all defect points belonging to the scratch in the defect texture binary image,
Figure 100002_DEST_PATH_IMAGE068
the probability values of all defect points belonging to the scratch in the defect texture binary image,
Figure 100002_DEST_PATH_IMAGE070
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 direction
Figure DEST_PATH_IMAGE072
It 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 paths
Figure 379368DEST_PATH_IMAGE072
Respectively 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:
Figure DEST_PATH_IMAGE074
Figure 788483DEST_PATH_IMAGE074
Figure DEST_PATH_IMAGE076
Figure DEST_PATH_IMAGE078
Figure DEST_PATH_IMAGE080
Figure 935038DEST_PATH_IMAGE080
Figure DEST_PATH_IMAGE082
merging the codes of each path to obtain a merged code sequence:
Figure DEST_PATH_IMAGE084
Figure 20674DEST_PATH_IMAGE076
Figure 731141DEST_PATH_IMAGE078
Figure 225839DEST_PATH_IMAGE080
Figure 338151DEST_PATH_IMAGE080
Figure DEST_PATH_IMAGE086
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:
Figure DEST_PATH_IMAGE088
for the above-mentioned coding sequence
Figure DEST_PATH_IMAGE090
Which indicates the second one corresponding to the defect point in the defect texture binary image
Figure DEST_PATH_IMAGE092
In a sequence encoding branch paths
Figure DEST_PATH_IMAGE094
The number of the elements is one,
Figure 686700DEST_PATH_IMAGE006
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:
Figure DEST_PATH_IMAGE096
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:
Figure DEST_PATH_IMAGE098
the calculation formula of the confidence sequence of each element in the coding sequence of the branch path is:
Figure DEST_PATH_IMAGE002A
wherein,
Figure 431933DEST_PATH_IMAGE004
is the first in the coding sequence of the branch path
Figure 245168DEST_PATH_IMAGE006
The confidence of the individual elements is calculated,
Figure 211987DEST_PATH_IMAGE008
is the sum of all element coefficients in the coding sequence of the branch path,
Figure 452475DEST_PATH_IMAGE010
corresponding to the coding sequence of the branch path
Figure 121223DEST_PATH_IMAGE012
The sum of the coefficients of the individual elements,
Figure 472570DEST_PATH_IMAGE014
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:
Figure DEST_PATH_IMAGE100
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 image
Figure DEST_PATH_IMAGE102
For 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 image
Figure 471660DEST_PATH_IMAGE090
For 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:
Figure DEST_PATH_IMAGE016A
Figure DEST_PATH_IMAGE018A
Figure DEST_PATH_IMAGE020A
wherein,
Figure 696099DEST_PATH_IMAGE022
is composed of
Figure 602876DEST_PATH_IMAGE024
The defect point at (a) belongs to the probability value of the scratch,
Figure 492334DEST_PATH_IMAGE026
is composed of
Figure 433745DEST_PATH_IMAGE024
The defect point belongs to the probability value of the kneading injury,
Figure 281616DEST_PATH_IMAGE028
is composed of
Figure 924955DEST_PATH_IMAGE024
The defect point at (a) belongs to the probability value of the chatter mark,
Figure 618105DEST_PATH_IMAGE030
for the confidence level of each defective dot,
Figure 148443DEST_PATH_IMAGE032
is composed of
Figure 901636DEST_PATH_IMAGE024
In a direction extending co-occurrence matrix of defect points
Figure 530807DEST_PATH_IMAGE034
The value of the element(s) at (a),
Figure 27647DEST_PATH_IMAGE036
is composed of
Figure 943651DEST_PATH_IMAGE024
In a direction extending co-occurrence matrix of defect points
Figure 602165DEST_PATH_IMAGE038
The value of the element(s) at (a),
Figure 220097DEST_PATH_IMAGE040
is composed of
Figure 255049DEST_PATH_IMAGE024
In a direction extending co-occurrence matrix of defect points
Figure 25559DEST_PATH_IMAGE042
The value of the element(s) of (b),
Figure 854975DEST_PATH_IMAGE044
for the first element on the branch path,
Figure 461668DEST_PATH_IMAGE046
for the second element on the branch path,
Figure 300311DEST_PATH_IMAGE048
for the third element on the branch path,
Figure 659748DEST_PATH_IMAGE050
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:
Figure DEST_PATH_IMAGE052A
Figure DEST_PATH_IMAGE054A
Figure DEST_PATH_IMAGE056A
wherein,
Figure 735764DEST_PATH_IMAGE058
the proportion of the components of the scratch in the defect texture binary image,
Figure 813441DEST_PATH_IMAGE060
the proportion of the components of the kneading injury in the defect texture binary image,
Figure 455775DEST_PATH_IMAGE062
the composition ratio of the chattering marks in the defect texture binary image,
Figure 184566DEST_PATH_IMAGE064
for the total number of defective points in the defective texture binary image,
Figure 621363DEST_PATH_IMAGE066
the probability values of all defect points belonging to the scratch in the defect texture binary image,
Figure 186337DEST_PATH_IMAGE068
is the probability value of all defect points belonging to the kneading injury in the defect texture binary image,
Figure 366782DEST_PATH_IMAGE070
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:
Figure DEST_PATH_IMAGE002
wherein,
Figure DEST_PATH_IMAGE004
for each branch path in the code sequence
Figure DEST_PATH_IMAGE006
The confidence of the individual elements is calculated,
Figure DEST_PATH_IMAGE008
is the sum of all element coefficients in the coding sequence of the respective branch path,
Figure DEST_PATH_IMAGE010
for the corresponding front of the code sequence of each branch path
Figure DEST_PATH_IMAGE012
The sum of the coefficients of the individual elements,
Figure DEST_PATH_IMAGE014
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:
Figure DEST_PATH_IMAGE016
Figure DEST_PATH_IMAGE018
Figure DEST_PATH_IMAGE020
wherein,
Figure DEST_PATH_IMAGE022
is composed of
Figure DEST_PATH_IMAGE024
The defect point belongs to the probability value of the scratch,
Figure DEST_PATH_IMAGE026
is composed of
Figure 72781DEST_PATH_IMAGE024
The defect point at (b) belongs to the probability value of the kneading injury,
Figure DEST_PATH_IMAGE028
is composed of
Figure 553703DEST_PATH_IMAGE024
The defect point at (a) belongs to the probability value of the chatter mark,
Figure DEST_PATH_IMAGE030
for the confidence level of each defect point,
Figure DEST_PATH_IMAGE032
is composed of
Figure 192495DEST_PATH_IMAGE024
In a co-existing matrix extending in the direction of the defective spot
Figure DEST_PATH_IMAGE034
The value of the element(s) of (b),
Figure DEST_PATH_IMAGE036
is composed of
Figure 685574DEST_PATH_IMAGE024
In a direction extending co-occurrence matrix of defect points
Figure DEST_PATH_IMAGE038
The value of the element(s) of (b),
Figure DEST_PATH_IMAGE040
is composed of
Figure 359001DEST_PATH_IMAGE024
In a co-existing matrix extending in the direction of the defective spot
Figure DEST_PATH_IMAGE042
The value of the element(s) of (b),
Figure DEST_PATH_IMAGE044
for the first element on the branch path,
Figure DEST_PATH_IMAGE046
for the second element on the branch path,
Figure DEST_PATH_IMAGE048
for the third element on the branch path,
Figure DEST_PATH_IMAGE050
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:
Figure DEST_PATH_IMAGE052
Figure DEST_PATH_IMAGE054
Figure DEST_PATH_IMAGE056
wherein,
Figure DEST_PATH_IMAGE058
the proportion of the components of the scratch in the defect texture binary image,
Figure DEST_PATH_IMAGE060
the proportion of the components of the kneading injury in the defect texture binary image,
Figure DEST_PATH_IMAGE062
the component proportion of the vibration marks in the defect texture binary image,
Figure DEST_PATH_IMAGE064
for the total number of defective points in the defective texture binary image,
Figure DEST_PATH_IMAGE066
is the probability value of all defect points belonging to the scratch in the defect texture binary image,
Figure DEST_PATH_IMAGE068
the probability values of all defect points belonging to the scratch in the defect texture binary image,
Figure DEST_PATH_IMAGE070
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.
CN202210548501.8A 2022-05-20 2022-05-20 Non-ferrous metal calendering quality detection method and system based on machine vision Active CN114638833B (en)

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)

* Cited by examiner, † Cited by third party
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

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