A method for identifying rolling defects of alloy plates used in building formwork systems
Through regional division and feature analysis of the grayscale image of the alloy sheet, the characteristics of the pressed objects and oil-contaminated areas are identified, which solves the problem of low accuracy in identifying rolling defects in the existing technology and achieves higher rolling defects. Recognition accuracy.
Patent Information
- Application Number
- CN202411061564.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-08-05
AI Technical Summary
The existing technology fails to effectively identify oil-contaminated areas and indented object defective areas during the rolling process of alloy sheets, resulting in a reduction in defect identification accuracy.
By obtaining the grayscale image of the plate, dividing the image area, obtaining the reflective index, performing edge detection and texture analysis, combined with the shape characteristics of the abnormal area, calculate the defect edge index, and distinguish the intrusion and oil pollution areas.
It improves the accuracy of identification of rolling defects in alloy sheets, enables accurate identification of indented objects and oil-stained areas, and enhances the ability to identify rolling defects.
Smart Images

Figure CN118570214B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image analysis technology, and more specifically to a method for identifying roll forming defects in alloy sheet metal for building formwork systems. Background Technology
[0002] In the process of making building formwork using alloy sheets, roll forming is an important processing step. During the roll forming process, some roll forming defects may occur due to problems such as uneven roll forming force. In order to ensure the safety and processing quality of the building formwork, it is necessary to identify defects in the sheet after roll forming.
[0003] During the roll forming process of alloy sheets, the most common problem is indentation. This is usually caused by burrs and foreign objects on the sheet edge being pressed into the sheet surface by the rollers during the roll forming process. Indentation can damage the sheet surface and create indentation defects. Roller lubricating oil may drip onto the sheet, forming oil stains. The grayscale difference characteristics of the indentation defect area, the oil stain area, and the surrounding normal sheet area are somewhat similar. Current metal sheet defect identification methods do not address the impact of oil stains on the identification of indentation defect areas. This leads to the misidentification of oil stain areas as indentation defect areas during the defect identification process, thereby reducing the accuracy of alloy sheet roll forming defect identification. Summary of the Invention
[0004] To address the technical problem of inaccurate identification of roll forming defects in alloy sheets due to the failure to consider the impact of grayscale values in areas with oil stains on the identification of defects in the pressed material, the present invention aims to provide a method for identifying roll forming defects in alloy sheets for building formwork systems. The specific technical solution adopted is as follows:
[0005] This invention proposes a method for identifying roll forming defects in alloy sheet metal for building formwork systems, the method comprising:
[0006] Obtain a grayscale image of the alloy sheet to be tested after it has been rolled;
[0007] The grayscale image of the board material is divided into different image regions; the reflectivity index of the board material in the corresponding image region is obtained based on the grayscale distribution of pixels in each image region.
[0008] Edge detection is performed on the grayscale image of the board to obtain abnormal regions; based on the grayscale distribution of edge pixels in each abnormal region, the shape of each abnormal region, and the reflectivity index of the board in the image of the region where each abnormal region is located, the defect edge index of each abnormal region is obtained.
[0009] Rolling defects are identified in the alloy plate under test based on the texture of the abnormal areas contained in each image region, the defect edge index, and the plate reflectivity index.
[0010] Furthermore, the method for dividing the grayscale image of the board material into different image regions includes:
[0011] Based on the distance and grayscale value difference between any two pixels, a similarity index between the corresponding two pixels is obtained; based on the similarity index, the pixels in the grayscale image of the board are clustered to obtain different clusters; the connected component formed by the pixels in each cluster is recorded as the initial region;
[0012] Arrange the total number of pixels in the initial region in order to obtain the analysis sequence; divide the analysis sequence into a first subsequence and a second subsequence; the mean value of the elements in the first subsequence is less than the mean value of the elements in the second subsequence; take the initial region corresponding to each element in the first subsequence as the suspected abnormal region; take the initial region corresponding to each element in the second subsequence as the whole region;
[0013] For each suspected abnormal region, the entire region adjacent to the suspected abnormal region is taken as the analysis region of the suspected abnormal region; the difference between the suspected abnormal region and the mean gray value of the pixels in each analysis region is calculated, and the analysis region corresponding to the smallest difference is taken as the target region of the suspected abnormal region; each suspected abnormal region and its target region are merged to obtain the image region.
[0014] Furthermore, the method for obtaining the reflectivity index of the board material in the corresponding image region based on the grayscale distribution of pixels in each image region includes:
[0015] The mode of the grayscale value of each pixel in the overall area of each image region is recorded as the reference value of the corresponding image region; the difference between the grayscale value of each pixel in the overall area of each image region and the reference value is recorded as the reference difference value of the corresponding pixel; the reflectivity index of the board material in the corresponding image region is obtained based on the grayscale value of the pixel in the overall area of each image region and the reference difference value.
[0016] Furthermore, the method for obtaining abnormal regions by edge detection of the grayscale image of the board material includes:
[0017] Edge detection is performed on the grayscale image of the board material to obtain edge pixels in the grayscale image of the board material; the closed region formed by the edge pixels is recorded as the target region; for each target region, it is determined whether the target region is in the suspected abnormal region. If so, the suspected abnormal region where the target region is located is regarded as an abnormal region; otherwise, the target region is regarded as an abnormal region.
[0018] Furthermore, the method for obtaining the defect edge index of each abnormal region includes:
[0019] Based on the grayscale distribution of edge pixels within each abnormal region, obtain the edge reflectivity index of each abnormal region;
[0020] Obtain the edge shape index of each abnormal region based on the shape of each abnormal region;
[0021] Using the reflectivity index of the board material in the image of each abnormal region, the edge reflectivity index and the edge shape index of each abnormal region are weighted and summed to obtain the defect edge index of each abnormal region.
[0022] Furthermore, the method for obtaining the edge reflectivity index of each abnormal region includes:
[0023] For each abnormal region, the distance between each edge pixel in the abnormal region and the boundary of the abnormal region is recorded as the boundary distance of the corresponding edge pixel. Based on the difference between the gray value of each edge pixel in the abnormal region and the average gray value of all edge pixels, and the boundary distance, the local edge reflection value of the corresponding edge pixel is obtained. The average of the local edge reflection values of all edge pixels in the abnormal region is normalized to obtain the edge reflection index of the corresponding abnormal region.
[0024] Furthermore, the method for obtaining the edge shape index of each abnormal region includes:
[0025] Curve fitting is performed on the pixels on the boundary of each abnormal region to obtain the boundary fitting curve of the corresponding abnormal region; the slope of each pixel on the boundary fitting curve is obtained; on the boundary fitting curve of each abnormal region, the mean of the slope difference between each pixel on the boundary fitting curve and its neighboring pixels is calculated as the position difference of each pixel on the boundary fitting curve of each abnormal region; the mean of the position difference of the pixels on the boundary fitting curve of each abnormal region is normalized to obtain the edge shape index of the abnormal region.
[0026] Further, the method for identifying roll forming defects in the alloy plate under test based on the texture of the abnormal areas contained in each image region, the defect edge index, and the plate reflectivity index includes:
[0027] By negatively correlating the mean variance of the grayscale values of pixels in the target region within each abnormal region, a texture representation index for the corresponding abnormal region is obtained.
[0028] Using the reflectivity index of the sheet metal in each image region, the mean of the defect edge index and the mean of the texture expression index of all abnormal regions contained in each image region are weighted and summed to obtain the roll forming defect index of the corresponding image region.
[0029] If the roll forming defect index of an image region in the grayscale image of the plate is greater than the preset roll forming defect threshold, then the alloy plate under test has a roll forming defect; if the roll forming defect index of all image regions in the grayscale image of the plate is less than or equal to the preset roll forming defect threshold, then the alloy plate under test does not have a roll forming defect.
[0030] Furthermore, the method for edge detection of the grayscale image of the board material is the Canny operator.
[0031] Furthermore, the preset rolling defect threshold is 0.55.
[0032] The present invention has the following beneficial effects:
[0033] In this embodiment of the invention, the grayscale image of the board material is divided into different image regions to facilitate subsequent reflectivity analysis based on the brightness of the regions. The reflectivity of the image regions is mainly represented by grayscale values, so the reflectivity index of the board material is obtained based on the grayscale distribution of pixels within the image regions. Defect regions, namely indentation regions and oil stain contamination regions, usually have relatively obvious edges in the grayscale image of the board material, so abnormal regions are obtained through edge detection. Since the reflectivity of the recessed edges formed by indentation defects varies at different locations, while the reflectivity of the edge portions of oil stain contamination defects is similar, and the reflectivity is represented by the grayscale values of pixels, the reflectivity index is obtained through edge detection. The grayscale distribution of edge pixels within an abnormal region exhibits edge characteristics. In the grayscale image of the sheet metal, the reflective portion of edge pixels in brighter defect areas may be difficult to distinguish from other pixels in the same area due to their high reflectivity. Therefore, it is necessary to analyze the shape characteristics of the abnormal region to improve the accuracy of the defect edge index in representing defect edge characteristics. Since the reflectivity of the oil stain area is uniform while that of the pressed material area is uneven, considering the texture of the abnormal areas within the image region can further improve the accuracy of roll forming defect identification when performing defect detection on alloy sheets based on defect edge characteristics. This scheme combines the reflectivity, shape, and texture characteristics of abnormal areas to identify roll forming defects in the tested alloy sheet. It can accurately identify oil stains and contamination areas formed by pressed material and lubricating oil dripping onto the sheet, thus improving the accuracy of roll forming defect identification for alloy sheets. Attached Figure Description
[0034] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This is a flowchart illustrating the steps of a method for identifying roll forming defects in alloy sheet metal for building formwork systems, provided in one embodiment of the present invention.
[0036] Figure 2 This is a partial schematic diagram of a grayscale image of a sheet metal with an indentation defect, provided in an embodiment of the present invention.
[0037] Figure 3 This is a schematic diagram of the regional proximity distribution provided in one embodiment of the present invention;
[0038] Figure 4 A flowchart illustrating the steps of a method for obtaining defect edge indicators in an abnormal region, as provided in an embodiment of the present invention;
[0039] Figure 5 This is a schematic diagram of a computer device for identifying roll forming defects in alloy sheet materials for building formwork systems, provided as an embodiment of the present invention. Detailed Implementation
[0040] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a method for identifying roll forming defects in alloy plates for building formwork systems based on the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0041] Unless otherwise defined, 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 pertains.
[0042] The following description, in conjunction with the accompanying drawings, details a specific scheme for identifying roll forming defects in alloy sheet metal for building formwork systems provided by the present invention.
[0043] Example 1:
[0044] This invention proposes a method for identifying roll forming defects in alloy sheet metal for building formwork systems. Please refer to [link / reference]. Figure 1 The diagram illustrates a flowchart of a method for identifying roll forming defects in alloy sheet metal for building formwork systems, according to an embodiment of the present invention. The method includes:
[0045] Step S1: Obtain the grayscale image of the alloy sheet to be tested after roll pressing.
[0046] Specifically, the surface of the rolled alloy sheet is relatively smooth, making it prone to reflection. During image acquisition, it is necessary to avoid direct light reflection from the sheet into the imaging equipment, which would create large areas of strong reflection in the acquired image, making it difficult to analyze image features. Therefore, in this embodiment of the invention, an industrial camera is mounted directly above the rolled alloy sheet to be tested, with the light illuminating the sheet at a 45-degree angle to the horizontal plane. The industrial camera captures an image of the rolled alloy sheet, which is an RGB image. The image is then converted to grayscale and denoised to obtain a grayscale image of the sheet.
[0047] It should be noted that in the embodiments of the present invention, a weighted average grayscale algorithm is used for grayscale processing, and non-local mean filtering is used for noise reduction. The specific methods are not described here, as they are all techniques well known to those skilled in the art. In other embodiments of the present invention, other image acquisition devices and image preprocessing algorithms may also be used. Image acquisition and image preprocessing algorithms are all techniques well known to those skilled in the art and are not limited here.
[0048] During the rolling process of alloy sheet, the most common problem is the presence of pressed-in material. This is usually caused by burrs on the edge of the sheet and foreign objects on the surface being pressed into the sheet surface by the rollers during the rolling process. The pressed-in material damages the sheet surface, resulting in the sheet's appearance not meeting the standards and reducing the sheet's performance. Figure 2 This is a partial grayscale image schematic diagram of a sheet metal with an indentation defect, provided in an embodiment of the present invention. In this embodiment, the rolling defect of the alloy sheet metal is an indentation defect.
[0049] Step S2: Divide the grayscale image of the board into different image regions; obtain the reflectivity index of the board in the corresponding image region based on the grayscale distribution of pixels in each image region.
[0050] Indentations are typically small, irregular areas that exhibit a certain grayscale difference from the surrounding normal sheet material in a grayscale image. This difference is similar to the grayscale difference between an oil stain contaminated area formed by lubricating oil droplets from a pressure roller on the sheet material and a normal area. The problem addressed by this solution is: to identify indentation defects on the surface of alloy sheets in situations where oil stains may be present.
[0051] The surface of the rolled alloy sheet is relatively smooth, making it prone to reflection under light. This results in areas of varying brightness appearing in the grayscale image of the sheet. Figure 2 As shown, Figure 2The area along the main diagonal is brighter, while the areas on either side of it are darker. The characteristics of the indentation area differ across different brightness levels. This is because the grayscale values of the normal board surface differ between brighter and darker areas, resulting in varying grayscale differences between the defect area and the normal board surface at different brightness levels. For example, the indentation defect causes surface deformation, creating a reflective area on the darker surface, while oil stains, where oil directly covers the board surface, typically do not create a reflective area. The defect area includes both the indentation area and the oil stain area. Therefore, to increase the accuracy of defect feature analysis, the grayscale image of the board needs to be segmented into blocks to obtain image regions.
[0052] Step S210: Based on the distance and gray value difference between any two pixels, obtain the similarity index between the corresponding two pixels; based on the similarity index, cluster the pixels in the grayscale image of the board to obtain different clusters; denote the connected region formed by the pixels in each cluster as the initial region.
[0053] Since the areas containing the pressed material and the oil stains are usually small areas and have different gray levels from the surrounding normal board areas, the areas are divided according to the distance between pixels and the difference in gray levels.
[0054] Taking the a-th and b-th pixels in the grayscale image of the board material as an example for analysis, preferably, in this embodiment of the invention, the similarity index between the a-th and b-th pixels in the grayscale image of the board material is... Expressed as a formula:
[0055] In the formula, Let x be the x-coordinate of the a-th pixel in the grayscale image of the board material; Let x be the x-coordinate of the b-th pixel in the grayscale image of the board material. The ordinate of the pixel coordinates of the a-th pixel in the grayscale image of the board material; The ordinate of the pixel coordinates of the b-th pixel in the grayscale image of the board material; Let be the grayscale value of the a-th pixel in the grayscale image of the board material; Let be the grayscale value of the b-th pixel in the grayscale image of the board. The pixel coordinates of the pixel are common knowledge and will not be described further here.
[0056] In this embodiment of the invention, based on the similarity index between pixels, the K-means clustering algorithm is used to cluster the pixels in the grayscale image of the board material to obtain different clusters; wherein the K value is determined by the elbow method. In other embodiments of the invention, the DBSCAN algorithm and hierarchical clustering algorithm can also be used for clustering. Both the K-means clustering algorithm and the elbow method are well-known techniques to those skilled in the art and will not be described in detail here.
[0057] Step S220: Arrange the total number of pixels in the initial region in order to obtain the analysis sequence; divide the analysis sequence into a first subsequence and a second subsequence; the mean of the elements in the first subsequence is less than the mean of the elements in the second subsequence; take the initial region corresponding to each element in the first subsequence as a suspected abnormal region; take the initial region corresponding to each element in the second subsequence as the whole region.
[0058] Preferably, the method for dividing the analysis sequence includes: arranging the total number of pixels in all initial regions in ascending order to obtain the analysis sequence; calculating the absolute value of the difference between every two adjacent elements in the analysis sequence, and forming a first subsequence from the minimum value of the two elements corresponding to the largest absolute value of the difference, and the elements preceding that element; and forming a second subsequence from the remaining elements in the analysis sequence excluding those in the first subsequence.
[0059] Because indentation areas and oil stain contamination areas are usually small areas, while normal areas usually occupy most of the image, the initial areas with fewer pixels (i.e., the initial areas corresponding to the elements in the first subsequence) are more likely to represent indentation areas or oil stain contamination areas, and these initial areas are recorded as suspected abnormal areas; the initial areas with more pixels (i.e., the initial areas corresponding to the elements in the second subsequence) are more likely to represent the overall bright and dark parts of the image, and these initial areas are recorded as the overall area.
[0060] In another embodiment of the present invention, the method for dividing the analysis sequence may also be: calculating the mean of the elements in the analysis sequence; in the analysis sequence, elements less than or equal to the mean constitute the first subsequence, and elements greater than the mean constitute the second subsequence.
[0061] Step S230: For each suspected abnormal region, the entire region adjacent to the suspected abnormal region is taken as the analysis region of the suspected abnormal region; calculate the difference between the gray value mean of the pixels in the suspected abnormal region and each analysis region, and take the analysis region corresponding to the smallest difference as the target region of the suspected abnormal region; merge each suspected abnormal region with its target region to obtain the image region.
[0062] Defective areas possess different grayscale characteristics than normal material, potentially leading to them being classified as independent regions. This could interfere with the image segmentation process based on brightness and darkness. To avoid this issue, suspected anomalous areas are merged with adjacent regions whose overall grayscale distribution is similar to that of the target region. In other words, suspected anomalous areas are assigned to larger regions that represent the overall brightness and darkness of the image, thus improving the accuracy of subsequent defect analysis. It should be noted that if at least two suspected anomalous areas exist within the same target region, these suspected anomalous areas and the target region together constitute a single image region.
[0063] Figure 3 This is a schematic diagram of the regional proximity distribution provided in one embodiment of the present invention, such as... Figure 3 As shown, Figure 3 In the given region, s1, s2, s3 and s4 are all regions. Regions adjacent to region s1 are s2 and s3, regions adjacent to region s2 are s1, s3 and s4, regions adjacent to region s3 are s1, s2 and s4, and regions adjacent to region s4 are s2 and s3.
[0064] The reflectivity of an image area is mainly represented by grayscale values. Therefore, the reflectivity index of the board material is obtained based on the grayscale distribution of pixels within the image area.
[0065] Preferably, the method for obtaining the reflectivity index of the board material includes: recording the mode of the grayscale values of the pixels in the overall area of each image region as the reference value of the corresponding image region; taking the difference between the grayscale value of each pixel in the overall area of each image region and the reference value as the reference difference value of the corresponding pixel; and obtaining the reflectivity index of the board material in the corresponding image region based on the grayscale value of the pixels in the overall area of each image region and the reference difference value.
[0066] It should be noted that the image area is obtained by merging a whole area with several suspected abnormal areas. The higher the probability that the suspected abnormal area is an area of indentation or oil stain, the more the defective area will affect the normal reflection of the board surface. In order to avoid the influence of suspected abnormal areas on the reflection degree assessment, only the whole area in the image area is used for reflection assessment.
[0067] The degree of reflectivity is primarily represented by grayscale values; the higher the overall grayscale value of an image area, the stronger its reflectivity. Grayscale images of the board material may contain surface textures caused by the rolling process, such as fine lines or streaks. These textures reduce reflectivity. The baseline value of the image area represents the overall grayscale of the entire area, signifying the background. The smaller the baseline difference value of each pixel within the overall image area, the closer the pixel's grayscale value is to the background. This means the pixel has a lower probability of representing texture features and a higher probability of representing reflective features. To improve the accuracy of reflectivity feature analysis, the grayscale values of pixels with a higher probability of representing reflective features should be given greater weight in the acquisition of the board's reflectivity index. Therefore, the grayscale values of pixels within the overall image area are positively correlated with the board's reflectivity index, while the baseline difference value is negatively correlated with the board's reflectivity index.
[0068] In one specific implementation of this invention, the reflectivity of the sheet metal is expressed by the formula:
[0069]
[0070] In the formula, B is the reflectivity index of the board material for each image region; I is the total number of pixels in all regions of each image region. The grayscale value of the i-th pixel within the entire region of each image region; Reference values for each image region; The baseline difference value of the i-th pixel within all global regions of each image region; The preset positive number is taken as the empirical value of 1, which is used to prevent the fraction from being undefined when the denominator is 0. is the absolute value function; tanh is the arctangent function, used for normalization.
[0071] It should be noted that when The larger the value, the stronger the reflectivity of the i-th pixel within the entire image region; when... The smaller the pixel size, the lower the probability that the pixel represents texture features and the higher the probability that it represents reflective features. Adjustment This gives greater weight to the grayscale value of pixels with a higher probability of representing reflective features in the process of obtaining the light emission index of the board, thereby improving the accuracy of the reflectivity of the pixel.
[0072] Step S3: Perform edge detection on the grayscale image of the board to obtain abnormal regions; based on the grayscale distribution of edge pixels in each abnormal region, the shape of each abnormal region, and the reflectivity index of the board in the image of the region where each abnormal region is located, obtain the defect edge index of each abnormal region.
[0073] In grayscale images of sheet metal, defective areas and normal sheet metal areas typically exhibit significant feature differences. These differences are primarily due to the damage caused by defects to the sheet metal surface and the presence of oil stains, leading to variations in reflectivity between the sheet metal surface and its surroundings. Therefore, defective areas in grayscale images usually possess relatively distinct edges. In this embodiment, the Canny operator is used to perform edge detection on the grayscale image of the sheet metal to obtain edge pixels, and the closed regions formed by these edge pixels are extracted. In the actual defect section, since indentation defects are formed when foreign objects are pressed into the surface of the alloy sheet during the rolling process, they typically damage the surface, causing a certain degree of indentation. The different angles of the arc surfaces formed by the indentation edges result in variations in reflectivity at different locations along the indentation edges. Therefore, indentation defects may be divided into multiple closed-edge regions. The edge detection results are corrected by identifying suspected anomalous regions during the clustering process to obtain anomalous regions. The specific correction process is as follows:
[0074] The closed region formed by edge pixels is denoted as the target region. For each target region, it is determined whether the target region is in a suspected abnormal region. If so, the suspected abnormal region in which the target region is located is designated as an abnormal region. If not, the target region is designated as an abnormal region.
[0075] Indentation defects are formed when foreign objects are pressed into the surface of alloy sheet by the rolls during the rolling process. They usually damage the surface of the alloy sheet and cause a certain depression. The edge of the depression will form an arc surface. Because the angle of different arc surfaces is different, the amount of reflection of some edges of the depression is greater than that of the rest of the edge.
[0076] The reflectance varies at different locations on the recessed edge of indented defects, while oil stain defects do not cause substantial damage to the board surface, and the reflectance at their edges is generally similar. The shape of indented defects is related to the shape of the foreign object, while the shape of oil stain areas shows no obvious pattern. This solution uses grayscale values to represent reflectance. Based on the grayscale distribution of edge pixels within the abnormal area, the shape of the abnormal area, and the board reflectance index of the image of the area where the abnormal area is located, defect edge indicators are obtained, improving the accuracy of distinguishing between indented defects and oil stain defects using defect edge indicators.
[0077] Indentation defects are formed when foreign objects are pressed into the surface of alloy sheets during the rolling process. This typically damages the surface, causing indentations. The edges of these indentations form curved surfaces, and due to the different angles of these curved surfaces, the reflectivity of some edges differs from the rest. The original surface rigidity defects of the alloy sheet are usually smoothed out after rolling, while the surface indentations caused by indentation defects are due to the rolling process itself. Furthermore, oil stains do not cause substantial damage to the sheet surface, and the reflectivity characteristics of their edges differ from those of the defective areas. Additionally, the shape of the edges also reflects the difference between defective and oily areas: based on the above description of the causes of indentation defects, the resulting defect edges are related to the shape of the foreign object; while the edges of oily areas show no obvious pattern. Therefore, defect edge indices are obtained based on the grayscale distribution of edge pixels within abnormal areas, the shape of each abnormal area, and the sheet reflectivity of the image of the area where each abnormal area is located.
[0078] Please see Figure 4 The diagram illustrates a flowchart of a method for obtaining defect edge indicators of an abnormal region according to an embodiment of the present invention. The method includes:
[0079] Step S310: Obtain the edge reflectivity index of each abnormal region based on the grayscale distribution of edge pixels within each abnormal region.
[0080] The reflective areas have significant grayscale differences from both the normal board surface and the interior of the defects. Edge pixels obtained by edge detection within the abnormal areas can better reflect the differences in edge characteristics between the indented areas and the oil stain areas. Therefore, analyzing the reflectivity based on the grayscale distribution of edge pixels within the abnormal areas can improve the accuracy of the edge reflectivity index.
[0081] Preferably, the method for obtaining the edge reflectivity index is as follows: for each abnormal region, the distance between each edge pixel in the abnormal region and the boundary of the abnormal region is recorded as the boundary distance of the corresponding edge pixel; based on the difference between the gray value of each edge pixel in the abnormal region and the average gray value of all edge pixels, as well as the boundary distance, the local edge reflectivity value of the corresponding edge pixel is obtained; the average local edge reflectivity value of all edge pixels in the abnormal region is normalized to obtain the edge reflectivity index of the corresponding abnormal region.
[0082] It should be noted that, due to the varying reflectivity of different locations on the edge of the depression formed by the indentation defect, and the similar reflectivity of the edge portion of the oil stain defect, the grayscale values of the edge pixels within the abnormal area corresponding to the indentation defect are relatively discrete, while the grayscale values of the edge pixels within the abnormal area corresponding to the oil stain defect are more consistent. Since the depression formed by the indentation defect is closer to the defect boundary, the target area within the abnormal area corresponding to the indentation defect is located near the boundary of the abnormal area. The abnormal area corresponding to the oil stain defect is the same as the target area, and the edge pixels within the abnormal area corresponding to the oil stain defect are more likely to be surface texture pixels of the board material. The location distribution of these texture pixels is not fixed. In this embodiment, the dispersion of the grayscale values of the edge pixels within the abnormal area is presented by the difference between the grayscale value of this edge pixel and the average grayscale value of all edge pixels within the abnormal area, combined with the boundary distance, to obtain the edge reflectivity index of the abnormal area.
[0083] It should be noted that for each edge pixel within the abnormal region, the Euclidean distance between that edge pixel and each pixel on the boundary of the abnormal region is calculated, and the smallest Euclidean distance is taken as the distance between the edge pixel and the boundary of the abnormal region. If an edge pixel within the abnormal region is located on the boundary of the abnormal region, then these edge pixels are not included in the acquisition of the edge reflectivity index of the abnormal region.
[0084] In one specific implementation of this invention, the edge reflectivity index is expressed by the formula:
[0085]
[0086] In the formula, R represents the edge reflectivity index for each anomalous region; R is the total number of edge pixels within each anomalous region. Let r be the grayscale value of the r-th edge pixel within each abnormal region; The average grayscale value of all edge pixels within each abnormal region; The boundary distance of the r-th edge pixel within each abnormal region; This represents the local edge reflectance value of the r-th edge pixel within each abnormal region. The preset positive number is taken as the empirical value of 1, which is used to prevent the fraction from being undefined when the denominator is 0. is the absolute value function; tanh is the arctangent function, used for normalization.
[0087] It should be noted that, As the main body for calculating the edge reflectivity index, through Measure the difference in reflectivity of edge pixels within the abnormal region; when The larger the value, the greater the difference in reflectivity between different edge pixels within each abnormal region, and the greater the likelihood that the edges of this abnormal region are deformed edges caused by indentation defects; when The smaller the value, the more similar the reflectivity of edge pixels within each abnormal region, increasing the likelihood that the edges within that region are oil stain edges. This is determined by the boundary distance. The process of calculating the variance of grayscale values of edge pixels within the abnormal region is adjusted. The smaller the value, the greater the probability that the r-th edge pixel in each abnormal region is located at the edge caused by the indentation defect, and the smaller the probability that it belongs to the texture pixel inside the region, thus improving... smaller pixels The weighting of edge reflectivity in the calculation of edge reflectivity index is increased to improve the accuracy of edge reflectivity calculation.
[0088] Step S320: Obtain the edge shape index of each abnormal region based on the shape of each abnormal region.
[0089] The shape of the pressed-in area is related to the shape of the foreign object. The edge of the oil stain area has no obvious pattern. The edge shape index of the abnormal area is obtained.
[0090] Preferably, the method for obtaining the edge shape index is as follows: curve fitting is performed on the pixels on the boundary of each abnormal region to obtain the boundary fitting curve of the corresponding abnormal region; the slope of each pixel on the boundary fitting curve is obtained; on the boundary fitting curve of each abnormal region, the average value of the slope difference between each pixel on the boundary fitting curve and its adjacent pixels is calculated as the position difference of each pixel on the boundary fitting curve of each abnormal region; the average value of the position difference of pixels on the boundary fitting curve of each abnormal region is normalized to obtain the edge shape index of the abnormal region.
[0091] It should be noted that the least squares method is used for curve fitting in this embodiment of the invention; the least squares method is a well-known technique to those skilled in the art and will not be described in detail here. The slope between two pixels on the boundary fitting curve is obtained through the pixel coordinates of the pixels, that is, the ratio of the difference between the ordinates and the differences between the abscissas of the two pixels. In this embodiment of the invention, the Sigmoid function is used for normalization, but other normalization methods can also be selected, such as function transformation, min-max normalization, etc., which are not limited here.
[0092] Step S330: Using the plate reflectivity index of the image of each abnormal area, the edge reflectivity index and edge shape index of each abnormal area are weighted and summed to obtain the defect edge index of each abnormal area.
[0093] The calculation weights of the edge reflectivity and edge shape indices of the abnormal region are adjusted by considering the reflectivity of the material in the image region where the abnormal region is located. In the grayscale image of the material, the reflective portion of the edge pixels in the brighter defect area may be difficult to distinguish from other pixels in the same area due to the high degree of reflectivity. Therefore, such abnormal regions are mainly judged by shape features. When the reflectivity of the material in the image region where the abnormal region is located is high, the calculation weight of the edge shape index should be high; otherwise, the edge reflectivity index should be high.
[0094] In one specific implementation of this invention, the defect edge index of each abnormal region is expressed by the formula:
[0095]
[0096] In the formula, C is the defect edge index of each abnormal region; B is the reflectivity index of the board material in the image area where each abnormal region is located. The edge reflectivity index for each anomalous region; The edge shape index for each abnormal region.
[0097] Step S4: Identify roll forming defects in the alloy plate under test based on the texture and defect edge indicators of the abnormal areas contained in each image area, as well as the reflectivity of the plate.
[0098] To further improve the accuracy of defect area identification, it is necessary to further analyze the image features inside the image area: oil stain defects are caused by lubricating oil covering the surface of the board, and contain dirt such as dust and metal shavings. Since the thickness of the oil stains on the board is different and the dirt contained in each part may also be different, the uniformity of the surface reflection of the oil stains is low; the abnormality of the indentation defect is caused by foreign objects being pressed into the board, and its surface reflection changes relatively uniformly.
[0099] Step S410: Negatively correlate the mean variance of the grayscale values of pixels in the target area within each abnormal region to obtain the texture representation index of the corresponding abnormal region.
[0100] The surface uniformity of an abnormal area is determined by the variance of the grayscale values of pixels within the target area. Oily areas exhibit lower internal reflectivity uniformity compared to areas with indentations. A smaller mean variance of grayscale values within the target area and an abnormal area suggests a higher likelihood that the abnormal area is oil-contaminated. Therefore, a negative correlation processing is needed to obtain a texture representation index, where a larger texture representation index indicates a higher probability that the abnormal area is an indentation defect.
[0101] It should be noted that in this embodiment of the invention, the exp() function is used to perform negative correlation mapping on the mean of the variances of the grayscale values of pixels in the target region within the abnormal region. Other methods can also be used to achieve negative correlation mapping, which are not limited here. Here, exp is an exponential function with the natural constant e as the base.
[0102] Step S420: Using the reflectivity index of the sheet metal in each image region, the mean of the defect edge index and the mean of the texture expression index of all abnormal areas contained in each image region are weighted and summed to obtain the roll forming defect index of the corresponding image region.
[0103] The weights of the average defect edge index and the average texture expression index of abnormal areas in the image region are adjusted by the reflectivity index of the sheet material during the process of obtaining the roll forming defect index. In a specific implementation of this invention, the roll forming defect index of each image region is expressed by the formula:
[0104]
[0105] In the formula, P is the roll forming defect index for each image region; B is the sheet material reflectivity index for each image region. The mean of the defect edge index of all abnormal regions contained in each image region; The mean of the texture representation index of all anomalous regions contained within each image region.
[0106] It should be noted that the higher the reflectivity of the image area, the greater the difference in reflectivity between different reflective areas, and the higher the accuracy of assessing rolling defects by examining the internal texture of abnormal areas. Therefore, the higher the reflectivity index B of the board, the more texture information is presented. The larger the calculation weight, the better.
[0107] If the roll forming defect index of an image region in the grayscale image of the plate exceeds the preset roll forming defect threshold, then the alloy plate under test has a roll forming defect; if the roll forming defect index of all image regions in the grayscale image of the plate is less than or equal to the preset roll forming defect threshold, then the alloy plate under test does not have a roll forming defect.
[0108] It should be noted that in this embodiment of the invention, the preset roll forming defect threshold is taken as an empirical value of 0.55, and the implementer can set it according to the specific situation.
[0109] This invention is now complete.
[0110] In summary, in this embodiment of the invention, the reflectivity index of the board material is obtained based on the grayscale distribution of pixels within the image region of the board material's grayscale image; abnormal regions in the board material's grayscale image are obtained, and defect edge indicators are obtained by combining the grayscale distribution and shape of edge pixels within each abnormal region with the board material reflectivity index of the image of the region where the abnormal region is located; based on the texture and defect edge indicators of the abnormal regions contained within the image region, as well as the board material reflectivity index, roll forming defects of the alloy board under test are identified. This invention, based on the differences in reflectivity and shape characteristics between indented defects and oil stain contamination areas of alloy boards, identifies roll forming defects of the alloy board under test, improving the accuracy of roll forming defect identification of alloy boards.
[0111] Example 2:
[0112] Figure 5 This is a schematic diagram of a computer device for identifying roll forming defects in alloy sheet metal for building formwork systems, provided as an embodiment of the present invention. For example,... Figure 5 As shown, the computer device includes: a memory 501, a processor 502, and a computer program 503 stored in the memory 501 and running on the processor 502, wherein when the processor 502 executes the computer program 503, the computer device can execute any of the aforementioned methods for identifying roll forming defects in alloy plates for building formwork systems.
[0113] Furthermore, this application also protects an apparatus that may include a memory and a processor, wherein the memory stores executable program code, and the processor is used to call and execute the executable program code to perform the method for identifying roll forming defects of alloy plates for building formwork systems provided in this application.
[0114] This embodiment can divide the device into functional modules based on the above method example. For example, each module can correspond to a separate function, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0115] It should be understood that the device provided in this embodiment is used to perform the above-described method for identifying roll forming defects in alloy plates for building formwork systems, and therefore can achieve the same effect as the above-described implementation method.
[0116] When using integrated units, the device may include a processing module and a storage module. When applied to a workpiece, the processing module can be used to control and manage the workpiece's operations. The storage module can be used to support the execution of program code by the workpiece.
[0117] The processing module may be a processor or a controller, which can implement or execute various exemplary logic blocks, modules, and circuits as disclosed in this application. The processor may also be a combination of computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and microprocessors, etc., and the storage module may be a memory.
[0118] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0119] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0120] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for identifying rolling defects of alloy plates for building formwork systems, characterized in that: The method includes: Acquire a plate grayscale image of the alloy plate to be tested after rolling; Divide the grayscale image of the plate into different image areas; obtain the plate reflectivity index of the corresponding image area according to the grayscale distribution of the pixel points in each image area; Perform edge detection on the grayscale image of the plate to obtain abnormal areas; obtain defect edge indicators of each abnormal area based on the grayscale distribution of edge pixels in each abnormal area, the shape of each abnormal area, and the plate reflective index of the image of the area where each abnormal area is located; According to the texture of the abnormal area contained in each image area, the defect edge index, and the plate reflective index, rolling defect identification is performed on the alloy plate to be tested; The method for dividing the plate grayscale image into different image areas comprises: According to the distance and gray value difference between any two pixel points, a similarity index between the corresponding two pixel points is obtained; based on the similarity index, the pixel points in the gray image of the plate are clustered to obtain different clusters; and the connected domain formed by the pixel points in each cluster is recorded as the initial area; The total number of pixels in the initial area is arranged in order to obtain an analysis sequence; the analysis sequence is divided into a first subsequence and a second subsequence; the mean value of the elements in the first subsequence is less than the mean value of the elements in the second subsequence; the initial area corresponding to each element in the first subsequence is taken as a suspected abnormal area; the initial area corresponding to each element in the second subsequence is taken as the overall area; For each suspected abnormal area, the entire area adjacent to the suspected abnormal area is used as the analysis area of the suspected abnormal area; the difference between the suspected abnormal area and the mean gray value of the pixel points in each analysis area is calculated, and the analysis area corresponding to the smallest difference is used as the target area of the suspected abnormal area; each suspected abnormal area is merged with its target area to obtain an image area; The method for obtaining the plate reflectivity index of the corresponding image area according to the grayscale distribution of the pixel points in each image area comprises: Recording the grayscale value mode of the pixels in the overall area of each image area as the reference value of the corresponding image area; taking the difference between the grayscale value of each pixel in the overall area of each image area and the reference value as the reference difference value of the corresponding pixel; obtaining the plate reflectivity index of the corresponding image area according to the grayscale value of the pixels in the overall area of each image area and the reference difference value; The method for performing edge detection on a plate grayscale image to obtain an abnormal area comprises: Perform edge detection on the grayscale image of the plate to obtain edge pixel points in the grayscale image of the plate; record the closed area formed by the edge pixel points as the target area; for each target area, determine whether the target area is in the suspected abnormal area, if so, take the suspected abnormal area where the target area is located as the abnormal area; if not, take the target area as the abnormal area; The method for obtaining the defect edge index of each abnormal area includes: According to the grayscale distribution of edge pixels in each abnormal area, the edge reflection index of each abnormal area is obtained; Obtaining edge shape indicators of each abnormal region according to the shape of each abnormal region; Using the plate reflectivity index of the image of the region where each abnormal region is located, weighted summation is performed on the edge reflectivity index and the edge shape index of each abnormal region to obtain a defect edge index of each abnormal region; The method for identifying rolling defects of the alloy plate to be tested based on the texture of the abnormal area contained in each image area, the defect edge index, and the plate reflective index comprises: Negative correlation mapping is performed on the mean of the variance of the grayscale values of the pixels in the target area in each abnormal area to obtain a texture expression index of the corresponding abnormal area; Using the plate reflectivity index of each image area, weighted summation is performed on the mean values of the defect edge index and the texture expression index of all abnormal areas contained in each image area to obtain a rolling defect index of the corresponding image area; If the rolling defect index of the image area in the grayscale image of the plate is greater than the preset rolling defect threshold, then the alloy plate to be tested has a rolling defect; if the rolling defect index of all image areas in the grayscale image of the plate is less than or equal to the preset rolling defect threshold, then the alloy plate to be tested does not have a rolling defect.
2. The method for identifying rolling defects of alloy plates for building formwork systems according to claim 1, characterized in that: The method for obtaining the edge reflection index of each abnormal area includes: For each abnormal area, the distance between each edge pixel point in the abnormal area and the boundary of the abnormal area is recorded as the boundary distance of the corresponding edge pixel point; according to the difference between the grayscale value of each edge pixel point in the abnormal area and the average grayscale value of all edge pixels, and the boundary distance, the local edge reflection value of the corresponding edge pixel point is obtained; the average value of the local edge reflection values of all edge pixels in the abnormal area is normalized to obtain the edge reflection index of the corresponding abnormal area.
3. The method for identifying rolling defects of alloy plates for building formwork systems according to claim 1, characterized in that: The method for obtaining the edge shape index of each abnormal area includes: Perform curve fitting on the pixel points on the boundary of each abnormal area to obtain the boundary fitting curve of the corresponding abnormal area; obtain the slope of each pixel point on the boundary fitting curve; on the boundary fitting curve of each abnormal area, calculate the mean value of the difference between the slopes of each pixel point on the boundary fitting curve and its adjacent pixel points, as the position difference of each pixel point on the boundary fitting curve of each abnormal area; normalize the mean value of the position difference of the pixel points on the boundary fitting curve of each abnormal area to obtain the edge shape index of the abnormal area.
4. The method for identifying rolling defects of alloy plates for building formwork systems according to claim 1, characterized in that: The method for edge detection of the plate grayscale image is the Canny operator.
5. The method for identifying rolling defects of alloy plates for building formwork systems according to claim 1, characterized in that: The preset rolling defect threshold is 0.55.
Citation Information
Patent Citations
Furniture composite board surface defect identification method
CN115294144A
Visual inspection system for polishing effect of aluminum alloy surface
CN117173189A
Aluminum composite plate defect detection method and system based on artificial intelligence
CN117611583A
Subject detection device, imaging device, and program
JP2019008830A
