Alloy plate rolling defect identification method for building template system
Through regional division and feature analysis of the grayscale image of the alloy plate, combined with reflection and texture features, the rolling defects of the alloy plate are identified, which solves the problem of difficulty in identifying the indented objects and oil contaminated areas in the existing technology, and improves the rolling quality Accuracy of defect identification.
Patent Information
- Application Number
- CN202411061564.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-08-05
AI Technical Summary
The existing technology fails to effectively identify defects in the intrusion and oil-stained 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, and performing edge detection, combined with the texture and shape characteristics, the defect edge index is calculated, and the indented object and the oil-contaminated area are distinguished.
It improves the accuracy of identification of rolling defects in alloy sheets, can accurately identify indented objects and oil-contaminated areas, and enhances the ability to identify rolling defects.
Smart Images

Figure CN118570214A
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image analysis, and in particular to a method for identifying rolling defects of alloy plates used in building formwork systems. Background Art
[0002] Roll forming is an important processing step in the process of making building formwork from alloy plates. During the rolling process, some rolling defects may occur due to uneven rolling force. In order to ensure the safety and processing quality of the building formwork, it is necessary to identify defects on the plate after rolling.
[0003] During the rolling process of alloy plates, the most likely problem is pressed-in objects, which are usually caused by burrs on the edge of the plate and foreign matter on the surface being pressed into the surface of the plate by the roller during the rolling process. The pressed-in objects will cause the surface of the plate to be damaged and produce pressed-in object defects. The lubricating oil of the roller may drip on the plate to form an oily contaminated area, and the grayscale difference characteristics of the pressed-in object defect area and the oily contaminated area and the surrounding normal plate area have certain similarities. The existing metal plate defect recognition does not address the influence of the oily contaminated area on the recognition of the pressed-in object defect area, resulting in the oily contaminated area being mistakenly identified as the pressed-in object defect area during the defect recognition process, thereby reducing the accuracy of alloy plate rolling defect recognition. Summary of the invention
[0004] In order to solve the technical problem that the influence of the gray scale of the oil-contaminated area on the identification of the defects of the pressed object is not considered, resulting in inaccurate identification of the rolling defects of the alloy plate, the purpose of the present invention is to provide a method for identifying the rolling defects of the alloy plate used in the building formwork system, and the technical scheme adopted is as follows: The present invention proposes a method for identifying rolling defects of alloy plates for building formwork systems, the method comprising: 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; Rolling defects of the alloy plate to be tested are identified according to the texture of the abnormal area contained in each image area, the defect edge index, and the plate reflective index.
[0005] Furthermore, 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 grayscale 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.
[0006] Furthermore, 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 includes: The mode of the grayscale values of the pixels in the overall area of each image area is recorded as the reference value of the corresponding image area; the difference between the grayscale value of each pixel in the overall area of each image area and the reference value is taken as the reference difference value of the corresponding pixel; and the plate reflectivity index of the corresponding image area is obtained according to the grayscale value of the pixels in the overall area of each image area and the reference difference value.
[0007] Furthermore, the method for performing edge detection on the grayscale image of the plate to obtain abnormal areas includes: 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, treat the suspected abnormal area where the target area is located as the abnormal area; if not, treat the target area as the abnormal area.
[0008] Furthermore, 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; By using the plate reflective index of the image of the region where each abnormal region is located, weighted summation is performed on the edge reflective index and the edge shape index of each abnormal region to obtain the defect edge index of each abnormal region.
[0009] Furthermore, 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.
[0010] Furthermore, 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.
[0011] Furthermore, 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 includes: 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.
[0012] Furthermore, the method for performing edge detection on the grayscale image of the plate is a Canny operator.
[0013] Furthermore, the preset rolling defect threshold is 0.55.
[0014] The present invention has the following beneficial effects: In an embodiment of the present invention, the grayscale image of the plate is divided into different image areas to facilitate subsequent reflection analysis based on the brightness of the area; the reflection degree of the image area is mainly presented by the grayscale value, and the reflection index of the plate is obtained according to the grayscale distribution of the pixels in the image area; the defective area, that is, the pressed object area and the oil stain pollution area, usually have relatively obvious edges in the grayscale image of the plate, and the abnormal area is obtained by edge detection; since the reflection degrees of different positions of the concave edge formed by the pressed object defect are different, and the reflection amount of the edge part of the oil stain pollution defect is close, and the reflection amount is presented by the grayscale value of the pixel point, the abnormal area is obtained by edge detection. The grayscale distribution of edge pixels in the abnormal area presents edge features; in the grayscale image of the plate, the reflective part of the edge pixels in the defect area of the brighter area may be difficult to distinguish from other pixels in the area due to the large degree of reflection, so it is necessary to analyze in combination with the shape features of the abnormal area to improve the accuracy of the defect edge feature presented by the defect edge indicator; because the surface reflection degree of the oil stain area is uniform and the pressed object area is uneven, when performing defect detection on the alloy plate based on the defect edge feature, considering the texture of the abnormal area contained in the image area can further improve the accuracy of rolling defect recognition. This scheme combines the characteristics of the reflectivity, shape and texture of the abnormal area to identify rolling defects of the alloy plate to be tested, and can accurately identify the oil stain contaminated area formed by the pressed object and the lubricating oil of the roller dripping on the plate, thereby improving the accuracy of rolling defect recognition of the alloy plate. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] 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.
[0016] Figure 1 A flowchart of a method for identifying rolling defects of alloy plates for building formwork systems provided by one embodiment of the present invention; Figure 2 A partial schematic diagram of a grayscale image of a plate with a pressed object defect provided by an embodiment of the present invention; Figure 3 A schematic diagram of regional proximity distribution provided by an embodiment of the present invention; Figure 4A flowchart of a method for obtaining defect edge indicators of an abnormal area provided by an embodiment of the present invention; Figure 5 A computer device schematic diagram of an alloy plate rolling defect identification device for a building formwork system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0017] 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 a method for identifying rolling defects of alloy plates for building formwork systems 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.
[0018] 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.
[0019] The specific scheme of the method for identifying rolling defects of alloy plates for building formwork systems provided by the present invention is described in detail below with reference to the accompanying drawings.
[0020] Embodiment 1: The present invention proposes a method for identifying rolling defects of alloy plates used in building formwork systems. Figure 1 , which shows a flowchart of the steps of a method for identifying rolling defects of alloy plates for building formwork systems provided by one embodiment of the present invention, the method comprising: Step S1: obtaining a grayscale image of the alloy plate to be tested after rolling.
[0021] Specifically, the surface of the alloy plate after rolling is relatively smooth and prone to reflection. During the image acquisition process, it is necessary to avoid the light from being reflected by the plate and directly entering the image acquisition device, which will cause a large area of strong reflection in the acquired image and make it difficult to analyze the image features. Therefore, in the embodiment of the present invention, an industrial camera is installed directly above the alloy plate to be tested after rolling, so that the light is kept at a 45-degree angle to the horizontal plane to illuminate the alloy plate, and the image of the alloy plate to be tested after rolling is taken by the industrial camera to obtain the plate image, which is an RGB image. The plate image is grayscaled and denoised to obtain a plate grayscale image.
[0022] It should be noted that in the embodiment of the present invention, a weighted average grayscale algorithm is selected for grayscale processing, and a non-local mean filter is used for denoising processing. The specific methods are not introduced here, and they are all technical means well known to those skilled in the art. In other embodiments of the present invention, other image acquisition devices and image preprocessing algorithms can also be selected. Image acquisition and image preprocessing algorithms are both technical means well known to those skilled in the art and are not limited here.
[0023] During the rolling process of alloy plates, the most common problem is the problem of pressed objects. This is usually caused by the burrs on the edge of the plate and foreign objects on the surface being pressed into the surface of the plate by the rollers during the rolling process. The pressed objects damage the surface of the plate, causing the appearance of the plate to not meet the standards and reduce the performance of the plate. Figure 2 A partial schematic diagram of a grayscale image of a plate with an indentation defect provided by an embodiment of the present invention. In this solution, the rolling defect of the alloy plate is an indentation defect.
[0024] Step S2: Divide the grayscale image of the plate into different image areas; and obtain the plate reflectivity index of the corresponding image area according to the grayscale distribution of the pixels in each image area.
[0025] The pressed object is usually a small irregular area, which has a certain grayscale difference feature from the surrounding normal plate area in the plate grayscale image. This feature is similar to the grayscale difference feature between the oil stain contaminated area formed by the lubricating oil of the press roller dripping on the plate and the normal area. The problem solved by this solution is: to identify the pressed object defect on the surface of the alloy plate in the case of possible oil stain defects.
[0026] The surface of the alloy sheet after rolling is relatively smooth, and it is easy to reflect light under light, so there will be areas with different brightness and darkness in the grayscale image of the sheet; Figure 2 As shown, Figure 2 The area where the main diagonal line is located is brighter, and the areas on both sides of this area are darker. There are differences in the characteristic performance of the pressed object area in different brightness areas. The specific reason is: the grayscale value of the normal plate surface in the brighter area and the darker area is different, which makes the grayscale difference between the defective area and the normal plate surface of different brightness different; for example, the pressed object defect causes the plate surface to deform, which causes a certain reflective area on the darker surface, while the oil stain contaminated area is the oil stain directly covering the plate surface, which usually does not cause a reflective area. Among them, the defective area includes: the pressed object area and the oil stain contaminated area. Therefore, in order to increase the accuracy of the defect feature analysis, it is necessary to divide the plate grayscale image into blocks to obtain the image area.
[0027] Step S210: according to the distance and gray value difference between any two pixel points, obtain the similarity index between the corresponding two pixel points; cluster the pixel points in the gray image of the plate based on the similarity index to obtain different clusters; record the connected domain formed by the pixel points in each cluster as the initial area.
[0028] Since the pressed object area and the oil stain contaminated area are usually small areas and have grayscale differences from the surrounding normal plate area, the area division is performed based on the distance between pixel points and the grayscale value difference.
[0029] Taking the a and b pixel points in the grayscale image of the plate as an example for analysis, preferably, the similarity index between the a and b pixel points in the grayscale image of the plate in the embodiment of the present invention is The formula is: ; In the formula, is the horizontal coordinate of the pixel coordinate of the ath pixel in the grayscale image of the plate; is the horizontal coordinate of the pixel coordinate of the bth pixel in the grayscale image of the plate; is the ordinate of the pixel coordinate of the ath pixel in the grayscale image of the plate; is the ordinate of the pixel coordinate of the bth pixel in the grayscale image of the plate; is the gray value of the ath pixel in the gray image of the plate; is the gray value of the bth pixel in the gray image of the plate. The pixel coordinates of the pixel are common knowledge and will not be described here.
[0030] In an embodiment of the present invention, based on the similarity index between the pixels, the K-means clustering algorithm is used to cluster the pixels in the grayscale image of the plate to obtain different clusters; wherein the K value is determined by the elbow method. In other embodiments of the present invention, the DBSCAN algorithm and the hierarchical clustering algorithm may also be used for clustering. wherein the K-means clustering algorithm and the elbow method are both well-known technologies to those skilled in the art and will not be described in detail here.
[0031] Step S220: Arrange the total number of pixels in the initial area in order to obtain an 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 area corresponding to each element in the first subsequence as a suspected abnormal area; take the initial area corresponding to each element in the second subsequence as the overall area.
[0032] Preferably, the method for dividing the analysis sequence includes: arranging the total number of pixel points in all initial areas in ascending order to obtain an analysis sequence; calculating the absolute value of the difference between every two adjacent elements in the analysis sequence, and forming a first subsequence by the minimum value of the two elements corresponding to the largest absolute value of the difference and the element before the element; and forming a second subsequence by the remaining elements in the analysis sequence except the elements in the first subsequence.
[0033] Because the pressed object area and the oil stain area are usually small areas, and the normal area usually occupies most of the image, the initial area with a smaller number of pixels in the area, that is, the initial area corresponding to the elements in the first subsequence, is more likely to represent the pressed object area or the oil stain area, and these initial areas are recorded as suspected abnormal areas; the initial area with a larger number of pixels in the area, that is, the initial area corresponding to the elements in the second subsequence, is more likely to represent the overall bright and dark parts of the image, and these initial areas are recorded as overall areas.
[0034] 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, the first subsequence is composed of elements less than or equal to the mean, and the second subsequence is composed of elements greater than the mean.
[0035] Step S230: 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 grayscale value mean of the suspected abnormal area and 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.
[0036] The defective area has different grayscale characteristics from the normal plate, and there is a possibility that it will be divided into independent areas, which will interfere with the image segmentation process based on brightness. To avoid the above problems, the suspected abnormal area is merged with the overall area with a relatively close overall grayscale distribution adjacent to it, that is, the target area, that is, the suspected abnormal area is classified into the overall area with a larger area and presenting the overall brightness of the image, so as to improve the accuracy of subsequent defect analysis. It should be noted that if there are at least two suspected abnormal areas whose target areas are the same overall area, these suspected abnormal areas and the overall area together constitute an image area.
[0037] Figure 3 A schematic diagram of the region proximity distribution provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, Figure 3Here, s1, s2, s3 and s4 are all regions. The regions adjacent to region s1 are s2 and s3, the regions adjacent to region s2 are s1, s3 and s4, the regions adjacent to region s3 are s1, s2 and s4, and the regions adjacent to region s4 are s2 and s3.
[0038] The degree of reflection in the image area is mainly presented by the gray value, and the plate reflection index is obtained according to the gray distribution of the pixels in the image area.
[0039] Preferably, the method for obtaining the reflective index of the plate includes: recording the mode of the grayscale values 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; and obtaining the reflective index of the plate 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.
[0040] It should be noted that the image area is obtained by merging an overall area and several suspected abnormal areas. The greater the probability that the suspected abnormal area is a pressed object area or an oil contaminated area, the more likely it is that the defective area affects the normal reflection of the plate surface. In order to avoid the influence of the suspected abnormal area on the reflection degree assessment, only the overall area in the image area is used for reflection assessment.
[0041] The degree of reflection is mainly presented by grayscale value. The greater the overall grayscale, the stronger the reflection of the image area. There may be brushed textures on the surface of the plate caused by the rolling process in the grayscale image of the plate. These brushed textures reduce the degree of reflection. The reference value of the image area presents the overall grayscale of the entire area in the image area, representing the background of the image area. When the reference difference value of each pixel point in the entire area of the image area is smaller, the grayscale value of the pixel point is closer to the background, the probability of the pixel point representing the texture feature is lower and the probability of representing the reflective feature is greater. In order to improve the accuracy of the reflective feature analysis, the grayscale value of the pixel point with a greater probability of representing the reflective feature should be set with a larger weight in the process of obtaining the plate light index. Therefore, the grayscale value of the pixel point in the entire area of the image area is positively correlated with the plate reflective index, and the reference difference value is negatively correlated with the plate reflective index.
[0042] In a specific implementation of the embodiment of the present invention, the reflective index of the plate is expressed by the formula: Where B is the plate reflectivity index of each image area; I is the total number of pixels in all the overall areas of each image area; is the gray value of the i-th pixel in all the overall areas of each image area; is the baseline value for each image region; is the baseline difference value of the i-th pixel in all the overall areas of each image area; It is a preset positive number with an empirical value of 1. It is used to prevent the denominator from being 0, which makes the fraction meaningless. is the absolute value function; tanh is the inverse tangent function, which is used for normalization.
[0043] It should be noted that when When is larger, the reflection degree of the position of the i-th pixel in all the overall areas of the image area is stronger; when The smaller the pixel is, the lower the probability that it represents a texture feature and the greater the probability that it represents a reflective feature. Adjustment , so that the gray value of the pixel with a greater probability of representing the reflective feature has a greater weight in the process of obtaining the plate's light emission index, thereby improving the accuracy of the reflective degree of the pixel.
[0044] Step S3: Perform edge detection on the grayscale image of the plate to obtain abnormal areas; obtain the defect edge index of each abnormal area according to 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.
[0045] There are usually large feature differences between the defective area and the normal plate area in the plate grayscale image. This difference is mainly caused by the damage to the plate surface caused by the defect and the oil stains attached to the plate surface, which makes the reflective amount of the plate surface different from the surrounding area. Therefore, the defective area usually has a relatively obvious edge in the plate grayscale image. In the embodiment of the present invention, the Canny operator is used to perform edge detection on the plate grayscale image to obtain edge pixels, and the closed area formed by the edge pixels in the image is extracted. In the actual defect part, since the pressed object defect is formed by the foreign matter being pressed into the surface of the alloy plate by the rolling roller during the rolling process, it usually damages the surface of the alloy plate to cause a certain depression. The different angles of the arc surface formed by the depression edge lead to differences in the reflective amount at different positions of the depression edge. Therefore, the pressed object defect may be divided into multiple edge closed areas. The edge detection result is corrected by the suspected abnormal area in the clustering process to obtain the abnormal area. The specific correction process is as follows: The closed area formed by the edge pixels is recorded as the target area; for each target area, it is determined whether the target area is in the suspected abnormal area. If so, the suspected abnormal area where the target area is located is regarded as the abnormal area; if not, the target area is regarded as the abnormal area.
[0046] The pressed-in defect is formed when foreign matter is pressed into the surface of the alloy plate by the rolling roller during the rolling process. It usually damages the surface of the alloy plate and causes a certain depression, and the edge of the depression forms an arc surface. Due to the different angles of different arc surfaces, the amount of reflection at some edges of the depression is larger than that at the other edges.
[0047] There are differences in the amount of reflection at different positions of the concave edge of the pressed object defect. The oil stain defect does not cause substantial damage to the surface of the plate, and the amount of reflection at its edge is similar. The shape of the pressed object defect is related to the shape of the foreign body, while the shape of the oil stain area has no obvious regularity. This solution presents the amount of reflection through grayscale values. Based on the grayscale distribution of edge pixels in the abnormal area, the shape of the abnormal area, and the plate reflection index of the image of the area where the abnormal area is located, the defect edge index is obtained to improve the accuracy of distinguishing pressed object defects from oil stain defects using the defect edge index.
[0048] The pressed-in defect is formed when foreign matter is pressed into the surface of the alloy plate by the roller during the rolling process. It usually damages the surface of the alloy plate and causes a certain depression, and the edge of the depression forms an arc surface. Due to the different angles of different arc surfaces, the reflection amount of some edges of the depression edge is larger than that of the other edges. The original surface rigidity defects of the alloy plate after rolling are usually squeezed smooth, while the surface depression formed by the pressed-in defect is caused by the rolling process; in addition, the oily part does not cause substantial damage to the surface of the plate, and the reflection amount characteristics of its edge part are different from those of the defective part. In addition, the shape of the edge part can also reflect the difference between the defective area and the oily area: according to the above description of the cause of the pressed-in defect, the defective edge formed is related to the shape of the foreign matter; while the edge of the oily area has no obvious regularity. Therefore, according to the grayscale distribution of the edge pixels in the abnormal area, the shape of each abnormal area and the plate reflection index of the image of the area where each abnormal area is located, the defect edge index is obtained.
[0049] See also Figure 4 , which shows a flowchart of a method for obtaining defect edge indicators of an abnormal area provided by an embodiment of the present invention, the method comprising: Step S310: Obtaining the edge reflection index of each abnormal area according to the grayscale distribution of edge pixels in each abnormal area.
[0050] The reflective area has a large grayscale difference from the normal plate surface and the inside of the defect. The edge pixel points obtained by edge detection in the abnormal area can better reflect the edge feature differences between the pressed object area and the oil contaminated area. Therefore, analyzing the degree of reflection based on the grayscale distribution of edge pixels in the abnormal area can improve the accuracy of the edge reflection index.
[0051] Preferably, the method for obtaining the edge reflection index is: 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 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.
[0052] It should be noted that, since the degree of reflection at different positions of the edge of the depression formed by the impingement defect is different, the amount of reflection at the edge of the oil stain defect is close, so the grayscale value of the edge pixel point in the abnormal area corresponding to the impingement defect is relatively discrete, and the grayscale value of the edge pixel point in the abnormal area corresponding to the oil stain defect is relatively consistent. The depression formed by the impingement defect is closer to the boundary of the defect, then the target area in the abnormal area corresponding to the impingement 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 greater the possibility that the edge pixel point in the abnormal area corresponding to the oil stain defect is the texture pixel point on the surface of the plate, the more the position distribution of these texture pixel points is not fixed. In this embodiment, the discrete degree of the grayscale value of the edge pixel point in the abnormal area is presented by the difference between the grayscale value of the edge pixel point and the average grayscale value of all edge pixel points in the abnormal area, and the edge reflection index of the abnormal area is obtained by combining the boundary distance.
[0053] It should be noted that for each edge pixel point in the abnormal area, the Euclidean distance between the edge pixel point and each pixel point on the boundary of the abnormal area is calculated, and the minimum Euclidean distance is used as the distance between the edge pixel point and the boundary of the abnormal area. If the edge pixel points in the abnormal area are on the boundary of the abnormal area, these edge pixel points do not participate in the acquisition of the edge reflection index of the abnormal area.
[0054] In a specific implementation of the embodiment of the present invention, the edge reflection index is expressed by the formula: In the formula, R is the total number of edge pixels in each abnormal area; is the gray value of the rth edge pixel in each abnormal area; is the mean gray value of all edge pixels in each abnormal area; is the boundary distance of the rth edge pixel in each abnormal area; is the local edge reflection value of the rth edge pixel in each abnormal area; It is a preset positive number with an empirical value of 1. It is used to prevent the denominator from being 0, which makes the fraction meaningless. is the absolute value function; tanh is the inverse tangent function, which is used for normalization.
[0055] It should be noted that It is the calculation subject of edge reflection index, through Measures the difference in the degree of reflection of edge pixels in the abnormal area; When the value is larger, the difference in the degree of reflection of different edge pixels in each abnormal area is greater, and the possibility that the edge parts of the abnormal area are deformed edges caused by the indentation defect is greater; when The smaller the distance, the closer the degree of reflection of the edge pixels in each abnormal area is, and the greater the possibility that the edge parts in the abnormal area are oil stain edges. The process of calculating the variance of the grayscale values of edge pixels in the abnormal area is adjusted. The smaller the value, the greater the possibility that the rth edge pixel in each abnormal area is located at the edge caused by the indentation defect, and the smaller the possibility that it belongs to the texture pixel inside the area. The smaller the pixel Weight in edge reflection index calculation to improve the accuracy of edge reflection calculation.
[0056] Step S320: Obtaining edge shape indicators of each abnormal region according to the shape of each abnormal region.
[0057] The shape of the pressed object area is related to the shape of the foreign body. The edge of the oily area has no obvious regularity, and the edge shape index of the abnormal area is obtained.
[0058] Preferably, the method for obtaining the edge shape index is: performing curve fitting on the pixel points on the boundary of each abnormal area to obtain the boundary fitting curve of the corresponding abnormal area; obtaining the slope of each pixel point on the boundary fitting curve; on the boundary fitting curve of each abnormal area, calculating the mean of the slope differences between 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; normalizing the mean 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.
[0059] It should be noted that the least square method is used for curve fitting in the embodiment of the present invention; wherein, the least square method is a well-known technology for those skilled in the art and will not be described in detail here. The slope between two pixel points on the boundary fitting curve is obtained by the pixel coordinates of the pixel points, that is, the ratio of the difference between the ordinate and the abscissa of the pixel coordinates of the two pixel points. In the embodiment of the present invention, the Sigmoid function is used for normalization processing, and other normalization methods may also be selected, such as function conversion, maximum and minimum normalization, etc., which are not limited here.
[0060] Step S330: 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 the defect edge index of each abnormal region.
[0061] The calculation weights of the edge reflection index and edge shape index of the abnormal area are adjusted by the plate reflection index of the image area where the abnormal area is located; in the grayscale image of the plate, the reflection part of the edge pixel points in the defect area of the brighter area may be difficult to distinguish by the edge reflection feature due to the large degree of reflection from other pixels in the area, so this type of abnormal area is mainly judged by the shape feature. When the plate reflection index of the image area where the abnormal area is located is large, the calculation weight of the edge shape index should be large, otherwise the edge reflection index is large.
[0062] In a specific implementation of the embodiment of the present invention, the defect edge index of each abnormal area is expressed by the formula: Where, C is the defect edge index of each abnormal area; B is the plate reflectivity index of the image area where each abnormal area is located; It is the edge reflection indicator of each abnormal area; is the edge shape indicator for each abnormal region.
[0063] Step S4: Rolling defects of the alloy plate to be tested are identified according to the texture conditions and defect edge indicators of the abnormal area contained in each image area, as well as the plate reflective indicators.
[0064] In order to further improve the accuracy of defect area identification, it is necessary to further analyze the image features inside the image area: the oil stain defect is caused by lubricating oil covering the surface of the plate, which contains stains such as dust and metal chips. Since the thickness of the oil stain on the plate is different and the stains contained in each part may also be different, the reflection uniformity of the oil stain surface is low; the pressed object defect anomaly is caused by foreign matter pressing into the plate, and the surface reflection changes are relatively uniform.
[0065] Step S410: negatively correlate the mean of the variance of the grayscale values of the pixels in the target area within each abnormal area to obtain a texture expression index corresponding to the abnormal area.
[0066] The variance of the grayscale values of the pixels in the target area within the abnormal area shows the surface uniformity of the abnormal area; the internal reflection uniformity of the oily area is lower than that of the pressed object area. When the mean of the variance of the grayscale values of the pixels in the target area within the abnormal area is smaller, the possibility that the abnormal area is an oily contaminated area is greater. Therefore, it is necessary to perform negative correlation processing on the mean of the variance of the grayscale values of the pixels in the target area within the abnormal area to obtain the texture expression index, so that the abnormal area with a larger texture expression index is more likely to be a pressed object defect.
[0067] It should be noted that in the embodiment of the present invention, the exp(-) function is used to negatively correlate the mean of the variance of the grayscale values of the pixels in the target area within the abnormal area. Other methods can also be used to achieve negative correlation mapping, which is not limited here. Wherein, exp is an exponential function with the natural constant e as the base.
[0068] Step S420: using the plate reflectivity index of each image area, weighted summing 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 the rolling defect index of the corresponding image area.
[0069] The weights of the defect edge index mean and the texture expression index mean of the abnormal area in the image area in the process of obtaining the rolling defect index are adjusted by the plate reflectivity index. In a specific implementation of the embodiment of the present invention, the rolling defect index of each image area is expressed by the formula: Where, P is the rolling defect index of each image area; B is the plate reflectivity index of each image area; is the mean value of defect edge indicators of all abnormal areas contained in each image area; It is the mean value of the texture expression index of all abnormal areas contained in each image area.
[0070] It should be noted that the higher the degree of reflection in the image area, the greater the difference in the amount of reflection in areas with different reflective capabilities, and the higher the accuracy of evaluating rolling defects through the internal texture of the abnormal area. When the reflective index B of the plate is larger, the texture information is presented. The larger the calculation weight should be.
[0071] If the rolling defect index of the image area in the grayscale image of the plate is greater than the preset rolling defect threshold, the alloy plate to be tested has a rolling defect; if the rolling defect indicators of all image areas in the grayscale image of the plate are less than or equal to the preset rolling defect threshold, the alloy plate to be tested does not have a rolling defect.
[0072] It should be noted that in the embodiment of the present invention, the preset rolling defect threshold is an empirical value of 0.55, and the implementer can set it according to the specific situation.
[0073] So far, the present invention is completed.
[0074] In summary, in an embodiment of the present invention, the plate reflective index is obtained according to the grayscale distribution of the pixel points in the image area in the plate grayscale image; the abnormal area in the plate grayscale image is obtained, and the defect edge index is obtained by combining the grayscale distribution and shape of the edge pixel points in each abnormal area and the plate reflective index of the image in the area where the abnormal area is located; the rolling defect of the alloy plate to be tested is identified according to the texture of the abnormal area contained in the image area and the defect edge index, as well as the plate reflective index. The present invention identifies the rolling defects of the alloy plate to be tested based on the difference in the reflective characteristics and shape characteristics of the pressed object defect and the oil contaminated area of the alloy plate, thereby improving the accuracy of the identification of the rolling defects of the alloy plate.
[0075] Embodiment 2: Figure 5 A computer device schematic diagram of a device for identifying rolling defects of alloy plates for building formwork systems provided by one embodiment of the present invention. 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 one of the above-mentioned alloy plate rolling defect identification methods for building formwork systems.
[0076] In addition, an embodiment of the present application also protects a device, which may include a memory and a processor, wherein the memory stores an executable program code, and the processor is used to call and execute the executable program code to execute a method for identifying rolling defects of alloy plates for building formwork systems provided in an embodiment of the present application.
[0077] In this embodiment, the functional modules of the device can be divided according to the above method example. For example, each functional module can be corresponded, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0078] It should be understood that the device provided in this embodiment is used to execute the above-mentioned method for identifying rolling defects of alloy plates for building formwork systems, and thus can achieve the same effect as the above-mentioned implementation method.
[0079] In the case of an integrated unit, the device may include a processing module and a storage module. When the device is applied to a device, the processing module may be used to control and manage the actions of the device. The storage module may be used to support the device to execute mutual program codes, etc.
[0080] The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits disclosed in the present application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.
[0081] It should be noted that the sequence of the above embodiments of the present invention is for description only 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.
[0082] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0083] 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 in 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; Rolling defects of the alloy plate to be tested are identified according to the texture of the abnormal area contained in each image area, the defect edge index, and the plate reflective index.
2. The method for identifying rolling defects of alloy plates for building formwork systems according to claim 1, characterized in that: 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 grayscale 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.
3. The method for identifying rolling defects of alloy plates for building formwork systems according to claim 2, characterized in that: 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: The mode of the grayscale values of the pixels in the overall area of each image area is recorded as the reference value of the corresponding image area; the difference between the grayscale value of each pixel in the overall area of each image area and the reference value is taken as the reference difference value of the corresponding pixel; and the plate reflectivity index of the corresponding image area is obtained according to the grayscale value of the pixels in the overall area of each image area and the reference difference value.
4. The method for identifying rolling defects of alloy plates for building formwork systems according to claim 2, characterized in that: 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, treat the suspected abnormal area where the target area is located as the abnormal area; if not, treat the target area as the abnormal area.
5. 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 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; By using the plate reflective index of the image of the region where each abnormal region is located, weighted summation is performed on the edge reflective index and the edge shape index of each abnormal region to obtain the defect edge index of each abnormal region.
6. The method for identifying rolling defects of alloy plates for building formwork systems according to claim 5, 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.
7. The method for identifying rolling defects of alloy plates for building formwork systems according to claim 5, 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.
8. The method for identifying rolling defects of alloy plates for building formwork systems according to claim 4, characterized in that: 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.
9. 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.
10. The method for identifying rolling defects of alloy plates for building formwork systems according to claim 8, 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
Cited By
Packaging tin appearance defect detection method
CN119228800A
Packaging tin cover buckling detection method based on image processing
CN119313666A
Plate spraying effect detection method and system based on image processing
CN121190465A
