CN114663713A - Metal wire drawing production control method and system based on Hough transform - Google Patents
Metal wire drawing production control method and system based on Hough transform Download PDFInfo
- Publication number
- CN114663713A CN114663713A CN202210547770.2A CN202210547770A CN114663713A CN 114663713 A CN114663713 A CN 114663713A CN 202210547770 A CN202210547770 A CN 202210547770A CN 114663713 A CN114663713 A CN 114663713A
- Authority
- CN
- China
- Prior art keywords
- wire drawing
- points
- parameter space
- repair
- obtaining
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000005491 wire drawing Methods 0.000 title claims abstract description 88
- 229910052751 metal Inorganic materials 0.000 title claims abstract description 48
- 239000002184 metal Substances 0.000 title claims abstract description 48
- 238000000195 production control method Methods 0.000 title claims abstract description 21
- 230000008439 repair process Effects 0.000 claims abstract description 98
- 238000000034 method Methods 0.000 claims abstract description 17
- 238000004519 manufacturing process Methods 0.000 claims abstract description 7
- 230000011218 segmentation Effects 0.000 claims description 9
- 238000013507 mapping Methods 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 6
- 238000012545 processing Methods 0.000 claims description 6
- 230000009466 transformation Effects 0.000 claims description 5
- 238000003708 edge detection Methods 0.000 claims description 3
- 238000009826 distribution Methods 0.000 abstract description 16
- 238000013473 artificial intelligence Methods 0.000 abstract description 2
- 230000001131 transforming effect Effects 0.000 abstract 1
- 230000008569 process Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 5
- 239000007769 metal material Substances 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 239000000463 material Substances 0.000 description 4
- 238000012549 training Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 229910052782 aluminium Inorganic materials 0.000 description 1
- XAGFODPZIPBFFR-UHFFFAOYSA-N aluminium Chemical compound [Al] XAGFODPZIPBFFR-UHFFFAOYSA-N 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000739 chaotic effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000007797 corrosion Effects 0.000 description 1
- 238000005260 corrosion Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000007246 mechanism Effects 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
- 238000005070 sampling Methods 0.000 description 1
- 238000007790 scraping Methods 0.000 description 1
- 230000001629 suppression Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/77—Retouching; Inpainting; Scratch removal
-
- 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/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Bioinformatics & Cheminformatics (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Image Analysis (AREA)
Abstract
The invention relates to the technical field of artificial intelligence, in particular to a metal wire drawing production control method and system based on Hough transform. The method comprises the steps of transforming a wire drawing edge into a Hough space, classifying according to a slope coordinate of the Hough space to obtain a plurality of parallel line categories, and obtaining a broken line segment according to an end point of the wire drawing edge. And obtaining broken line type positions according to the positions of the broken line segments, and obtaining second parameter space points according to straight lines among the broken line type positions. And determining the number of the parameter space points and the number of the isolated points according to the voting value size and the position distribution of the second parameter space points, and further obtaining the repairing difficulty. And combining the parallelism, the broken grain degree and the number of parallel line categories to obtain the repair priority. The invention determines the repair priority by obtaining the self characteristics and distribution of the broken lines, thereby realizing the control of wire drawing production.
Description
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a metal wire drawing production control method and system based on Hough transform.
Background
The metal wire drawing process is a process of scraping metal such as an aluminum plate and the like into lines on the surface of the metal through abrasive paper. The lines with different densities and different directions can enable the metal to present different textures, and the metal can resist corrosion through a wire drawing process, so that the material has elements of fashion and science and technology.
In the existing metal wire drawing process, lines on a material plate can be broken due to the operation of operators or machines, so that the attractiveness is influenced, and the product quality is reduced. For materials with a plurality of line areas, broken lines in different areas are distributed differently, the repairing directions are different, and the broken lines cannot be repaired scientifically and efficiently, so that the production efficiency is low, and the product quality is affected.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide a metal wire drawing production control method and system based on Hough transform, and the adopted technical scheme is as follows:
the invention provides a metal wire drawing production control method based on Hough transform, which comprises the following steps:
obtaining a metal image; extracting the wire drawing edge in the metal image to obtain a wire drawing image;
mapping the wire drawing edge in the wire drawing image to a Hough space through Hough transformation to obtain a first parameter space point; classifying according to the slope coordinates of the first parameter space points to obtain a plurality of parallel line categories; obtaining a broken line segment according to an end point on the wire drawing edge;
taking the central point of the broken line segment as a broken line position; clustering is carried out in each parallel line category according to the distance between the broken line positions to obtain a plurality of clustering clusters, and the average coordinate in each clustering cluster is used as the broken line category position; mapping all straight lines between the broken line category positions to a Hough space to obtain a second parameter space point;
if the voting value of the second parameter space point with the largest voting value is larger than a preset first voting value threshold, taking the second parameter space point with the largest voting value and other second parameter space points within the preset slope threshold as related parameter space points, taking the average coordinate of the related parameter space points as a parameter representative point, eliminating the related parameter space points until the second parameter space point with the largest voting value is not larger than the first voting value threshold, obtaining a plurality of representative points, and taking the second parameter space point with the voting value not larger than the first voting value threshold as an isolated point; obtaining the drawing repair difficulty according to the number of the parameter representative points and the isolated points;
obtaining parallelism according to the difference of the slope coordinates of the first parameter space point in each parallel line category; obtaining the broken grain degree according to the length of the broken grain line segment; taking the ratio of the parallelism to the broken line degree as the quality before repair; taking the product of the parallelism and the number of the parallel line categories as a reference mass after restoration; obtaining a repair priority according to the quality before repair, the reference quality after repair and the drawing repair difficulty; and controlling the drawing repair according to the repair priority.
Further, the extracting the wire drawing edge in the metal image and obtaining the wire drawing image comprises:
sending the metal image into a pre-trained semantic segmentation network to obtain an initial wire drawing image; and after the initial wire drawing image is subjected to binarization processing, detecting the wire drawing edge through an edge detection algorithm to obtain the wire drawing image.
Further, the classifying according to the slope coordinates of the first parameter space point to obtain a plurality of parallel line categories includes:
and clustering according to the slope coordinates of the first parameter space points to obtain a plurality of clustering categories, wherein each clustering category is the parallel line category.
Further, the obtaining of the broken line segment according to the endpoint on the drawing edge comprises:
obtaining an initial endpoint of the first parameter space point with a voting value larger than a preset second voting value threshold; taking the initial end points with the distance between the adjacent initial end points larger than a preset distance threshold as the end points; the wire drawing edge formed by the end points is a first line segment, and the first line segment smaller than a preset length threshold is removed to obtain a second line segment; and the broken line segments are formed by the corresponding end points between the second segments.
Further, the taking the average coordinate of the relevant parameter space point as a parameter representative point includes:
if the slope coordinates of the related parameter space points are equal, taking the average coordinate corresponding to the coordinate mean value of the related parameter space points as the parameter representative point;
if the slope coordinates of the related parameter space points are not equal, setting a plurality of reference points between the related parameter space points, and taking the reference point closest to the average coordinate of the related parameter space points as the parameter representative point.
Further, the obtaining of the drawing repair difficulty according to the number of the parameter representative points and the number of the isolated points includes:
and weighting and summing the number of the parameter representative points and the number of the isolated points to obtain the drawing repair difficulty.
Further, the obtaining parallelism by the difference of the slope coordinates of the first parameter space point in each of the parallel line categories comprises:
taking the central point of the first parameter space point in each parallel line category in Hough space as a parallel reference point; and taking the difference of the average slope coordinates of all the first parameter space points in the parallel line categories and the parallel reference points as the parallelism.
Further, the obtaining the broken line degree according to the length of the broken line segment includes: obtaining the fracture degree according to a broken line degree formula; the formula of the broken line degree is as follows:
wherein,in order to be said degree of the broken grain,is as followsThe length of each of said broken line segments,as to the number of the line segments,the average length of the corresponding drawn edge in the parallel line category.
Further, the obtaining of the repair priority according to the pre-repair quality, the post-repair reference quality, and the drawing repair difficulty includes: obtaining the repair priority according to a repair priority obtaining formula; the repair priority acquisition formula includes:
wherein,in order to be the priority of the repair,is the reference mass after the repair,for the purpose of the pre-repair quality,difficulty in repairing the drawn wire.
The invention provides a metal wire drawing production control system based on Hough transform, which comprises a memory, a processor and a computer program which is stored in the memory and can run on the processor, wherein the processor realizes any one of the steps of the metal wire drawing production control method based on Hough transform when executing the computer program.
The invention has the following beneficial effects:
1. according to the embodiment of the invention, the parameter representative points and the isolated points are obtained according to the distribution of the broken line positions. The number of the directions of the broken lines required to be repaired is represented by the number of the representative points of the parameters, and the defects in the same direction can be repaired simultaneously according to one direction in the repairing process; the isolated points represent the positions of the broken lines which exist independently and cannot be repaired together with other broken lines, so that the number of the isolated points and the number of the parameter representative points can effectively represent the drawing repair difficulty. And further combining the quality before repair and the reference quality after repair to obtain the repair priority, and efficiently and scientifically realizing the control of the wire drawing process through the repair priority.
2. The embodiment of the invention considers that the larger the parallelism of the edge of the drawn wire is, the larger the broken line degree is, the larger the quality before repair is; the more parallel line types, the better texture the material presents, therefore the greater the parallelism of the drawn edge, the greater the number of parallel line types, and the greater the reference quality after repair. Objective and scientific repair priority can be obtained according to the quality before repair and the quality after prediction of repair as parameter indexes of the repair priority.
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 a metal wire drawing production control method based on hough transform according to an embodiment of the present invention;
FIG. 2 is a graph illustrating a profile of a broken line location according to an embodiment of the present invention;
FIG. 3 is a graph illustrating a cluster distribution of the positions of broken lines according to an embodiment of the present invention;
FIG. 4 is a parameter representative histogram corresponding to a parameter representative point according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a reference point setting according to an embodiment of the present invention.
Detailed Description
In order to further illustrate the technical means and effects of the present invention adopted to achieve the predetermined object, the following detailed description of the embodiments, structures, features and effects of a metal wire drawing production control method and system based on hough transform according to the present invention is provided with 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 metal wire drawing production control method and system based on Hough transform is described in detail below with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a metal wire drawing production control method based on hough transform according to an embodiment of the present invention is shown, where the method includes:
step S1: obtaining a metal image; and extracting the wire drawing edge in the metal image to obtain a wire drawing image.
A camera with moderate height is arranged above the metal material, so that the metal material can completely appear in the field of view of the camera to obtain a metal image.
And sending the metal image into a pre-trained semantic segmentation network to obtain an initial wire drawing image. And marking the wire drawing edge in the initial wire drawing image, and detecting the wire drawing edge by an edge detection algorithm after carrying out binarization processing on the initial wire drawing image in order to obtain a clearer wire drawing edge to obtain a wire drawing image.
The specific training method of the semantic segmentation network comprises the following steps:
(1) and taking a metal image with various patterns of drawn lines as training data. And marking the pixel point of the wire drawing line as 1, and marking other pixel points as 0.
(2) The semantic segmentation network adopts a coding and decoding structure. And extracting the characteristics of the input data by the semantic segmentation encoder to obtain a characteristic diagram. And the semantic segmentation decoder performs sampling transformation on the feature map and outputs a semantic segmentation result. And obtaining an initial wire drawing image according to the semantic segmentation result.
(3) And training the network by adopting a cross entropy loss function.
In the embodiment of the invention, after the initial wire drawing image is subjected to the convolution kernel processing of Gaussian distribution, the image noise is removed. Processing the initial wire drawing image by using a soluble operator to obtain an image gradient amplitude and an angle value, carrying out maximum suppression on the amplitude according to the angle value, detecting the image by using a double-threshold algorithm, and connecting the detected edge to obtain the wire drawing image.
Step S2: mapping a wire drawing edge in the wire drawing image to a Hough space through Hough transformation to obtain a first parameter space point; classifying according to the slope coordinates of the first parameter space points to obtain a plurality of parallel line categories; and obtaining a broken line segment according to the end point on the edge of the drawn wire.
The Hough transform is a conventional technical means, and can be obtained by simply calculating the difficultly processed image space in the parameter space through conversion of a Hough parameter space, wherein a straight line in the image space corresponds to a point in the parameter space, and a point in the image space corresponds to a sine curve in the parameter space. One straight line in the image space can be regarded as formed by connecting discrete points with small distance, one straight line in the detection image space can be converted into intersection points of different straight lines in the detection parameter space, and through a voting mechanism, the more the number of the straight lines passing through the intersection points in the parameter space is, the more the connecting line of the points in the image space corresponding to the point is likely to be one straight line. The detailed operation is not described again.
After Hough transformation, the drawn wire edges in the image space are parameter space points in Hough space. For parallel stringy edges, the slope of the line in image space should be equal or similar, i.e., the slope coordinates of the corresponding first parameter space points in hough parameter space should be similar. Therefore, clustering is carried out according to the slope coordinates of the first parameter space points to obtain a plurality of clustering categories, and each clustering category corresponds to one parallel line category.
Due to the influence of the operation or the tool in the drawing process, individual breaks, i.e. broken line segments, are formed on the drawing edge. The endpoint of the wire drawing edge can be obtained according to the distribution characteristics of the pixel points of the wire drawing edge in the image, and then the broken line segment is determined, and the method specifically comprises the following steps:
and obtaining an initial endpoint of the first parameter space point with the voting value larger than a preset second voting value threshold value. And if the voting threshold value is larger than the second voting threshold value, the current point corresponds to a drawn edge straight line. And if the distance between the adjacent initial end points is greater than the preset distance threshold value, the fracture is shown, the initial end points with the distance between the adjacent initial end points greater than the distance threshold value are taken as end points, the drawn wire edge formed by the end points is a first line segment, and the first line segment smaller than the preset length threshold value is removed to obtain a second line segment. And the broken line segments are formed by corresponding end points between the second segments. And if the first line segment is smaller than the length threshold value, the wire drawing edge corresponding to the current initial line segment is considered as noise information, and the noise information is removed to obtain the optimal broken line segment. In the embodiment of the present invention, the second voting threshold is set to 300, the distance threshold is set to 100 pixel units, and the length threshold is set to 300 pixel units.
In the embodiment of the invention, pixel points at the edge of the drawn wire are analyzed point by point in an image coordinate system to obtain voting values of the pixel points in the Hough space, accumulators at corresponding positions in the Hough space are monitored, gaps between the drawn wire edges are analyzed to obtain pixel points corresponding to end points, and after noise information is identified and removed, numerical values in the accumulators at corresponding positions in the Hough space are correspondingly reduced, so that the analysis process is more visual.
Step S3: taking the central point of the broken line segment as the broken line position; clustering is carried out in each parallel line category according to the distance between the broken line positions to obtain a plurality of clustering clusters, and the average coordinates in the clustering clusters are used as the broken line category positions; mapping all straight lines between broken line category positions to a Hough space to obtain a second parameter space point;
the distribution of the positions of the broken line segments in the same parallel line category in the image space has certain influence on the repair, and the more regular the distribution is, the more consistent the repair direction is, the lower the repair difficulty is; the more chaotic the distribution, the more repair directions, the higher the repair difficulty. Therefore, the position distribution of the broken line segments needs to be analyzed, and the repair difficulty of the parallel line categories is evaluated. Referring to fig. 2, a distribution diagram of the position of a broken line according to an embodiment of the present invention is shown, in which the central point of a broken line segment in an image space is used as the position of the broken line, and the distribution is performed in the image space.
And for the similar broken grain positions, the similar broken grain positions can be repaired together during repair, so that the similar broken grain positions can be regarded as the same broken grain, and clustering is performed in each parallel line category according to the distance between the broken grain positions to obtain a plurality of clustering clusters. Please refer to fig. 3, which shows a cluster distribution diagram of a broken line position according to an embodiment of the present invention, that is, a in fig. 3 corresponds to a cluster; b. c corresponds to a cluster; d. e corresponds to a cluster; f, h corresponds to a cluster; g, i corresponds to a cluster; j, k corresponds to a cluster; i, m corresponds to a cluster; n, o correspond to a cluster.
And taking the average coordinates in the cluster as broken line category positions, wherein the connecting line of each broken line category position can be regarded as a straight line, mapping all the straight lines between the broken line category positions to a Hough space, and obtaining second parameter space points, wherein each second parameter space point comprises different voting values.
Step S4: if the voting value of the second parameter space point with the largest voting value is larger than a preset first voting value threshold, taking the second parameter space point with the largest voting value and other second parameter space points within the preset slope threshold as related parameter space points, taking the average coordinate of the related parameter space points as parameter representative points, eliminating the related parameter space points until the second parameter space point with the largest voting value is not larger than the first voting value threshold, obtaining a plurality of representative points, and taking the second parameter space point with the voting value not larger than the first voting value threshold as an isolated point; and obtaining the drawing repair difficulty according to the number of the representative points and the isolated points.
The second parameter space point corresponds to a straight line which is at a broken line type position in the image space, and the broken line type positions which are more crossed by the straight line indicate that the repairing directions of the broken line type positions in the straight line direction are the same, so that the broken line type positions can be repaired together. Therefore, in order to obtain accurate wire drawing repair difficulty, the number of directions required for repairing broken lines needs to be obtained.
If the second parameter space point with the largest voting value is smaller than the first voting value threshold value, it is indicated that the broken line category position distribution is disordered and cannot be repaired together in the image space, and all the corresponding second parameter space points are isolated points. If the voting value of the second parameter space point with the largest voting value is greater than the preset first voting value threshold, it is indicated that the straight line corresponding to the second parameter space point can pass through the position of the broken line category most. The second parameter space point with the maximum voting value and other second parameter space points in the preset slope threshold value are used as related parameter space points, the slopes of straight lines corresponding to the other second parameter space points in the slope threshold value are close to the slopes of straight lines corresponding to the second parameter space point with the maximum voting value, therefore, the analysis can be carried out jointly, the average coordinate of the related parameter space points is used as a parameter representative point, the parameter representative point represents a parameter representative straight line in the repairing direction when the broken lines are repaired, namely, the repair is carried out on the parameter representative straight line, and a plurality of broken line segments can be repaired jointly. And eliminating the analyzed related parameter space points, judging the second parameter space point with the maximum voting value, if the second parameter space point is still greater than the voting value threshold value, continuously obtaining the parameter representative points until the second parameter space point with the maximum voting value is not greater than the first voting value threshold value, namely obtaining a plurality of parameter representative points and taking the remaining second parameter space points as isolated points. Referring to fig. 4, a parametric representative histogram corresponding to a parametric representative point according to an embodiment of the present invention is shown. In fig. 4, a, bc, de, fh, gi, jkim and no correspond to a broken line type position respectively, and each parameter represents that most broken line type positions of the straight line pass through or are close to most broken line type positions. In the embodiment of the present invention, the first voting threshold value can be specifically set according to the quality requirement of a specific metal material and the size parameter of a metal plate.
The specific method for obtaining the parameter representative point comprises the following steps:
if the slope coordinates of the related parameter space points are equal, taking the average coordinate corresponding to the coordinate mean value of the related parameter space points as a parameter representative point;
if the slope coordinates of the related parameter space points are not equal, a plurality of reference points are arranged among the related parameter space points, and the reference point closest to the average coordinate of the related parameter space points is used as a parameter representative point.
Referring to fig. 5, a schematic diagram of a reference point setting according to an embodiment of the invention is shown. In embodiments of the present invention, for analytical convenience, the slope coordinates are converted to angular coordinates, i.e., interceptIs a vertical coordinate and a straight line inclination angleFor the slope coordinates, the points with vote values of 10 and 9 are the relevant parameter space points, the slope threshold is set to 5 °, and 4 reference points A, B, C, D are set between the relevant parameter space points. And taking the reference point closest to the average coordinate as a parameter representative point.
The more the number of the parameter representative points is, the more the repairing direction is needed, and the larger the repairing difficulty is; the more isolated points, the more repair directions are needed, and the greater the repair difficulty is; therefore, the number of the parameter representative points and the number of the isolated points are weighted and summed according to the direct proportion relation to obtain the wiredrawing repair difficulty, namely the wiredrawing repair difficultyComprises the following steps:whereinin order to solve the problem of difficulty in wire drawing repair,the weight corresponding to the number of points represented by the parameter,to the extent that the parameter represents the number of points,the weight corresponding to the number of isolated points,the number of outliers. In the embodiment of the present invention, it is,the setting is made to be 0.7,set to 0.3.
Step S5: obtaining parallelism by the difference of the slope coordinates of the first parameter space point in each parallel line category; obtaining the broken grain degree according to the length of the broken grain line segment; taking the product of the parallelism and the broken grain degree as the quality before repair; taking the product of the parallelism and the number of the parallel line categories as the reference quality after restoration; obtaining a repair priority according to the quality before repair, the reference quality after repair and the drawing repair difficulty; and controlling the drawing repair according to the repair priority.
The parallelism of the wire drawing edge is one of the quality judgment criteria of the metal wire drawing process, namely the larger the parallelism is, the better the quality of the metal material is. Taking the central point of the first parameter space point in each parallel line category in the Hough space as a parallel reference point; and taking the difference of the average slope coordinates of all the first parameter space points in the parallel line category and the parallel reference points as the parallelism.
The degree of the broken lines is one of the judgment standards of the quality before metal repair, namely the larger the degree of the broken lines is, the smaller the metal repair quality is. The length of the broken line segment can effectively represent the broken line degree, and the broken line degree is obtained according to a broken line degree formula; the formula of the broken line degree is as follows:
wherein,in order to determine the degree of the broken lines,is as followsThe length of each of the broken line segments,to be the number of line segments,is the average length of the corresponding drawn edge in the parallel line category.
Therefore, the ratio of the parallelism to the degree of the fracture is used as the quality before repair. The quality after repair can be referred according to the parallelism and the number of the parallel line types, the higher the parallelism is, the better the wiredrawing edge effect is, the more the parallel line types are, the better the texture effect of the metal material is, therefore, the product of the parallelism and the number of the parallel line types is used as the reference quality after repair.
And obtaining the repair priority by combining the quality before repair, the reference quality after repair and the drawing repair difficulty. In order to improve the working efficiency, the repair process should follow the rule of easy before difficult, i.e. the smaller the drawing repair difficulty is, the larger the quality before repair and the reference quality after repair are, the larger the repair priority is. The method specifically comprises the following steps: and acquiring the repair priority according to a repair priority acquisition formula. The repair priority acquisition formula includes:
wherein,in order to repair the priority level of the file,in order to refer to the mass after the repair,in order to achieve the quality before the repair,the difficulty of wire drawing repair is solved.
And controlling the wire drawing repair according to the repair priority to realize the control of the metal wire drawing production.
In summary, in the embodiments of the present invention, the drawn wire edge is transformed into the hough space, a plurality of parallel line categories are obtained by classifying according to the slope coordinates of the hough space, and the broken line segment is obtained according to the end point of the drawn wire edge. And obtaining broken line type positions according to the positions of the broken line segments, and obtaining second parameter space points according to straight lines among the broken line type positions. And determining the number of the parameter space points and the number of the isolated points according to the voting value size and the position distribution of the second parameter space points, and further obtaining the repairing difficulty. And combining the parallelism, the broken grain degree and the number of parallel line categories to obtain the repair priority. According to the embodiment of the invention, the repair priority is determined by obtaining the characteristics and distribution of the broken lines, so that the control of wire drawing production is realized.
The invention provides a metal wire drawing production control system based on Hough transform, which comprises a memory, a processor and a computer program which is stored in the memory and can run on the processor, wherein the processor realizes any one step of the metal wire drawing production control method based on Hough transform when executing the computer program.
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 specific embodiments thereof 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 is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (10)
1. A metal wire drawing production control method based on Hough transform is characterized by comprising the following steps:
obtaining a metal image; extracting the wire drawing edge in the metal image to obtain a wire drawing image;
mapping the wire drawing edge in the wire drawing image to a Hough space through Hough transformation to obtain a first parameter space point; classifying according to the slope coordinates of the first parameter space points to obtain a plurality of parallel line categories; obtaining a broken line segment according to an end point on the wire drawing edge;
taking the central point of the broken line segment as a broken line position; clustering is carried out in each parallel line category according to the distance between the broken line positions to obtain a plurality of clustering clusters, and the average coordinate in each clustering cluster is used as the broken line category position; mapping all straight lines between the broken line category positions to a Hough space to obtain a second parameter space point;
if the voting value of the second parameter space point with the largest voting value is larger than a preset first voting value threshold, taking the second parameter space point with the largest voting value and other second parameter space points within the preset slope threshold as related parameter space points, taking the average coordinate of the related parameter space points as a parameter representative point, eliminating the related parameter space points until the second parameter space point with the largest voting value is not larger than the first voting value threshold, obtaining a plurality of representative points, and taking the second parameter space point with the voting value not larger than the first voting value threshold as an isolated point; obtaining the drawing repair difficulty according to the number of the parameter representative points and the isolated points;
obtaining parallelism according to the difference of the slope coordinates of the first parameter space point in each parallel line category; obtaining the broken grain degree according to the length of the broken grain line segment; taking the ratio of the parallelism to the broken line degree as the quality before repair; taking the product of the parallelism and the number of the parallel line categories as a repaired reference mass; obtaining a repair priority according to the quality before repair, the reference quality after repair and the drawing repair difficulty; and controlling the drawing repair according to the repair priority.
2. The metal wire drawing production control method based on Hough transform according to claim 1, wherein the extracting the wire drawing edge in the metal image to obtain the wire drawing image comprises:
sending the metal image into a pre-trained semantic segmentation network to obtain an initial wire drawing image; and after the initial wire drawing image is subjected to binarization processing, detecting the wire drawing edge through an edge detection algorithm to obtain the wire drawing image.
3. The metal wire drawing production control method based on Hough transform according to claim 1, wherein the classifying according to the first parameter space point slope coordinates to obtain a plurality of parallel line categories comprises:
and clustering according to the slope coordinates of the first parameter space points to obtain a plurality of clustering categories, wherein each clustering category is the parallel line category.
4. The metal wire drawing production control method based on Hough transform according to claim 1, wherein the obtaining of the broken line segments according to the end points on the wire drawing edge comprises:
obtaining an initial endpoint of the first parameter space point with a voting value larger than a preset second voting value threshold; taking the initial end points with the distance between the adjacent initial end points larger than a preset distance threshold as the end points; the wire drawing edge formed by the end points is a first line segment, and the first line segment smaller than a preset length threshold is removed to obtain a second line segment; and the broken line segments are formed by the corresponding end points between the second segments.
5. The metal wire drawing production control method based on Hough transform as claimed in claim 1, wherein said taking the average coordinates of the relevant parameter space points as parameter representative points comprises:
if the slope coordinates of the related parameter space points are equal, taking the average coordinate corresponding to the coordinate mean value of the related parameter space points as the parameter representative point;
if the slope coordinates of the related parameter space points are not equal, setting a plurality of reference points between the related parameter space points, and taking the reference point closest to the average coordinate of the related parameter space points as the parameter representative point.
6. The metal wire drawing production control method based on Hough transform according to claim 1, wherein the obtaining of the wire drawing repair difficulty according to the number of the parameter representative points and the isolated points comprises:
and weighting and summing the number of the parameter representative points and the number of the isolated points to obtain the drawing repair difficulty.
7. The metal wire drawing production control method based on Hough transform as claimed in claim 1, wherein said obtaining parallelism by difference of slope coordinates of said first parameter space point in each of said parallel line categories comprises:
taking the central point of the first parameter space point in each parallel line category in Hough space as a parallel reference point; and taking the difference of the average slope coordinates of all the first parameter space points in the parallel line category and the parallel reference point as the parallelism.
8. The metal wire drawing production control method based on Hough transform according to claim 1, wherein the obtaining of the degree of broken lines according to the length of the broken line segments comprises: obtaining the fracture degree according to a broken line degree formula; the formula of the broken line degree is as follows:
9. The metal wire drawing production control method based on Hough transform according to claim 1, wherein the obtaining of the repair priority according to the pre-repair quality, the post-repair reference quality and the wire drawing repair difficulty comprises: obtaining the repair priority according to a repair priority obtaining formula; the repair priority acquisition formula includes:
10. A metal wire drawing production control system based on hough transform, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 9 when executing the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210547770.2A CN114663713B (en) | 2022-05-20 | 2022-05-20 | Metal wire drawing production control method and system based on Hough transform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210547770.2A CN114663713B (en) | 2022-05-20 | 2022-05-20 | Metal wire drawing production control method and system based on Hough transform |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114663713A true CN114663713A (en) | 2022-06-24 |
CN114663713B CN114663713B (en) | 2022-08-30 |
Family
ID=82038051
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210547770.2A Active CN114663713B (en) | 2022-05-20 | 2022-05-20 | Metal wire drawing production control method and system based on Hough transform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114663713B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104751145A (en) * | 2015-04-10 | 2015-07-01 | 西安电子科技大学 | Local Hough transform and morphological optimization SAR (synthetic aperture radar) image power line detection method |
CN108550138A (en) * | 2018-03-14 | 2018-09-18 | 浙江大学山东工业技术研究院 | Refractory brick surface scratch recognition methods based on frequency filtering enhancing |
CN108596873A (en) * | 2018-03-14 | 2018-09-28 | 浙江大学山东工业技术研究院 | The recognition methods of refractory brick deep defects based on height histogram divion |
CN108662977A (en) * | 2018-03-14 | 2018-10-16 | 浙江大学山东工业技术研究院 | A kind of refractory brick geometric dimension measurement method |
CN110181166A (en) * | 2019-07-04 | 2019-08-30 | 上海锦持汽车零部件再制造有限公司 | A kind of wire drawing renovation technique remanufacturing automotive wheel |
CN113965420A (en) * | 2021-12-23 | 2022-01-21 | 西安道法数器信息科技有限公司 | Network security encryption method and system based on artificial intelligence |
-
2022
- 2022-05-20 CN CN202210547770.2A patent/CN114663713B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104751145A (en) * | 2015-04-10 | 2015-07-01 | 西安电子科技大学 | Local Hough transform and morphological optimization SAR (synthetic aperture radar) image power line detection method |
CN108550138A (en) * | 2018-03-14 | 2018-09-18 | 浙江大学山东工业技术研究院 | Refractory brick surface scratch recognition methods based on frequency filtering enhancing |
CN108596873A (en) * | 2018-03-14 | 2018-09-28 | 浙江大学山东工业技术研究院 | The recognition methods of refractory brick deep defects based on height histogram divion |
CN108662977A (en) * | 2018-03-14 | 2018-10-16 | 浙江大学山东工业技术研究院 | A kind of refractory brick geometric dimension measurement method |
CN110181166A (en) * | 2019-07-04 | 2019-08-30 | 上海锦持汽车零部件再制造有限公司 | A kind of wire drawing renovation technique remanufacturing automotive wheel |
CN113965420A (en) * | 2021-12-23 | 2022-01-21 | 西安道法数器信息科技有限公司 | Network security encryption method and system based on artificial intelligence |
Non-Patent Citations (1)
Title |
---|
刘纪等: "应用对抗网络和霍夫变换的织物点状缺陷检测研究", 《毛纺科技》 * |
Also Published As
Publication number | Publication date |
---|---|
CN114663713B (en) | 2022-08-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN116664559B (en) | Machine vision-based memory bank damage rapid detection method | |
CN116168026B (en) | Water quality detection method and system based on computer vision | |
CN109242870A (en) | A kind of sea horizon detection method divided based on image with textural characteristics | |
CN116934740B (en) | Plastic mold surface defect analysis and detection method based on image processing | |
CN114299066B (en) | Defect detection method and device based on salient feature pre-extraction and image segmentation | |
CN115294099B (en) | Method and system for detecting hairline defect in steel plate rolling process | |
CN111178190B (en) | Target detection method and device based on depth image and storage medium | |
CN108846831B (en) | Band steel surface defect classification method based on combination of statistical characteristics and image characteristics | |
CN115115612B (en) | Surface defect detection method and system for mechanical parts | |
CN112233116B (en) | Concave-convex mark visual detection method based on neighborhood decision and gray level co-occurrence matrix description | |
CN116205919A (en) | Hardware part production quality detection method and system based on artificial intelligence | |
CN110826408B (en) | Face recognition method by regional feature extraction | |
CN115861291A (en) | Patch circuit board production defect detection method based on machine vision | |
CN117689655B (en) | Metal button surface defect detection method based on computer vision | |
CN115082465B (en) | Wool and cashmere classification method based on scanning electron microscope image processing | |
CN112270658A (en) | Elevator steel wire rope detection method based on machine vision | |
CN115311267A (en) | Method for detecting abnormity of check fabric | |
CN114820625A (en) | Automobile top block defect detection method | |
CN107516315B (en) | Tunneling machine slag tapping monitoring method based on machine vision | |
CN117115075A (en) | Metal surface rust spot detection method integrating multidirectional multi-element universe local segmentation | |
CN117314901B (en) | Scale-adaptive chip detection neural network system | |
CN107977608B (en) | Method for extracting road area of highway video image | |
CN114663713B (en) | Metal wire drawing production control method and system based on Hough transform | |
CN116596921B (en) | Method and system for sorting incinerator slag | |
US10115195B2 (en) | Method and apparatus for processing block to be processed of urine sediment image |
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 |