Spiral machine blade pressing quality detection method based on image recognition

By acquiring images of propeller blades under different lighting conditions, using grayscale and texture features to identify suspected defect areas, and performing optimization processing, the problem of misjudgment caused by grayscale overlap was solved, thus improving the accuracy of propeller blade defect detection.

CN120833334BActive Publication Date: 2025-11-18CHANGSHU SHENLI MACHINE MFG
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511334081.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-18
Publication Date
2025-11-18
Estimated Expiration
2045-09-18

AI Technical Summary

Technical Problem

In the existing technology, the accuracy of defect detection of screw conveyor blades is low, mainly because gray-scale overlap leads to misjudgment by the threshold segmentation algorithm, making it difficult to accurately segment the defect area.

Method used

By acquiring images of the propeller blades under different lighting conditions, grayscale processing is performed. Suspected abnormal points are identified using the grayscale distribution and texture features of the pixels. The defect coefficient of the defect area is obtained, and the pixels in the suspected defect area are optimized to enhance the contrast between the defect area and the background and reduce the contrast of the interference area. Finally, a threshold segmentation algorithm is used for accurate segmentation.

Benefits of technology

It improves the accuracy of defect detection in screw compressor blades, effectively eliminates interference factors such as oil stains and reflections, and ensures accurate segmentation of defect areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120833334B_ABST
    Figure CN120833334B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of computer vision, and particularly relates to a spiral machine blade pressing quality detection method based on image recognition, which obtains a target image and a reference image of a spiral machine blade to be detected; if it is detected that there are suspected abnormal pixel points in the target image, then according to the gray distribution characteristics and the texture characteristics of each suspected abnormal pixel point in the target image, a suspected defect region is obtained; a reference region of each suspected defect region is obtained in each reference image, and according to the gray variation characteristics and the gradient value of the pixel points in each suspected defect region and the gray distribution characteristics of the pixel points in each reference region, a defect coefficient of each suspected defect region is obtained; the gray value of the pixel points of each suspected defect region is optimized by using the defect coefficient of each suspected defect region, an optimized image is obtained, and the optimized image is segmented by using a threshold segmentation algorithm, so that the accuracy of the propeller blade defect detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, and in particular to a method for detecting the pressing quality of screw conveyor blades based on image recognition. Background Technology

[0002] In the manufacturing processes of modern aerospace, wind power generation, and other high-precision mechanical equipment, the quality of propeller blades, as core components, has a crucial impact on overall performance. The manufacturing process of propeller blades is complex, involving multiple stages such as material selection, pressing, and forming. Among these, the pressing process is a critical step, as the quality of the pressing directly affects the service life, performance stability, and safety of the propeller blades. Therefore, how to effectively detect the pressing quality of propeller blades has always been a key focus in the industry.

[0003] Because the grayscale values ​​of surface defects on screw press blades typically differ from those of normal areas, existing technologies generally use threshold segmentation algorithms based on computer vision to segment these defects and classify them according to their quantity. However, threshold segmentation algorithms determine thresholds based on global grayscale histograms. Since some screw press blades develop pressing textures during pressing, these textured areas may overlap with the grayscale values ​​of defect areas (cracks). Secondly, during blade processing (such as milling, turning, and grinding), cutting fluid or coolant is used for lubrication and cooling. If cleaning is incomplete, oil residue can remain. While this oil residue doesn't affect blade quality, it can still overlap with the grayscale values ​​of defect areas (cracks). Finally, because screw press blades are metal products with high reflectivity, they can also overlap with the grayscale values ​​of defect areas (uneven deformation). This grayscale overlap leads to threshold segmentation errors, misclassifying normal areas as defect areas and significantly reducing the accuracy of screw press blade defect detection.

[0004] Therefore, how to accurately segment the defect area in the propeller blade and improve the accuracy of propeller blade defect detection has become an urgent problem to be solved. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a method for detecting the pressing quality of propeller blades based on image recognition, in order to solve the problem of how to accurately segment the defect area in the propeller blade and improve the accuracy of propeller blade defect detection.

[0006] This invention provides a method for detecting the pressing quality of screw compressor blades based on image recognition. The method includes the following steps:

[0007] Acquire images of the turbine blades to be inspected under at least two lighting conditions, and perform grayscale processing on each image to obtain a target image and a preset number of reference images;

[0008] Based on the grayscale distribution features and texture features of the pixels in the target image, it is determined whether there are any suspected abnormal pixels in the target image. If there is at least one suspected abnormal pixel in the target image, at least one suspected defect region is obtained in the target image based on the grayscale distribution features and texture features of each suspected abnormal pixel in the target image.

[0009] For any suspected defect area, a reference area with the same location as the suspected defect area is obtained in each reference image. Based on the gray-level change characteristics and gradient values ​​of the pixels in the suspected defect area, and the gray-level distribution characteristics of the pixels in each reference area, the defect coefficient of the suspected defect area is obtained.

[0010] The defect coefficient of each suspected defect region in the target image is obtained. The gray value of each pixel in each suspected defect region is optimized based on the defect coefficient to obtain an optimized image. The optimized image is then segmented using a threshold segmentation algorithm to obtain the pressing quality test result of the screw press blade to be tested.

[0011] Preferably, determining whether there are suspected abnormal pixels in the target image based on the grayscale distribution features and texture features of the pixels in the target image includes:

[0012] Based on the grayscale distribution features and texture features of the pixels in the target image, the degree of abnormality of each pixel in the target image is obtained;

[0013] If the abnormality level of any pixel is greater than or equal to the preset abnormality level threshold, then the pixel is confirmed as a suspected abnormal pixel.

[0014] If the number of suspected abnormal pixels in the target image is greater than or equal to 1, then it is confirmed that there are suspected abnormal pixels in the target image.

[0015] Preferably, the step of obtaining the degree of abnormality of each pixel in the target image based on the grayscale distribution features and texture features of the pixels in the target image includes:

[0016] For any pixel in the target image, a window of a preset size is established in the target image with the pixel as the center. The structure tensor matrix corresponding to the window is obtained, and two eigenvalues ​​of the structure tensor matrix are obtained, denoted as the first eigenvalue and the second eigenvalue.

[0017] Obtain the difference between the first feature value and the second feature value to obtain the feature value difference; obtain the sum of the second feature value and a preset constant to obtain the first sum result; obtain the ratio of the feature value difference to the first sum result to obtain the first feature index.

[0018] The sum of the first feature value and the second feature value is obtained to obtain the total feature value. The absolute value of the difference between the feature values ​​is added to a preset constant to obtain the second sum. The ratio of the total feature value to the second sum is obtained to obtain the second feature index.

[0019] The sum of the first feature index and the second feature index is obtained to obtain the feature index of any pixel. The difference between the maximum gray value and the minimum gray value in the window is obtained to obtain the degree of local gray value change of any pixel.

[0020] The abnormality level of any pixel is obtained by normalizing the product of its feature index and the degree of local grayscale change.

[0021] Preferably, the step of obtaining at least one suspected defect region in the target image based on the grayscale distribution features and texture features of each suspected abnormal pixel in the target image includes:

[0022] A two-dimensional rectangular coordinate system is constructed with the lower left corner of the target image as the origin, the horizontal direction as the abscissa, and the vertical direction as the ordinate. The coordinates and abnormality degree of each suspected abnormal pixel are combined to form a feature vector. Based on the feature vector of each suspected abnormal pixel, the suspected abnormal pixels in the target image are clustered to obtain at least one cluster. Based on the pixels corresponding to each cluster, the suspected defect region corresponding to each cluster is obtained.

[0023] Preferably, obtaining the defect coefficient of any suspected defect region based on the grayscale change characteristics and gradient values ​​of pixels in any suspected defect region, and the grayscale distribution characteristics of pixels in each reference region, includes:

[0024] Based on the grayscale change characteristics and gradient values ​​of pixels in any suspected defect region, the first defect coefficient of any suspected defect region is obtained.

[0025] Based on the grayscale change characteristics of pixels in any suspected defect region and the grayscale distribution characteristics of pixels in each reference region, the second defect coefficient of any suspected defect region is obtained.

[0026] The mean of the first defect coefficient and the second defect coefficient is obtained and denoted as the mean defect coefficient. The negative of the mean defect coefficient is substituted into an exponential function with the natural constant as the base to obtain the normality of any suspected defect region. The difference between the constant 1 and the normality is obtained to obtain the defect coefficient of any suspected defect region.

[0027] Preferably, obtaining the first defect coefficient of any suspected defect region based on the grayscale change characteristics and gradient values ​​of pixels in any suspected defect region includes:

[0028] Obtain the bounding rectangle of any suspected defect region, calculate the aspect ratio of the bounding rectangle, and obtain the standard deviation of the gray values ​​of all pixels within any suspected defect region;

[0029] Obtain the edge pixels of any suspected defect region. For any edge pixel, establish a target window of a preset length centered on the edge pixel in the gradient direction of the edge pixel. In the target window, the pixels before the edge pixel form a first sub-window, and the pixels after the edge pixel form a second sub-window.

[0030] The average gray value of the pixels in the first sub-window is obtained and recorded as the first gray value. The absolute value of the difference between the gray value of each pixel in the first sub-window and the first gray value is accumulated to obtain the first gray difference index.

[0031] The average gray value of the pixels in the second sub-window is obtained and recorded as the second gray value. The absolute value of the difference between the gray value of each pixel in the second sub-window and the second gray value is accumulated to obtain the second gray difference index.

[0032] The reciprocal of the sum of the first grayscale difference index and the second grayscale difference index is obtained to obtain the overall consistency index of any edge pixel.

[0033] Obtain the overall consistency index of each edge pixel in any suspected defect region, and obtain the mean of the overall consistency index. Obtain the mean gradient value of the edge pixel in any suspected defect region, and calculate the sum of the mean of the overall consistency index and the mean of the gradient value to obtain the outlier value of any suspected defect region.

[0034] The first defect coefficient of any suspected defect region is obtained by multiplying the aspect ratio, the outlier, and the reciprocal of the standard deviation.

[0035] Preferably, obtaining the second defect coefficient of any suspected defect region based on the grayscale change characteristics of pixels in any suspected defect region and the grayscale distribution characteristics of pixels in each reference region includes:

[0036] Obtain the center point of any suspected defect region. In any suspected defect region, form a neighborhood window by taking the pixels in the eight neighboring directions of the center point. One neighborhood window corresponds to one neighborhood direction.

[0037] For any neighborhood window, the gray values ​​of the pixels in the neighborhood window are fitted to obtain a fitting function. The gray value of each pixel in the neighborhood window is predicted using the fitting function. The absolute values ​​of the difference between the gray value and the predicted value of each pixel in the neighborhood window are accumulated to obtain the gray difference feature value of the neighborhood window.

[0038] Obtain the grayscale difference feature value of each neighborhood window, and obtain the mean grayscale difference feature value. Obtain the gradient direction entropy of each pixel in each neighborhood window, and obtain the mean gradient direction entropy. Calculate the sum of the mean grayscale difference feature value and the mean gradient direction entropy to obtain the first abnormal feature value of any suspected defect region.

[0039] The average gray value of any suspected defect area is obtained, the average gray value of each reference area is obtained, the absolute value of the difference between the average gray value of any suspected defect area and the average gray value of each reference area is accumulated to obtain the total gray value difference of the area, and the reciprocal of the total gray value difference of the area is obtained to obtain the second abnormal feature value of any suspected defect area.

[0040] The second defect coefficient of any suspected defect region is obtained by multiplying the first abnormal feature value and the second abnormal feature value.

[0041] Preferably, the step of optimizing the grayscale value of each pixel in a suspected defect region based on the defect coefficient of each suspected defect region includes:

[0042] Obtain the maximum gray value of the pixel in the target image, take half of the maximum gray value as the gray value distinction threshold, and set a high gray value threshold and a low gray value threshold.

[0043] For any pixel in any suspected defect area in the target image, a grayscale window of a preset size is established with the pixel as the center. The average grayscale value of the pixels in the grayscale window is obtained. If the average grayscale value of the pixels in the grayscale window is greater than or equal to the grayscale distinction threshold, then the pixel is confirmed as a high grayscale pixel.

[0044] Based on the difference between the gray value of the high grayscale pixel and the high grayscale threshold, the high grayscale pixel is optimized using the defect coefficient of any suspected defect region.

[0045] If the average gray value of the pixels in the grayscale window is less than the grayscale distinction threshold, then any pixel is confirmed as a low grayscale pixel.

[0046] Based on the difference between the gray value of the low gray-scale pixel and the low gray-scale threshold, the low gray-scale pixel is optimized using the defect coefficient of any suspected defect region.

[0047] Preferably, the step of optimizing the high grayscale pixels based on the difference between the grayscale value of the high grayscale pixel and the high grayscale threshold, using the defect coefficient of any suspected defect region, includes:

[0048] If the gray value of the high grayscale pixel is greater than or equal to the high grayscale threshold, then half of the difference between the high grayscale threshold and the low grayscale threshold is obtained as the high grayscale adjustment weight. The negative of the defect coefficient of any suspected defect region is substituted into an exponential function with the natural constant as the base to obtain the exponential function result. The product of the high grayscale adjustment weight and the exponential function result is rounded to obtain the high grayscale adjustment value. The difference between the gray value of the high grayscale pixel and the high grayscale adjustment value is obtained to obtain the optimized grayscale value of the high grayscale pixel.

[0049] If the grayscale value of the high grayscale pixel is less than the high grayscale threshold, the difference between the maximum grayscale value and the high grayscale threshold is obtained as the high grayscale adjustment weight. The product of the high grayscale adjustment weight and the defect coefficient of any suspected defect region is rounded to obtain the high grayscale adjustment value. The grayscale value of the high grayscale pixel and the high grayscale adjustment value are added together to obtain the optimized grayscale value of the high grayscale pixel.

[0050] Preferably, the step of optimizing the low-grayscale pixels based on the difference between the grayscale value of the low-grayscale pixel and the low-grayscale threshold, using the defect coefficient of any suspected defect region, includes:

[0051] If the gray value of the low gray-scale pixel is less than or equal to the low gray-scale threshold, then half of the difference between the high gray-scale threshold and the low gray-scale threshold is obtained as the low gray-scale adjustment weight. The negative of the defect coefficient of any suspected defect region is substituted into an exponential function with the natural constant as the base to obtain the exponential function result. The product of the low gray-scale adjustment weight and the exponential function result is rounded to obtain the low gray-scale adjustment value. The gray value of the low gray-scale pixel and the low gray-scale adjustment value are added together to obtain the optimized gray-scale value of the low gray-scale pixel.

[0052] If the gray value of the low gray-scale pixel is greater than the low gray-scale threshold, the product of the low gray-scale threshold and the defect coefficient of any suspected defect region is rounded to the nearest integer to obtain a low gray-scale adjustment value. The difference between the gray value of the low gray-scale pixel and the low gray-scale adjustment value is then obtained to obtain the optimized gray-scale value of the low gray-scale pixel.

[0053] The beneficial effects of the embodiments of the present invention compared with the prior art are as follows:

[0054] This invention acquires images of a screw conveyor blade to be inspected under at least two lighting conditions. Each image is converted to grayscale to obtain a target image and a preset number of reference images. Based on the grayscale distribution and texture features of pixels in the target image, it determines whether there are any suspected abnormal pixels. If at least one suspected abnormal pixel exists in the target image, at least one suspected defect region is obtained in the target image based on the grayscale distribution and texture features of each suspected abnormal pixel. For any suspected defect region, a reference region at the same location as the suspected defect region is obtained in each reference image. Based on the grayscale change features and gradient values ​​of pixels in the suspected defect region, and the grayscale distribution features of pixels in each reference region, a defect coefficient for the suspected defect region is obtained. The defect coefficient for each suspected defect region in the target image is obtained. Based on the defect coefficient of each suspected defect region, the grayscale values ​​of pixels in each suspected defect region are optimized to obtain an optimized image. A threshold segmentation algorithm is used to segment the optimized image to obtain the pressing quality inspection result of the screw conveyor blade to be inspected. Specifically, based on the grayscale change characteristics and gradient values ​​of pixels in any suspected defect area, as well as the grayscale distribution characteristics of pixels in each reference area, the defect coefficient of any suspected defect area is obtained, eliminating interference factors such as oil stains and reflections in the propeller blade to be inspected. Based on the defect coefficient of each suspected defect area, the grayscale values ​​of pixels in each suspected defect area are optimized to enhance the contrast between the defect area and the background while reducing the contrast between the interference area and the background. This allows the threshold segmentation algorithm to accurately segment the defect area in the propeller blade, improving the accuracy of propeller blade defect detection. Attached Figure Description

[0055] To more clearly illustrate the technical solutions in the embodiments of the present invention, 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.

[0056] Figure 1 This is a flowchart of a method for detecting the pressing quality of screw conveyor blades based on image recognition, provided in Embodiment 1 of the present invention.

[0057] Figure 2 This is an image captured by a propeller blade when both light sources are turned on simultaneously, according to Embodiment 1 of the present invention. Detailed Implementation

[0058] Embodiments of this disclosure are described in detail below, with examples of these embodiments illustrated in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting it.

[0059] It should be noted that the terms "first," "second," etc., used in this disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure.

[0060] To illustrate the technical solution of the present invention, specific embodiments are described below.

[0061] See Figure 1 This is a flowchart of a method for detecting the pressing quality of screw conveyor blades based on image recognition, provided in Embodiment 1 of the present invention. Figure 1 As shown, the method may include:

[0062] Step S101: Acquire images of the turbine blades to be inspected under at least two lighting conditions, perform grayscale processing on each image, and obtain a target image and a preset number of reference images.

[0063] In the manufacturing process of screw compressor blades, the pressing process is a crucial step, as the quality of the pressing directly affects the blade's service life, performance stability, and safety. Therefore, how to effectively detect the pressing quality of screw compressor blades has always been a key concern in the industry.

[0064] Since the gray values ​​of surface defects on the propeller blades are usually different from those of the normal area, existing technologies generally use threshold segmentation algorithms based on computer vision to segment surface defects on the propeller blades and classify their quality according to the number of surface defects on each propeller blade.

[0065] In this embodiment, after the screw conveyor blades are pressed in the production department, the pressed blades (i.e., the screw conveyor blades to be inspected) are placed on a conveyor belt at a fixed angle. An image acquisition device, such as a high-definition camera, is installed above the fixed position on the conveyor belt. Identical light sources are installed on both sides of the image acquisition device for illumination. When the screw conveyor blade passes the image acquisition device, it pauses for 2 seconds to acquire an image. This is not limited and can be set according to the specific implementation scenario. When acquiring images, both light sources are turned on simultaneously to acquire one image a, such as... Figure 2As shown, the right light source is then activated to acquire image b, and finally the left light source is activated to acquire image c. Image a is then converted to grayscale to obtain the target image. Images b and c are then converted to grayscale to obtain reference images b and c. In this embodiment, the preset number of reference images is 2, but this is not limited and can be set according to the specific implementation scenario. Grayscale conversion is a prior art technique and will not be described in detail here.

[0066] The threshold segmentation algorithm determines the threshold based on the global grayscale histogram. However, some screw press blades develop pressing textures during the pressing process, which may overlap with the grayscale of defect areas (cracks). Secondly, during blade processing (such as milling, turning, and grinding), cutting fluid or coolant is used for lubrication and cooling. Incomplete cleaning can leave oil residue, which, while not affecting blade quality, can still overlap with the grayscale of defect areas (cracks). Finally, screw press blades are metal products with high reflectivity, which can also overlap with the grayscale of defect areas (deformation). This grayscale overlap leads to threshold segmentation errors, misclassifying normal areas as defective areas and significantly reducing the accuracy of screw press blade defect detection.

[0067] Therefore, in this embodiment, when at least one suspected abnormal pixel is detected in the target image, a suspected defect region is obtained in the target image based on the grayscale distribution characteristics and texture characteristics of the suspected abnormal pixel. Then, based on the grayscale change characteristics and gradient values ​​of the pixels in the suspected defect region, as well as the grayscale distribution characteristics of the pixels in each reference region, the defect coefficient of the suspected defect region is obtained. Finally, the grayscale values ​​of the pixels in the suspected defect region are optimized based on the defect coefficient of the suspected defect region, thereby enhancing the contrast between the defect region and the background while reducing the contrast between the interference region and the background. This enables the threshold segmentation algorithm to accurately segment the defect region in the propeller blade, improving the accuracy of propeller blade defect detection.

[0068] Step S102: Based on the grayscale distribution features and texture features of the pixels in the target image, determine whether there are any suspected abnormal pixels in the target image. If there is at least one suspected abnormal pixel in the target image, then based on the grayscale distribution features and texture features of each suspected abnormal pixel in the target image, obtain at least one suspected defect region in the target image.

[0069] First, detect whether there are any suspected abnormal pixels in the target image. Since defective areas generally exhibit texture and grayscale features that differ from normal areas, the presence of suspected abnormal pixels in the target image can be determined based on the grayscale distribution and texture features of the pixels in the target image.

[0070] The method for determining whether there are suspected abnormal pixels in a target image based on the grayscale distribution and texture features of pixels in the target image is as follows:

[0071] (1) Based on the grayscale distribution features and texture features of the pixels in the target image, obtain the degree of abnormality of each pixel in the target image.

[0072] Specifically, for any pixel in the target image, a window of a preset size of 3×3 (i.e., the window includes 9 pixels) is established in the target image with the pixel as the center. There is no limitation here, and it can be set according to the specific implementation scenario. If any pixel is an edge pixel, a boundary filling algorithm is used to obtain a 3×3 window. The boundary filling algorithm is an existing technology and will not be described in detail here. The gradient of each pixel in the x and y directions in the window is calculated by the Sobel operator. Then, the gradients of all pixels in the x and y directions in the window are summed by Gaussian weighted summation to obtain the structure tensor matrix corresponding to the window. Two eigenvalues ​​of the structure tensor matrix are obtained and denoted as the first eigenvalue and the second eigenvalue. Obtaining the structure tensor matrix and the eigenvalues ​​of the structure tensor matrix is ​​an existing technology and will not be described in detail here.

[0073] Obtain the difference between the first feature value and the second feature value to obtain the feature value difference; obtain the sum of the second feature value and a preset constant to obtain the first sum result; obtain the ratio of the feature value difference to the first sum result to obtain the first feature index.

[0074] The sum of the first feature value and the second feature value is obtained to obtain the total feature value. The absolute value of the difference between the feature values ​​is added to a preset constant to obtain the second sum. The ratio of the total feature value to the second sum is obtained to obtain the second feature index.

[0075] The sum of the first feature index and the second feature index is obtained to obtain the feature index of any pixel. The difference between the maximum gray value and the minimum gray value in the window is obtained to obtain the degree of local gray value change of any pixel.

[0076] The abnormality level of any pixel is obtained by normalizing the product of its feature index and the degree of local grayscale change.

[0077] In one embodiment, taking the i-th pixel in the target image as an example, the formula for calculating the abnormality level of the i-th pixel is:

[0078]

[0079] in, The degree of abnormality of the i-th pixel; It is the first eigenvalue; It is the second eigenvalue; The maximum grayscale value in the window centered on the i-th pixel; is the minimum gray value in the window centered on the i-th pixel; C is a preset constant, which is set to 1 in this embodiment to ensure that the fraction is meaningful. There is no restriction here, and it can be set according to the specific implementation scenario. It is the absolute value symbol; This is the normalization function.

[0080] It should be noted that, The first feature index reflects the probability that the i-th pixel belongs to an edge. When the i-th pixel has a significant directional change, it is more likely that the i-th pixel belongs to an edge point. The larger it is; The second feature index reflects the probability that the i-th pixel belongs to a complex texture region. When, it means that the i-th pixel has grayscale changes in both the x and y directions. The larger it is; The feature index reflects the texture complexity of the i-th pixel. or The larger, The larger the value, the more likely the i-th pixel is to be an abnormal pixel. The larger it is; The degree of local grayscale change of the i-th pixel. The larger the value, the greater the local grayscale difference of the i-th pixel, and the more likely it is to be an abnormal pixel. The larger it is.

[0081] (2) Based on the degree of abnormality of each pixel in the target image, determine whether there are any suspected abnormal pixels in the target image.

[0082] If the abnormality level of any pixel is greater than or equal to the preset abnormality level threshold, then the pixel is confirmed as a suspected abnormal pixel. In this embodiment, the preset abnormality level threshold is 0.7, which is not limited here and can be set according to the specific implementation scenario.

[0083] If the number of suspected abnormal pixels in the target image is greater than or equal to 1, then it is confirmed that there are suspected abnormal pixels in the target image.

[0084] Furthermore, if there is at least one suspected abnormal pixel in the target image, it indicates that there may be a defect area in the screw conveyor blade to be detected. Therefore, based on the degree of abnormality of the suspected abnormal pixel in the target image, the suspected defect area in the target image is obtained, and the gray value of the pixel in the suspected defect area is optimized so that the threshold segmentation algorithm can accurately segment the defect area in the screw conveyor blade.

[0085] The method for obtaining suspected defect regions in a target image based on the degree of abnormality of suspected abnormal pixels is as follows:

[0086] A two-dimensional Cartesian coordinate system is constructed with the lower left corner of the target image as the origin, the horizontal direction as the x-coordinate, and the vertical direction as the y-coordinate. The coordinates and anomaly level of each suspected abnormal pixel are combined to form a feature vector. Based on the feature vector of each suspected abnormal pixel, mean-shift clustering is performed on the suspected abnormal pixels in the target image to obtain at least one cluster. Each pixel in a cluster is then labeled in the target image. All pixels corresponding to a cluster form an initial region. For any initial region, the circumscribed ellipse is obtained. Within any initial region, the pixel with the shortest distance to the circumscribed ellipse in each direction is taken as the edge pixel. Connecting all edge pixels yields the suspected defect region corresponding to any initial region. Similarly, the suspected defect region corresponding to each cluster is obtained. Mean-shift clustering is an existing technique and will not be elaborated upon here.

[0087] At this point, the suspected defect area in the target image has been obtained.

[0088] Step S103: For any suspected defect area, obtain a reference area in each reference image that is at the same location as the suspected defect area. Based on the grayscale change characteristics and gradient values ​​of the pixels in the suspected defect area, and the grayscale distribution characteristics of the pixels in each reference area, obtain the defect coefficient of the suspected defect area.

[0089] After obtaining the suspected defect areas in the target image, oil stains may form on the screw conveyor blades due to incomplete cleaning or accidental adhesion during production. Both oil stains and cracks are characterized by low grayscale values. At the same time, reflective areas may exist on the screw conveyor blades when acquiring the target image. Both uneven deformation and reflective areas are characterized by high grayscale values. This results in reflective and oil stain areas being different from normal areas, but reflective and oil stain areas do not affect the quality of the screw conveyor blades. Therefore, for any suspected defect area, the defect coefficient of any suspected defect area can be obtained based on its performance characteristics, reducing the interference of reflective and oil stain areas on defect area identification.

[0090] The method for obtaining the defect coefficient of any suspected defect region based on its performance characteristics is as follows:

[0091] (1) Based on the grayscale change characteristics and gradient values ​​of the pixels in any suspected defect region, obtain the first defect coefficient of any suspected defect region.

[0092] Since both oil stain areas and crack areas are characterized by low grayscale values, but oil stain areas appear as irregular, blurred-edge, and complex-grayscale blocks, while crack areas appear as thin, elongated lines with clear edges and uniform grayscale values, the first defect coefficient of any suspected defect area can be obtained based on the grayscale variation characteristics and gradient values ​​of pixels in any suspected defect area, thus reducing the interference of oil stain areas on crack area identification.

[0093] Specifically, obtain the bounding rectangle of any suspected defect region, calculate the aspect ratio of the bounding rectangle, and obtain the standard deviation of the gray values ​​of all pixels within any suspected defect region;

[0094] Obtain the edge pixels of any suspected defect region. For any edge pixel, establish a target window with a preset length of 5 in the gradient direction of the edge pixel, with the edge pixel as the center. There is no limit here, and it can be set according to the specific implementation scenario. In the target window, the pixels before the edge pixel form a first sub-window, and the pixels after the edge pixel form a second sub-window.

[0095] The average gray value of the pixels in the first sub-window is obtained and recorded as the first gray value. The absolute value of the difference between the gray value of each pixel in the first sub-window and the first gray value is accumulated to obtain the first gray difference index.

[0096] The average gray value of the pixels in the second sub-window is obtained and recorded as the second gray value. The absolute value of the difference between the gray value of each pixel in the second sub-window and the second gray value is accumulated to obtain the second gray difference index.

[0097] The reciprocal of the sum of the first grayscale difference index and the second grayscale difference index is obtained to obtain the overall consistency index of any edge pixel.

[0098] Obtain the overall consistency index of each edge pixel in any suspected defect region, and obtain the mean of the overall consistency index. Obtain the mean gradient value of the edge pixel in any suspected defect region, and calculate the sum of the mean of the overall consistency index and the mean of the gradient value to obtain the outlier value of any suspected defect region.

[0099] The first defect coefficient of any suspected defect region is obtained by multiplying the aspect ratio, the outlier, and the reciprocal of the standard deviation.

[0100] In one embodiment, taking the f-th suspected defect region as an example, the formula for calculating the first defect coefficient of the f-th suspected defect region is:

[0101]

[0102] in, The first defect coefficient for the f-th suspected defect region; Let f be the length of the bounding rectangle of the f-th suspected defect region; Let f be the width of the bounding rectangle of the f-th suspected defect region; The average gradient value of all edge pixels in the f-th suspected defect region; Let z be the grayscale value of the z-th pixel in the first sub-window of the j-th edge pixel in the f-th suspected defect region; The first grayscale mean is the average grayscale value of the pixels in the first sub-window of the j-th edge pixel in the f-th suspected defect region. Let z be the grayscale value of the z-th pixel in the second sub-window of the j-th edge pixel in the f-th suspected defect region; The second grayscale mean is the average grayscale value of the pixels in the second sub-window of the j-th edge pixel in the f-th suspected defect region. The number of pixels in the first or second sub-window of the j-th edge pixel in the f-th suspected defect region; Let f be the number of edge pixels in the f-th suspected defect region; Let be the standard deviation of the grayscale values ​​of all pixels in the f-th suspected defect region; It is the absolute value symbol.

[0103] It should be noted that, Let be the aspect ratio of the bounding rectangle of the f-th suspected defect region. The larger the value, the more the f-th suspected defect region conforms to the elongated characteristics of a crack region. The larger it is; This represents an outlier in the f-th suspected defect region. The larger the value, the clearer the edge pixels in the f-th suspected defect region, and the more the f-th suspected defect region matches the characteristic of a clear crack edge. The larger it is, the better. The larger it is; Let be the overall consistency index of the j-th edge pixel in the f-th suspected defect region. Since the two sides of the edge pixel are different regions, the clearer the edge, the higher the consistency of the pixels in the regions on both sides of the edge pixel (i.e., the consistency of the pixels in the first sub-window is high, and the consistency of the pixels in the second sub-window is high). or The smaller the value, the smaller the grayscale difference between pixels in the sub-windows on both sides of the j-th edge pixel, indicating higher consistency. The larger the value, the more closely the f-th suspected defect region matches the characteristics of a clearly defined crack edge. The larger it is, the better. The larger it is; The smaller the value, the lower the grayscale complexity within the f-th suspected defect region, and the more it matches the characteristic of uniform grayscale within a crack region. The larger it is.

[0104] (2) Based on the grayscale change characteristics of pixels in any suspected defect region and the grayscale distribution characteristics of pixels in each reference region, obtain the second defect coefficient of any suspected defect region.

[0105] Since both the concave-convex deformation and reflective areas are regions with high grayscale values, and the screw conveyor blades are made of metal with a high surface smoothness, reflective interference areas will appear in the acquired images. These areas are characterized by gradual grayscale changes and significant variations in grayscale values ​​with the light source. Concave-convex deformation areas, on the other hand, are defective areas formed by processing errors or deformation under stress. These areas are characterized by grayscale changes with the concavity or convexity and no significant changes in grayscale values ​​with the light source. Therefore, a reference area with the same location as any suspected defective area is obtained in each reference image. Based on the grayscale change characteristics of pixels in any suspected defective area and the grayscale distribution characteristics of pixels in each reference area, a second defect coefficient for any suspected defective area is obtained, reducing the interference of reflective areas on the identification of concave-convex deformation areas.

[0106] Specifically, the center point of any suspected defect region is obtained, and in any suspected defect region, the pixels in the eight neighboring directions of the center point are respectively formed into a neighborhood window, with one neighborhood window corresponding to one neighborhood direction;

[0107] For any neighborhood window, the gray values ​​of the pixels in the neighborhood window are fitted to obtain a linear fitting function. The predicted gray value of each pixel in the neighborhood window is obtained using the linear fitting function. The absolute value of the difference between the gray value of each pixel in the neighborhood window and its predicted value is accumulated to obtain the gray difference feature value of the neighborhood window.

[0108] Obtain the grayscale difference feature value of each neighborhood window, and obtain the mean grayscale difference feature value. Obtain the gradient direction entropy of each pixel in each neighborhood window, and obtain the mean gradient direction entropy. Calculate the sum of the mean grayscale difference feature value and the mean gradient direction entropy to obtain the first abnormal feature value of any suspected defect region.

[0109] The average gray value of any suspected defect area is obtained, the average gray value of each reference area is obtained, the absolute value of the difference between the average gray value of any suspected defect area and the average gray value of each reference area is accumulated to obtain the total gray value difference of the area, and the reciprocal of the total gray value difference of the area is obtained to obtain the second abnormal feature value of any suspected defect area.

[0110] The second defect coefficient of any suspected defect region is obtained by multiplying the first abnormal feature value and the second abnormal feature value.

[0111] In one embodiment, taking the f-th suspected defect region as an example, the formula for calculating the second defect coefficient of the f-th suspected defect region is as follows:

[0112]

[0113] in, The second defect coefficient for the f-th suspected defect region; The mean entropy along the gradient direction; Let be the grayscale value of the k-th pixel in the F-th neighborhood window of the f-th suspected defect region; The predicted grayscale value of the k-th pixel in the F-th neighborhood window of the f-th suspected defect region; Let f be the number of pixels in the F-th neighboring window of the f-th suspected defect region; The average grayscale value of the f-th suspected defect region; The grayscale value of the reference region for the f-th suspected defect region in reference image b; The grayscale value of the reference region for the f-th suspected defect region in reference image c; It is the absolute value symbol.

[0114] It should be noted that, The larger the value, the lower the uniformity of the gradient direction in that region, the weaker the gradient characteristics, and the less likely it is to belong to a reflective region. In other words, the greater the likelihood that this region belongs to a region of concave-convex deformation. The larger it is; Let f be the grayscale difference feature value of the F-th neighboring window of the f-th suspected defect region. The larger the value, the greater the difference between the grayscale value of the k-th pixel in the F-th neighborhood window of the f-th suspected defect region and its predicted value. The larger the value, the weaker the gradient characteristics within that region, and the greater the likelihood that it belongs to a region of concave-convex deformation. The larger it is; This is the second abnormal feature value of the f-th suspected defect region. The smaller the value, the smaller the grayscale change in the area with varying light sources, and the greater the likelihood that it belongs to a region of uneven deformation. The larger it is.

[0115] (3) Obtain the defect coefficient of any suspected defect region based on the first defect coefficient and the second defect coefficient of any suspected defect region.

[0116] Specifically, the mean of the first defect coefficient and the second defect coefficient is obtained and denoted as the mean defect coefficient. The negative of the mean defect coefficient is substituted into an exponential function with the natural constant as the base to obtain the normality of any suspected defect region. The difference between the constant 1 and the normality is obtained to obtain the defect coefficient of any suspected defect region.

[0117] In one embodiment, taking the f-th suspected defect region as an example, the formula for calculating the defect coefficient of the f-th suspected defect region is:

[0118]

[0119] in, Let f be the defect coefficient of the f-th suspected defect region; The first defect coefficient for the f-th suspected defect region; The second defect coefficient for the f-th suspected defect region; It is an exponential function with the natural constant as the base, used for inverse proportional normalization.

[0120] It should be noted that, The larger the value, the greater the likelihood that the f-th suspected defect region is a crack region. The larger it is; The larger the value, the greater the likelihood that the f-th suspected defect region is a region of uneven deformation. The larger it is.

[0121] Thus, the defect coefficient of any suspected defect region in the target image is obtained.

[0122] Step S104: Obtain the defect coefficient of each suspected defect region in the target image, optimize the gray value of each suspected defect region's pixel based on the defect coefficient of each suspected defect region to obtain an optimized image, and segment the optimized image using a threshold segmentation algorithm to obtain the detection result of the pressing quality of the screw conveyor blade to be detected.

[0123] Following the method described above for obtaining the defect coefficient of the fth suspected defect region, the defect coefficient of each suspected defect region in the target image is obtained. Based on the defect coefficient of each suspected defect region, the gray value of the pixel of each suspected defect region is optimized to obtain an optimized image. This enables the threshold segmentation algorithm to accurately segment the defect region in the propeller blade, thereby improving the accuracy of propeller blade defect detection.

[0124] The method for optimizing the grayscale value of each pixel in a suspected defective region based on the defect coefficient of that region is as follows:

[0125] (1) Distinguish between high grayscale pixels and low grayscale pixels.

[0126] Since different defect areas have different pixel values, the corresponding threshold segmentation values ​​are also different. For example, crack defects require a low grayscale threshold, while concave and convex deformation areas require a high grayscale threshold. Therefore, when adjusting the grayscale value of a pixel, it should be adjusted in conjunction with its local grayscale characteristics. The maximum grayscale value of the pixel in the target image is obtained, and half of the maximum grayscale value is used as the grayscale distinction threshold. The grayscale values ​​of all pixels in the target image are sorted in ascending order to obtain an ascending sequence. Based on historical experience, the high grayscale threshold is set to the 95th percentile in the ascending sequence, and the low grayscale threshold is set to the 5th percentile in the ascending sequence. For example, if the 95th percentile in the ascending sequence is X, then 95% of the pixels in the target image have a grayscale value less than or equal to X. There is no restriction here, and it can be set according to the specific implementation scenario.

[0127] For any pixel in any suspected defect area in the target image, a grayscale window of a preset size of 5×5 is established with the pixel as the center. There is no limit to this, and it can be set according to the specific implementation scenario. The average grayscale value of the pixels in the grayscale window is obtained. If the average grayscale value of the pixels in the grayscale window is greater than or equal to the grayscale distinction threshold, then the pixel is confirmed as a high grayscale pixel.

[0128] If the average gray value of the pixels in the grayscale window is less than the grayscale distinction threshold, then any pixel is confirmed as a low grayscale pixel.

[0129] (2) Based on the difference between the gray value of the high grayscale pixel and the high grayscale threshold, the high grayscale pixel is optimized using the defect coefficient of any suspected defect region.

[0130] Specifically, if the gray value of the high grayscale pixel is greater than or equal to the high grayscale threshold, then half of the difference between the high grayscale threshold and the low grayscale threshold is obtained as the high grayscale adjustment weight. The negative of the defect coefficient of any suspected defect region is substituted into an exponential function with the natural constant as the base to obtain the exponential function result. The product of the high grayscale adjustment weight and the exponential function result is rounded to obtain the high grayscale adjustment value. The difference between the gray value of the high grayscale pixel and the high grayscale adjustment value is obtained to obtain the optimized grayscale value of the high grayscale pixel.

[0131] If the grayscale value of the high grayscale pixel is less than the high grayscale threshold, the difference between the maximum grayscale value and the high grayscale threshold is obtained as the high grayscale adjustment weight. The product of the high grayscale adjustment weight and the defect coefficient of any suspected defect region is rounded to obtain the high grayscale adjustment value. The grayscale value of the high grayscale pixel and the high grayscale adjustment value are added together to obtain the optimized grayscale value of the high grayscale pixel.

[0132] In one embodiment, taking the u-th pixel in the f-th suspected defect region as an example, if the u-th pixel is a high grayscale pixel, then the formula for calculating the optimized grayscale value of the u-th pixel is:

[0133]

[0134] in, The optimized grayscale value for the u-th pixel; Let G be the grayscale value of the u-th pixel; G is the high grayscale threshold; and D is the low grayscale threshold. This is the maximum grayscale value; Let f be the defect coefficient of the f-th suspected defect region; It is an exponential function with the natural constant as the base, used for inverse proportional normalization.

[0135] It should be noted that, if This indicates that the high-grayscale pixel has been identified as an abnormal pixel in the threshold segmentation algorithm. However, this high-grayscale pixel may be an interference pixel (i.e., a high-grayscale pixel in the reflective area), therefore, it needs to be further analyzed according to... That is, the defect coefficient of the f-th suspected defect region is adjusted. The smaller the value, the more likely the high-grayscale pixel is to be a pixel in a reflective area, belonging to a normal area. To avoid being judged as a defective area, the value needs to be reduced. , The smaller, The greater the reduction, the better. The weight for high grayscale is used to constrain the degree of adjustment and prevent excessive reduction; if This indicates that the high-grayscale pixel cannot be identified as an abnormal pixel in the threshold segmentation algorithm. The larger the value, the more likely the high-grayscale pixel is to belong to a defect area. Therefore, in order for the high-grayscale pixel to be identified as a defect area, the value needs to be increased. , The bigger The greater the degree of improvement needed, The weight for high grayscale is used to constrain the degree of adjustment and prevent excessive increase.

[0136] (3) Based on the difference between the gray value of the low gray pixel and the low gray threshold, the low gray pixel is optimized using the defect coefficient of any suspected defect region.

[0137] Specifically, if the gray value of the low gray-scale pixel is less than or equal to the low gray-scale threshold, then half of the difference between the high gray-scale threshold and the low gray-scale threshold is obtained as the low gray-scale adjustment weight. The negative of the defect coefficient of any suspected defect region is substituted into an exponential function with the natural constant as the base to obtain the exponential function result. The product of the low gray-scale adjustment weight and the exponential function result is rounded to obtain the low gray-scale adjustment value. The gray value of the low gray-scale pixel and the low gray-scale adjustment value are added together to obtain the optimized gray-scale value of the low gray-scale pixel.

[0138] If the gray value of the low gray-scale pixel is greater than the low gray-scale threshold, the product of the low gray-scale threshold and the defect coefficient of any suspected defect region is rounded to the nearest integer to obtain a low gray-scale adjustment value. The difference between the gray value of the low gray-scale pixel and the low gray-scale adjustment value is then obtained to obtain the optimized gray-scale value of the low gray-scale pixel.

[0139] In one embodiment, taking the u-th pixel in the f-th suspected defect region as an example, if the u-th pixel is a low grayscale pixel, then the formula for calculating the optimized grayscale value of the u-th pixel is:

[0140]

[0141] in, The optimized grayscale value for the u-th pixel; Let G be the grayscale value of the u-th pixel; G is the high grayscale threshold; and D is the low grayscale threshold. Let f be the defect coefficient of the f-th suspected defect region; It is an exponential function with the natural constant as the base, used for inverse proportional normalization.

[0142] It should be noted that, if This indicates that the low-grayscale pixel has been identified as an abnormal pixel in the threshold segmentation algorithm. However, this low-grayscale pixel may be an interference pixel (i.e., a low-grayscale pixel in an oily area), therefore, it needs to be further analyzed based on... That is, the defect coefficient of the f-th suspected defect region is adjusted. The smaller the value, the more likely the low-grayscale pixel is to be a pixel within an oily area, belonging to a normal region. To avoid being identified as a defective area, it needs to be increased. , The smaller, The greater the increase, the more The weight for low grayscale adjustment is used to constrain the degree of adjustment and prevent excessive increase; if This indicates that the low-grayscale pixel cannot be identified as an abnormal pixel in the threshold segmentation algorithm. The larger the value, the more likely the low-grayscale pixel is to belong to a defect area. Therefore, in order for the low-grayscale pixel to be identified as a defect area, the value needs to be reduced. , The larger, The greater the reduction, the more important it is to reduce the grayscale. D is the weight for low-grayscale adjustment, used to constrain the degree of adjustment and avoid excessive reduction.

[0143] Similarly, following the optimization method for the grayscale value of the u-th pixel in the f-th suspected defect region, the grayscale value of each pixel in the suspected defect region is optimized to obtain an optimized image.

[0144] After obtaining the optimized image, a threshold segmentation algorithm is used to segment the optimized image. If the screw conveyor blade to be inspected contains defective areas, the screw conveyor blade to be inspected is marked as a defective product; if the screw conveyor blade to be inspected does not contain defective areas, the screw conveyor blade to be inspected is marked as a superior product. Thus, the pressing quality inspection result of the screw conveyor blade to be inspected is obtained. The threshold segmentation algorithm is existing technology and will not be described in detail here.

[0145] Among them, defective products can be classified according to the number and area of ​​defective areas in the auger blades, which helps the staff to process defective auger blades with different degrees of defects in batches. Classifying them according to the number and area of ​​defective areas in the auger blades is existing technology and will not be elaborated here.

[0146] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for detecting the pressing quality of screw conveyor blades based on image recognition, characterized in that, The image recognition-based method for detecting the pressing quality of screw compressor blades includes: Acquire images of the turbine blades to be inspected under at least two lighting conditions, and perform grayscale processing on each image to obtain a target image and a preset number of reference images; Based on the grayscale distribution features and texture features of the pixels in the target image, it is determined whether there are any suspected abnormal pixels in the target image. If there is at least one suspected abnormal pixel in the target image, at least one suspected defect region is obtained in the target image based on the grayscale distribution features and texture features of each suspected abnormal pixel in the target image. For any suspected defect area, a reference area with the same location as the suspected defect area is obtained in each reference image. Based on the gray-level change characteristics and gradient values ​​of the pixels in the suspected defect area, and the gray-level distribution characteristics of the pixels in each reference area, the defect coefficient of the suspected defect area is obtained. The defect coefficient of each suspected defect region in the target image is obtained. The gray value of each pixel in each suspected defect region is optimized based on the defect coefficient to obtain an optimized image. The optimized image is then segmented using a threshold segmentation algorithm to obtain the pressing quality test result of the screw press blade to be tested.

2. The method for detecting the pressing quality of screw conveyor blades based on image recognition according to claim 1, characterized in that, The step of determining whether there are suspected abnormal pixels in the target image based on the grayscale distribution features and texture features of the pixels in the target image includes: Based on the grayscale distribution features and texture features of the pixels in the target image, the degree of abnormality of each pixel in the target image is obtained; If the abnormality level of any pixel is greater than or equal to the preset abnormality level threshold, then the pixel is confirmed as a suspected abnormal pixel. If the number of suspected abnormal pixels in the target image is greater than or equal to 1, then it is confirmed that there are suspected abnormal pixels in the target image.

3. The method for detecting the pressing quality of screw conveyor blades based on image recognition according to claim 2, characterized in that, The step of obtaining the degree of abnormality of each pixel in the target image based on the grayscale distribution features and texture features of the pixels in the target image includes: For any pixel in the target image, a window of a preset size is established in the target image with the pixel as the center. The structure tensor matrix corresponding to the window is obtained, and two eigenvalues ​​of the structure tensor matrix are obtained, denoted as the first eigenvalue and the second eigenvalue. Obtain the difference between the first feature value and the second feature value to obtain the feature value difference; obtain the sum of the second feature value and a preset constant to obtain the first sum result; obtain the ratio of the feature value difference to the first sum result to obtain the first feature index. The sum of the first feature value and the second feature value is obtained to obtain the total feature value. The absolute value of the difference between the feature values ​​is added to a preset constant to obtain the second sum. The ratio of the total feature value to the second sum is obtained to obtain the second feature index. The sum of the first feature index and the second feature index is obtained to obtain the feature index of any pixel. The difference between the maximum gray value and the minimum gray value in the window is obtained to obtain the degree of local gray value change of any pixel. The abnormality level of any pixel is obtained by normalizing the product of its feature index and the degree of local grayscale change.

4. The method for detecting the pressing quality of screw conveyor blades based on image recognition according to claim 2, characterized in that, The step of obtaining at least one suspected defect region in the target image based on the grayscale distribution features and texture features of each suspected abnormal pixel in the target image includes: A two-dimensional rectangular coordinate system is constructed with the lower left corner of the target image as the origin, the horizontal direction as the abscissa, and the vertical direction as the ordinate. The coordinates and abnormality degree of each suspected abnormal pixel are combined to form a feature vector. Based on the feature vector of each suspected abnormal pixel, the suspected abnormal pixels in the target image are clustered to obtain at least one cluster. Based on the pixels corresponding to each cluster, the suspected defect region corresponding to each cluster is obtained.

5. The method for detecting the pressing quality of screw conveyor blades based on image recognition according to claim 1, characterized in that, The step of obtaining the defect coefficient of any suspected defect region based on the grayscale change characteristics and gradient values ​​of pixels in any suspected defect region, and the grayscale distribution characteristics of pixels in each reference region, includes: Based on the grayscale change characteristics and gradient values ​​of pixels in any suspected defect region, the first defect coefficient of any suspected defect region is obtained. Based on the grayscale change characteristics of pixels in any suspected defect region and the grayscale distribution characteristics of pixels in each reference region, the second defect coefficient of any suspected defect region is obtained. The mean of the first defect coefficient and the second defect coefficient is obtained and denoted as the mean defect coefficient. The negative of the mean defect coefficient is substituted into an exponential function with the natural constant as the base to obtain the normality of any suspected defect region. The difference between the constant 1 and the normality is obtained to obtain the defect coefficient of any suspected defect region.

6. The method for detecting the pressing quality of screw compressor blades based on image recognition according to claim 5, characterized in that, The step of obtaining the first defect coefficient of any suspected defect region based on the grayscale change characteristics and gradient values ​​of pixels in any suspected defect region includes: Obtain the bounding rectangle of any suspected defect region, calculate the aspect ratio of the bounding rectangle, and obtain the standard deviation of the gray values ​​of all pixels within any suspected defect region; Obtain the edge pixels of any suspected defect region. For any edge pixel, establish a target window of a preset length centered on the edge pixel in the gradient direction of the edge pixel. In the target window, the pixels before the edge pixel form a first sub-window, and the pixels after the edge pixel form a second sub-window. The average gray value of the pixels in the first sub-window is obtained and recorded as the first gray value. The absolute value of the difference between the gray value of each pixel in the first sub-window and the first gray value is accumulated to obtain the first gray difference index. The average gray value of the pixels in the second sub-window is obtained and recorded as the second gray value. The absolute value of the difference between the gray value of each pixel in the second sub-window and the second gray value is accumulated to obtain the second gray difference index. The reciprocal of the sum of the first grayscale difference index and the second grayscale difference index is obtained to obtain the overall consistency index of any edge pixel. Obtain the overall consistency index of each edge pixel in any suspected defect region, and obtain the mean of the overall consistency index. Obtain the mean gradient value of the edge pixel in any suspected defect region, and calculate the sum of the mean of the overall consistency index and the mean of the gradient value to obtain the outlier value of any suspected defect region. The first defect coefficient of any suspected defect region is obtained by multiplying the aspect ratio, the outlier, and the reciprocal of the standard deviation.

7. The method for detecting the pressing quality of screw compressor blades based on image recognition according to claim 5, characterized in that, The step of obtaining the second defect coefficient of any suspected defect region based on the grayscale change characteristics of pixels in any suspected defect region and the grayscale distribution characteristics of pixels in each reference region includes: Obtain the center point of any suspected defect region. In any suspected defect region, form a neighborhood window by taking the pixels in the eight neighboring directions of the center point. One neighborhood window corresponds to one neighborhood direction. For any neighborhood window, the gray values ​​of the pixels in the neighborhood window are fitted to obtain a fitting function. The gray value of each pixel in the neighborhood window is predicted using the fitting function. The absolute values ​​of the difference between the gray value and the predicted value of each pixel in the neighborhood window are accumulated to obtain the gray difference feature value of the neighborhood window. Obtain the grayscale difference feature value of each neighborhood window, and obtain the mean grayscale difference feature value. Obtain the gradient direction entropy of each pixel in each neighborhood window, and obtain the mean gradient direction entropy. Calculate the sum of the mean grayscale difference feature value and the mean gradient direction entropy to obtain the first abnormal feature value of any suspected defect region. The average gray value of any suspected defect area is obtained, the average gray value of each reference area is obtained, the absolute value of the difference between the average gray value of any suspected defect area and the average gray value of each reference area is accumulated to obtain the total gray value difference of the area, and the reciprocal of the total gray value difference of the area is obtained to obtain the second abnormal feature value of any suspected defect area. The second defect coefficient of any suspected defect region is obtained by multiplying the first abnormal feature value and the second abnormal feature value.

8. The method for detecting the pressing quality of screw compressor blades based on image recognition according to claim 1, characterized in that, The optimization of the grayscale value of each pixel in a suspected defect region based on the defect coefficient of each suspected defect region includes: Obtain the maximum gray value of the pixel in the target image, take half of the maximum gray value as the gray value distinction threshold, and set a high gray value threshold and a low gray value threshold. For any pixel in any suspected defect area in the target image, a grayscale window of a preset size is established with the pixel as the center. The average grayscale value of the pixels in the grayscale window is obtained. If the average grayscale value of the pixels in the grayscale window is greater than or equal to the grayscale distinction threshold, then the pixel is confirmed as a high grayscale pixel. Based on the difference between the gray value of the high grayscale pixel and the high grayscale threshold, the high grayscale pixel is optimized using the defect coefficient of any suspected defect region. If the average gray value of the pixels in the grayscale window is less than the grayscale distinction threshold, then any pixel is confirmed as a low grayscale pixel. Based on the difference between the gray value of the low gray-scale pixel and the low gray-scale threshold, the low gray-scale pixel is optimized using the defect coefficient of any suspected defect region.

9. The method for detecting the pressing quality of screw compressor blades based on image recognition according to claim 8, characterized in that, The step of optimizing the high grayscale pixels based on the difference between their grayscale values ​​and the high grayscale threshold, using the defect coefficient of any suspected defect region, includes: If the gray value of the high grayscale pixel is greater than or equal to the high grayscale threshold, then half of the difference between the high grayscale threshold and the low grayscale threshold is obtained as the high grayscale adjustment weight. The negative of the defect coefficient of any suspected defect region is substituted into an exponential function with the natural constant as the base to obtain the exponential function result. The product of the high grayscale adjustment weight and the exponential function result is rounded to obtain the high grayscale adjustment value. The difference between the gray value of the high grayscale pixel and the high grayscale adjustment value is obtained to obtain the optimized grayscale value of the high grayscale pixel. If the grayscale value of the high grayscale pixel is less than the high grayscale threshold, the difference between the maximum grayscale value and the high grayscale threshold is obtained as the high grayscale adjustment weight. The product of the high grayscale adjustment weight and the defect coefficient of any suspected defect region is rounded to obtain the high grayscale adjustment value. The grayscale value of the high grayscale pixel and the high grayscale adjustment value are added together to obtain the optimized grayscale value of the high grayscale pixel.

10. The method for detecting the pressing quality of screw compressor blades based on image recognition according to claim 8, characterized in that, The step of optimizing the low-grayscale pixels based on the difference between their grayscale values ​​and the low-grayscale threshold, using the defect coefficient of any suspected defect region, includes: If the gray value of the low gray-scale pixel is less than or equal to the low gray-scale threshold, then half of the difference between the high gray-scale threshold and the low gray-scale threshold is obtained as the low gray-scale adjustment weight. The negative of the defect coefficient of any suspected defect region is substituted into an exponential function with the natural constant as the base to obtain the exponential function result. The product of the low gray-scale adjustment weight and the exponential function result is rounded to obtain the low gray-scale adjustment value. The gray value of the low gray-scale pixel and the low gray-scale adjustment value are added together to obtain the optimized gray-scale value of the low gray-scale pixel. If the gray value of the low gray-scale pixel is greater than the low gray-scale threshold, the product of the low gray-scale threshold and the defect coefficient of any suspected defect region is rounded to the nearest integer to obtain a low gray-scale adjustment value. The difference between the gray value of the low gray-scale pixel and the low gray-scale adjustment value is then obtained to obtain the optimized gray-scale value of the low gray-scale pixel.

Citation Information

Patent Citations

  • Metal surface defect detection method

    CN115082482A

  • Steel rail bolt corrosion area segmentation method based on image features

    CN117237396A