Precise measurement method of steel profile dimensions based on data analysis

Through data analysis and Hough transform technology, the profile size of the profile steel is determined directly from the cross-sectional image of the profile steel, which solves the problem of low accuracy of the traditional method and improves the accuracy of profile size detection of the profile steel.

CN118314191BActive Publication Date: 2024-10-11WUXI FANGSHUN STEEL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410726359.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-10-11
Estimated Expiration
2044-06-06

AI Technical Summary

Technical Problem

The traditional calculation method of profile steel profile size accuracy has low accuracy and is difficult to meet engineering needs.

Method used

Using a method based on data analysis, by taking cross-sectional images of the section steel, using the Canny edge detection algorithm and Hough transform technology, the distribution pattern of pixels in the Hough space is analyzed to determine the accuracy of the profile size of the section steel, thus avoiding the need for distortion of the section steel. Accurate segmentation.

Benefits of technology

The detection accuracy of the steel profile dimension accuracy is improved. The accuracy of the profile steel profile size can be obtained directly through the characteristic analysis of the intersection points in Hough space, which enhances the reliability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118314191B_ABST
    Figure CN118314191B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of profile measurement of steel, and specifically to a method for accurately measuring the profile size of steel based on data analysis, which comprises: photographing the cross section of the steel to be detected to obtain a cross-sectional image of the steel to be detected; performing edge detection on the cross-sectional image of the steel to be detected using a preset edge detection algorithm to obtain an edge detection result; converting the pixel points in the edge detection result from the original space to the Hough space, and based on the distribution law of the data points corresponding to the pixel points corresponding to the cross-sectional profile of the steel with accurate accuracy in the Hough space, combined with the image characteristics when the shooting angle is inclined, performing data analysis on the data points corresponding to the pixel points corresponding to the cross-sectional profile of the steel to be detected in the Hough space to determine the accuracy of the profile size of the steel. The technical solution of the present invention can effectively improve the detection accuracy of the profile size of the steel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of section steel profile measurement, and in particular to a method for accurately measuring section steel profile dimensions based on data analysis. Background Art

[0002] The accuracy of steel profiles is important for ensuring product quality, engineering safety, cost-effectiveness, and compliance. By calculating the accuracy of steel profiles, we can ensure that products meet design specifications and standards, and that the designed structures or parts meet engineering requirements, thereby improving the reliability and safety of engineering projects. Therefore, ensuring the accuracy of steel profiles is not only a basic requirement for the manufacturing and engineering industries, but also an important measure to protect consumer interests and maintain public safety.

[0003] The traditional method of calculating the accuracy of the steel profile size requires the use of image segmentation technology to segment each steel profile, and then determine the accuracy of the steel profile size by comparing the size relationship of each side length of the steel profile. However, this method must accurately segment the steel profile. The current image segmentation technology has a low accuracy in segmentation accuracy, which makes it difficult to meet the calculation requirements of the steel profile size accuracy. Summary of the invention

[0004] In order to solve the technical problem that the existing method for calculating the accuracy of the profile size of steel is of low accuracy, the purpose of the present invention is to provide a method for accurately measuring the profile size of steel based on data analysis. The technical solution adopted is as follows:

[0005] The method for accurately measuring the profile size of a steel section based on data analysis is suitable for measuring the profile size accuracy of a steel section with a regular polygonal cross section. The method for accurately measuring the profile size of a steel section includes:

[0006] The cross section of the steel to be inspected is photographed to obtain a cross section image of the steel to be inspected; wherein, when photographing the cross section of the steel to be inspected, within a preset error allowable range, the camera lens is photographing the cross section of the steel to be inspected;

[0007] Using a preset edge detection algorithm to perform edge detection on the cross-sectional image of the steel section to be detected, and obtaining an edge detection result;

[0008] The pixel points in the edge detection result are converted from the original space to the Hough space to obtain the data points corresponding to the pixel points corresponding to the cross-sectional profile of the steel section to be detected in the Hough space;

[0009] Based on the distribution law of the data points corresponding to the pixel points of the cross-sectional contour of the steel section with accurate accuracy in the Hough space, combined with the image characteristics when the shooting angle is inclined during the shooting of the cross-sectional contour of the steel section, data analysis is performed on the data points corresponding to the pixel points of the cross-sectional contour of the steel section to be inspected in the Hough space to determine the accuracy of the contour size of the steel section.

[0010] Furthermore, the preset edge detection algorithm is a Canny edge detection algorithm.

[0011] Furthermore, the Hough space uses the minimum angle between a straight line and the x-axis to represent the polar angle, and uses the distance from the origin to the straight line to represent the polar diameter; and in the Hough space, when the straight line is above the polar axis, the corresponding polar diameter is positive, and when the straight line is below the polar axis, the corresponding polar diameter is negative.

[0012] Furthermore, based on the distribution law of the data points corresponding to the pixel points corresponding to the cross-sectional profile of the steel section with accurate accuracy in the Hough space, combined with the image characteristics when the shooting angle is inclined during the shooting of the cross-sectional profile of the steel section, the data points corresponding to the pixel points corresponding to the cross-sectional profile of the steel section to be detected in the Hough space are analyzed to determine the accuracy of the profile size of the steel section, including:

[0013] Based on the distribution law of data points corresponding to the pixel points corresponding to the cross-sectional contour of the steel section with accurate accuracy in the Hough space, the data points corresponding to each side of each steel section to be detected in the Hough space are extracted from the data points corresponding to the pixel points in the edge detection result in the Hough space, and the probability that the polygon surrounded by the straight lines corresponding to all the extracted data points in the original space is a regular polygon is calculated; wherein the distribution law includes: for the steel section with a regular polygonal cross section, each pixel point of each side of its cross section corresponds to a curve in the Hough space, and the curves corresponding to all the pixel points of the same side intersect at one point, which is recorded as the data point of the corresponding side; assuming that the number of sides of the cross section of the steel section with a regular polygonal cross section is n, the data points corresponding to the contour of its cross section in the Hough space present n / 2 pairs, the polar angles between each pair of data points are equal, the polar angle differences between two adjacent pairs are equal, and the polar diameter differences of each pair of n / 2 pairs of data points are equal;

[0014] Based on the calculated probability that the polygon enclosed by the straight lines corresponding to all the extracted data points in the original space is a regular polygon, the first accuracy of the steel section to be detected is obtained;

[0015] In view of the possibility that the shooting angle is tilted when shooting the cross-section of the steel to be inspected, the first accuracy is corrected based on the image characteristics when the shooting angle is tilted to obtain the second accuracy of the steel to be inspected; wherein the image characteristics include: when the shooting angle is tilted, the size value of the side length of the cross-section of the steel to be inspected in the obtained image decreases with the increase of the shooting distance, and the pixel grayscale value of the side length of the cross-section of the steel to be inspected decreases with the increase of the shooting distance.

[0016] Furthermore, based on the distribution law of data points corresponding to the pixel points corresponding to the cross-sectional profile of the steel section with correct accuracy in the Hough space, the data points corresponding to each edge of each steel section to be detected in the Hough space are extracted from the data points corresponding to the pixel points in the edge detection result in the Hough space, and the probability that the polygon surrounded by the straight lines corresponding to all the extracted data points in the original space is a regular polygon is calculated, including:

[0017] Divide the data points corresponding to the pixel points belonging to the same continuous contour in the Hough space into the same data point set;

[0018] According to the distribution rule, every two data points in the data point set are grouped together to complete data point grouping;

[0019] According to the grouping result of the data points, the probability that the polygon enclosed by the straight lines corresponding to all the data points in the current data point set in the original space is a regular polygon is calculated.

[0020] Furthermore, the step of grouping every two data points in the data point set into one group according to the distribution rule to complete the data point grouping includes:

[0021] Step 1: Select the data point with the smallest polar angle from the data point set , and then calculate each data point and Similar possibilities:

[0022] Step 2, with The most likely data point of the same type is of the same type, group the two together, and delete them from the data point set to obtain an updated data point set;

[0023] Step 3, iteratively execute steps 1 to 2 until all data points are grouped.

[0024] Further, the calculation of each data point and The formula for calculating the similar probability is:

[0025] ;

[0026] in, Represents the kth data point and The possibility of the same type; exp represents the exponential function with the natural number e as the base; express The corresponding polar angle; express The corresponding polar angle; Indicates taking the absolute value.

[0027] Furthermore, the calculation of the probability that the polygon enclosed by the straight lines corresponding to all the data points in the current data point set in the original space is a regular polygon according to the grouping result of the data points includes:

[0028] Calculate the average polar angle of the two data points in each group, and sort the groups according to the size of the average polar angle;

[0029] Construct the following formula to calculate the probability that the polygon enclosed by the straight lines corresponding to all data points in the data point set in the original space is a regular polygon:

[0030] ;

[0031] ;

[0032] in, It represents the probability that the polygon enclosed by the straight lines corresponding to all data points in the data point set in the original space is a regular polygon; n represents the number of sides of the cross section of the steel section, n is an even number and n≥6; Represents the jth data point in Hough space A screening process to determine whether the corresponding line segment in the original space is a straight line; exp represents an exponential function with the natural number e as the base; represents the average polar angle of the two data points in the mth group; represents the average polar angle of two data points in the m+1th group; represents the average polar angle of two data points in the m+2th group; Indicates taking the absolute value; Represents the absolute value of the difference in polar diameter between two data points in the mth group; It is the average value of the absolute value of the polar diameter difference corresponding to all groups.

[0033] Furthermore, the first accuracy of the steel section to be detected is obtained based on the calculated probability that the polygon enclosed by the straight lines corresponding to all the extracted data points in the original space is a regular polygon, including:

[0034] When the calculated probability that the polygon enclosed by the corresponding straight lines of all data points in the original space is a regular polygon is greater than a preset probability threshold, all data points in the data point set are mapped back to the original space to obtain a polygon enclosed by the corresponding edges of all data points in the data point set in the original space, and the polygon is matched with the edge detection result in the original space according to the center point, and the average value of the sum of errors between each point on each edge of the polygon and its nearest edge pixel point is calculated according to the matching result. ;

[0035] Construct the following formula to calculate the first accuracy of the steel to be tested:

[0036] ;

[0037] in, Indicates the first accuracy of the steel to be tested; It represents the probability that the polygon enclosed by the straight lines corresponding to all data points in the data point set in the original space is a regular polygon; exp represents the exponential function with the natural number e as the base.

[0038] Furthermore, the calculation formula for correcting the first precision to obtain the second precision of the steel section to be detected is:

[0039] ;

[0040] in, represents the second precision of the steel to be tested; f represents the normalization function; n represents the number of sides of the cross section of the steel; exp represents the exponential function with the natural number e as the base; Represents the qth data point in the data point set The length of the corresponding side in the original space; It means that when the lengths of the edges corresponding to each data point in the original space are sorted in ascending order, The corresponding sort value; It represents the sum of the grayscale values ​​of the pixels closest to each point on the edge corresponding to the qth data point in the polygon enclosed by the edges corresponding to all data points in the data point set in the original space; It means that when the sum of the grayscale values ​​of the closest pixel points on each edge of the polygon surrounded by the corresponding edges of all data points in the data point set in the original space is sorted in ascending order, The corresponding sort value, Indicates the first accuracy of the steel to be tested; Indicates taking the absolute value.

[0041] The present invention has the following beneficial effects:

[0042] The present invention shoots the cross-sectional image of the steel section, and then uses the Canny edge detection algorithm to detect the contour edge of the cross-sectional profile of the steel section; and then converts the contour edge detected by the Canny edge into the Hough space, and then performs data analysis through the intersection of the steel section in the Hough space to determine the accuracy of the contour size of the steel section. Thus, the accuracy of the contour size of each steel section is determined by combining digital image technology with data analysis, and each steel section does not need to be accurately segmented. The accuracy of the contour size of each steel section can be obtained directly through the feature analysis of the intersection in the Hough space; thereby improving the detection accuracy of the contour size accuracy of the steel section. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0044] Figure 1 A flow chart of a method for accurately measuring the profile dimensions of a steel section based on data analysis provided by one embodiment of the present invention;

[0045] Figure 2 A schematic diagram of the principle of distinguishing positive and negative polar diameters in the Hough space provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0046] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of the accurate measurement method of the profile size of steel based on data analysis proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0047] 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.

[0048] The specific scheme of the method for accurately measuring the profile dimensions of steel sections based on data analysis provided by the present invention is described in detail below in conjunction with the accompanying drawings. It should be noted that the method for accurately measuring the profile dimensions of steel sections based on data analysis of the present invention is suitable for measuring the profile dimension accuracy of steel sections with regular polygonal cross sections. The specific implementation process of the method for accurately measuring the profile dimensions of steel sections with regular hexagonal cross sections is described below by taking the measurement of the profile dimension accuracy of steel sections with regular hexagonal cross sections as an example. Figure 1 , which shows a flow chart of a method for accurately measuring the profile size of a steel section based on data analysis provided by an embodiment of the present invention, the method for accurately measuring the profile size of a steel section based on data analysis comprises the following steps:

[0049] S1, photographing the cross section of the steel to be inspected to obtain a cross-sectional image of the steel to be inspected; wherein, when photographing the cross section of the steel to be inspected, within a preset error allowable range, the camera lens is photographing the cross section of the steel to be inspected;

[0050] S2, using a preset edge detection algorithm to perform edge detection on the cross-sectional image of the steel section to be detected, and obtain an edge detection result;

[0051] The edge detection algorithm used in this embodiment is the Canny edge detection algorithm.

[0052] S3, converting the pixel points in the edge detection result from the original space into the Hough space, and obtaining the data points corresponding to the pixel points corresponding to the cross-sectional profile of the steel section to be detected in the Hough space;

[0053] It should be noted that the polar angle and polar diameter representation methods used in the Hough space used in this embodiment are improved polar angle and polar diameter representation methods; specifically, in the Hough space used in this embodiment, the minimum angle between the straight line and the x-axis is used to represent the polar angle, and the distance from the origin to the straight line is used to represent the polar diameter (the polar diameter here is positive or negative, otherwise for example Figure 2 The two parallel straight lines shown have the same polar angle and the same distance from the origin to the straight lines, so they cannot be distinguished. Specifically, in the Hough space used in this embodiment, the polar diameter above the polar axis is represented as positive, and the polar diameter below the polar axis is represented as negative).

[0054] S4, based on the distribution law of the data points corresponding to the pixel points of the cross-sectional contour of the steel section with accurate accuracy in the Hough space, combined with the image characteristics when the shooting angle is inclined during the shooting of the cross-sectional contour of the steel section, data analysis is performed on the data points corresponding to the pixel points of the cross-sectional contour of the steel section to be inspected in the Hough space to determine the accuracy of the contour size of the steel section.

[0055] Specifically, in this embodiment, the above S4 includes the following steps:

[0056] S41, based on the distribution law of data points corresponding to the pixel points corresponding to the cross-sectional contour of the steel section with accuracy in the Hough space, extract the data points corresponding to each side of each steel section to be detected in the Hough space from the data points corresponding to the pixel points in the edge detection result in the Hough space, and calculate the probability that the polygon surrounded by the straight lines corresponding to all the extracted data points in the original space is a regular polygon; wherein the distribution law includes: for a steel section whose cross section is a regular polygon, each pixel point of each side of its cross section corresponds to a curve in the Hough space, and the curves corresponding to all the pixel points of the same side intersect at point, and record it as the data point of the corresponding side; assuming that the number of sides of the cross section of the steel section with a regular polygonal cross section is n, the data points corresponding to the contour of its cross section in the Hough space present n / 2 pairs, the polar angles between each pair of data points are equal, the polar angle differences between two adjacent pairs are equal, and the polar diameter differences of each pair of n / 2 pairs of data points are equal; specifically, the cross section of the steel section to be detected in this embodiment is a regular hexagon. Since the six sides of its cross section are straight lines, each side is represented as a point in the Hough space, so the point corresponding to the cross-sectional contour of the hexagonal steel with an equilateral hexagonal cross section in the Hough space can be found.

[0057] Based on the above, S41 includes the following steps:

[0058] S411, dividing the data points corresponding to the pixel points belonging to the same continuous contour in the Hough space into the same data point set;

[0059] S412, grouping every two data points in the data point set into one group according to the distribution rule, thereby completing data point grouping;

[0060] Further, S412 includes the following steps:

[0061] S4121, select the data point with the smallest polar angle from the data point set , and then calculate each data point and Similar possibilities:

[0062] Among them, calculate each data point and The formula for calculating the similar probability is:

[0063] ;

[0064] in, Represents the kth data point and The possibility of the same type; exp represents the exponential function with the natural number e as the base; express The corresponding polar angle; express The corresponding polar angle; Indicates taking the absolute value;

[0065] Based on the above, express and The difference in the corresponding polar angles;

[0066] Because the six sides of a regular hexagon can be divided into three pairs, and the inclination angles between the two sides of each pair are equal, so the point polar angles corresponding to each pair of straight lines in the Hough space must be equal. Therefore, in this embodiment, the six points corresponding to the six sides of a regular hexagon in the Hough space are , , , , , According to the similarity of their polar angles, they are divided into three categories. The smaller the difference between the polar angles of two points, the more likely they are in the same category. The two largest points are grouped together.

[0067] S4122, will be The most likely data point of the same type is of the same type, group the two together, and delete them from the data point set to obtain an updated data point set;

[0068] S4123, iteratively execute S4121 to S4122 until all data points are grouped.

[0069] S413, calculating the probability that the polygon enclosed by the straight lines corresponding to all the data points in the current data point set in the original space is a regular polygon according to the grouping result of the data points;

[0070] Further, S413 includes the following steps:

[0071] S4131, calculating the average polar angle of two data points in each group, and sorting the groups according to the size of the average polar angle;

[0072] S4132, construct the following formula to calculate the probability that the polygon enclosed by the straight lines corresponding to all data points in the data point set in the original space is a regular polygon:

[0073] ;

[0074] ;

[0075] in, It represents the probability that the polygon enclosed by the straight lines corresponding to all data points in the data point set in the original space is a regular polygon; n represents the number of sides of the cross section of the steel section, n is an even number and n≥6; Represents the jth data point in Hough space A screening process to determine whether the corresponding line segment in the original space is a straight line; exp represents an exponential function with the natural number e as the base; represents the average polar angle of the two data points in the mth group; represents the average polar angle of two data points in the m+1th group; represents the average polar angle of two data points in the m+2th group; Indicates taking the absolute value; Represents the absolute value of the difference in polar diameter between two data points in the mth group; It is the average value of the absolute value of the polar diameter difference corresponding to all groups.

[0076] Based on the above, in this embodiment, the value of n is 6; Both represent the average polar angle difference between two adjacent groups. express differences; It represents the variance of the internal diameter differences of multiple groups, that is, the degree of change of the internal diameter differences of each group.

[0077] In this regard, it should be noted that for the points corresponding to each edge of the hexagonal steel in the Hough space, because each edge has a certain length, the number of curves passing through the corresponding points should be maintained at a certain number. Here, the preset threshold is set to 10. The number of curves passing through the point in the Hough space is greater than or equal to 10, and it is possible to be a straight line in the original space. Based on this, we first construct To screen whether the edges corresponding to the corresponding points are possible to be straight lines. In addition, for a regular hexagon, the points corresponding to each edge in the Hough space must not only pass through a sufficient number of curves, but also because it is a regular hexagon, there must be three pairs of parallel lines, and the inclination angles of each pair of parallel lines are equal, and they are arranged from small to large, and the difference in inclination angles between two adjacent teams must be equal (the difference tends to 45), and because it is a regular hexagon, the polar diameter difference of each pair is also equal. Therefore, all points are divided into three groups, and after sorting them according to the size of the average polar angle, the smaller the difference between the average polar angle of the first and second groups and the average polar angle of the second and third groups, the better, that is, the difference between the average polar angle of the first and second groups and the average polar angle of the second and third groups is equal to The relationship is inversely proportional; and the smaller the change in the diameter difference of the three groups, the better (here the variance is used to represent the change in the diameter difference of the three groups), that is, the change in the diameter difference of the three groups is also proportional to It shows an inverse proportional relationship. The above formula can be obtained by constructing these two inverse proportional relationships using the reciprocal of the exponential function with base e.

[0078] S42, based on the calculated probability that the polygon enclosed by the straight lines corresponding to all the extracted data points in the original space is a regular polygon, obtain the first accuracy of the steel section to be detected;

[0079] Further, S42 includes the following steps:

[0080] S421, when the calculated probability that the polygon enclosed by the corresponding straight lines of all data points in the data point set in the original space is a regular polygon is greater than a preset probability threshold (in this embodiment, the preset probability threshold is 0.7), all data points in the data point set are mapped back to the original space to obtain a polygon enclosed by the corresponding edges of all data points in the data point set in the original space, and the polygon is matched with the edge detection result in the original space according to the center point, and the average value of the sum of errors between each point on each edge of the polygon and its nearest edge pixel point is calculated according to the matching result ;

[0081] S422, construct the following formula to calculate the first accuracy of the steel to be tested:

[0082] ;

[0083] in, Indicates the first accuracy of the steel to be tested; It represents the probability that the polygon enclosed by the straight lines corresponding to all data points in the data point set in the original space is a regular polygon; exp represents the exponential function with the natural number e as the base.

[0084] For the above formula, it should be noted that for each hexagonal steel, if its cross section is a regular hexagon, then the six points in the Hough space corresponding to its six sides are , , , , , The calculated P value should be larger, that is, the P value is directly proportional to the dimensional accuracy of the steel section; and all the pixel points detected by the Canny edge detection algorithm corresponding to the hexagonal steel and the six points in the Hough space corresponding to the cross-sectional profile of the hexagonal steel , , , , , The outline enclosed by straight lines in the original space should be close, that is, The smaller the better, so It is inversely proportional to the dimensional accuracy of the steel section. In this regard, the inverse of the exponential function with e as the base is used to construct this inverse proportional relationship.

[0085] S43, in view of the situation that the shooting angle may be tilted when shooting the cross section of the steel to be inspected, based on the image characteristics when the shooting angle is tilted, the first accuracy is corrected to obtain the second accuracy of the steel to be inspected; wherein the image characteristics include: when the shooting angle is tilted, the size value of the side length of the cross section of the steel to be inspected in the obtained image decreases with the increase of the shooting distance, and the pixel grayscale value of the side length of the cross section of the steel to be inspected decreases with the increase of the shooting distance;

[0086] It should be noted that the calculation process of the first accuracy only considers the situation that the camera lens is completely facing the cross section of the steel section when shooting the cross section of the steel section. However, in practice, the placement of the steel section may be tilted sometimes. In this regard, this embodiment corrects the first accuracy by taking advantage of the characteristic that when the steel section is tilted, the length of the side at a distance becomes smaller, the grayscale becomes smaller, and the length of the side at a nearby location becomes larger, and the grayscale value becomes larger. The details are as follows:

[0087] The following formula is constructed to correct the first accuracy and obtain the second accuracy of the steel to be tested:

[0088] ;

[0089] in, represents the second precision of the steel to be tested; f represents the normalization function; n represents the number of sides of the cross section of the steel; exp represents the exponential function with the natural number e as the base; Represents the qth data point in the data point set The length of the corresponding side in the original space; It means that when the lengths of the edges corresponding to each data point in the original space are sorted in ascending order, The corresponding sort value; It represents the sum of the grayscale values ​​of the pixels closest to each point on the edge corresponding to the qth data point in the polygon enclosed by the edges corresponding to all data points in the data point set in the original space; It means that when the sum of the grayscale values ​​of the closest pixel points on each edge of the polygon surrounded by the corresponding edges of all data points in the data point set in the original space is sorted in ascending order, The corresponding sort value, Indicates the first accuracy of the steel to be tested.

[0090] For the above correction process, it should be noted that when photographing the cross section of the steel, if the steel is tilted, due to the perspective effect, the side length in the distance will appear smaller, and the side length in the near will appear larger. In addition, due to the lighting, the gray value in the distance will also be smaller (darker), and the gray value in the near will be larger (whiter), so the first accuracy obtained can be corrected based on this. The implementation principle is: construct the degree to which each side conforms to the perspective effect, that is, arrange the side length and gray value of each side from small to large, and the length and gray value of each side should be arranged in the same order, so the smaller the difference between the two, the more the accuracy calculation result conforms to the actual situation. For this, exp is used to construct this inverse proportional relationship, and finally the first accuracy calculated is corrected with this degree of conformity to the perspective effect, and the corrected accuracy, that is, the second accuracy, can be obtained.

[0091] In summary, this embodiment provides a method for accurately measuring the profile size of a steel section based on data analysis, by shooting a cross-sectional image of the steel section, and then using the Canny edge detection algorithm to detect the profile edge of the cross-sectional profile of the steel section; and by converting the profile edge detected by the Canny edge to the Hough space, and then performing data analysis through the intersection of the steel section in the Hough space, the accuracy of the profile size of the steel section is determined. Thus, the accuracy of the profile size of each steel section is determined by combining digital image technology with data analysis, without accurately segmenting each steel section, and the accuracy of the profile size of each steel section can be obtained directly through the feature analysis of the intersection in the Hough space; thereby improving the detection accuracy of the profile size accuracy of the steel section.

[0092] In addition, it should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0093] It should also be noted that: each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

Claims

1. The method for accurately measuring the profile dimensions of steel sections based on data analysis is suitable for measuring the profile dimension accuracy of steel sections with regular polygonal cross sections, and is characterized in that: The method for accurately measuring the profile dimensions of a steel section comprises: The cross section of the steel to be inspected is photographed to obtain a cross section image of the steel to be inspected; wherein, when photographing the cross section of the steel to be inspected, within a preset error tolerance range, the camera lens is photographing the cross section of the steel to be inspected; Using a preset edge detection algorithm to perform edge detection on the cross-sectional image of the steel section to be detected, and obtaining an edge detection result; The pixel points in the edge detection result are converted from the original space to the Hough space to obtain the data points corresponding to the pixel points corresponding to the cross-sectional profile of the steel section to be detected in the Hough space; Based on the distribution law of the data points corresponding to the pixel points of the cross-sectional profile of the steel section with accurate accuracy in the Hough space, combined with the image characteristics when the shooting angle is inclined during the shooting of the cross-sectional profile of the steel section, the data points corresponding to the pixel points of the cross-sectional profile of the steel section to be tested in the Hough space are analyzed to determine the accuracy of the profile size of the steel section; The Hough space uses the minimum angle between a straight line and the x-axis to represent the polar angle, and uses the distance from the origin to the straight line to represent the polar diameter; and in the Hough space, when the straight line is above the polar axis, the corresponding polar diameter is positive, and when the straight line is below the polar axis, the corresponding polar diameter is negative; The method is based on the distribution law of the data points corresponding to the pixel points corresponding to the cross-sectional profile of the steel section with correct accuracy in the Hough space, and combines the image characteristics when the shooting angle is inclined during the shooting of the cross-sectional profile of the steel section, and performs data analysis on the data points corresponding to the pixel points corresponding to the cross-sectional profile of the steel section to be detected in the Hough space to determine the accuracy of the profile size of the steel section, including: Based on the distribution law of data points corresponding to the pixel points corresponding to the cross-sectional contour of the steel section with accurate accuracy in the Hough space, the data points corresponding to each side of each steel section to be detected in the Hough space are extracted from the data points corresponding to the pixel points in the edge detection result in the Hough space, and the probability that the polygon surrounded by the straight lines corresponding to all the extracted data points in the original space is a regular polygon is calculated; wherein the distribution law includes: for the steel section with a regular polygonal cross section, each pixel point of each side of its cross section corresponds to a curve in the Hough space, and the curves corresponding to all the pixel points of the same side intersect at one point, which is recorded as the data point corresponding to the corresponding side; assuming that the number of sides of the cross section of the steel section with a regular polygonal cross section is n, the data points corresponding to the contour of its cross section in the Hough space present n / 2 pairs, the polar angles between each pair of data points are equal, the polar angle differences between two adjacent pairs are equal, and the polar diameter differences of each pair of n / 2 pairs of data points are equal; Based on the calculated probability that the polygon enclosed by the straight lines corresponding to all the extracted data points in the original space is a regular polygon, the first accuracy of the steel section to be detected is obtained; In view of the possibility that the shooting angle is tilted when shooting the cross-section of the steel to be inspected, the first accuracy is corrected based on the image characteristics when the shooting angle is tilted to obtain the second accuracy of the steel to be inspected; wherein the image characteristics include: when the shooting angle is tilted, the size value of the side length of the cross-section of the steel to be inspected in the obtained image decreases with the increase of the shooting distance, and the pixel grayscale value of the side length of the cross-section of the steel to be inspected decreases with the increase of the shooting distance.

2. The method for accurately measuring the profile dimensions of steel sections based on data analysis according to claim 1, characterized in that: The preset edge detection algorithm is the Canny edge detection algorithm.

3. The method for accurately measuring the profile dimensions of steel sections based on data analysis according to claim 1, characterized in that: The method is based on the distribution law of data points corresponding to the pixel points corresponding to the cross-sectional profile of the steel section with accurate accuracy in the Hough space, extracting data points corresponding to each edge of each steel section to be detected in the Hough space from the data points corresponding to the pixel points in the edge detection result in the Hough space, and calculating the probability that the polygon surrounded by the straight lines corresponding to all the extracted data points in the original space is a regular polygon, including: Divide the data points corresponding to the pixel points belonging to the same continuous contour in the Hough space into the same data point set; According to the distribution rule, every two data points in the data point set are grouped together to complete data point grouping; According to the grouping result of the data points, the probability that the polygon enclosed by the straight lines corresponding to all the data points in the current data point set in the original space is a regular polygon is calculated.

4. The method for accurately measuring the profile dimensions of a steel section based on data analysis according to claim 3, characterized in that: The step of grouping every two data points in the data point set into one group according to the distribution rule to complete the data point grouping includes: Step 1: Select the data point with the smallest polar angle from the data point set , and then calculate each data point and Similar possibilities: Step 2, with The most likely data point of the same type is of the same type, group the two together, and delete them from the data point set to obtain an updated data point set; Step 3, iteratively execute steps 1 to 2 until all data points are grouped.

5. The method for accurately measuring the profile dimensions of steel sections based on data analysis according to claim 4, characterized in that: The calculation of each data point and The formula for calculating the similar probability is: ; in, Represents the kth data point and The possibility of the same type; exp represents the exponential function with the natural number e as the base; express The corresponding polar angle; express The corresponding polar angle; Indicates taking the absolute value.

6. The method for accurately measuring the profile dimensions of steel sections based on data analysis according to claim 3, characterized in that: The method of calculating the probability that the polygon enclosed by the straight lines corresponding to all the data points in the current data point set in the original space is a regular polygon according to the grouping result of the data points includes: Calculate the average polar angle of the two data points in each group, and sort the groups according to the size of the average polar angle; Construct the following formula to calculate the probability that the polygon enclosed by the straight lines corresponding to all data points in the data point set in the original space is a regular polygon: ; ; in, It represents the probability that the polygon enclosed by the straight lines corresponding to all data points in the data point set in the original space is a regular polygon; n represents the number of sides of the cross section of the steel section, n is an even number and n≥6; Represents the jth data point in Hough space A screening process to determine whether the corresponding line segment in the original space is a straight line; exp represents an exponential function with the natural number e as the base; represents the average polar angle of the two data points in the mth group; represents the average polar angle of two data points in the m+1th group; represents the average polar angle of two data points in the m+2th group; Indicates taking the absolute value; Represents the absolute value of the difference in polar diameter between two data points in the mth group; It is the average value of the absolute value of the polar diameter difference corresponding to all groups.

7. The method for accurately measuring the profile dimensions of steel sections based on data analysis according to claim 6, characterized in that: The method of obtaining the first accuracy of the steel section to be detected based on the calculated probability that the polygon enclosed by the straight lines corresponding to all the extracted data points in the original space is a regular polygon includes: When the calculated probability that the polygon enclosed by the corresponding straight lines of all data points in the original space is a regular polygon is greater than a preset probability threshold, all data points in the data point set are mapped back to the original space to obtain a polygon enclosed by the corresponding edges of all data points in the data point set in the original space, and the polygon is matched with the edge detection result in the original space according to the center point, and the average value of the sum of errors between each point on each edge of the polygon and its nearest edge pixel point is calculated according to the matching result. ; Construct the following formula to calculate the first accuracy of the steel to be tested: ; in, Indicates the first accuracy of the steel to be tested; It represents the probability that the polygon enclosed by the straight lines corresponding to all data points in the data point set in the original space is a regular polygon; exp represents the exponential function with the natural number e as the base.

8. The method for accurately measuring the profile dimensions of steel sections based on data analysis according to claim 3, characterized in that: The calculation formula for correcting the first accuracy to obtain the second accuracy of the steel section to be detected is: ; in, represents the second precision of the steel to be tested; f represents the normalization function; n represents the number of sides of the cross section of the steel; exp represents the exponential function with the natural number e as the base; Represents the qth data point in the data point set The length of the corresponding side in the original space; It means that when the lengths of the edges corresponding to each data point in the original space are sorted in ascending order, The corresponding sort value; It represents the sum of the grayscale values ​​of the pixels closest to each point on the edge corresponding to the qth data point in the polygon enclosed by the edges corresponding to all data points in the data point set in the original space; It means that when the sum of the grayscale values ​​of the closest pixel points on each edge of the polygon surrounded by the corresponding edges of all data points in the data point set in the original space is sorted in ascending order, The corresponding sort value, Indicates the first accuracy of the steel to be tested; Indicates taking the absolute value.