Industrial defect analysis method and device, storage medium and equipment
By constructing the original coordinate plane in industrial defect analysis and rotating in different directions, the classification and linear aggregation of linear coordinate groups is solved, and the problem of poor accuracy and large calculation amount of linear aggregation results in the prior art is achieved, and more efficient and accurate defect analysis is achieved.
Patent Information
- Application Number
- CN202411930968.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-22
AI Technical Summary
In the existing industrial defect analysis methods, the accuracy of linear aggregation results is poor and the calculation amount is too large, resulting in low analysis efficiency.
By constructing the original coordinate plane, rotating the coordinates of industrial defects in different directions, classifying and linear aggregating linear coordinate groups, thereby improving the accuracy and efficiency of the analysis results.
The calculation amount in the linear aggregation process of industrial defects is reduced, and the accuracy of linear aggregation results is improved, thereby improving the efficiency and accuracy of defect analysis.
Smart Images

Figure CN119862516A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the technical field of industrial defect detection, and more specifically, to an industrial defect analysis method, an industrial defect analysis device, a computer-readable storage medium, and an electronic device. Background Art
[0002] In the existing industrial defect analysis method, two randomly selected industrial defects are connected by lines, and then the linear clustering between the industrial defects is determined based on the connection line. However, the linear clustering results obtained by this method have poor accuracy and there is a problem of excessive calculation.
[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0004] The purpose of the present disclosure is to provide an industrial defect analysis method, an industrial defect analysis device, a computer-readable storage medium and an electronic device, thereby at least to a certain extent overcoming the problems of poor accuracy of linear clustering results and excessive calculation amount caused by the limitations and defects of related technologies.
[0005] According to one aspect of the present disclosure, there is provided a method for analyzing industrial defects, comprising:
[0006] Constructing an original coordinate plane according to the multiple industrial defects, and determining first original coordinate positions of the multiple industrial defects on the original coordinate plane respectively;
[0007] Rotating the industrial defect in the original coordinate plane along a first direction, and determining a target coordinate position of the industrial defect on the rotated coordinate plane according to the first original coordinate position and a first rotation angle;
[0008] Classifying the industrial defects according to the target coordinate positions to obtain a linear coordinate group, and rotating the industrial defects in the rotated coordinate plane along a second direction to obtain the original coordinate plane, wherein the first direction is different from the second direction;
[0009] According to the second original coordinate position of the industrial defects included in the linear coordinate group in the original coordinate plane, linear clustering is performed on the industrial defects included in the linear coordinate group to obtain a linear clustering result, and the industrial defects are analyzed according to the linear clustering result.
[0010] In an exemplary embodiment of the present disclosure, constructing an original coordinate plane according to a plurality of industrial defects includes:
[0011] Acquire multiple industrial defects obtained by performing product defect detection on industrial products, and construct a two-dimensional coordinate axis based on the product surface area of the industrial products;
[0012] Based on the regional coordinate positions of the multiple industrial defects in the surface area of the product, the multiple industrial defects are mapped to the coordinate plane of the two-dimensional coordinate axis to obtain the original coordinate plane.
[0013] In an exemplary embodiment of the present disclosure, determining a target coordinate position of an industrial defect on a rotated coordinate plane according to the first original coordinate position and the first rotation angle includes:
[0014] Calculating a first sine value and a first cosine value of a first rotation angle, and constructing a first rotation matrix according to the first sine value and the first cosine value of the first rotation angle;
[0015] According to the first original coordinate position and the first rotation matrix, a target coordinate position of the industrial defect on the rotated coordinate plane is determined.
[0016] In an exemplary embodiment of the present disclosure, the industrial defects are classified according to the target coordinate positions to obtain a linear coordinate group, including:
[0017] Determine the target horizontal coordinate value of the industrial defect in the rotated coordinate plane according to the target coordinate position, and sort the industrial defects according to the target horizontal coordinate value to obtain a defect sorting result;
[0018] Selecting any industrial defect in the defect sorting result as a first target defect, and calculating a first adjacent defect array of the first target defect;
[0019] Repeating the process of determining the first adjacent defect array to obtain other adjacent defect arrays of other target defects except the first target defect in the defect sorting result;
[0020] The industrial defects are classified according to the first adjacent defect array and other adjacent defect arrays to obtain the linear coordinate group.
[0021] In an exemplary embodiment of the present disclosure, calculating a first adjacent defect array of the first target defect includes:
[0022] A first target left array and a first target right array of the first target defect are calculated, and a first adjacent defect array of the first target defect is obtained according to the first target left array and the first target right array.
[0023] In an exemplary embodiment of the present disclosure, calculating a first target left array of the first target defect includes:
[0024] Calculating a first left distance between a first left defect adjacent to the first target defect and the first target defect;
[0025] If the first left distance is less than or equal to the preset distance threshold, writing the target coordinate position of the first left defect into the first target left array corresponding to the first target defect;
[0026] Calculating a second left distance between a second left defect adjacent to the first left defect and the first target defect;
[0027] If the second left distance is less than or equal to a preset distance threshold, writing the target coordinate position of the second left defect into the first target left array;
[0028] The writing process of the second left defect is repeated until the left distance between the first target defect and the left defect is greater than a preset distance threshold, so as to obtain a first target left array.
[0029] In an exemplary embodiment of the present disclosure, the industrial defects are classified according to the first adjacent defect array and other adjacent defect arrays to obtain the linear coordinate group, including:
[0030] Calculating the number of first defect points of industrial defects included in the first adjacent defect array and other adjacent defect arrays;
[0031] Sort the first adjacent defect array and other adjacent defect arrays according to the first defect point quantity to obtain a defect point array sorting result;
[0032] A defect point array whose first defect point quantity is greater than a preset quantity threshold is extracted from the defect point data sorting result as the linear coordinate group.
[0033] In an exemplary embodiment of the present disclosure, the industrial defect in the rotated coordinate plane is rotated along the second direction to obtain the original coordinate plane, including:
[0034] According to the first rotation angle rotated in the first rotation process, a second rotation angle is determined, and based on the second rotation angle, the industrial defect in the rotated coordinate plane is rotated in a second direction to obtain the original coordinate plane.
[0035] In an exemplary embodiment of the present disclosure, according to the second original coordinate position of the industrial defects included in the linear coordinate group in the original coordinate plane, linearly clustering the industrial defects included in the linear coordinate group to obtain a linear clustering result includes:
[0036] Calculating a second sine value and a second cosine value of a second rotation angle, and constructing a second rotation matrix according to the second sine value and the second cosine value of the second rotation angle;
[0037] Determine a second original coordinate position of the industrial defect included in the linear coordinate group in the original coordinate plane according to the target coordinate position of the industrial defect included in the linear coordinate group in the rotated coordinate plane and the second rotation matrix;
[0038] According to the second original coordinate position, the second original ordinate value of the industrial defect included in the linear coordinate group is determined, and the industrial defects included in the linear coordinate group are linearly clustered according to the second original ordinate value to obtain a linear clustering result.
[0039] In an exemplary embodiment of the present disclosure, linearly clustering the industrial defects included in the linear coordinate group according to the second original ordinate value includes:
[0040] Determine the second minimum ordinate value and the second maximum ordinate value in the second original ordinate value, and use the industrial defect corresponding to the second minimum ordinate value in the linear coordinate group as the starting point of the line segment, and use the industrial defect corresponding to the second maximum ordinate value in the linear coordinate group as the end point of the line segment;
[0041] Based on the line segment start point and the line segment end point, a linear clustering result of the industrial defects included in the linear coordinate group is drawn.
[0042] In an exemplary embodiment of the present disclosure, the industrial defect analysis method further includes:
[0043] In response to a request for obtaining the linear aggregation results sent by a business terminal, the linear aggregation results are fed back to the business terminal, and the linear aggregation results are displayed on the display interface of the business terminal, so that the user can analyze the product defect type of the industrial product corresponding to the industrial defect according to the linear aggregation results, and debug the preparation process of the industrial product based on the obtained product defect type.
[0044] In an exemplary embodiment of the present disclosure, the first rotation angle in the first direction rotation process includes 0°-179°.
[0045] According to one aspect of the present disclosure, there is provided an analysis device for industrial defects, comprising:
[0046] An original coordinate position determination module, used to construct an original coordinate plane according to a plurality of industrial defects, and determine first original coordinate positions of the plurality of industrial defects on the original coordinate plane respectively;
[0047] a target coordinate position determination module, configured to rotate the industrial defect in the original coordinate plane along a first direction, and determine the target coordinate position of the industrial defect on the rotated coordinate plane according to the first original coordinate position and a first rotation angle;
[0048] a linear coordinate group determination module, configured to classify the industrial defects according to the target coordinate position to obtain a linear coordinate group, and rotate the industrial defects in the rotated coordinate plane along a second direction to obtain the original coordinate plane, wherein the first direction is different from the second direction;
[0049] The defect analysis module is used to linearly cluster the industrial defects included in the linear coordinate group according to the second original coordinate position of the industrial defects included in the linear coordinate group in the original coordinate plane to obtain a linear clustering result, and analyze the industrial defects according to the linear clustering result.
[0050] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the industrial defect analysis method described in any one of the above is implemented.
[0051] According to one aspect of the present disclosure, there is provided an electronic device, including:
[0052] Processor; and
[0053] A memory, configured to store executable instructions of the processor;
[0054] Wherein, the processor is configured to execute any one of the above-mentioned industrial defect analysis methods by executing the executable instructions.
[0055] An analysis method for industrial defects provided by an embodiment of the present disclosure comprises the following steps: on the one hand, an original coordinate plane is constructed according to a plurality of industrial defects, and first original coordinate positions of the plurality of industrial defects on the original coordinate plane are determined; then the industrial defects in the original coordinate plane are rotated along a first direction, and according to the first original coordinate position and the first rotation angle, a target coordinate position of the industrial defects on the rotated coordinate plane is determined; then the industrial defects are classified according to the target coordinate position to obtain a linear coordinate group, and the industrial defects in the rotated coordinate plane are rotated along a second direction to obtain the original coordinate plane, wherein the first direction is different from the second direction; finally, according to the second original coordinate positions of the industrial defects included in the linear coordinate group in the original coordinate plane, the industrial defects included in the linear coordinate group are linearly clustered to obtain a linear clustering result, and the industrial defects are analyzed according to the linear clustering result, thereby reducing the amount of calculation of the industrial defects in the linear clustering process, thereby solving the problem of excessive amount of calculation in the related art caused by directly connecting two randomly selected industrial defects and then determining the linear clustering situation between the industrial defects based on the connection; on the other hand, the accuracy of the obtained linear clustering result is also improved, thereby improving the accuracy of the defect analysis result.
[0056] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0058] Figure 1 A flowchart schematically illustrates a method for analyzing industrial defects according to an exemplary embodiment of the present disclosure.
[0059] Figure 2 An example diagram of a coordinate scene of an original coordinate plane according to an example embodiment of the present disclosure is schematically shown.
[0060] Figure 3 A scene example diagram of a coordinate plane obtained by rotating 90 degrees in a first rotation direction according to an example embodiment of the present disclosure is schematically shown.
[0061] Figure 4 A scene example diagram of a coordinate plane obtained by rotating 30 degrees in a first rotation direction according to an example embodiment of the present disclosure is schematically shown.
[0062] Figure 5 A scene example diagram schematically illustrates a matching process of a linear coordinate group according to an example embodiment of the present disclosure.
[0063] Figure 6 An exemplary diagram schematically illustrates an analysis result of an industrial defect according to an exemplary embodiment of the present disclosure.
[0064] Figure 7 A structural block diagram of an industrial defect analysis device according to an exemplary embodiment of the present disclosure is schematically shown.
[0065] Figure 8 An electronic device for implementing an analysis method for industrial defects according to an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0066] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, the known technical solutions are not shown or described in detail to avoid obscuring the various aspects of the present disclosure.
[0067] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0068] In the relevant industrial defect analysis method, it can be implemented as follows: first, randomly select two points corresponding to industrial defects to form a line; second, traverse all points corresponding to industrial defects to calculate the vertical distance between the line; then, if the distance between the point and the line meets a certain unit (such as 5mm), the point is considered to meet the conditions; further, when the number of points that meet the conditions reaches a certain number (such as greater than or equal to 50), it is considered that the industrial defect can be linearly clustered. However, this scheme has the following defects: since it is necessary to calculate the line combination of all two coordinate points, the amount of calculation is large and the amount of calculation increases exponentially with the number of points; however, if the calculation is performed in a random partial number of times, it will be missed, which makes the accuracy of the obtained linear clustering result low.
[0069] Based on this, this exemplary embodiment first provides an industrial defect analysis method, which can be run on a server, server cluster or cloud server, etc. Of course, those skilled in the art can also run the method disclosed in this disclosure on other platforms as required, and this exemplary embodiment does not specifically limit this. Figure 1 As shown, the industrial defect analysis method may include the following steps:
[0070] Step S110. construct an original coordinate plane according to a plurality of industrial defects, and determine first original coordinate positions of the plurality of industrial defects on the original coordinate plane respectively;
[0071] Step S120: rotating the industrial defect in the original coordinate plane along a first direction, and determining a target coordinate position of the industrial defect on the rotated coordinate plane according to the first original coordinate position and the first rotation angle;
[0072] Step S130. Classify the industrial defects according to the target coordinate position to obtain a linear coordinate group, and rotate the industrial defects in the rotated coordinate plane along a second direction to obtain the original coordinate plane, wherein the first direction is different from the second direction;
[0073] Step S140. According to the second original coordinate position of the industrial defects included in the linear coordinate group in the original coordinate plane, linearly cluster the industrial defects included in the linear coordinate group to obtain a linear clustering result, and analyze the industrial defects according to the linear clustering result.
[0074] In the above-described analysis method of industrial defects, on the one hand, an original coordinate plane is constructed according to a plurality of industrial defects, and the first original coordinate positions of the plurality of industrial defects on the original coordinate plane are determined; then the industrial defects in the original coordinate plane are rotated along a first direction, and according to the first original coordinate position and the first rotation angle, the target coordinate position of the industrial defects on the rotated coordinate plane is determined; then the industrial defects are classified according to the target coordinate position to obtain a linear coordinate group, and the industrial defects in the rotated coordinate plane are rotated along a second direction to obtain the original coordinate plane, wherein the first direction is different from the second direction; finally, according to the second original coordinate position of the industrial defects included in the linear coordinate group in the original coordinate plane, the industrial defects included in the linear coordinate group are linearly clustered to obtain a linear clustering result, and the industrial defects are analyzed according to the linear clustering result, thereby reducing the amount of calculation of the industrial defects in the linear clustering process, thereby solving the problem of excessive calculation caused by directly connecting two randomly selected industrial defects and then determining the linear clustering situation between the industrial defects based on the connection in the related art; on the other hand, the accuracy of the obtained linear clustering result is also improved, thereby improving the accuracy of the defect analysis result.
[0075] Hereinafter, the industrial defect analysis method involved in the exemplary embodiment of the present disclosure will be explained and illustrated in detail with reference to the accompanying drawings.
[0076] First, the terms involved in the exemplary embodiments of the present disclosure are explained and illustrated.
[0077] Linear clustering: The present disclosure describes the defects of industrial products as a number of coordinate points on a plane, which show a linear clustering trend in several directions; at the same time, the linear trend is defined as the vertical distance between the coordinate points of two defects in the linear direction meets a certain unit (such as 5mm) and the number of points reaches a certain number (such as greater than or equal to 50, of course it can also be other numbers, and this example does not impose any special restrictions on this).
[0078] Industrial defects: Industrial defects refer to various quality problems that occur in the production process of industrial products. These defects may affect the performance and reliability of the products. The categories of industrial defects may include but are not limited to: surface defects: such as inclusions, scratches, pressed oxide scale, cracks, pitting and plaques; small target defects: defects with smaller size in the image, usually less than 32×32 pixels, etc. In the process of practical application, the detection and identification of industrial defects is crucial to ensure product quality; among them, the detection and identification of industrial defects can be achieved in the following ways: one is based on deep learning methods; for example, industrial defect detection can be based on convolutional neural networks or generative adversarial networks; the other is traditional machine vision methods; for example, industrial defect detection can be performed using methods such as KNN classifiers and naive Bayes classifiers.
[0079] Secondly, the technical implementation principle of the exemplary embodiment of the present disclosure is explained and illustrated. Specifically, in the actual application process, the plane coordinates can be rotated by 0-179 degrees, assuming that the y coordinate values of the points are the same, and through linear sorting, only the conditions near the x coordinate points corresponding to the industrial defects are calculated; under this premise, compared with the existing methods, irrelevant calculation processes are saved to achieve the problem of improving the calculation speed and reducing the calculation burden.
[0080] The following will Figure 1 The analysis method of industrial defects shown in the following is further explained and illustrated. Specifically:
[0081] In step S110, an original coordinate plane is constructed according to a plurality of industrial defects, and first original coordinate positions of the plurality of industrial defects on the original coordinate plane are determined.
[0082] In this example embodiment, first, an original coordinate plane is constructed; specifically, it can be implemented in the following manner: obtain multiple industrial defects obtained by performing product defect detection on industrial products, and construct a two-dimensional coordinate axis based on the product surface area of the industrial product; based on the regional coordinate positions of the multiple industrial defects in the product surface area, map the multiple industrial defects to the coordinate plane of the two-dimensional coordinate axis to obtain the original coordinate plane; that is, in the process of constructing the original coordinate plane, a coordinate system can be constructed with the lower left corner of the product surface area of the industrial product as the coordinate origin; then, proportional scaling is performed based on the size of the product surface area and the size of the coordinate axis, and the regional coordinate position is scaled based on the scaling ratio, and then the industrial defects are mapped to the coordinate system based on the scaled regional coordinate position to obtain the original coordinate plane. Among them, the obtained original coordinate plane can be referenced. Figure 2 shown.
[0083] Secondly, after obtaining the original coordinate plane, it is also necessary to record the first original coordinate position of each industrial defect in the original coordinate plane; wherein the first original coordinate position can be expressed as D1: (x1, y1), D2: (x2, y2), D3: (x3, y3), ..., Dn: (xn, yn), etc.; wherein n indicates the number of industrial defects.
[0084] In step S120, the industrial defect in the original coordinate plane is rotated along a first direction, and the target coordinate position of the industrial defect on the rotated coordinate plane is determined according to the first original coordinate position and the first rotation angle.
[0085] In this example embodiment, first, the industrial defects in the original coordinate plane are rotated along a first direction; wherein the first direction rotation recorded here refers to a clockwise rotation, and the clockwise rotation angle during the clockwise rotation process includes 0°-179°; that is, in the actual application process, the rotation range can be set to [0-179], and the angle of each rotation can be 1° or other degrees. In the actual application process, it can be selected according to actual needs, and this example does not impose special restrictions on this; and it is also necessary to add that in the rotation process, the default starting rotation angle is 0, and the y-axis coordinate is ignored. As a result, subsequent calculations can obtain the current angle based on the longitudinal linear aggregation, that is, the 90° linear aggregation situation; each rotation angle requires the calculation of the industrial defect analysis result once until the rotation angle reaches the final value; wherein, the coordinate plane obtained after a 90-degree clockwise rotation can be referenced. Figure 3 As shown; the coordinate plane obtained after rotating 30 degrees clockwise can be referred to Figure 4 It should be noted that the clockwise rotation can be achieved in the following ways:
[0086] First, the clockwise rotation angle is converted into clockwise rotation radians; wherein the specific calculation formula for the clockwise rotation radians can be shown in the following formula (1):
[0087] θ_rad=θ_deg*(π / 180); Formula (1)
[0088] Among them, θ_rad is the rotation radian; θ_deg is the rotation angle. Then, based on the obtained clockwise rotation radian, clockwise rotation can be performed.
[0089] Secondly, according to the first original coordinate position and the first rotation angle, the target coordinate position of the industrial defect on the rotated coordinate plane is determined; specifically, it can be achieved in the following way: first, the first sine value and the first cosine value of the first rotation angle are calculated, and the first rotation matrix is constructed according to the first sine value and the first cosine value of the first rotation angle; secondly, according to the first original coordinate position and the first rotation matrix, the target coordinate position of the industrial defect on the rotated coordinate plane is determined. That is, in the actual application process, the first sine value sin(θ) and the first cosine value cos(θ) of the clockwise rotation angle can be determined first, and then the first rotation matrix (that is, the clockwise rotation matrix) can be constructed; wherein the obtained clockwise rotation matrix R can be shown as the following formula (2):
[0090]
[0091] Furthermore, after obtaining the clockwise rotation matrix, the target coordinate position can be determined. Taking the point (x, y) as an example, the specific calculation process of the target coordinate position (x', y') after rotation can be shown in the following formula (3) and formula (4):
[0092] x' = x * cos(θ) - y * sin(θ); Formula (3)
[0093] y' = x * sin(θ) + y * cos(θ); Formula (4)
[0094] In step S130, the industrial defects are classified according to the target coordinate positions to obtain a linear coordinate group, and the industrial defects in the rotated coordinate plane are rotated along a second direction to obtain the original coordinate plane, where the first direction is different from the second direction.
[0095] In this exemplary embodiment, first, industrial defects are classified according to the target coordinate position to obtain a linear coordinate group; specifically, this can be achieved in the following manner: according to the target coordinate position, the target horizontal coordinate value of the industrial defect in the rotated coordinate plane is determined, and the industrial defects are sorted according to the target horizontal coordinate value to obtain a defect sorting result; any industrial defect in the defect sorting result is selected as the first target defect, and the first adjacent defect array of the first target defect is calculated; the determination process of the first adjacent defect array is repeated to obtain other adjacent defect arrays of other target defects except the first target defect in the defect sorting result; the industrial defects are classified according to the first adjacent defect array and other adjacent defect arrays to obtain the linear coordinate group.
[0096] In an exemplary embodiment, calculating the first adjacent defect array of the first target defect can be achieved by calculating the first target left array and the first target right array of the first target defect, and obtaining the first adjacent defect array of the first target defect based on the first target left array and the first target right array.
[0097] In an exemplary embodiment, calculating the first target left array of the first target defect can be achieved in the following manner: calculating the first left distance between the first left defect adjacent to the first target defect and the first target defect; if the first left distance is less than or equal to a preset distance threshold, writing the target coordinate position of the first left defect into the first target left array corresponding to the first target defect; calculating the second left distance between the second left defect adjacent to the first left defect and the first target defect; if the second left distance is less than or equal to the preset distance threshold, writing the target coordinate position of the second left defect into the first target left array; repeating the writing process of the second left defect until the left distance between the first target defect and the left defect is greater than the preset distance threshold, so as to obtain the first target left array.
[0098] In an exemplary embodiment, the industrial defects are classified according to the first adjacent defect array and other adjacent defect arrays to obtain the linear coordinate group, which can be achieved in the following manner: calculating the number of first defect points of the industrial defects included in the first adjacent defect array and other adjacent defect arrays; sorting the first adjacent defect array and other adjacent defect arrays according to the first defect point number to obtain a defect point array sorting result; and extracting a defect point array whose first defect point number is greater than a preset number threshold from the defect point data sorting result as the linear coordinate group.
[0099] The specific determination process of the linear coordinate group will be further explained and illustrated below. Specifically, in the actual application process, it is necessary to first set the linear clustering condition; wherein, the linear clustering condition is: if the distance between two industrial defects is less than or equal to the preset distance threshold (for example, 1mm), and the number of other industrial defects near the industrial defect and the distance between it and the industrial defect is less than or equal to the preset distance threshold reaches the preset number threshold (for example, 7), then it is considered to be linear clustering. Under this premise, first, sort the x-coordinate of each industrial defect from small to large to obtain ordered coordinate points and store them in a numerical data structure; then, construct two arrays of the same length to respectively save the number of points that meet the conditions in front of each coordinate point and the number of points that meet the conditions behind; wherein, the specific calculation scenario diagram can be referred to. Figure 5As shown. Furthermore, in the actual application process, if the number of points that meet the conditions before the first point is 0, traverse and calculate the distance between the second point and the first point. If the condition is met, count 1; calculate the distance between the third point and the first point. If the condition is not met, end the calculation. Similarly, calculate the number of points that meet the conditions before all points and the number of points that meet the conditions after all points; finally, add the number of points that meet the conditions before + the number of points that meet the conditions after, and add the points themselves, to get the cumulative number of points that meet the conditions for each point. Finally, group the coordinate points that meet the conditions to get a linear coordinate point group; specifically, traverse the array of the cumulative number of points that meet the conditions to determine whether the number is 7 consecutively met. If it is met, it is classified as a linear coordinate point group; at the same time, it is also necessary to calculate the two endpoints of the linear coordinate point group, and obtain the points with the smallest and largest y coordinates in the coordinate axis of the linear coordinate group as the two endpoints of the linear aggregation.
[0100] Secondly, after obtaining the linear coordinate group, the industrial defects in the rotated coordinate plane can be rotated along the second direction to obtain the original coordinate plane; specifically, this can be achieved in the following manner: according to the first rotation angle rotated in the first rotation process, the second rotation angle is determined, and based on the second rotation angle, the industrial defects in the rotated coordinate plane are rotated in the second direction to obtain the original coordinate plane. It should be noted here that the reason why counterclockwise rotation is required is that after obtaining the linear coordinate group, if a linear aggregation result needs to be generated, it needs to be generated on the basis of the original coordinate plane.
[0101] In step S140, according to the second original coordinate position of the industrial defects included in the linear coordinate group in the original coordinate plane, the industrial defects included in the linear coordinate group are linearly clustered to obtain a linear clustering result, and the industrial defects are analyzed according to the linear clustering result.
[0102] In this example embodiment, first, according to the second original coordinate positions of the industrial defects included in the linear coordinate group in the original coordinate plane, the industrial defects included in the linear coordinate group are linearly clustered to obtain a linear clustering result; specifically, it can be achieved in the following way: calculate the second sine value and the second cosine value of the second rotation angle, and construct a second rotation matrix according to the second sine value and the second cosine value of the second rotation angle; determine the second original coordinate positions of the industrial defects included in the linear coordinate group in the original coordinate plane according to the target coordinate positions of the industrial defects included in the linear coordinate group in the rotated coordinate plane and the second rotation matrix; determine the second original vertical coordinate values of the industrial defects included in the linear coordinate group according to the second original vertical coordinate values, and linearly cluster the industrial defects included in the linear coordinate group according to the second original vertical coordinate values to obtain a linear clustering result.
[0103] In an exemplary embodiment, linear clustering of industrial defects included in the linear coordinate group according to the second original ordinate value can be achieved in the following manner: determine the second minimum ordinate value and the second maximum ordinate value in the second original ordinate value, and use the industrial defect corresponding to the second minimum ordinate value in the linear coordinate group as the starting point of the line segment, and use the industrial defect corresponding to the second maximum ordinate value in the linear coordinate group as the end point of the line segment; based on the starting point and the end point of the line segment, draw the linear clustering result of the industrial defects included in the linear coordinate group.
[0104] The following will further explain and illustrate the specific drawing process of the linear aggregation result. Specifically, first, the rotated coordinate plane is rotated along the second direction (that is, counterclockwise); the specific calculation process of the counterclockwise rotation arc can refer to the following formula (5):
[0105] θ_rad=-θ_deg*(π / 180); Formula (5)
[0106] Then, a counterclockwise rotation matrix (ie, the second rotation matrix) is constructed; specifically, the obtained second rotation matrix can be specifically referred to as shown in the following formula (6):
[0107]
[0108] Furthermore, after obtaining the counterclockwise rotation matrix, the second original coordinate position can be determined. Taking the point (x, y) as an example, the specific calculation process of the second original coordinate position (x", y") after rotation can be shown in the following formula (7) and formula (8):
[0109] x” = x'* cos(θ) + y'* sin(θ); Formula (7)
[0110] y”= -x’* sin(θ) + y’* cos(θ); Formula (8)
[0111] Finally, after obtaining the coordinates of the second original position, the two endpoints of the linear coordinate point group can be calculated, and the points with the minimum and maximum y coordinates in the coordinate axis are obtained as the two ends of the two lines; connecting these two endpoints can obtain the linear aggregation result.
[0112] At this point, the industrial defect analysis method involved in the example embodiment of the present disclosure has been fully realized. In the process of actual application, after obtaining the linear aggregation result, the method may also include: responding to the linear aggregation result acquisition request sent by the business terminal, feeding back the linear aggregation result to the business terminal, and displaying the linear aggregation result on the display interface of the business terminal, so that the user can analyze the product defect type of the industrial product corresponding to the industrial defect according to the linear aggregation result, and debug the preparation process of the industrial product based on the obtained product defect type. That is, in the actual usage scenario, the business terminal (such as a web page) initiates an acquisition request to the server, and the server obtains the planar linear aggregation that needs to be calculated according to the user's request problem information; then, the server returns all endpoints of the linear aggregation result to the request source; the plane and the points on the plane are drawn at the business interruption, and the line is drawn according to the two endpoints of the linear aggregation, so as to obtain the following. Figure 6 The web page of the business end shown is displayed in linear aggregation; based on this method, the debugging efficiency and defect analysis efficiency can be improved, and the accuracy of the defect analysis results can also be improved.
[0113] Furthermore, the industrial defect analysis method provided by the example embodiment of the present disclosure also has the following advantages: on the one hand, the plane coordinates are rotated by technical points to solve the linear aggregation calculation at any angle; on the other hand, the technical points are sorted according to the coordinates (x-axis), and then the nearby left and right points that meet the conditions are calculated, which improves the calculation performance and ensures that no points are missed, thereby achieving the purpose of improving the accuracy of the linear aggregation results.
[0114] The following are embodiments of the device disclosed herein, which can be used to execute the method embodiments disclosed herein. For details not disclosed in the device embodiments disclosed herein, please refer to the method embodiments disclosed herein.
[0115] The exemplary embodiment of the present disclosure also provides an analysis device for industrial defects. Specifically, refer to Figure 7 As shown, the industrial defect analysis device may include an original coordinate position determination module 710 , a target coordinate position determination module 720 , a linear coordinate group determination module 730 , and a defect analysis module 740 .
[0116] in:
[0117] The original coordinate position determination module 710 may be used to construct an original coordinate plane according to a plurality of industrial defects, and determine first original coordinate positions of the plurality of industrial defects on the original coordinate plane;
[0118] The target coordinate position determination module 720 may be used to rotate the industrial defect in the original coordinate plane along a first direction, and determine the target coordinate position of the industrial defect on the rotated coordinate plane according to the first original coordinate position and the first rotation angle;
[0119] The linear coordinate group determination module 730 may be used to classify the industrial defects according to the target coordinate position to obtain a linear coordinate group, and rotate the industrial defects in the rotated coordinate plane along a second direction to obtain the original coordinate plane, wherein the first direction is different from the second direction;
[0120] The defect analysis module 740 can be used to linearly cluster the industrial defects included in the linear coordinate group according to the second original coordinate position of the industrial defects included in the linear coordinate group in the original coordinate plane to obtain a linear clustering result, and analyze the industrial defects based on the linear clustering result.
[0121] In an exemplary embodiment of the present disclosure, an original coordinate plane is constructed based on multiple industrial defects, including: acquiring multiple industrial defects obtained by performing product defect detection on an industrial product, and constructing a two-dimensional coordinate axis based on the product surface area of the industrial product; based on the regional coordinate positions of the multiple industrial defects in the product surface area, mapping the multiple industrial defects to the coordinate plane of the two-dimensional coordinate axis to obtain the original coordinate plane.
[0122] In an exemplary embodiment of the present disclosure, the target coordinate position of the industrial defect on the rotated coordinate plane is determined according to the first original coordinate position and the first rotation angle, including: calculating the first sine value and the first cosine value of the first rotation angle, and constructing a first rotation matrix according to the first sine value and the first cosine value of the first rotation angle; determining the target coordinate position of the industrial defect on the rotated coordinate plane according to the first original coordinate position and the first rotation matrix.
[0123] In an exemplary embodiment of the present disclosure, the industrial defects are classified according to the target coordinate position to obtain a linear coordinate group, including: determining the target horizontal coordinate value of the industrial defect in the rotated coordinate plane according to the target coordinate position, and sorting the industrial defects according to the target horizontal coordinate value to obtain a defect sorting result; selecting any industrial defect in the defect sorting result as the first target defect, and calculating the first adjacent defect array of the first target defect; repeating the determination process of the first adjacent defect array to obtain other adjacent defect arrays of other target defects except the first target defect in the defect sorting result; classifying the industrial defects according to the first adjacent defect array and other adjacent defect arrays to obtain the linear coordinate group.
[0124] In an exemplary embodiment of the present disclosure, calculating the first adjacent defect array of the first target defect includes: calculating the first target left array and the first target right array of the first target defect, and obtaining the first adjacent defect array of the first target defect based on the first target left array and the first target right array.
[0125] In an exemplary embodiment of the present disclosure, calculating the first target left array of the first target defect includes: calculating the first left distance between a first left defect adjacent to the first target defect and the first target defect; if the first left distance is less than or equal to a preset distance threshold, writing the target coordinate position of the first left defect into the first target left array corresponding to the first target defect; calculating the second left distance between a second left defect adjacent to the first left defect and the first target defect; if the second left distance is less than or equal to the preset distance threshold, writing the target coordinate position of the second left defect into the first target left array; repeating the writing process of the second left defect until the left distance between the first target defect and the left defect is greater than the preset distance threshold, so as to obtain the first target left array.
[0126] In an exemplary embodiment of the present disclosure, the industrial defects are classified according to the first adjacent defect array and other adjacent defect arrays to obtain the linear coordinate group, including: calculating the number of first defect points of the industrial defects included in the first adjacent defect array and other adjacent defect arrays; sorting the first adjacent defect array and other adjacent defect arrays according to the first defect point number to obtain a defect point array sorting result; extracting a defect point array whose first defect point number is greater than a preset number threshold from the defect point data sorting result as the linear coordinate group.
[0127] In an exemplary embodiment of the present disclosure, the industrial defects in the rotated coordinate plane are rotated along a second direction to obtain the original coordinate plane, including: determining a second rotation angle based on a first rotation angle rotated during a first rotation process, and rotating the industrial defects in the rotated coordinate plane in a second direction based on the second rotation angle to obtain the original coordinate plane.
[0128] In an exemplary embodiment of the present disclosure, according to the second original coordinate positions of the industrial defects included in the linear coordinate group in the original coordinate plane, linear clustering is performed on the industrial defects included in the linear coordinate group to obtain a linear clustering result, including: calculating the second sine value and the second cosine value of the second rotation angle, and constructing a second rotation matrix according to the second sine value and the second cosine value of the second rotation angle; determining the second original coordinate positions of the industrial defects included in the linear coordinate group in the original coordinate plane according to the target coordinate positions of the industrial defects included in the linear coordinate group in the rotated coordinate plane and the second rotation matrix; determining the second original vertical coordinate values of the industrial defects included in the linear coordinate group according to the second original vertical coordinate values, and linearly clustering the industrial defects included in the linear coordinate group according to the second original vertical coordinate values to obtain a linear clustering result.
[0129] In an exemplary embodiment of the present disclosure, linear clustering of industrial defects included in the linear coordinate group is performed according to the second original ordinate value, including: determining the second minimum ordinate value and the second maximum ordinate value in the second original ordinate value, and taking the industrial defect corresponding to the second minimum ordinate value in the linear coordinate group as the starting point of the line segment, and taking the industrial defect corresponding to the second maximum ordinate value in the linear coordinate group as the end point of the line segment; based on the line segment starting point and the line segment end point, drawing the linear clustering result of the industrial defects included in the linear coordinate group.
[0130] In an exemplary embodiment of the present disclosure, the industrial defect analysis device further includes:
[0131] A defect type determination module is used to respond to a request for obtaining a linear aggregation result sent by a business terminal, feed back the linear aggregation result to the business terminal, and display the linear aggregation result on a display interface of the business terminal, so that a user can analyze the product defect type of the industrial product corresponding to the industrial defect according to the linear aggregation result, and debug the preparation process of the industrial product based on the obtained product defect type.
[0132] In an exemplary embodiment of the present disclosure, the first rotation angle in the first direction rotation process includes 0°-179°.
[0133] The specific details of each module in the above-mentioned industrial defect analysis device have been described in detail in the corresponding industrial defect analysis method, so they will not be repeated here.
[0134] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0135] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0136] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided. It will be appreciated by those skilled in the art that various aspects of the present disclosure may be implemented as a system, method or program product. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which may be collectively referred to herein as a "circuit", "module" or "system".
[0137] Refer to the following Figure 8 The electronic device 800 according to this embodiment of the present disclosure is described. Figure 8 The electronic device 800 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0138] like Figure 8 As shown, the electronic device 800 is in the form of a general computing device. The components of the electronic device 800 may include, but are not limited to: the at least one processing unit 810, the at least one storage unit 820, a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810), and a display unit 840.
[0139] The storage unit stores program codes, which can be executed by the processing unit 810, so that the processing unit 810 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 810 can perform the following steps: Figure 1Step S110 shown in: constructing an original coordinate plane according to multiple industrial defects, and determining the first original coordinate positions of the multiple industrial defects on the original coordinate plane respectively; step S120: rotating the industrial defects in the original coordinate plane along a first direction, and determining the target coordinate position of the industrial defects on the rotated coordinate plane according to the first original coordinate position and the first rotation angle; step S130: classifying the industrial defects according to the target coordinate position to obtain a linear coordinate group, and rotating the industrial defects in the rotated coordinate plane along a second direction to obtain the original coordinate plane, the first direction is different from the second direction; step S140: linearly clustering the industrial defects included in the linear coordinate group according to the second original coordinate positions of the industrial defects included in the linear coordinate group in the original coordinate plane to obtain a linear clustering result, and analyzing the industrial defects according to the linear clustering result.
[0140] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 8201 and / or a cache memory unit 8202 , and may further include a read-only memory unit (ROM) 8203 .
[0141] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0142] Bus 830 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0143] The electronic device 800 may also communicate with one or more external devices 900 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 800, and / or communicate with any device that enables the electronic device 800 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 850. Furthermore, the electronic device 800 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 860. As shown, the network adapter 860 communicates with other modules of the electronic device 800 via a bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0144] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0145] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above "Exemplary Method" section of the present specification.
[0146] According to the program product for implementing the above method in the embodiment of the present disclosure, it can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0147] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0148] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0149] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0150] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0151] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0152] Other embodiments of the present disclosure will be readily apparent to those skilled in the art after considering the specification and practicing the inventions invented herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not invented by the present disclosure. The specification and examples are to be considered merely exemplary, and the true scope and spirit of the present disclosure are indicated by the claims.
Claims
1. A method for analyzing industrial defects, characterized in that: include: Constructing an original coordinate plane according to the multiple industrial defects, and determining first original coordinate positions of the multiple industrial defects on the original coordinate plane respectively; Rotating the industrial defect in the original coordinate plane along a first direction, and determining a target coordinate position of the industrial defect on the rotated coordinate plane according to the first original coordinate position and a first rotation angle; Classifying the industrial defects according to the target coordinate positions to obtain a linear coordinate group, and rotating the industrial defects in the rotated coordinate plane along a second direction to obtain the original coordinate plane, wherein the first direction is different from the second direction; According to the second original coordinate position of the industrial defects included in the linear coordinate group in the original coordinate plane, linear clustering is performed on the industrial defects included in the linear coordinate group to obtain a linear clustering result, and the industrial defects are analyzed according to the linear clustering result.
2. The method for analyzing industrial defects according to claim 1, characterized in that: The original coordinate plane is constructed based on multiple industrial defects, including: Acquire multiple industrial defects obtained by performing product defect detection on industrial products, and construct a two-dimensional coordinate axis based on the product surface area of the industrial products; Based on the regional coordinate positions of the multiple industrial defects in the surface area of the product, the multiple industrial defects are mapped to the coordinate plane of the two-dimensional coordinate axis to obtain the original coordinate plane.
3. The method for analyzing industrial defects according to claim 1, characterized in that: Determining a target coordinate position of the industrial defect on the rotated coordinate plane according to the first original coordinate position and the first rotation angle includes: Calculating a first sine value and a first cosine value of a first rotation angle, and constructing a first rotation matrix according to the first sine value and the first cosine value of the first rotation angle; According to the first original coordinate position and the first rotation matrix, a target coordinate position of the industrial defect on the rotated coordinate plane is determined.
4. The method for analyzing industrial defects according to claim 1, characterized in that: The industrial defects are classified according to the target coordinate positions to obtain a linear coordinate group, including: Determine the target horizontal coordinate value of the industrial defect in the rotated coordinate plane according to the target coordinate position, and sort the industrial defects according to the target horizontal coordinate value to obtain a defect sorting result; Selecting any industrial defect in the defect sorting result as a first target defect, and calculating a first adjacent defect array of the first target defect; Repeating the process of determining the first adjacent defect array to obtain other adjacent defect arrays of other target defects except the first target defect in the defect sorting result; The industrial defects are classified according to the first adjacent defect array and other adjacent defect arrays to obtain the linear coordinate group.
5. The method for analyzing industrial defects according to claim 4, characterized in that: Calculating a first adjacent defect array of the first target defect includes: A first target left array and a first target right array of the first target defect are calculated, and a first adjacent defect array of the first target defect is obtained according to the first target left array and the first target right array.
6. The method for analyzing industrial defects according to claim 5, characterized in that: Calculating a first target left array of the first target defect includes: Calculating a first left distance between a first left defect adjacent to the first target defect and the first target defect; If the first left distance is less than or equal to the preset distance threshold, writing the target coordinate position of the first left defect into the first target left array corresponding to the first target defect; Calculating a second left distance between a second left defect adjacent to the first left defect and the first target defect; If the second left distance is less than or equal to a preset distance threshold, writing the target coordinate position of the second left defect into the first target left array; The writing process of the second left defect is repeated until the left distance between the first target defect and the left defect is greater than a preset distance threshold, so as to obtain a first target left array.
7. The method for analyzing industrial defects according to claim 4, characterized in that: The industrial defects are classified according to the first adjacent defect array and other adjacent defect arrays to obtain the linear coordinate group, including: Calculating the number of first defect points of industrial defects included in the first adjacent defect array and other adjacent defect arrays; Sort the first adjacent defect array and other adjacent defect arrays according to the first defect point quantity to obtain a defect point array sorting result; A defect point array whose first defect point quantity is greater than a preset quantity threshold is extracted from the defect point data sorting result as the linear coordinate group.
8. The method for analyzing industrial defects according to claim 1, characterized in that: The industrial defects in the rotated coordinate plane are rotated along the second direction to obtain the original coordinate plane, including: According to the first rotation angle rotated in the first rotation process, a second rotation angle is determined, and based on the second rotation angle, the industrial defect in the rotated coordinate plane is rotated in a second direction to obtain the original coordinate plane.
9. The method for analyzing industrial defects according to claim 8, characterized in that: According to the second original coordinate position of the industrial defects included in the linear coordinate group in the original coordinate plane, linearly clustering the industrial defects included in the linear coordinate group to obtain a linear clustering result, including: Calculating a second sine value and a second cosine value of a second rotation angle, and constructing a second rotation matrix according to the second sine value and the second cosine value of the second rotation angle; Determine a second original coordinate position of the industrial defect included in the linear coordinate group in the original coordinate plane according to the target coordinate position of the industrial defect included in the linear coordinate group in the rotated coordinate plane and the second rotation matrix; According to the second original coordinate position, the second original ordinate value of the industrial defect included in the linear coordinate group is determined, and the industrial defects included in the linear coordinate group are linearly clustered according to the second original ordinate value to obtain a linear clustering result.
10. The method for analyzing industrial defects according to claim 9, characterized in that: The industrial defects included in the linear coordinate group are linearly clustered according to the second original ordinate value, including: Determine the second minimum ordinate value and the second maximum ordinate value in the second original ordinate value, and use the industrial defect corresponding to the second minimum ordinate value in the linear coordinate group as the starting point of the line segment, and use the industrial defect corresponding to the second maximum ordinate value in the linear coordinate group as the end point of the line segment; Based on the line segment start point and the line segment end point, a linear clustering result of the industrial defects included in the linear coordinate group is drawn.
11. The method for analyzing industrial defects according to claim 1, characterized in that: The industrial defect analysis method also includes: In response to a request for obtaining the linear aggregation results sent by a business terminal, the linear aggregation results are fed back to the business terminal, and the linear aggregation results are displayed on the display interface of the business terminal, so that the user can analyze the product defect type of the industrial product corresponding to the industrial defect according to the linear aggregation results, and debug the preparation process of the industrial product based on the obtained product defect type.
12. The method for analyzing industrial defects according to any one of claims 1 to 11, characterized in that: The first rotation angle during the first direction rotation includes 0°-179°.
13. An analysis device for industrial defects, characterized in that: include: An original coordinate position determination module, used to construct an original coordinate plane according to a plurality of industrial defects, and determine first original coordinate positions of the plurality of industrial defects on the original coordinate plane respectively; a target coordinate position determination module, configured to rotate the industrial defect in the original coordinate plane along a first direction, and determine a target coordinate position of the industrial defect on the rotated coordinate plane according to the first original coordinate position and a first rotation angle; a linear coordinate group determination module, configured to classify the industrial defects according to the target coordinate position to obtain a linear coordinate group, and rotate the industrial defects in the rotated coordinate plane along a second direction to obtain the original coordinate plane, wherein the first direction is different from the second direction; The defect analysis module is used to linearly cluster the industrial defects included in the linear coordinate group according to the second original coordinate position of the industrial defects included in the linear coordinate group in the original coordinate plane to obtain a linear clustering result, and analyze the industrial defects according to the linear clustering result.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for analyzing industrial defects according to any one of claims 1 to 12 is implemented.
15. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the industrial defect analysis method according to any one of claims 1 to 12 by executing the executable instructions.