Screw conveyor blade pressing quality detection method based on image recognition

By acquiring images of spiral machine blades under different lighting conditions, using grayscale and texture features to determine suspected defect areas and perform optimization processing, the misjudgment problem caused by grayscale overlap in the existing technology is solved, and the accuracy of spiral machine blade defect detection is improved.

CN120833334AActive Publication Date: 2025-10-24CHANGSHU SHENLI MACHINE MFG

Patent Information

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

AI Technical Summary

Technical Problem

In the existing technology, the screw machine blade defect detection based on the threshold segmentation algorithm has the problem of misjudgment caused by grayscale overlap, low accuracy, and difficulty in accurately segmenting the defective area in the screw machine blade.

Method used

By acquiring images of the propeller blades to be inspected under at least two lighting conditions and performing grayscale processing, the grayscale distribution and texture characteristics of the pixels are used to judge the suspected abnormal pixels, and the defect coefficient of the suspected defect area is obtained. The pixels in the suspected defect area are then optimized to enhance the contrast between the defect area and the background and reduce the contrast of the interference area. Finally, the threshold segmentation algorithm is used for accurate segmentation.

Benefits of technology

The accuracy of propeller blade defect detection is improved, and interference factors such as oil stains and reflections can be effectively eliminated to ensure accurate segmentation of defective areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120833334A_ABST
    Figure CN120833334A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer vision, in particular to a screw conveyor blade pressing quality detection method based on image recognition, and the method comprises the steps: obtaining a target image and a reference image of a to-be-detected screw conveyor blade; if it is detected that the suspected abnormal pixel points exist in the target image, obtaining a suspected defect area according to the gray distribution feature and the texture feature of each suspected abnormal pixel point in the target image; obtaining a reference area of each suspected defect area in each reference image, and obtaining a defect coefficient of each suspected defect area according to the gray level change characteristics and gradient values of the pixel points in each suspected defect area and the gray level distribution characteristics of the pixel points in each reference area; the defect coefficient of each suspected defect area is utilized to optimize the gray value of the pixel point of each suspected defect area to obtain an optimized image, and the threshold segmentation algorithm is utilized to segment the optimized image, so that the accuracy of propeller blade defect detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to a method for detecting the pressing quality of a screw machine blade based on image recognition. Background Art

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

[0003] Because the grayscale values ​​of surface defects on spiral blades often differ from those of normal areas, existing techniques typically use threshold segmentation algorithms based on computer vision to segment surface defects and classify each blade's quality based on the number of surface defects. However, threshold segmentation algorithms determine thresholds based on a global grayscale histogram. Because some spiral blades produce pressed textures during pressing, these textures may overlap with the grayscale of defective areas (cracks). Furthermore, during blade processing (such as milling, turning, and grinding), spiral blades use cutting fluids or coolants for lubrication and cooling. Incomplete cleaning can leave residual oil residue. While this oil residue doesn't affect blade quality, it can overlap with the grayscale of defective areas (cracks). Finally, because spiral blades are made of metal and have a high degree of reflectivity, this can also overlap with the grayscale of defective areas (concave and convex deformations). This grayscale overlap can lead to threshold segmentation errors, misidentifying normal areas as defective, significantly reducing the accuracy of spiral blade defect detection.

[0004] Therefore, how to accurately segment the defective areas in propeller blades 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, an embodiment of the present invention provides a method for detecting the pressing quality of a propeller blade based on image recognition to solve the problem of how to accurately segment the defective areas in the propeller blade and improve the accuracy of propeller blade defect detection.

[0006] An embodiment of the present invention provides a method for detecting the pressing quality of a screw machine blade based on image recognition, the method comprising the following steps: Acquire images of the propeller blade 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; determine whether there is a suspected abnormal pixel point in the target image according to the gray distribution feature and the texture feature of the pixel point in the target image, and if there is at least one suspected abnormal pixel point in the target image, acquire at least one suspected defect region in the target image according to the gray distribution feature and the texture feature of each suspected abnormal pixel point in the target image; For any suspected defect region, acquire a reference region with the same position as the any suspected defect region in each reference image, and acquire a defect coefficient of the any suspected defect region according to the gray variation feature and the gradient value of the pixel point in the any suspected defect region and the gray distribution feature of the pixel point in each reference region; acquire the defect coefficient of each suspected defect region in the target image, optimize the gray value of the pixel point of each suspected defect region according to the defect coefficient of each suspected defect region to obtain an optimized image, and segment the optimized image by using a threshold segmentation algorithm to obtain a detection result of the pressing quality of the spiral machine blade.

[0007] Preferably, the determining whether there is a suspected abnormal pixel point in the target image according to the gray distribution feature and the texture feature of the pixel point in the target image comprises: acquiring the abnormal degree of each pixel point in the target image according to the gray distribution feature and the texture feature of the pixel point in the target image; if the abnormal degree of any pixel point is greater than or equal to a preset abnormal degree threshold, confirming that the any pixel point is a suspected abnormal pixel point; if the number of suspected abnormal pixel points in the target image is greater than or equal to 1, confirming that there is a suspected abnormal pixel point in the target image.

[0008] Preferably, the acquiring the abnormal degree of each pixel point in the target image according to the gray distribution feature and the texture feature of the pixel point in the target image comprises: for any pixel point in the target image, establishing a window of a preset size in the target image with the any pixel point as the center, acquiring a structure tensor matrix corresponding to the window, acquiring two eigenvalues of the structure tensor matrix, denoted as a first eigenvalue and a second eigenvalue; acquiring a difference value of the first eigenvalue and the second eigenvalue to obtain an eigenvalue difference value, acquiring an addition result of the second eigenvalue and a preset constant to obtain a first addition result, and acquiring a ratio of the eigenvalue difference value and the first addition result to obtain a first feature index; obtaining a sum result of the first feature value and the second feature value to obtain a total feature value, obtaining a sum result of an absolute value of the feature value difference and a preset constant to obtain a second sum result, and obtaining a ratio of the total feature value and the second sum result to obtain a second feature index; obtaining a sum result of the first feature index and the second feature index to obtain a feature index of the any pixel point, and obtaining a difference value of a maximum gray value and a minimum gray value in the window to obtain a local gray variation degree of the any pixel point; performing normalization processing on a product of the feature index and the local gray variation degree of the any pixel point to obtain an abnormality degree of the any pixel point.

[0009] Preferably, the method comprises the following steps: taking a lower left corner of the target image as an origin, a horizontal direction as a horizontal coordinate, and a vertical direction as a vertical coordinate to construct a two-dimensional rectangular coordinate system, taking a coordinate and an abnormality degree of each suspected abnormal pixel point as a feature vector, performing clustering processing on the suspected abnormal pixel points in the target image according to the feature vector of each suspected abnormal pixel point to obtain at least one cluster, and obtaining a suspected defect region corresponding to each cluster according to the pixel points corresponding to each cluster.

[0010] Preferably, the method comprises the following steps: obtaining a first defect coefficient of the any suspected defect region according to the gray variation feature and the gradient value of the pixel points in the any suspected defect region; obtaining a second defect coefficient of the any suspected defect region according to the gray variation feature of the pixel points in the any suspected defect region and the gray distribution feature of the pixel points in each reference region; obtaining a mean value of the first defect coefficient and the second defect coefficient, denoted as a defect coefficient mean value, substituting an inverse of the defect coefficient mean value into an exponential function with a natural constant as a base number to obtain a normality degree of the any suspected defect region, and obtaining a difference value between a constant 1 and the normality degree to obtain a defect coefficient of the any suspected defect region.

[0011] Preferably, the method comprises the following steps: An enclosing rectangle of the any suspected defect region is obtained, an aspect ratio of the enclosing rectangle is calculated, and a standard deviation of gray scale values of all pixel points in the any suspected defect region is obtained; An edge pixel point of the any suspected defect region is obtained, for any edge pixel point, a target window of a preset length is established in a gradient direction of the any edge pixel point with the any edge pixel point as a center, in the target window, pixel points before the any edge pixel point form a first sub-window, and pixel points after the any edge pixel point form a second sub-window; A mean value of gray scale values of pixel points in the first sub-window is obtained and recorded as a first gray scale mean value, and absolute values of differences between the gray scale values of each pixel point in the first sub-window and the first gray scale mean value are accumulated to obtain a first gray scale difference index; A mean value of gray scale values of pixel points in the second sub-window is obtained and recorded as a second gray scale mean value, and absolute values of differences between the gray scale values of each pixel point in the second sub-window and the second gray scale mean value are accumulated to obtain a second gray scale difference index; An inverse of an addition result of the first gray scale difference index and the second gray scale difference index is obtained to obtain an overall consistency index of the any edge pixel point; An overall consistency index of each edge pixel point in the any suspected defect region is obtained, a mean value of the overall consistency indexes is obtained, a mean value of gradient values of edge pixel points in the any suspected defect region is obtained, and an addition result of the mean value of the overall consistency indexes and the mean value of the gradient values is calculated to obtain an abnormal value of the any suspected defect region; A product of the aspect ratio, the inverse of the abnormal value and the standard deviation is obtained to obtain a first defect coefficient of the any suspected defect region.

[0012] Preferably, the second defect coefficient of the any suspected defect region is obtained according to the gray scale change feature of the pixel points in the any suspected defect region and the gray scale distribution feature of the pixel points in each reference region, and the second defect coefficient of the any suspected defect region comprises: A center point of the any suspected defect region is obtained, in the any suspected defect region, pixel points in eight neighborhood directions of the center point are respectively grouped into neighborhood windows, and one neighborhood direction corresponds to one neighborhood window; For any neighborhood window, a fitting function is obtained by fitting gray scale values of pixel points in the any neighborhood window, a predicted value of the gray scale value of each pixel point in the any neighborhood window is obtained by using the fitting function, and an absolute value of a difference between the gray scale value of each pixel point in the any neighborhood window and the predicted value thereof is accumulated to obtain a gray scale difference feature value of the any neighborhood window; obtaining a gray value mean of the any suspected defect region, obtaining a gray value mean of each reference region, accumulating absolute values of differences between the gray value mean of the any suspected defect region and the gray value mean of each reference region to obtain a total value of region gray difference, obtaining an inverse of the total value of region gray difference to obtain a second abnormal feature value of the any suspected defect region; obtaining a gray value mean of the any suspected defect region, obtaining a gray value mean of each reference region, accumulating absolute values of differences between the gray value mean of the any suspected defect region and the gray value mean of each reference region to obtain a total value of region gray difference, obtaining an inverse of the total value of region gray difference to obtain a second abnormal feature value of the any suspected defect region; obtaining a second defect coefficient of the any suspected defect region according to a product of the first abnormal feature value and the second abnormal feature value.

[0013] Preferably, the optimizing processing of the gray values of the pixel points in each suspected defect region according to the defect coefficient of the suspected defect region comprises: obtaining a maximum gray value of the pixel points in the target image, taking one-half of the maximum gray value as a gray distinguishing threshold, and setting a high gray threshold and a low gray threshold; for any pixel point in the any suspected defect region in the target image, establishing a gray window of a preset size with the any pixel point as a center, obtaining a gray value mean of the pixel points in the gray window, and confirming the any pixel point as a high gray pixel point if the gray value mean of the pixel points in the gray window is greater than or equal to the gray distinguishing threshold; optimizing processing of the high gray pixel point according to a difference between the gray value of the high gray pixel point and the high gray threshold and by using the defect coefficient of the any suspected defect region; confirming the any pixel point as a low gray pixel point if the gray value mean of the pixel points in the gray window is less than the gray distinguishing threshold; optimizing processing of the low gray pixel point according to a difference between the gray value of the low gray pixel point and the low gray threshold and by using the defect coefficient of the any suspected defect region.

[0014] Preferably, the optimizing processing of the high gray pixel point according to a difference between the gray value of the high gray pixel point and the high gray threshold and by using the defect coefficient of the any suspected defect region comprises: If the gray value of the high gray pixel point is greater than or equal to the high gray threshold value, then the difference between the high gray threshold value and the low gray threshold value is obtained, and one half of the difference is taken as a high gray adjustment weight; the reciprocal of the defect coefficient of the any suspected defect region is substituted into an exponential function with a natural constant as a base number to obtain an exponential function result; the product of the high gray adjustment weight and the exponential function result is rounded to obtain a high gray adjustment value; the difference between the gray value of the high gray pixel point and the high gray adjustment value is obtained to obtain an optimized gray value of the high gray pixel point. If the gray value of the high gray pixel point is less than the high gray threshold value, then the difference between the maximum gray value and the high gray threshold value is obtained as a high gray adjustment weight; the product of the high gray adjustment weight and the defect coefficient of the any suspected defect region is rounded to obtain a high gray adjustment value; and the addition result of the gray value of the high gray pixel point and the high gray adjustment value is obtained to obtain an optimized gray value of the high gray pixel point.

[0015] Preferably, the optimization processing of the low gray pixel point according to the difference between the gray value of the low gray pixel point and the low gray threshold value and the defect coefficient of the any suspected defect region comprises: If the gray value of the low gray pixel point is less than or equal to the low gray threshold value, then the difference between the high gray threshold value and the low gray threshold value is obtained, and one half of the difference is taken as a low gray adjustment weight; the reciprocal of the defect coefficient of the any suspected defect region is substituted into an exponential function with a natural constant as a base number to obtain an exponential function result; the product of the low gray adjustment weight and the exponential function result is rounded to obtain a low gray adjustment value; and the addition result of the gray value of the low gray pixel point and the low gray adjustment value is obtained to obtain an optimized gray value of the low gray pixel point. If the gray value of the low gray pixel point is greater than the low gray threshold value, then the product of the low gray threshold value and the defect coefficient of the any suspected defect region is rounded to obtain a low gray adjustment value; and the difference between the gray value of the low gray pixel point and the low gray adjustment value is obtained to obtain an optimized gray value of the low gray pixel point.

[0016] Compared with the prior art, the embodiment of the present application has the following beneficial effects: The present invention obtains images of the screw machine blade to be inspected under at least two lighting conditions, performs grayscale processing on each image, and obtains a target image and a preset number of reference images; judges whether there are suspected abnormal pixels in the target image based on the grayscale distribution characteristics and texture characteristics of the pixels in the target image, and if there is at least one suspected abnormal pixel in the target image, obtains at least one suspected defect area in the target image based on the grayscale distribution characteristics and texture characteristics of each suspected abnormal pixel in the target image; for any suspected defect area, obtains a reference area with the same position as the any suspected defect area in each reference image, and obtains the defect coefficient of the any suspected defect area based on the grayscale change characteristics and gradient values ​​of the pixels in the any suspected defect area and the grayscale distribution characteristics of the pixels in each reference area; obtains the defect coefficient of each suspected defect area in the target image, optimizes the grayscale values ​​of the pixels in each suspected defect area based on the defect coefficient of each suspected defect area, and obtains an optimized image, and segments the optimized image using a threshold segmentation algorithm to obtain a pressing quality inspection result of the screw machine blade to be inspected. Among them, according to the grayscale change characteristics and gradient values ​​of the pixels in any suspected defect area and the grayscale distribution characteristics of the pixels in each reference area, the defect coefficient of any suspected defect area is obtained to eliminate interference factors such as oil stains and reflections in the propeller blades to be detected; according to the defect coefficient of each suspected defect area, the grayscale value of the pixels in each suspected defect area is optimized to enhance the contrast between the defect area and the background while reducing the contrast between the interference area and the background, so that the threshold segmentation algorithm can be used to accurately segment the defect area in the propeller blade, thereby improving the accuracy of propeller blade defect detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. 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 any creative work.

[0018] Figure 1 This is a flow chart of a method for detecting the pressing quality of a screw machine blade based on image recognition provided in the first embodiment of the present invention; Figure 2 This is an image of a propeller blade provided by the first embodiment of the present invention, captured when light sources on both sides are turned on simultaneously. DETAILED DESCRIPTION

[0019] Embodiments of the present disclosure are described in detail below with reference to the attached drawing figures, wherein the embodiments given herein are by way of illustration only and are not intended to be limiting of the present disclosure.

[0020] It should be noted that the terms "first", "second", and the like in the description of the present disclosure and the above drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than that illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Rather, they are merely examples of devices and methods consistent with some aspects of the present disclosure.

[0021] In order to illustrate the technical solutions of the present application, the following will be described by specific embodiments.

[0022] Referring to Figure 1 , a method flowchart of a spiral machine blade pressing quality detection method based on image recognition provided by Embodiment One of the present application is shown in Figure 1 , which can include: Step S101, acquiring images of the spiral machine blade to be detected under at least two lighting conditions, and performing gray scale processing on each image to obtain a target image and a preset number of reference images.

[0023] In the manufacturing process of the spiral machine blade, the pressing process is a crucial step, and the pressing quality of the spiral machine blade directly affects the service life, performance stability and safety of the spiral machine blade. Therefore, how to effectively detect the pressing quality of the spiral machine blade has always been a key problem in the industry.

[0024] Since the gray scale value of the surface defects of the spiral machine blade is usually different from that of the normal area, the prior art generally uses a threshold segmentation algorithm based on computer vision to segment the surface defects of the spiral machine blade, and classifies the quality of each spiral machine blade surface defect according to the number of surface defects.

[0025] In this embodiment, after the spiral machine blade is pressed in the production department, the pressed blade (i.e. the spiral machine blade to be detected) is placed on the transmission track at a fixed angle, an image acquisition device such as a high-definition camera is arranged above the fixed position of the transmission track, and the same light source is arranged on the left and right sides of the image acquisition device for illumination. When the spiral machine blade passes through the image acquisition device, it is stopped for 2s to collect images, which is not limited here and can be set according to the specific implementation scene. When collecting images, the two side light sources are turned on at the same time to collect one image a, as shown in Figure 2As shown, then the right light source is turned on to collect image b, and finally the left light source is turned on to collect image c. Image a is subjected to grayscale processing to obtain a target image. Images b and c are subjected to grayscale processing to obtain reference images b and c. In this embodiment, the preset number of reference images is 2, which is not limited here and can be set according to a specific implementation scenario. The grayscale processing belongs to the prior art and will not be described here.

[0026] The threshold segmentation algorithm determines the threshold based on a global grayscale histogram. Since some spiral blade press textures are generated during pressing, the texture part may overlap with the defect area (crack) grayscale. Secondly, since the spiral blade is lubricated and cooled with cutting fluid or cooling fluid during blade processing (such as milling, turning, and grinding), if not thoroughly cleaned, oil stains will be left, which will not affect the blade quality but will also overlap with the defect area (crack) grayscale. Finally, since the spiral blade is a metal product, it has good reflectivity and will also overlap with the defect area (concave-convex deformation) grayscale. The grayscale overlap will cause threshold segmentation errors, misjudging normal areas as defect areas, which greatly reduces the accuracy of spiral blade defect detection.

[0027] Therefore, when at least one suspected abnormal pixel point is detected in the target image, the grayscale distribution characteristics and texture characteristics of the suspected abnormal pixel point in the target image are used to obtain a suspected defect area in the target image. Then, the grayscale variation characteristics and gradient values of the pixel points in the suspected defect area, and the grayscale distribution characteristics of the pixel points in each reference area are used to obtain a defect coefficient of the suspected defect area. Finally, the grayscale values of the pixel points in the 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, so that the threshold segmentation algorithm can accurately segment the defect area in the spiral blade and improve the accuracy of the propeller blade defect detection.

[0028] In step S102, whether there is a suspected abnormal pixel point in the target image is determined based on the grayscale distribution characteristics and texture characteristics of the pixel points in the target image. If there is at least one suspected abnormal pixel point in the target image, at least one suspected defect area in the target image is obtained based on the grayscale distribution characteristics and texture characteristics of each suspected abnormal pixel point in the target image.

[0029] First, whether there is a suspected abnormal pixel point in the target image is detected. Since the defect area generally exhibits texture and grayscale characteristics different from those of the normal area, whether there is a suspected abnormal pixel point in the target image can be determined based on the grayscale distribution characteristics and texture characteristics of the pixel points in the target image.

[0030] Wherein, according to the gray level distribution characteristics and texture characteristics of the pixel points in the target image, the method for judging whether there is a suspected abnormal pixel point in the target image is as follows: (1) According to the gray level distribution characteristics and texture characteristics of the pixel points in the target image, the abnormal degree of each pixel point in the target image is obtained.

[0031] Specifically, for any pixel point in the target image, a window with a preset size of 3x3 (i.e. the window includes 9 pixel points) is established in the target image with the pixel point as the center, which is not limited here and can be set according to the specific implementation scenario. If any pixel point is an edge pixel point, a 3x3 window is obtained by using a boundary filling algorithm, which is a prior art and will not be described here. The gradient of each pixel in the window in the x and y directions is calculated by a sobel operator, and then the gradient of all pixel points in the window in the x and y directions is Gaussian weighted summed to obtain a structure tensor matrix corresponding to the window, and two eigenvalues of the structure tensor matrix are obtained, denoted as a first eigenvalue and a second eigenvalue. Obtaining the structure tensor matrix and the eigenvalues of the structure tensor matrix is a prior art and will not be described here. The difference between the first eigenvalue and the second eigenvalue is obtained to obtain a feature value difference, the addition result of the second eigenvalue and a preset constant is obtained to obtain a first addition result, and the ratio of the feature value difference to the first addition result is obtained to obtain a first feature index. The addition result of the first eigenvalue and the second eigenvalue is obtained to obtain a total eigenvalue, the addition result of the absolute value of the feature value difference and a preset constant is obtained to obtain a second addition result, and the ratio of the total eigenvalue to the second addition result is obtained to obtain a second feature index. The addition result of the first feature index and the second feature index is obtained to obtain the feature index of the any pixel point, and the difference between the maximum gray value and the minimum gray value in the window is obtained to obtain the local gray level change degree of the any pixel point. The product of the feature index and the local gray level change degree of the any pixel point is normalized to obtain the abnormal degree of the any pixel point.

[0032] In an embodiment, taking the i-th pixel point in the target image as an example, the calculation formula of the abnormal degree of the i-th pixel point is: Wherein, is the abnormal degree of the i-th pixel point; is the first eigenvalue; is the second eigenvalue; is the maximum gray value in the window established with the i-th pixel point as the center; is the minimum gray value in the window centered on the ith pixel point; C is a preset constant, which is set to 1 in this embodiment, for ensuring that the fraction is meaningful, which is not limited here and can be set according to a specific implementation scenario; is an absolute value symbol; is a normalization function.

[0033] It should be noted that, is a first feature index, reflecting the possibility that the ith pixel point belongs to an edge, when , it indicates that the ith pixel point has a significant directional change, and the more likely the ith pixel point belongs to an edge point, , the greater the value is; is a second feature index, reflecting the possibility that the ith pixel point belongs to a complex texture region, when , it indicates that the ith pixel point has a gray value change in the x and y directions, , the greater the value is; is a feature index, reflecting the texture complexity of the ith pixel point, or , the greater the value is, , the greater the value is, and the more likely the ith pixel point belongs to an abnormal pixel point, , the greater the value is; is the local gray value change degree of the ith pixel point, , the greater the local gray value difference of the ith pixel point is, and the more likely the ith pixel point belongs to an abnormal pixel point, , the greater the value is.

[0034] (2) According to the abnormal degree of each pixel point in the target image, it is determined whether there is a suspected abnormal pixel point in the target image.

[0035] If the abnormal degree of any pixel point is greater than or equal to a preset abnormal degree threshold, the any pixel point is confirmed as a suspected abnormal pixel point, and the preset abnormal degree threshold in this embodiment is 0.7, which is not limited here and can be set according to a specific implementation scenario; If the number of suspected abnormal pixel points in the target image is greater than or equal to 1, it is confirmed that there is a suspected abnormal pixel point in the target image.

[0036] Further, if there is at least one suspected abnormal pixel point in the target image, it indicates that there may be a defect region in the spiral machine blade to be detected, and therefore, according to the abnormal degree of the suspected abnormal pixel point in the target image, a suspected defect region in the target image is obtained, and the gray value of the pixel point in the suspected defect region is optimized, so that the threshold segmentation algorithm can accurately segment the defect region in the spiral machine blade.

[0037] Wherein, according to the abnormal degree of the suspected abnormal pixel points in the target image, the method for obtaining the suspected defect region in the target image is as follows: 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, a two-dimensional rectangular coordinate system is constructed, the coordinates and the abnormal degree of each suspected abnormal pixel point are combined to form a feature vector, the suspected abnormal pixel points in the target image are subjected to mean shift clustering processing according to the feature vector of each suspected abnormal pixel point, at least one cluster is obtained, and each pixel point in the cluster is marked in the target image. All the pixel points corresponding to one cluster form an initial region. For any initial region, an inscribed ellipse of the initial region is obtained. In any initial region, the pixel points with the shortest distance from the inscribed ellipse in each direction are obtained as edge pixel points. All the edge pixel points are connected to obtain the suspected defect region corresponding to any initial region. Similarly, the suspected defect region corresponding to each cluster is obtained. The mean shift clustering belongs to the prior art, and will not be described here.

[0038] Thus, the suspected defect region in the target image is obtained.

[0039] In step S103, for any suspected defect region, a reference region with the same position as the suspected defect region is obtained in each reference image. According to the gray level variation feature and gradient value of the pixel points in the suspected defect region and the gray level distribution feature of the pixel points in each reference region, the defect coefficient of the suspected defect region is obtained.

[0040] After obtaining the suspected defect region in the target image, due to incomplete cleaning or accidental attachment in the production process of the spiral machine blade, an oil stain region may be formed. The oil stain region and the crack region both exhibit a region with a lower gray value. At the same time, when the target image is collected, a reflection region may exist in the spiral machine blade. The concave-convex deformation and the reflection region are both regions with a higher gray value, resulting in that the reflection, oil stain and other regions and the defect region are different from the normal region. However, the reflection, oil stain and other regions will not affect the quality of the spiral machine blade. Therefore, for any suspected defect region, the defect coefficient of the suspected defect region can be obtained according to the performance feature of the suspected defect region, so as to reduce the interference of the reflection, oil stain and other regions on the defect region identification.

[0041] Wherein, according to the performance feature of any suspected defect region, the method for obtaining the defect coefficient of any suspected defect region is as follows: (1) According to the gray level variation feature and the gradient value of the pixel points in the suspected defect region, the first defect coefficient of the suspected defect region is obtained.

[0042] Since both the oily area and the cracked area appear as areas with lower grayscale values, but the oily area appears as an irregular block with blurred edges and complex grayscale within the area, while the cracked area appears as a slender line with clear edges and uniform grayscale within the area, the first defect coefficient of any suspected defect area can be obtained based on the grayscale change characteristics and gradient values ​​of the pixels in any suspected defect area, thereby reducing the interference of the oily area on the identification of the crack area.

[0043] Specifically, obtaining a bounding rectangle of any suspected defect area, calculating the aspect ratio of the bounding rectangle, and obtaining a standard deviation of the grayscale values ​​of all pixels in any suspected defect area; Obtain edge pixels of any suspected defect area, and for any edge pixel, establish a target window with a preset length of 5, centered on the edge pixel, and in the gradient direction of the edge pixel. This is not limited here and can be set according to a 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. Obtaining a grayscale mean of pixels in the first subwindow, recorded as a first grayscale mean, and accumulating the absolute value of the difference between the grayscale value of each pixel in the first subwindow and the first grayscale mean to obtain a first grayscale difference index; Obtaining a grayscale mean of the pixels in the second subwindow, recorded as a second grayscale mean, and accumulating the absolute value of the difference between the grayscale value of each pixel in the second subwindow and the second grayscale mean to obtain a second grayscale difference index; Obtaining the reciprocal of the sum of the first grayscale difference index and the second grayscale difference index to obtain an overall consistency index of any edge pixel point; Obtaining an overall consistency index for each edge pixel point in any suspected defect area, and correspondingly obtaining a mean value of the overall consistency index, obtaining a mean value of the gradient values ​​of the edge pixels in any suspected defect area, and calculating the sum of the mean value of the overall consistency index and the mean value of the gradient values ​​to obtain an outlier value of any suspected defect area; The product of the aspect ratio, the outlier, and the reciprocal of the standard deviation is obtained to obtain a first defect coefficient of any suspected defect area.

[0044] In one embodiment, taking the fth suspected defect region as an example, the calculation formula for the first defect coefficient of the fth suspected defect region is: in, is the first defect coefficient of the fth suspected defect area; is the length of the circumscribed rectangle of the fth suspected defect area; is a width of the circumscribed rectangle of the fth suspected defect region; is a mean value of gradient values of all edge pixel points in the fth suspected defect region; is a gray value of a zth pixel point in the first sub-window of the jth edge pixel point in the fth suspected defect region; is a first gray mean value, i.e., a mean value of gray values of pixel points in the first sub-window of the jth edge pixel point in the fth suspected defect region; is a gray value of a zth pixel point in the second sub-window of the jth edge pixel point in the fth suspected defect region; is a second gray mean value, i.e., a mean value of gray values of pixel points in the second sub-window of the jth edge pixel point in the fth suspected defect region; is a number of pixel points in the first sub-window or the second sub-window of the jth edge pixel point in the fth suspected defect region; is a number of edge pixel points in the fth suspected defect region; is a standard deviation of gray values of all pixel points in the fth suspected defect region; is an absolute value symbol.

[0045] It should be noted that, is an aspect ratio of the circumscribed rectangle of the fth suspected defect region, the greater, the more the fth suspected defect region conforms to the elongated performance characteristics of the crack region, the greater; is an outlier of the fth suspected defect region, the greater, the more the edge pixel points in the fth suspected defect region are clear, and the more the fth suspected defect region conforms to the characteristics of clear edges of the crack region, the greater, the greater; is a global consistency index of the jth edge pixel point in the fth suspected defect region, since the two sides of the edge pixel point are different regions, the more clear the edge, the higher the consistency of the pixel points on the two sides of the edge pixel point (i.e., the higher the consistency of the pixel points in the first sub-window, the higher the consistency of the pixel points in the second sub-window), or the smaller, the smaller the gray difference between the pixel points in the two sub-windows on the two sides of the jth edge pixel point, i.e., the higher the consistency, the greater, the more the fth suspected defect region conforms to the characteristics of clear edges of the crack region, the greater, the greater; the smaller, the lower the complexity of the gray in the fth suspected defect region, the more it conforms to the characteristics of uniform gray in the crack region, the greater.

[0046] (2) According to the gray level variation characteristics of the pixel points in any one of the suspected defect regions and the gray level distribution characteristics of the pixel points in each reference region, a second defect coefficient of any one of the suspected defect regions is obtained.

[0047] Since the concave-convex deformation and the light reflection region are both regions with high gray level values, the spiral machine blade is made of metal material and has high surface smoothness, so the collected image will have a light reflection interference region, which is characterized by gradual change of gray level in the region and obvious change of gray level value in the region with light source. The concave-convex deformation region is a defect region formed due to processing error or stress deformation, which is characterized by change of gray level in the region with concave-convex transformation and no obvious change of gray level value in the region with light source. Therefore, in each reference image, a reference region with the same position as any one of the suspected defect regions is obtained, and according to the gray level variation characteristics of the pixel points in any one of the suspected defect regions and the gray level distribution characteristics of the pixel points in each reference region, a second defect coefficient of any one of the suspected defect regions is obtained, so as to reduce the interference of the light reflection region on the recognition of the concave-convex deformation region.

[0048] Specifically, a center point of any one of the suspected defect regions is obtained, and in any one of the suspected defect regions, the pixel points in eight neighborhood directions of the center point are grouped into neighborhood windows, and one neighborhood direction corresponds to one neighborhood window. For any one of the neighborhood windows, the gray level values of the pixel points in the neighborhood window are fitted to obtain a fitted linear function, the predicted value of the gray level value of each pixel point in the neighborhood window is obtained by using the fitted linear function, and the absolute value of the difference between the gray level value of each pixel point in the neighborhood window and the predicted value thereof is accumulated to obtain a gray level difference feature value of the neighborhood window. The gray level difference feature value of each neighborhood window is obtained, and the mean value of the gray level difference feature value is obtained. The gradient direction entropy of the pixel points in each neighborhood window is obtained, and the mean value of the gradient direction entropy is obtained. The sum of the mean value of the gray level difference feature value and the mean value of the gradient direction entropy is calculated to obtain a first abnormal feature value of any one of the suspected defect regions. The mean value of the gray level value of any one of the suspected defect regions is obtained, the mean value of the gray level value of each reference region is obtained, the absolute value of the difference between the mean value of the gray level value of any one of the suspected defect regions and the mean value of the gray level value of each reference region is accumulated to obtain a total value of the region gray level difference, and the reciprocal of the total value of the region gray level difference is obtained to obtain a second abnormal feature value of any one of the suspected defect regions. The second defect coefficient of any one of the suspected defect regions is obtained according to the product of the first abnormal feature value and the second abnormal feature value.

[0049] In an embodiment, taking the fth suspected defect region as an example, the calculation formula of the second defect coefficient of the fth suspected defect region is: wherein, is the second defect coefficient of the fth suspected defect region; is the gradient direction entropy mean value; is the gray value of the kth pixel point in the Fth neighborhood window of the fth suspected defect region; is the predicted value of the gray value of the kth pixel point in the Fth neighborhood window of the fth suspected defect region; is the number of pixel points in the Fth neighborhood window of the fth suspected defect region; is the gray value mean value of the fth suspected defect region; is the gray value mean value of the reference region of the fth suspected defect region in the reference image b; is the gray value mean value of the reference region of the fth suspected defect region in the reference image c; is the absolute value symbol.

[0050] It should be noted that, the greater the region gradient direction consistency is, the weaker the gradual change feature is, and the less likely the region is a light reflection region, i.e., the greater the possibility of the region being a concave-convex deformation region is, the greater the value is; is the gray difference feature value of the Fth neighborhood window of the fth suspected defect region, the greater the value is, the greater the difference between the gray value of the kth pixel point in the Fth neighborhood window of the fth suspected defect region and the predicted value is, the greater the region gradual change feature is, the greater the possibility of the region being a concave-convex deformation region is, the greater the value is; is the second abnormal feature value of the fth suspected defect region, the smaller the gray value change of the region with the light source is, the greater the possibility of the region being a concave-convex deformation region is, the greater the value is.

[0051] (3) According to the first defect coefficient and the second defect coefficient of any suspected defect region, the defect coefficient of any suspected defect region is obtained.

[0052] Specifically, the mean value of the first defect coefficient and the second defect coefficient is obtained, denoted as defect coefficient mean value, the inverse of the defect coefficient mean value is substituted into the exponential function with the natural constant as the base number to obtain the normal degree of the any suspected defect region, and the difference between the constant 1 and the normal degree is obtained to obtain the defect coefficient of the any suspected defect region.

[0053] In an embodiment, taking the fth suspected defect region as an example, the calculation formula of the defect coefficient of the fth suspected defect region is: wherein, is the defect coefficient of the fth suspected defect region; is the first defect coefficient of the fth suspected defect region; is the second defect coefficient of the fth suspected defect region; is an exponential function with a natural constant as the base number, used for inverse proportional normalization.

[0054] It should be noted that, the greater the value is, the greater the possibility that the fth suspected defect region belongs to the crack region is, the greater the value is; the greater the value is, the greater the possibility that the fth suspected defect region belongs to the concave-convex deformation region is, the greater the value is.

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

[0056] In step S104, the defect coefficient of each suspected defect region in the target image is obtained, the gray value of the pixel point of each suspected defect region is optimized according to the defect coefficient of each suspected defect region, an optimized image is obtained, the optimized image is segmented by using a threshold segmentation algorithm, and a detection result of the pressing quality of the propeller blade is obtained.

[0057] According to the above method 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, and the gray value of the pixel point of each suspected defect region is optimized according to the defect coefficient of each suspected defect region, so that the defect region in the propeller blade can be accurately segmented by using the threshold segmentation algorithm, and the accuracy of the propeller blade defect detection is improved.

[0058] wherein, the method for optimizing the gray value of the pixel point of each suspected defect region according to the defect coefficient of each suspected defect region is as follows: (1) distinguishing high gray value pixel points and low gray value pixel points.

[0059] Since the pixel values of different defect regions are different, the corresponding threshold segmentation values are also different, such as the crack defect requiring a low gray threshold value, and the concave-convex deformation region requiring a high gray threshold value, therefore, when adjusting the gray value of the pixel point, the local gray feature thereof should be combined to adjust it, the maximum gray value of the pixel point in the target image is obtained, half of the maximum gray value is taken as a gray threshold value, the gray values of all pixel points in the target image are sorted in ascending order to obtain an ascending sequence, the high gray threshold value is set to be the 95th percentile of the ascending sequence according to historical experience, and the low gray threshold value is set to be the 5th percentile of the ascending sequence, for example, the 95th percentile of the ascending sequence is X, and the gray value of 95% of the pixel points in the target image is less than or equal to X, which is not limited here and can be set according to a specific implementation scenario; For any pixel point in any suspected defect region in the target image, a gray window with a preset size of 5*5 is established with the any pixel point as the center, which is not limited here and can be set according to a specific implementation scenario, the mean value of the gray values of the pixel points in the gray window is obtained, if the mean value of the gray values of the pixel points in the gray window is greater than or equal to the gray threshold value, it is confirmed that the any pixel point is a high gray pixel point. If the mean value of the gray values of the pixel points in the gray window is less than the gray threshold value, it is confirmed that the any pixel point is a low gray pixel point.

[0060] (2) According to the difference between the gray value of the high gray pixel point and the high gray threshold value, the high gray pixel point is optimized by using the defect coefficient of the any suspected defect region.

[0061] Specifically, if the gray value of the high gray pixel point is greater than or equal to the high gray threshold value, half of the difference between the high gray threshold value and the low gray threshold value is taken as a high gray adjustment weight, the reciprocal of the defect coefficient of the any suspected defect region is substituted into an exponential function with a natural constant as the base number to obtain an exponential function result, the product of the high gray adjustment weight and the exponential function result is rounded to obtain a high gray adjustment value, the difference between the gray value of the high gray pixel point and the high gray adjustment value is obtained to obtain an optimized gray value of the high gray pixel point. If the gray value of the high gray pixel point is less than the high gray threshold value, the difference between the maximum gray value and the high gray threshold value is taken as a high gray adjustment weight, the product of the high gray adjustment weight and the defect coefficient of the any suspected defect region is rounded to obtain a high gray adjustment value, and the addition result of the gray value of the high gray pixel point and the high gray adjustment value is obtained to obtain an optimized gray value of the high gray pixel point.

[0062] In an embodiment, taking the u-th pixel point in the f-th suspected defect region as an example, if the u-th pixel point is a high gray pixel point, the calculation formula of the optimized gray value of the u-th pixel point is: wherein, is the optimized gray value of the u-th pixel point; is the gray value of the u-th pixel point; G is a high gray threshold value; and D is a low gray threshold value. is a maximum gray value; is a defect coefficient of the f-th suspected defect region; is an exponential function with a natural constant as a base number, used for inverse proportional normalization.

[0063] It should be noted that if , it indicates that the high gray pixel point can be determined as an abnormal pixel point in the threshold segmentation algorithm, but the high gray pixel point can be an interference pixel point (i.e. a high gray pixel point in a reflection region), and therefore needs to be adjusted according to , i.e. the defect coefficient of the f-th suspected defect region, The smaller the defect coefficient is, the more likely the high gray pixel point is a pixel point in the reflection region, belonging to a normal region, and in order not to be determined as a defect region, the defect coefficient needs to be reduced. The smaller the defect coefficient is, The smaller the defect coefficient is, The greater the degree of reduction needs to be, is a high gray adjustment weight, used for constraining the adjustment degree to avoid excessive reduction; if , it indicates that the high gray pixel point cannot be determined as an abnormal pixel point in the threshold segmentation algorithm, and therefore The greater the defect coefficient is, the more likely the high gray pixel point belongs to a defect region, and therefore, in order to enable the high gray pixel point to be determined as a defect region, the defect coefficient needs to be increased. The greater the defect coefficient is, The greater the defect coefficient is, The greater the degree of increase needs to be, is a high gray adjustment weight, used for constraining the adjustment degree to avoid excessive increase.

[0064] (3) According to the difference between the gray value of the low gray pixel point and the low gray threshold value, the low gray pixel point is optimized by using the defect coefficient of any suspected defect region.

[0065] Specifically, if the gray value of the low gray pixel point is less than or equal to the low gray threshold value, half of the difference between the high gray threshold value and the low gray threshold value is obtained as a low gray adjustment weight, the reciprocal of the defect coefficient of the any suspected defect region is substituted into an exponential function with a natural constant as a base number to obtain an exponential function result, the product of the low gray adjustment weight and the exponential function result is rounded to obtain a low gray adjustment value, and the addition result of the gray value of the low gray pixel point and the low gray adjustment value is obtained to obtain the optimized gray value of the low gray pixel point. If the gray value of the low gray pixel point is greater than the low gray threshold value, the product of the low gray threshold value and the defect coefficient of the any suspected defect region is rounded to obtain a low gray adjustment value, and the difference between the gray value of the low gray pixel point and the low gray adjustment value is obtained to obtain the optimized gray value of the low gray pixel point.

[0066] In an embodiment, taking the u-th pixel point in the f-th suspected defect region as an example, if the u-th pixel point is a low gray pixel point, the calculation formula of the optimized gray value of the u-th pixel point is: wherein, is the optimized gray value of the u-th pixel point; is the gray value of the u-th pixel point; G is a high gray threshold value; and D is a low gray threshold value. is the defect coefficient of the f-th suspected defect region. is an exponential function with a natural constant as a base number, used for inverse proportional normalization.

[0067] It should be noted that if , it indicates that the low gray pixel point can be determined as an abnormal pixel point in the threshold segmentation algorithm, but the low gray pixel point can be an interference pixel point (i.e., a low gray pixel point in an oil stain region), and therefore needs to be adjusted according to , i.e., the defect coefficient of the f-th suspected defect region. The smaller the defect coefficient of the f-th suspected defect region is, the more likely the low gray pixel point is a pixel point in the oil stain region, belonging to a normal region, and therefore needs to increase . The smaller the defect coefficient of the f-th suspected defect region is, the more likely the low gray pixel point is a pixel point in the oil stain region, belonging to a normal region, and therefore needs to increase . The smaller the defect coefficient of the f-th suspected defect region is, the more likely the low gray pixel point is a pixel point in the oil stain region, belonging to a normal region, and therefore needs to increase is a low gray adjustment weight, used for restricting the adjustment degree to avoid excessive increase; if , it indicates that the low gray pixel point cannot be determined as an abnormal pixel point in the threshold segmentation algorithm, and therefore The greater the value is, the more likely the low gray pixel point belongs to the defect area, and therefore, in order to enable the low gray pixel point to be determined as the defect area, the degree of reduction needs to be increased , The greater the value is, the more likely the low gray pixel point belongs to the defect area, and therefore, in order to enable the low gray pixel point to be determined as the defect area, the degree of reduction needs to be increased The greater the value is, the more likely the low gray pixel point belongs to the defect area, and therefore, in order to enable the low gray pixel point to be determined as the defect area, the degree of reduction needs to be increased

[0068] Similarly, according to the optimization method of the optimized gray value of the u-th pixel point in the f-th suspected defect area, the gray values of the pixel points of each suspected defect area are optimized to obtain an optimized image.

[0069] After the optimized image is obtained, a threshold segmentation algorithm is used to segment the optimized image, if the spiral machine blade to be detected contains a defect area, the spiral machine blade to be detected is marked as a defective product, if the spiral machine blade to be detected does not contain a defect area, the spiral machine blade to be detected is marked as a good product, thus, a spiral machine blade pressing quality detection result is obtained. The threshold segmentation algorithm belongs to the prior art, and will not be described here.

[0070] In addition, the spiral machine blade to be detected can be classified according to the number and area of the defect area in the spiral machine blade, to assist the staff in batch processing of spiral machine blade defective products of different degrees of defects. The classification according to the number and area of the defect area in the spiral machine blade belongs to the prior art, and will not be described here.

[0071] The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A method for detecting the quality of pressing of a spiral machine blade based on image recognition, characterized in that, The image recognition-based spiral machine blade pressing quality detection method comprises: An image of a spiral machine blade to be detected under at least two illumination conditions is acquired, each image is subjected to grayscale processing, and a target image and a preset number of reference images are obtained; According to the grayscale distribution characteristics and the texture characteristics of the pixel points in the target image, it is determined whether there are suspected abnormal pixel points in the target image. If there are at least one suspected abnormal pixel point in the target image, the grayscale distribution characteristics and the texture characteristics of each suspected abnormal pixel point in the target image are used to acquire at least one suspected defect region in the target image; For any suspected defect region, a reference region with the same position as the suspected defect region is acquired in each reference image. According to the grayscale variation characteristics and the gradient values of the pixel points in the suspected defect region and the grayscale distribution characteristics of the pixel points in each reference region, a defect coefficient of the suspected defect region is acquired. The defect coefficients of each suspected defect region in the target image are acquired. The grayscale values of the pixel points in each suspected defect region are optimized according to the defect coefficients of each suspected defect region to obtain an optimized image. The optimized image is segmented by using a threshold segmentation algorithm to obtain a spiral machine blade pressing quality detection result of the spiral machine blade to be detected.

2. The image recognition-based spiral machine blade pressing quality detection method according to claim 1, characterized in that, According to the grayscale distribution characteristics and the texture characteristics of the pixel points in the target image, it is determined whether there are suspected abnormal pixel points in the target image. If there are at least one suspected abnormal pixel point in the target image, the grayscale distribution characteristics and the texture characteristics of the pixel points in the target image are used to acquire at least one suspected defect region in the target image; According to the grayscale distribution characteristics and the texture characteristics of the pixel points in the target image, the abnormality degree of each pixel point in the target image is acquired. If the abnormality degree of any pixel point is greater than or equal to a preset abnormality degree threshold, the any pixel point is confirmed as a suspected abnormal pixel point. If the number of suspected abnormal pixel points in the target image is greater than or equal to 1, it is confirmed that there are suspected abnormal pixel points in the target image.

3. The image recognition-based spiral machine blade pressing quality detection method according to claim 2, characterized in that, According to the grayscale distribution characteristics and the texture characteristics of the pixel points in the target image, the abnormality degree of each pixel point in the target image is acquired. For any pixel point in the target image, a window of a preset size is established in the target image with the any pixel point as the center. A structure tensor matrix corresponding to the window is acquired. Two eigenvalues of the structure tensor matrix are acquired, which are denoted as a first eigenvalue and a second eigenvalue. The difference between the first eigenvalue and the second eigenvalue is acquired to obtain an eigenvalue difference. An addition result of the second eigenvalue and a preset constant is acquired to obtain a first addition result. A ratio of the eigenvalue difference and the first addition result is acquired to obtain a first feature index. An addition result of the first eigenvalue and the second eigenvalue is acquired to obtain an eigenvalue total value. An addition result of an absolute value of the eigenvalue difference and a preset constant is acquired to obtain a second addition result. A ratio of the eigenvalue total value and the second addition result is acquired to obtain a second feature index. obtaining a sum of the first feature index and the second feature index to obtain a feature index of the any pixel point, and obtaining a difference between a maximum gray value and a minimum gray value in the window to obtain a local gray level variation degree of the any pixel point; normalizing a product of the feature index and the local gray level variation degree of the any pixel point to obtain an abnormality degree of the any pixel point.

4. The image recognition based spiral machine blade pressing quality detection method according to claim 2, characterized in that, The method comprises the following steps: taking a lower left corner of the target image as an origin, a horizontal direction as a horizontal coordinate, and a vertical direction as a vertical coordinate to construct a two-dimensional rectangular coordinate system, taking a coordinate of each suspected abnormal pixel point and the abnormality degree as a feature vector, and performing clustering processing on the suspected abnormal pixel points in the target image according to the feature vector of each suspected abnormal pixel point to obtain at least one cluster, and obtaining a suspected defect region corresponding to each cluster according to the pixel points corresponding to each cluster.

5. The image recognition based spiral machine blade pressing quality detection method according to claim 1, characterized in that, The method comprises the following steps: obtaining a first defect coefficient of the any suspected defect region according to the gray level variation feature and the gradient value of the pixel points in the any suspected defect region; obtaining a second defect coefficient of the any suspected defect region according to the gray level variation feature of the pixel points in the any suspected defect region and the gray level distribution feature of the pixel points in each reference region; obtaining a mean value of the first defect coefficient and the second defect coefficient, denoted as a defect coefficient mean value, substituting an inverse of the defect coefficient mean value into an exponential function with a natural constant as a base to obtain a normality degree of the any suspected defect region, and obtaining a difference between a constant 1 and the normality degree to obtain a defect coefficient of the any suspected defect region.

6. The image recognition-based spiral machine blade pressing quality detection method according to claim 5, characterized in that, The method comprises the following steps: obtaining a circumscribed rectangle of the any suspected defect region, calculating an aspect ratio of the circumscribed rectangle, and obtaining a standard deviation of gray values of all pixel points in the any suspected defect region; obtaining an edge pixel point of the any suspected defect region, taking the any edge pixel point as a center, establishing a target window with a preset length in a gradient direction of the any edge pixel point in the any suspected defect region, and grouping pixel points before the any edge pixel point into a first sub-window and grouping pixel points after the any edge pixel point into a second sub-window in the target window; obtaining a mean value of gray values of the pixel points in the first sub-window, denoted as a first gray mean value, and accumulating absolute values of differences between the gray values of each pixel point in the first sub-window and the first gray mean value to obtain a first gray difference index; obtaining a mean value of the gray scale values of the pixels in the second sub-window, denoted as a second gray scale mean value, and accumulating the absolute values of the differences between the gray scale values of each pixel in the second sub-window and the second gray scale mean value to obtain a second gray scale difference index; obtaining an inverse of the sum of the first gray scale difference index and the second gray scale difference index to obtain the overall consistency index of the any edge pixel point; obtaining the overall consistency index of each edge pixel point in the any suspected defect region, and correspondingly obtaining a mean value of the overall consistency indexes, obtaining a mean value of the gradient values of the edge pixel points in the any suspected defect region, and calculating the sum of the mean value of the overall consistency indexes and the mean value of the gradient values to obtain an abnormal value of the any suspected defect region; obtaining the product of the inverse of the standard deviation, the length-width ratio and the abnormal value to obtain a first defect coefficient of the any suspected defect region.

7. The image recognition based spiral machine blade pressing quality detection method according to claim 5, characterized in that, The second defect coefficient of the any suspected defect region is obtained according to the gray scale variation characteristics of the pixels in the any suspected defect region and the gray scale distribution characteristics of the pixels in each reference region, and includes: obtaining a center point of the any suspected defect region, and grouping the pixels in eight neighborhood directions of the center point into neighborhood windows in the any suspected defect region, one neighborhood direction corresponding to one neighborhood window; for any neighborhood window, fitting the gray scale values of the pixels in the any neighborhood window to obtain a fitting function, obtaining the predicted values of the gray scale values of each pixel in the any neighborhood window by using the fitting function, and accumulating the absolute values of the differences between the gray scale values of each pixel in the any neighborhood window and the predicted values thereof to obtain a gray scale difference characteristic value of the any neighborhood window; obtaining the gray scale difference characteristic value of each neighborhood window, correspondingly obtaining a mean value of the gray scale difference characteristic values, obtaining the gradient direction entropy of the pixels in each neighborhood window, correspondingly obtaining a mean value of the gradient direction entropies, and calculating the sum of the mean value of the gray scale difference characteristic values and the mean value of the gradient direction entropies to obtain a first abnormal characteristic value of the any suspected defect region; obtaining a mean value of the gray scale values of the any suspected defect region, obtaining a mean value of the gray scale values of each reference region, accumulating the absolute values of the differences between the mean value of the gray scale values of the any suspected defect region and the mean value of the gray scale values of each reference region to obtain a total value of the region gray scale difference, and obtaining an inverse of the total value of the region gray scale difference to obtain a second abnormal characteristic value of the any suspected defect region; obtaining the second defect coefficient of the any suspected defect region according to the product of the first abnormal characteristic value and the second abnormal characteristic value.

8. The image recognition based spiral machine blade pressing quality detection method according to claim 1, characterized in that, The gray scale values of the pixels of each suspected defect region are optimized according to the defect coefficients of each suspected defect region, and include: obtaining a maximum gray scale value of the pixels in the target image, taking one-half of the maximum gray scale value as a gray scale division threshold, and setting a high gray scale threshold and a low gray scale threshold; The method comprises the following steps: establishing a preset size gray window with any pixel point in any suspected defect region in the target image as the center, obtaining the average gray value of the pixel points in the gray window, and confirming the any pixel point as a high gray pixel point if the average gray value of the pixel points in the gray window is greater than or equal to the gray threshold value; According to the difference between the gray value of the high gray pixel point and the high gray threshold value, the defect coefficient of the any suspected defect region is used to optimize the high gray pixel point; If the average gray value of the pixel points in the gray window is less than the gray threshold value, the any pixel point is confirmed as a low gray pixel point; According to the difference between the gray value of the low gray pixel point and the low gray threshold value, the defect coefficient of the any suspected defect region is used to optimize the low gray pixel point.

9. The image recognition based spiral machine blade pressing quality detection method according to claim 8, characterized in that, The method comprises the following steps: If the gray value of the high gray pixel point is greater than or equal to the high gray threshold value, half of the difference between the high gray threshold value and the low gray threshold value is obtained as a high gray adjustment weight, the opposite number of the defect coefficient of the any suspected defect region is substituted into an exponential function with a natural constant as the base number to obtain an exponential function result, the product of the high gray adjustment weight and the exponential function result is rounded to obtain a high gray adjustment value, the difference between the gray value of the high gray pixel point and the high gray adjustment value is obtained to obtain the optimized gray value of the high gray pixel point; If the gray value of the high gray pixel point is less than the high gray threshold value, the difference between the maximum gray value and the high gray threshold value is obtained as a high gray adjustment weight, the product of the high gray adjustment weight and the defect coefficient of the any suspected defect region is rounded to obtain a high gray adjustment value, and the addition result of the gray value of the high gray pixel point and the high gray adjustment value is obtained to obtain the optimized gray value of the high gray pixel point.

10. The image recognition based spiral machine blade pressing quality detection method according to claim 8, characterized in that, The method comprises the following steps: If the gray value of the low gray pixel point is less than or equal to the low gray threshold value, half of the difference between the high gray threshold value and the low gray threshold value is obtained as a low gray adjustment weight, the opposite number of the defect coefficient of the any suspected defect region is substituted into an exponential function with a natural constant as the base number to obtain an exponential function result, the product of the low gray adjustment weight and the exponential function result is rounded to obtain a low gray adjustment value, and the addition result of the gray value of the low gray pixel point and the low gray adjustment value is obtained to obtain the optimized gray value of the low gray pixel point. If the gray value of the low gray pixel point is greater than the low gray threshold value, rounding the product of the low gray threshold value and the defect coefficient of any suspected defect region to obtain a low gray adjustment value, obtaining the difference between the gray value of the low gray pixel point and the low gray adjustment value to obtain the optimized gray value of the low gray pixel point.

Citation Information

Patent Citations

  • Metal surface defect detection method

    CN115082482A

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

    CN117237396A

  • Visual inspection system for defects of turbine guide blade of aero-engine

    CN117830298A

  • Optical fiber surface coating quality visual detection method

    CN117974646A

  • Boiler coke accumulation detection system based on unmanned aerial vehicle inspection

    CN120526097A

Cited By

  • Material defect detection method for keyboard and keycap production

    CN121033031A

  • A keyboard and a keycap production material defect detection method

    CN121033031B