Turbine blade surface crystal grain detection method and system

By using automated image processing methods, the problem of low efficiency and accuracy in grain detection on turbine blade surfaces has been solved, achieving efficient and accurate grain detection and providing a digital quality traceability system.

CN121582601APending Publication Date: 2026-02-27GUIYANG AVIC POWER PRECISION CASTING
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511758007.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing technologies for detecting grains on turbine blade surfaces are inefficient and inaccurate, and rely on subjective human judgment, resulting in inaccurate test results and the inability to establish a digital quality traceability system.

Method used

An automated image processing method is used to acquire blade images, generate grayscale images, extract the foreground portion, perform edge detection and feature extraction, and combine pixel value line chart analysis to calculate the number of grains and grain boundary deviation angles, thereby enabling grain type identification.

Benefits of technology

It achieves fully automated testing, significantly improves testing efficiency, accurately identifies the number of grains and grain boundary deviation angles, avoids errors and misjudgments in manual testing, and provides accurate grain type identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121582601A_ABST
    Figure CN121582601A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of turbine blades, and discloses a turbine blade surface grain detection method and system, and the method comprises the following steps: collecting an original image of a to-be-detected blade, generating a grayscale image according to the original image, and extracting a foreground part of the grayscale image; extracting edge features of the foreground part and forming an edge image, and fusing the edge image and the original image to generate a target edge image; drawing a pixel value broken line graph of the corresponding relationship between the pixel value of the target edge image and the real position of the leaf; analyzing according to the pixel value broken line graph, and judging whether the number of crystal boundaries meets a set requirement or not according to the number of crystal grains; performing fitting analysis on the grain boundary growth direction axis in the target edge image, and judging whether the type of the grain meets the set requirement or not according to the type of the grain; and determining whether the growth angle of the to-be-measured blade crystal grain meets a set requirement or not. The problems of low detection efficiency, low detection accuracy and the like in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of turbine blade, and particularly relates to a turbine blade surface grain detection method and system. BACKGROUND

[0002] The turbine blade (hereinafter referred to as "blade") of an aero-engine is a bright pearl on the industrial crown, and the surface grain quality is a key index affecting the overall mechanical strength and surface service performance of the blade. Specifically, the accurate control of the directional grain degree and the improvement of the surface grain quality directly determine the creep resistance and service life of the blade.

[0003] At present, the detection of the surface grain quality of the blade still generally adopts the traditional manual visual detection method, and the above traditional detection technical scheme has many significant defects: on the one hand, the manual detection mainly relies on the naked eye observation and subjective rating, and the efficiency is extremely low; on the other hand, the detection result is greatly affected by the subjective factors of the operator, so that the detection accuracy is doubtful, and a digital quality traceability system cannot be established. In addition, long-term high-intensity detection work will also seriously affect the vision of the detection personnel. SUMMARY

[0004] In order to overcome the defects of the prior art, the present application provides a turbine blade surface grain detection method and system, which solves the problems of low detection efficiency and low detection accuracy in the prior art.

[0005] The technical scheme for solving the above technical problems is as follows: A turbine blade surface grain detection method, comprising the following steps: Collecting an original image of a blade to be detected, generating a gray-scale image according to the original image, and extracting a foreground part of the gray-scale image; Performing edge detection on the foreground part of the gray-scale image, extracting edge features of the foreground part to form an edge image, and fusing the edge image and the original image to generate a target edge image; Selecting a real area of the blade to be detected, taking the real area as a template image, extracting a feature area of the target edge image, performing positioning matching on the real area and the feature area of the target edge image, and drawing a pixel value broken line graph of the corresponding relationship between the pixel value of the target edge image and the real position of the blade; According to the pixel value broken line graph, the number of grains is calculated, and whether the number of grain boundaries meets the set requirement is judged according to the number of grains; Performing fitting analysis on the grain boundary growth direction axis in the target edge image to determine the shape and growth trend of the grain boundary of the blade to be detected, so as to judge whether the type of the grain meets the set requirement; and calculating the deviation angle between the grain boundary growth direction axis and the main axis to determine whether the growth angle of the grain of the blade to be detected meets the set requirement.

[0006] The beneficial effects of the present application are: In terms of detection efficiency, the present application realizes full-automatic detection without the need for manual subjective judgment, thereby greatly shortening the detection period and significantly improving the detection efficiency; in terms of detection accuracy, the present application can accurately identify the number of crystal grains on a specific interface, effectively avoiding errors and ambiguities caused by naked-eye observation and subjective judgment in manual detection; at the same time, it can also accurately detect the angle of grain boundary deviation, avoid angle misjudgment caused by the inability to identify the spindle direction by naked eye in manual detection by accurately calculating the spindle direction; in addition, it can accurately identify the type of crystal grain, effectively avoiding misjudgment caused by similar appearance of different crystal grain types in manual detection.

[0007] On the basis of the above technical solution, the present application can also be improved as follows.

[0008] As a preferred technical solution, the edge of the foreground part of the gray-scale image is detected, the edge features of the foreground part are extracted and an edge image is formed, the edge image and the original image are fused to generate a target edge image, which includes the following steps: The edge of the foreground part is detected to identify the edge information in the gray-scale image; An edge image of black color matching the size of the edge information in the gray-scale image is constructed, and the edge pixel position is marked as red; The edge image and the original image are fused to control the color of the fused image to enhance the contrast of the grain edge; The edge of the fused image is enhanced and smoothed.

[0009] The beneficial effects of the preferred technical solution described above are: Directly using the image foreground for subsequent operations can maximize the retention of grain accuracy and ensure that small grain edges are also extracted; setting a red marker can visually display the detected edge and give a highlight display of the edge, which not only enhances the visual effect of the edge but also provides convenience for subsequent image processing; significantly improves the contrast around the grain, making the grain edge clearer and enabling more accurate control of image color; effectively balances noise suppression and weak edge detection capability to ensure the accuracy and reliability of the detection result; at the same time, the edge is enhanced and smoothed, further optimizing the edge quality and making the final processing result more perfect.

[0010] As a preferred technical solution, the color of the fused image is controlled to enhance the contrast of the grain edge, which includes the following steps: The color of the fused image is controlled to enhance the contrast of the grain edge by a contrast enhancement model; wherein the expression of the contrast enhancement model is: ; wherein, represents row number, represents column number, represents maximum value operation, represents multiplication operation, represents binary edge mask, represents original image red channel value, represents original image green channel value, represents original image blue channel value, represents fused image red channel value, represents fused image green channel value, represents fused image blue channel value.

[0011] The beneficial effects of the preferred technical solution are: It is convenient to enhance the grain edge contrast and obtain a clear grain edge image.

[0012] As a preferred technical solution, the edge of the fused image is enhanced and smoothed, including the following steps: The edge of the fused image is enhanced and smoothed by using a double threshold setting method; wherein the expression of the double threshold setting method is: ; wherein, represents the edge of the fused image after enhancement and smoothing, represents the threshold smoothing operator of the second stage, represents the threshold smoothing operator of the first stage, represents the edge of the fused image, represents the edge after the first stage smoothing, represents the edge image after double threshold smoothing, represents pixel-level fusion operation, represents edge enhancement operator, represents edge enhancement threshold, represents edge enhancement operator based on threshold .

[0013] The beneficial effects of the preferred technical solution are: It is convenient to enhance and smooth the edge of the fused image, suppress noise, and obtain a target edge image with optimized edge quality.

[0014] As a preferred technical solution, the edge of the fused image is enhanced and smoothed, including the following steps: The red channel, the green channel and the blue channel of the image are extracted and stored in variables redChannel, greenChannel and blueChannel respectively, so as to separate the color channels; A binary image redEdges is generated by setting a color threshold and using a logical operator, wherein the pixel points of the red edge of redEdges are marked as 1, and the rest of the pixel points are 0, so as to detect the red edge; then, the bwlabel function is used to identify the connected regions of all red edges, and the regionprops function is used to count the bounding box BoundingBox and the centroid Centroid of each red region; the leftmost and rightmost red lines in the middle region of the image are determined based on the bounding box BoundingBox and the centroid Centroid, so as to analyze the red edge; The target edge image is converted into a gray image, and the imbinarize function is used for binaryzation processing, and the binaryzation processing result is stored in the variable bwImg; For each row, the position of the red point is first determined, and then the effective region between the red points is found out, in the effective region, the bwlabel function is used to identify the connected black regions, and the midpoint of each region is calculated; wherein, if the midpoint position is not a red line, the midpoint position is marked as green to distinguish the midpoint and the red line; The rgb2hsv function is used to convert the image from the RGB color space to the HSV color space and store it in the variable img_hsv; then, the threshold range of red is defined, and a red mask red_mask is created to identify the position of the red region in the image; The Canny algorithm is used for edge detection on the red mask, then the Hough transform is used to detect the straight lines in the image, the hough function is used to calculate the Hough transform matrix, the houghpeaks function is used to detect the peak value, and the houghlines function is used to extract the straight lines according to the peak value; The end point coordinates of the straight lines are adjusted; then, a polygon mask mask is created using the coordinate points of the straight lines to identify the position of the blue region; An inversion operation is performed on each color channel of the pixels in the blue region, so that the black pixels in the mask region become white, and the non-black pixels become black; The leftmost and rightmost straight lines are marked with blue on the image after the inversion operation, and the marked image is displayed.

[0015] The beneficial effects of the above preferred technical solutions are: It is convenient to extract and analyze the red features from the target edge image, and finally highlight the specific region; it is helpful to connect the disconnected red regions and remove noise.

[0016] As a preferred technical solution, the real area of the selected blade to be tested is taken as a template image, a feature area of the target edge image is extracted, the real area and the feature area of the target edge image are positioned and matched, and a pixel value broken line graph of the corresponding relationship between the pixel value of the target edge image and the real position of the blade is drawn, including the following steps: The region of the target edge image having a set structure feature is extracted as a feature area by using the ssim function, so as to realize the first positioning between the target edge image and the real area of the blade to be tested; Based on the difference in gray value between the bottom of the blade to be tested and the background, the corresponding relationship between the pixel size of the target edge image and the real position of the blade is established, so as to realize the second positioning between the target edge image and the real area of the blade to be tested; The pixel value of the target edge image is counted to obtain the number of grains in the set region, and a pixel value broken line graph is drawn, and the pixel value broken line graph is denoised.

[0017] The beneficial effects of the above preferred technical solution are: It is convenient to realize feature extraction and accurate positioning according to the characteristics of the blade itself, and further to count and analyze the grains and other features, calculate the corresponding relationship between the real size and the photo size, and conveniently find the accurate interface of the features, and obtain the number of grains on the specific interface by counting the wave crest and wave trough in the pixel value broken line graph in the horizontal direction and the value with a slope of zero.

[0018] As a preferred technical solution, the denoising processing of the pixel value broken line graph includes the following steps: The pixel value broken line graph is denoised by using an adaptive double-threshold smoothing algorithm; and the expression of the adaptive double-threshold smoothing algorithm is: ; Among them, represents the pixel value number, represents a dynamic threshold value, represents the i-th pixel value of the original data sequence, represents the i+1-th pixel value of the original data sequence, represents a segment start index, represents a segment end index, represents a first dynamic threshold value, represents a second dynamic threshold value, represents a universal quantifier, represents the i-th pixel value of the data sequence after denoising processing, represents an iteration operation.

[0019] The beneficial effects of the above preferred technical solution are: It facilitates data processing in a progressive and smooth manner, preserving the main structural features of the image while avoiding excessive blurring. It also ensures the adaptability of multi-channel data, making the processed data more stable and reliable, and providing a better data foundation for subsequent feature analysis.

[0020] As a preferred technical solution, by statistically analyzing the number of continuous regions with a slope of zero and the number of abrupt changes in slope sign in the pixel value line graph, the slope of the number of abrupt changes in slope sign is calculated using the first-order difference, and then the points with a slope of zero are detected and the inflection points are located. Determine the pixel positions in a specified region of the blade image, calculate the pixel coordinates, and then calculate the number of grains based on the pixel coordinates. The expression for calculating the number of grains is as follows: ; in, This represents the number of continuous regions with a slope of zero. Indicates the number of abrupt changes in the slope sign. Indicates the number of grains.

[0021] The beneficial effects of adopting the above-mentioned preferred technical solution are: By placing all connected regions with the same grayscale value against their respective black backgrounds to form independent image regions, and statistically analyzing the length and width of each connected region, it is possible to determine whether the grain meets the process requirements. This completes the morphological analysis of the grains and enables grain classification, providing important basis for subsequent process optimization, quality control, and other applications. In other words, it realizes a complete process from image feature extraction and localization to grain statistics and analysis, providing an effective solution for related research and applications in the field of image processing and analysis.

[0022] As a preferred technical solution, the process of acquiring the original image of the blade to be tested, generating a grayscale image based on the original image, and extracting the foreground portion of the grayscale image includes the following steps: The grayscale image is binarized using the adaptthresh function to obtain the original binary image; Calculate the number of rows and columns of the original binarized image, extract the upper and lower parts of the original binarized image, set an upper binarization threshold for the upper part and a lower binarization threshold for the lower part; use the im2bw function to binarize the upper and lower binarization thresholds respectively, and merge the binarized upper and lower binarization thresholds to form a complete intermediate binarized image; The bwareaopen function is used to perform morphological opening operations to remove connected regions with an area smaller than a set pixel value threshold from the complete intermediate binarized image to obtain the target binarized image; The gray-scale image is multiplied with the target binary image element by element to extract the foreground part of the gray-scale image.

[0023] The beneficial effects of the preferred technical solutions are as follows: The small bright objects in the image (small bright spots after reflection of metal particles, treated as noise points) can be removed, so that a preliminary and relatively clean binary image is obtained, a complete binary image is formed, the image is further purified, the accuracy of foreground and background separation is improved, and effective separation of the blade foreground and background is realized, thereby providing clear and accurate foreground information for subsequent image processing and analysis.

[0024] On the basis of the above technical solutions, the application further provides a turbine blade surface grain detection system.

[0025] A turbine blade surface grain detection system is used to realize the turbine blade surface grain detection method, and comprises the following modules connected in sequence: The acquisition and extraction module is used to acquire the original image of the blade to be detected, generate a gray-scale image according to the original image, and extract the foreground part of the gray-scale image. The image generation module is used to perform edge detection on the foreground part of the gray-scale image, extract the edge features of the foreground part to form an edge image, and fuse the edge image and the original image to generate a target edge image. The positioning module is used to select a real area of the blade to be detected, take the real area as a template image, extract a feature area of the target edge image, perform positioning matching on the real area and the feature area of the target edge image, and draw a pixel value broken line graph of the corresponding relationship between the pixel value of the target edge image and the real position of the blade. The number extraction module is used to analyze the pixel value broken line graph, calculate the number of grains, and determine whether the number of grain boundaries meets the set requirement according to the number of grains. The analysis and judgment module is used to perform fitting analysis on the grain boundary growth direction axis in the target edge image, determine the shape and growth trend of the grain boundary of the blade to be detected to judge the type of the grain, determine whether the type of the grain meets the set requirement according to the type of the grain, calculate the deviation angle between the grain boundary growth direction axis and the main axis, and determine whether the growth angle of the grain of the blade to be detected meets the set requirement.

[0026] Compared with the prior art, the application has the following beneficial effects: (1) In terms of detection efficiency, the application realizes full-automatic detection without the need for manual subjective judgment, thereby greatly shortening the detection period and significantly improving the detection efficiency. (2) In terms of detection accuracy, the present invention can accurately identify the number of grains on a specific interface, effectively avoiding the errors and ambiguities caused by visual observation and subjective judgment in manual detection; at the same time, it can also accurately detect the grain boundary deviation angle, and avoid the angle misjudgment caused by the inability to visually identify the main axis direction in manual detection by accurately calculating the main axis direction; in addition, it can accurately identify the grain type, effectively avoiding the misjudgment caused by the similar appearance of different grain types in manual detection. Attached Figure Description

[0027] Figure 1 This is a schematic diagram illustrating the steps of a method for detecting grains on the surface of a turbine blade according to the present invention; Figure 2 A line chart of the original pixel values; Figure 3 A line graph showing the pixel values ​​after noise reduction. Figure 4 This is a schematic diagram of the grain growth direction; Figure 5 A flowchart for determining whether turbine blades are qualified. Detailed Implementation

[0028] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.

[0029] The principles and features of the present invention are described below. The embodiments given are only for explaining the present invention and are not intended to limit the scope of the present invention.

[0030] Example 1 like Figures 1 to 5 As shown, a method for detecting grain size on the surface of a turbine blade includes the following steps: Acquire the original image of the leaf to be tested, generate a grayscale image based on the original image, and extract the foreground part of the grayscale image; Edge detection is performed on the foreground portion of the grayscale image, edge features of the foreground portion are extracted and an edge image is constructed, and the edge image and the original image are fused to generate the target edge image; Select the real area of ​​the blade to be tested, use the real area as a template image, extract the feature area of ​​the target edge image, perform localization matching between the feature areas of the real area and the target edge image, and draw a pixel value line graph showing the correspondence between the pixel values ​​of the target edge image and the real position of the blade. The number of grains is calculated by analyzing the pixel value line graph, and the number of grain boundaries is then used to determine whether the number of grain boundaries meets the set requirements. Fitting analysis is performed on the grain boundary growth direction axis in the target edge image to determine the shape and growth trend of the to-be-tested blade grain boundary to judge the type of the grain, and according to the type of the grain, it is judged whether the grain type meets the set requirement; and the deviation angle of the grain boundary growth direction axis and the main axis is calculated to determine whether the growth angle of the to-be-tested blade grain meets the set requirement.

[0031] The beneficial effects of the present application are: In terms of detection efficiency, the present application realizes full-automatic detection without the need for manual subjective judgment, thereby greatly shortening the detection period and significantly improving the detection efficiency; in terms of detection accuracy, the present application can accurately identify the number of grains on a specific interface, effectively avoiding errors and ambiguity caused by naked eye observation and subjective judgment in manual detection; at the same time, it can also accurately detect the grain boundary deviation angle, avoid angle misjudgment caused by the inability to identify the main axis direction by naked eye in manual detection by accurately calculating the main axis direction; in addition, it can also accurately identify the grain type, effectively avoiding misjudgment caused by similar appearance of different grain types in manual detection.

[0032] On the basis of the above technical solution, the present application can also be improved as follows.

[0033] As a preferred technical solution, the edge of the foreground part of the gray-scale image is detected, the edge features of the foreground part are extracted and an edge image is formed, the edge image and the original image are fused to generate a target edge image, which includes the following steps: The edge of the foreground part is detected to identify the edge information in the gray-scale image; An edge image of black color matching the size of the edge information in the gray-scale image is constructed, and the edge pixel position is marked as red; The edge image and the original image are fused to control the color of the fused image to enhance the grain edge contrast; The edge of the fused image is enhanced and smoothed.

[0034] The beneficial effects of the above preferred technical solution are: Directly using the image foreground for subsequent operations can maximize the retention of grain accuracy and ensure that the edges of small grains are also extracted; setting the red marker can visually display the detected edges and give high-light display to the edges, which not only enhances the visual effect of the edges, but also provides convenience for subsequent image processing; significantly improves the contrast around the grains, making the grain edges clearer, and can more accurately control the image color; effectively balances the noise suppression and weak edge detection capability, ensuring the accuracy and reliability of the detection result; at the same time, the edges are enhanced and smoothed, further optimizing the edge quality and making the final processing result more perfect.

[0035] As a preferred technical solution, the color of the fused image is controlled to enhance the grain edge contrast, comprising the following steps: The color of the fused image is controlled to enhance the grain edge contrast by a contrast enhancement model; wherein the expression of the contrast enhancement model is: ; Wherein, represents the row number, represents the column number, represents the maximum value operation, represents the multiplication operation, represents the binary edge mask, represents the original image red channel value, represents the original image green channel value, represents the original image blue channel value, represents the fused image red channel value, represents the fused image green channel value, represents the fused image blue channel value.

[0036] The beneficial effects of the above preferred technical solution are: It is convenient to enhance the grain edge contrast and obtain a clear image of the grain edge.

[0037] As a preferred technical solution, the edge of the fused image is enhanced and smoothed, comprising the following steps: The edge of the fused image is enhanced and smoothed by a double threshold setting method; wherein the expression of the double threshold setting method is: ; Wherein, represents the enhanced and smoothed edge of the fused image, represents the second stage threshold smoothing operator, represents the first stage threshold smoothing operator, represents the edge of the fused image, represents the edge smoothed by the first stage, represents the edge image smoothed by the double threshold, represents the pixel-level fusion operation, represents the edge enhancement operator, represents the edge enhancement threshold, represents the edge enhancement operator based on the threshold .

[0038] The beneficial effects of the above preferred technical solution are: The edges of the fused image are enhanced and smoothed, noise is suppressed, and an edge quality optimized target edge image is obtained.

[0039] As a preferred technical solution, the enhancement and smoothing of the edges of the fused image comprises the following steps: The red, green and blue channels of the image are extracted and stored in variables redChannel, greenChannel and blueChannel, respectively, to separate the color channels; A binary image redEdges is generated by setting a color threshold and using a logical operator, wherein the red edge pixel points of redEdges are marked as 1, and the remaining pixel points are 0, to realize red edge detection; then, the bwlabel function is used to identify all connected regions of the red edge, and the regionprops function is used to count the bounding box BoundingBox and centroid Centroid of each red region; the positions of the leftmost and rightmost red lines in the middle region of the image are determined based on the bounding box BoundingBox and the centroid Centroid, to realize red edge analysis; The target edge image is converted into a grayscale image, and the imbinarize function is used for binaryzation processing, and the binaryzation processing result is stored in the variable bwImg; For each row, first determine the position of the red point, then find the effective region between the red points, and in the effective region, use the bwlabel function to identify the connected black regions and calculate the midpoint of each region; wherein if the midpoint position is not a red line, the midpoint position is marked as green to distinguish the midpoint from the red line; The image is converted from RGB color space to HSV color space by the rgb2hsv function and stored in the variable img_hsv; then, the threshold range of red is defined, and a red mask red_mask is created to identify the position of the red region in the image; The Canny algorithm is used for edge detection on the red mask, then the Hough transform is used to detect straight lines in the image, the hough function is used to calculate the Hough transform matrix, the houghpeaks function is used to detect the peak value, and the houghlines function is used to extract straight lines according to the peak value; The end point coordinates of the straight lines are adjusted; then, a polygon mask mask is created using the coordinates of the straight lines to identify the position of the blue region; Each color channel of the pixels in the blue region is inverted, the black pixels in the mask region are changed to white, and the non-black pixels are changed to black; The leftmost and rightmost straight lines are marked with blue on the image after the inversion operation, and the marked image is displayed.

[0040] The beneficial effects of the above preferred technical solutions are: It is convenient to extract and analyze the red features from the target edge image, and finally highlight the specific area; it is helpful to connect the disconnected red area and remove the noise.

[0041] As a preferred technical solution, the real area of the selected to-be-measured blade is selected as a template image, the feature area of the target edge image is extracted, the real area and the feature area of the target edge image are positioned and matched, and a pixel value broken line graph of the corresponding relationship between the pixel value of the target edge image and the real position of the blade is drawn, including the following steps: The region with a set structure feature of the target edge image is extracted as a feature region by using the ssim function, so as to realize the first positioning between the target edge image and the real area of the to-be-measured blade; Based on the difference in gray value between the bottom of the to-be-measured blade and the background, the corresponding relationship between the pixel size of the target edge image and the real position of the blade is established, so as to realize the second positioning between the target edge image and the real area of the to-be-measured blade; The pixel value of the target edge image is counted to obtain the grain number in the set region, and a pixel value broken line graph is drawn, and the pixel value broken line graph is denoised.

[0042] The beneficial effects of the above preferred technical solutions are: It is convenient to realize feature extraction and accurate positioning according to the characteristics of the blade itself, and further to count and analyze the grains and other features, calculate the corresponding relationship between the real size and the photo size, and facilitate the accurate search for the feature interface, and obtain the grain number on the specific interface by counting the wave crest and wave trough in the pixel value broken line graph in the horizontal direction and the value with a slope of zero.

[0043] As a preferred technical solution, the denoising processing of the pixel value broken line graph includes the following steps: The pixel value broken line graph is denoised by using an adaptive double-threshold smoothing algorithm; the expression of the adaptive double-threshold smoothing algorithm is: ; Wherein, represents the pixel value number, represents a dynamic threshold value, represents the i-th pixel value of the original data sequence, represents the i+1-th pixel value of the original data sequence, represents a segment start index, represents a segment end index, represents a first dynamic threshold value, represents a second dynamic threshold value, Universal classifiers This represents the value of the i-th pixel in the denoised data sequence. This indicates an iterative operation.

[0044] The beneficial effects of adopting the above-mentioned preferred technical solution are: It facilitates data processing in a progressive and smooth manner, preserving the main structural features of the image while avoiding excessive blurring. It also ensures the adaptability of multi-channel data, making the processed data more stable and reliable, and providing a better data foundation for subsequent feature analysis.

[0045] As a preferred technical solution, by statistically analyzing the number of continuous regions with a slope of zero and the number of abrupt changes in slope sign in the pixel value line graph, the slope of the number of abrupt changes in slope sign is calculated using the first-order difference, and then the points with a slope of zero are detected and the inflection points are located. Determine the pixel positions in a specified region of the blade image, calculate the pixel coordinates, and then calculate the number of grains based on the pixel coordinates. The expression for calculating the number of grains is as follows: ; in, This represents the number of continuous regions with a slope of zero. Indicates the number of abrupt changes in the slope sign. Indicates the number of grains.

[0046] The beneficial effects of adopting the above-mentioned preferred technical solution are: By placing all connected regions with the same grayscale value against their respective black backgrounds to form independent image regions, and statistically analyzing the length and width of each connected region, it is possible to determine whether the grain meets the process requirements. This completes the morphological analysis of the grains and enables grain classification, providing important data for subsequent process optimization and quality control. In other words, it realizes a complete process from image feature extraction and localization to grain statistics and analysis, providing an effective solution for related research and applications in the field of image processing and analysis.

[0047] As a preferred technical solution, the process of acquiring the original image of the blade to be tested, generating a grayscale image based on the original image, and extracting the foreground portion of the grayscale image includes the following steps: The grayscale image is binarized using the adaptthresh function to obtain the original binary image; The number of rows and the number of columns of the original binary image are calculated, the upper part and the lower part of the original binary image are extracted, the upper binary threshold is set for the upper part, and the lower binary threshold is set for the lower part; the im2bw function is used to perform binary processing on the upper binary threshold and the lower binary threshold respectively, and the upper binary threshold and the lower binary threshold after the binary processing are merged to form a complete intermediate binary image; The bwareaopen function is used to perform a morphological opening operation to remove connected regions with an area less than a set pixel value threshold in the complete intermediate binary image to obtain a target binary image; The gray image and the target binary image are multiplied element by element to extract the foreground part of the gray image.

[0048] The beneficial effects of the above preferred technical solutions are: It is convenient to remove small bright objects in the image to obtain a preliminary and relatively clean binary image, to form a complete binary image, to further purify the image, to improve the accuracy of foreground and background separation, and to effectively separate the blade foreground and the background to provide clear and accurate foreground information for subsequent image processing and analysis.

[0049] On the basis of the above technical solutions, the application further provides a turbine blade surface grain detection system.

[0050] A turbine blade surface grain detection system is used to implement the turbine blade surface grain detection method, and includes the following modules connected in sequence: The acquisition and extraction module is used to acquire an original image of a blade to be measured, generate a gray image according to the original image, and extract a foreground part of the gray image; The image generation module is used to perform edge detection on the foreground part of the gray image, extract edge features of the foreground part to form an edge image, and fuse the edge image and the original image to generate a target edge image; The positioning module is used to select a real area of the blade to be measured, take the real area as a template image, extract a feature area of the target edge image, perform positioning matching on the real area and the feature area of the target edge image, and draw a pixel value broken line graph of the corresponding relationship between pixel values of the target edge image and the real position of the blade; The number extraction module is used to analyze the pixel value broken line graph to calculate the number of grains, and judge whether the number of grain boundaries meets a set requirement according to the number of grains; The analysis and judgment module is used for: fitting analysis on the grain boundary growth direction axis in the target edge image, determining the shape and growth trend of the to-be-measured blade grain boundary to judge the type of the grain, judging whether the type of the grain meets the set requirement according to the type of the grain; and calculating the deviation angle between the grain boundary growth direction axis and the main axis to determine whether the growth angle of the to-be-measured blade grain meets the set requirement.

[0051] Embodiment 2 As Figures 1 to 5 As shown, on the basis of Embodiment 1, this embodiment provides a more detailed implementation.

[0052] The turbine blade surface grain detection method provided by the embodiment of the application is applied to a turbine blade surface grain detection system, the turbine blade surface grain detection system comprises a client and a server, the client and the server communicate through a network, and is used for improving the detection efficiency and detection accuracy of traditional detection of blade surface grain quality. The client, also known as the user end, is a program that provides local services for the client corresponding to the server. The client can be installed on, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices. The server can be realized by an independent server or a server cluster composed of multiple servers.

[0053] More specific embodiments are as follows: In the system of the above-mentioned embodiments of the application, the principle of the turbine blade surface grain detection system is as follows: an industrial camera is used to take a picture of the blade to obtain a gray-scale image. Then, the foreground extraction processing is performed on the picture, the edge of the blade is accurately identified and marked by reasonably setting a threshold value. Next, each grain in the blade image is partitioned to determine the growth direction of each grain and calculate the included angle between the grain and the main shaft. At the same time, the aspect ratio of each grain is extracted as the basis for judging the type of the grain. Secondly, accurate positioning is performed according to the characteristics of the blade to establish the corresponding relationship between the real size and the picture size, so that the characteristic interface can be accurately found subsequently. By counting the number of wave peaks and wave troughs in the horizontal direction pixel chart, the number of grains on the specific interface can be obtained. Finally, all detection functions are integrated into the user interaction interface to realize comprehensive detection of the blade. At the same time, the process requirements are input into the system, the system judges whether the blade is qualified according to the detection results, and outputs the detailed results of all detection items.

[0054] In an embodiment, a turbine blade surface grain detection method is provided, which is described by taking a server as an example, and comprises the following steps: S10, collect the original image of the leaf to be tested, generate a gray-scale image according to the original image, and extract the foreground part and the background part of the gray-scale image; Understandably, the camera can be used to take pictures of the leaves, collect a large amount of original image data to form a data set, obtain the gray-scale image of the leaves, and then extract the foreground of the picture. Specifically, the following sub-steps are included: S101, use an adaptive threshold method (which can be implemented as follows: adaptive threshold segmentation, adaptive means that the threshold is not globally fixed, but is automatically calculated according to the brightness distribution of the local area of the image, and is realized by setting the neighborhood window size and adjusting constant C) to perform binaryzation processing on the gray-scale image to obtain an original binaryzation image; Understandably, a threshold value suitable for the characteristics of the image (a threshold value for separating the background from the leaf subject) is calculated by the adaptthresh function, and then the image is preliminarily binaryzation using the threshold value. In order to further optimize the processing result, the imopen function is also used to perform morphological opening operation combined with the threshold value. This step aims to remove small bright objects in the image, so as to obtain a preliminary and relatively clean binaryzation image.

[0055] S102, calculate the number of rows and columns of the original binaryzation image, extract the upper part and the lower part of the original binaryzation image (preferably, the middle line in the horizontal direction of the image is taken as the boundary), set an upper binaryzation threshold value for the upper part, and set a lower binaryzation threshold value for the lower part; use the im2bw function to perform binaryzation processing on the upper binaryzation threshold value and the lower binaryzation threshold value (different threshold values are used to re-binaryzation the different regions of the image to obtain more accurate results), and merge the processed results (the binaryzation results this time only have black and white colors in the leaf) to form a complete intermediate binaryzation image; Understandably, in order to more accurately process different regions of the image, the number of rows and columns of the image is calculated, the upper and lower two parts of the image are extracted respectively, and different binaryzation threshold values are set for each part. Then, the im2bw function is used to perform binaryzation processing on the different threshold values of the two parts, and the processed results of the two parts are merged to form a complete binaryzation image.

[0056] S103, use the bwareaopen function to perform morphological opening operation to remove connected regions with an area smaller than 90 pixel values in the intermediate binaryzation image to obtain a target binaryzation image; Understandably, in order to remove the noise points that may exist in the binaryzation image, the bwareaopen function is used to perform morphological opening operation to remove connected regions with an area smaller than 90 pixel values (further denoising is performed to eliminate the influence of large noise points on subsequent detection). This step helps to further purify the image and improve the accuracy of separating the foreground from the background.

[0057] S104, multiply the original gray image and the target binary image element by element to extract the foreground part of the gray image. Understandably, this step realizes the effective separation of the leaf foreground and the background, providing clear and accurate foreground information for subsequent image processing and analysis.

[0058] S20, edge detection is performed on the foreground part of the gray image, the edge features of the foreground part are extracted and labeled to form an edge image, and the edge image and the original image are fused to generate a target edge image. Understandably, using the image foreground directly for subsequent operations can maximize the retention of die accuracy and ensure that the edges of small dies are also extracted. Specifically, the following sub-steps are included: S201, the Canny algorithm is used to detect the edge of the foreground part, and the edge information in the gray image is successfully identified by carefully adjusting the threshold value of the Canny edge detection. Understandably, this step maximizes the accuracy of the die and ensures that the edges of small dies can also be accurately extracted.

[0059] S202, a black edge image matching the size of the edge detection result is constructed, and the edge pixel position is marked as red to realize the highlight display of the edge; Understandably, this step sets the red marker to visually display the detected edge and give the edge a highlight display, which not only enhances the visual effect of the edge, but also provides convenience for subsequent image processing.

[0060] S203, the edge image and the original image are fused and merged, the color of the fused image is controlled by comparing the strengthening model, the values of the green and blue channels are set to 0 by multiplication operation, and then the contrast of the die edge is enhanced to obtain a clear die edge image; The RGB channels of the image correspond to R (red), G (green), and B (blue). When G=0, B=0, and R maintains its edge-enhanced brightness: the edge pixels in the image will appear pure red, improving the contrast and being more intuitive; The expression of the contrast enhancement model is: (1) wherein, represents the row number, represents the column number, represents the maximum value operation, represents the multiplication operation, represents a binary edge mask (i.e. a binary image of the edge detection result, which takes values of 0 or 1, 1 indicating that the pixel is an edge, and 0 indicating a non-edge region), is the original image channel value, is the fusion processing result, represents the red channel value of the original image, represents the original image green channel value, represents the original image blue channel value, represents the post-fusion image red channel value, represents the post-fusion image green channel value, represents the post-fusion image blue channel value; it can be understood that according to the strict calculation of formula (1), the values of the green and blue channels are all set to 0 through the multiplication operation, which significantly improves the contrast around the crystal grains and makes the crystal grain edges clearer, so that the image color can be more accurately controlled.

[0061] S204, using a double-threshold setting method to enhance and smooth the edges of the post-fusion image, suppress noise, and obtain a target edge image with optimized edge quality; the expression of the double-threshold setting method is: (2) wherein, represents the enhanced and smoothed edges of the post-fusion image, represents a second-stage threshold smoothing operator, represents a first-stage threshold smoothing operator, , respectively used for segmented smoothing processing of the edges based on different threshold intervals, represents the edges of the post-fusion image, represents the edges smoothed by the first stage, represents the edge image smoothed by the double thresholds, represents a pixel-level fusion operation, used for complementary fusion of the double-threshold smoothing result and the enhancement result, represents an edge enhancement operator, represents an edge enhancement threshold, represents the edge enhancement operator based on the threshold , used for controlling the brightness improvement or structural strengthening degree of the edges according to the enhancement threshold.

[0062] It can be understood that in the process of edge detection and enhancement, the present application discards the traditional morphological operation and instead adopts a double-threshold setting strategy, which effectively balances the noise suppression and weak edge detection capability, ensuring the accuracy and reliability of the detection result; at the same time, the present application also enhances and smooths the edges, further optimizing the edge quality and making the final processing result more perfect.

[0063] In another embodiment, in order to extract and analyze the red feature from the target edge image and finally highlight the specific area, the following processing flow is further included: First, color channel separation is performed. The red, green, and blue channels of the image are extracted and stored in the variables redChannel, greenChannel, and blueChannel, respectively, laying the foundation for subsequent processing.

[0064] Next, red edge detection is performed. By setting specific color thresholds (red values above 200 and green and blue values below 50) and using logical operators, a binary image redEdges is generated. In this image, the pixels of the red edges are marked as 1, and the rest are 0.

[0065] Subsequently, the detected red edges are analyzed in depth. The bwlabel function is used to identify all connected regions of red edges, and the regionprops function is used to count the bounding box BoundingBox and centroid Centroid of each red region. Based on these properties, the positions of the leftmost and rightmost red lines in the middle region of the image are determined. Specifically, the horizontal center of the image is calculated, and the width of the middle region is set to 30% of the image width. Then, all red regions are traversed to filter out the red lines in the middle region, and the positions of the leftmost and rightmost red lines are updated accordingly. If no red line meets the conditions, an error message is thrown.

[0066] After completing the detection and analysis of red edges, the target edge image is converted to a grayscale image, and the imbinarize function is used for binary processing, with the result stored in the variable bwImg. At the same time, a copy of the original image annotatedImg is created for subsequent annotation of the midpoint while retaining the red lines in the original image.

[0067] Next, the midpoint between the leftmost and rightmost red lines is extracted. For each row, the positions of the red points are first determined, and then the effective region between these points is found. In the effective region, the bwlabel function is used to identify connected black regions, and the midpoint of each region is calculated. If the midpoint position is not a red line, it is marked as green ([0, 255, 0]) to distinguish it from the red line.

[0068] To extract the red features in the image, the image is converted from the RGB color space to the HSV color space. This conversion is achieved through the rgb2hsv function, and the result is stored in the variable img_hsv. Subsequently, the threshold range of red is defined, and a red mask red_mask is created to identify the position of the red region in the image.

[0069] To enhance the connectivity of the red region, morphological operations are performed on the red mask, including filling small holes, dilation, and erosion. These operations help to connect disconnected red regions and remove noise.

[0070] Next, the Canny algorithm is used to perform edge detection on the red mask to enhance the edges of the red lines. Then, the Hough transform is used to detect straight lines in the image. The Hough transform matrix is ​​calculated using the hough function, the houghpeaks function detects peaks, and the houghlines function extracts straight lines based on the peaks. In addition, a logic is implemented to find the leftmost and rightmost straight lines, which may represent specific structures or features in the image.

[0071] To ensure that the detected lines penetrate the upper and lower boundaries of the image, the coordinates of the line endpoints are adjusted. Then, a polygonal mask is created using these line coordinates to identify the locations of the blue areas.

[0072] Finally, the pixels within the blue area are inverted. Specifically, for each color channel (red, green, blue), black pixels within the mask area are turned white, and non-black pixels are turned black. This step helps to highlight the blue area. Finally, the leftmost and rightmost lines are marked in blue on the processed image, and the result is displayed.

[0073] S30. Select the actual area of ​​the blade to be tested. Using the actual area as a template image, use the ssim function to extract the feature region of the target edge image. Achieve localization matching between the feature regions of the actual area and the target edge image. Plot a pixel value line graph showing the correspondence between the pixel values ​​of the target edge image and the actual position of the blade (e.g., ...). Figure 2 As shown in the diagram), this step can understandably achieve feature extraction and precise positioning based on the characteristics of the blade itself, and further perform statistical analysis on features such as grains, calculating the relationship between the actual size and the photo size to facilitate precise location of feature interfaces. The number of grains on a specific interface is obtained by statistically analyzing the peaks and troughs and the values ​​with a slope of zero in the pixel value line graph along this horizontal direction. Specifically, it includes the following sub-steps: S301. Using the SSIM function (which compares image similarity and automatically matches the result with the highest similarity), regions with specific structural features in the target edge image are extracted as feature regions to achieve the first localization between the target edge image and the real region of the blade under test. For example, the blade tenon is used as input to locate the blade tenon in each image. Understandably, by measuring the structural similarity between images, the SSIM function can effectively identify regions with specific structural features in the image, achieving the first accurate localization of the image and providing a foundation and direction for subsequent accurate localization.

[0074] S302. By leveraging the significant difference in grayscale values ​​between the bottom of the blade under test and the background (the judgment criterion is: after the above processing, the background of the blade is pure black and the pixel value is 0, but if the pixel value of the blade is not 0, then there is a significant difference), a correspondence between the pixel size of the target edge image and the actual position of the blade is established, thereby achieving a second localization between the target edge image and the actual area of ​​the blade under test. Understandably, based on the localization results of the second localization, a correspondence between the pixel size and the actual position of the blade can be established. This correspondence is crucial for subsequent analysis of blade-related features, such as accurately calculating the physical dimensions of each region on the blade.

[0075] S303. Calculate the pixel values ​​at specific horizontal positions in the target edge image (using the SSIM function for localization matching to obtain the relationship between the actual leaf position and the image position, and finally locating the detection area in the image based on the obtained relationship), draw a pixel value line graph, and use an adaptive double threshold smoothing algorithm to denoise the pixel value line graph (the denoised pixel value line graph is shown below). Figure 3 (As shown); the expression for the adaptive double-threshold smoothing algorithm is: (3) in, Indicates the pixel value number. Indicates dynamic threshold. This represents the value of the i-th pixel in the original data sequence. This represents the (i+1)th pixel value in the original data sequence. Indicates the starting index of the segment. Indicates the end index of the segment. This indicates the first dynamic threshold. This indicates the second dynamic threshold. It indicates a universal quantifier, meaning "for all" or "any given". This represents the value of the i-th pixel in the denoised data sequence. This indicates an iterative operation.

[0076] Understandably, pixel value line graphs can provide in-depth analysis of image features. First, pixel values ​​at specific horizontal positions are statistically analyzed. The location of a specific interface is input (using the SSIM function for localization matching to obtain the relationship between the actual leaf position and the image position, ultimately locating the detection point in the image based on this relationship). Then, pixel values ​​at that interface are statistically analyzed. In the image after foreground extraction, all pixel values ​​at that horizontal position are counted, and a pixel value line graph is plotted. However, the original pixel value line graph may contain noise interference, affecting the accuracy of feature analysis. Therefore, an innovative adaptive dual-threshold smoothing algorithm is introduced. By adjusting the segmented sensitivity, this algorithm can process data in a progressively smoothing manner, preserving the main structural features of the image while avoiding excessive blurring. It also ensures the adaptability of multi-channel data, making the processed data more stable and reliable, providing a higher quality data foundation for subsequent feature analysis.

[0077] S40. Analyze the pixel value line graph, integrating slope changes with plateau regions (regions with a slope of zero). Combine this with smoothed data to calculate the number of grains. Based on the grain count, determine if the number of grain boundaries meets the requirements. Understandably, this method abandons the traditional approach of analyzing derivative values ​​from the line graph. Instead, it utilizes the number of consecutive regions with a slope of zero and the number of abrupt changes in slope sign. First, it uses first-order difference to calculate the slope, then detects zero slope and locates inflection points. This method effectively integrates slope changes with plateau regions, and combined with smoothed data, it offers higher stability and more accurate grain count calculations, providing more precise data support for subsequent analysis of grain characteristics.

[0078] Understandably, the image coordinates of the specified region are calculated by using the correspondence between the image pixel coordinates obtained above and the actual position. The pixels in the region are scanned horizontally and their gray values ​​are obtained. A line graph of the pixel values ​​in the region is drawn. After optimizing the image, the number of boundaries and whether they meet the requirements are determined based on the turning points of the line graph.

[0079] Specifically, step S40 includes the following sub-steps: S401. By statistically analyzing the number of continuous regions with a slope of zero and the number of abrupt changes in slope sign in the pixel value line graph, the slope of the abrupt changes in slope sign is calculated using the first-order difference, and then zero slope is detected and the inflection point is located. S402. By determining the pixel positions in the blade image of this region, the coordinates of the pixels in this region are calculated. The number of grains is then calculated based on the pixel coordinates. The mathematical expression for the number of grains is as follows: (4) in, This represents the number of continuous regions with a slope of zero. Indicates the number of abrupt changes in the slope sign. Indicates the number of grains.

[0080] Understandably, the above sub-steps place all connected regions with the same grayscale value onto their respective created black backgrounds, forming independent image regions. By statistically analyzing the length and width of each connected region, it is possible to determine whether the grain meets the process requirements, thus completing the morphological analysis of the grain and classifying it. This provides an important basis for subsequent applications such as process optimization and quality control. In other words, it realizes a complete process from image feature extraction and localization to grain statistics and analysis, providing an effective solution for related research and applications in the field of image processing and analysis.

[0081] S50, such as Figure 5 As shown, the fitting analysis of the grain boundary growth direction axis in the target edge image (which can be done in the following way: first, extract the edge of a single grain; second, extract the center of two edge points on a uniform horizontal line, and fit all center points into a straight line, which is the grain growth direction) determines the shape and growth pattern of the grain boundary of the blade under test to determine whether there is broken grain or transverse grain. At the same time, based on the characteristics of the grain, the category corresponding to the grain is output; the deviation angle between the grain boundary growth direction axis and the main axis is calculated to determine whether the growth angle of the blade grain meets the requirements. Understandably, the shape requirement of the blade grain is determined by fitting the grain boundary growth direction axis in the image to determine whether the grain boundary is qualified, such as whether there is broken grain or transverse grain. The angle requirement is achieved by calculating the deviation angle between the fitted grain boundary growth direction axis and the main axis, thereby determining whether the angle meets the requirements.

[0082] like Figure 5 As shown, the detection process of the turbine blade surface grain detection method can be as follows: start the detection process - measure and record the deflection angle of the grains - determine the grain type based on the measured deflection angle - count the number of each type of grain on a specific interface - output the measured deflection angle α - output the grain type - output the number of grains n on the specific interface - if α is less than α 标准 And the types meet the standards, and n is greater than n 标准 If the above conditions are met, the blade is qualified; otherwise, the blade is unqualified.

[0083] In the above embodiment of the present application, in terms of detection efficiency, full-automatic detection is realized, without manual subjective judgment, thereby greatly shortening the detection period and significantly improving the detection efficiency. Secondly, in terms of detection accuracy, the number of grains on a specific interface can be accurately identified, effectively avoiding errors and ambiguity caused by naked eye observation and subjective judgment in manual detection. At the same time, the grain boundary deviation angle can also be accurately detected, and by accurately calculating the spindle direction, angle misjudgment caused by the inability to identify the spindle direction by naked eye in manual detection is avoided. In addition, the grain type can also be accurately identified, effectively avoiding misjudgment caused by similar appearance of different grain types in manual detection. In summary, the machine vision technology is used to realize the automatic detection of the grain size on the surface of the blade, and according to the detection result, whether the blade meets the grain size requirement is output, thereby better meeting the demand of modern industry for blade production. While greatly improving the detection efficiency, the present application also ensures the detection accuracy, and realizes the accurate and intelligent detection of the grain on the surface of the blade.

[0084] It should be understood that the size of the serial number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.

[0085] Compared with the prior art, the present application has significant advantages in the detection of the grain size on the surface of the blade, which are embodied in the following aspects: (1) In terms of detection efficiency, the present application realizes full-automatic detection, without manual subjective judgment, thereby greatly shortening the detection period and significantly improving the detection efficiency; (2) In terms of detection accuracy, the present application can accurately identify the number of grains on a specific interface, effectively avoiding errors and ambiguity caused by naked eye observation and subjective judgment in manual detection. At the same time, the grain boundary deviation angle can also be accurately detected, and by accurately calculating the spindle direction, angle misjudgment caused by the inability to identify the spindle direction by naked eye in manual detection is avoided. In addition, the grain type can also be accurately identified, effectively avoiding misjudgment caused by similar appearance of different grain types in manual detection.

[0086] Embodiment 3 As shown in Figures 1 to 5 On the basis of embodiment 1 and embodiment 2, the present embodiment provides a turbine blade surface grain detection system.

[0087] A turbine blade surface grain detection system comprises: A collection and extraction module is configured to collect an original image of a blade to be detected, generate a gray-scale image according to the original image, and extract a foreground part and a background part of the gray-scale image. The image generation module is configured to perform edge detection on a foreground part of the grayscale image, extract and mark edge features of the foreground part to form an edge image, and fuse the edge image and the original image to generate a target edge image. The positioning module is configured to select a real area of the blade to be tested, take the real area as a template image, extract a feature area of the target edge image by using an SSIM function, position the real area and the feature area, and draw a pixel value broken line graph of a corresponding relationship between pixel values of the target edge image and the real position of the blade. The number extraction module is configured to analyze the pixel value broken line graph to calculate a number of grains, and determine whether the number of grain boundaries meets a requirement according to the number of grains. The analysis and judgment module is configured to perform fitting analysis on an axis of a grain boundary growth direction in the target edge image to determine a shape and a growth trend of the grain boundary of the blade to be tested to determine whether a broken grain or a transverse grain occurs. The analysis and judgment module is configured to perform fitting analysis on an axis of a grain boundary growth direction in the target edge image to determine a shape and a growth trend of the grain boundary of the blade to be tested to determine whether a broken grain or a transverse grain occurs.

[0088] The present application utilizes machine vision technology to realize automatic detection of the grain size on the surface of the blade, and outputs whether the blade meets the grain size requirement according to the detection result, thereby better meeting the demand of modern industry for blade production. The present application greatly improves the detection efficiency while ensuring the detection accuracy, and realizes the accurate and intelligent detection of the grain on the surface of the blade.

[0089] Specific limitations of the turbine blade surface grain detection system can be seen in the above limitations of the turbine blade surface grain detection method, and will not be repeated here. Each module in the above turbine blade surface grain detection system can be realized by software, hardware, or a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.

[0090] As described above, the present application can be better implemented.

[0091] In the description of the present application, it should be understood that the orientations or positional relationships indicated by the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential" are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and therefore cannot be understood as indicating or implying that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application.

[0092] In the description of the application, the terms "first", "second", "third", etc. are used only for descriptive purpose and are not to be construed as indicating or implying relative importance or an indicated number of technical features. Thus, features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the application, the meaning of "a plurality of" is at least two, such as two, three, etc., unless otherwise explicitly specified and limited.

[0093] In the description of the application, unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connecting", "fixing" and the like should be understood in a broad sense, such as fixed connection, detachable connection or integral; mechanical connection or electrical connection; direct connection or indirect connection through intermediate medium; internal communication of two elements or interaction relationship between two elements, unless otherwise explicitly specified and limited. For those skilled in the art, the specific meaning of the above terms in the application can be understood according to the specific circumstances.

[0094] In the description of the application, unless otherwise explicitly specified and limited, the first feature is "on" or "under" the second feature, which can be direct contact between the first and second features, or indirect contact between the first and second features through intermediate medium. Moreover, the first feature "above", "over" and "on" the second feature can be directly above or obliquely above the first feature, or only indicate that the horizontal height of the first feature is higher than that of the second feature. The first feature "below", "under" and "under" the second feature can be directly below or obliquely below the first feature, or only indicate that the horizontal height of the first feature is less than that of the second feature.

[0095] In the description of the application, the description of the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the application. In the description, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any suitable manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine different embodiments or examples described in the specification and the features of different embodiments or examples without contradiction.

[0096] In the description of the present application, although the embodiments of the present application have been shown and described in the present application, it can be understood that the above-mentioned embodiments are exemplary and cannot be understood as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above-mentioned embodiments within the scope of the present application.

[0097] In the description of the present application, all the features disclosed in all the embodiments in the specification, or all the steps in the implicitly disclosed methods or processes, can be combined and / or extended, replaced, unless the features and / or steps are mutually exclusive.

[0098] The above is only the preferred embodiment of the present application, not any form of limitation on the present application, according to the technical essence of the present application, any simple modification, equivalent replacement and improvement of the above embodiment within the spirit and principles of the present application are still within the protection scope of the technical scheme of the present application.

Claims

1. A method for detecting grain size on the surface of a turbine blade, characterized in that, Includes the following steps: Acquire the original image of the leaf to be tested, generate a grayscale image based on the original image, and extract the foreground part of the grayscale image; Edge detection is performed on the foreground portion of the grayscale image, edge features of the foreground portion are extracted and an edge image is constructed, and the edge image and the original image are fused to generate the target edge image; Select the real area of ​​the blade to be tested, use the real area as a template image, extract the feature area of ​​the target edge image, perform localization matching between the feature areas of the real area and the target edge image, and draw a pixel value line graph showing the correspondence between the pixel values ​​of the target edge image and the real position of the blade. The number of grains is calculated by analyzing the pixel value line graph, and the number of grain boundaries is then used to determine whether the number of grain boundaries meets the set requirements. Fitting analysis is performed on the grain boundary growth direction axis in the target edge image to determine the shape and growth trend of the grain boundary of the blade under test in order to determine the type of grain. Based on the type of grain, it is determined whether the type of grain meets the set requirements. Additionally, the deviation angle between the grain boundary growth direction axis and the main axis is calculated to determine whether the growth angle of the grains in the blade under test meets the set requirements.

2. The method for detecting surface grains of a turbine blade according to claim 1, characterized in that, The process of performing edge detection on the foreground portion of a grayscale image, extracting edge features from the foreground portion and constructing an edge image, and fusing the edge image and the original image to generate a target edge image includes the following steps: Edge detection is performed on the foreground portion to identify edge information in the grayscale image; Construct a black edge image that matches the size of the edge information in the grayscale image, and mark the edge pixel positions in red; The edge image is fused with the original image, and the color of the fused image is controlled to enhance the contrast of the grain edges; The edges of the fused image are enhanced and smoothed.

3. The method for detecting surface grains of a turbine blade according to claim 2, characterized in that, The control of the color of the fused image to enhance grain edge contrast includes the following steps: The contrast enhancement model controls the color of the fused image to enhance grain edge contrast; wherein, the expression of the contrast enhancement model is: ; in, Indicates the row number. Indicates column number, This represents the operation to find the maximum value. Indicates multiplication operation. Represents a binary edge mask. This represents the red channel value of the original image. This represents the green channel value of the original image. This represents the blue channel value of the original image. This represents the red channel value of the merged image. This represents the green channel value of the merged image. This represents the blue channel value of the merged image.

4. The method for detecting surface grains of a turbine blade according to claim 3, characterized in that, The enhancement and smoothing of the edges of the fused image includes the following steps: A dual-threshold method is used to enhance and smooth the edges of the fused image; wherein the expression for the dual-threshold method is: ; in, The edges of the image after enhancement and smoothing processing are represented. This represents the threshold smoothing operator in the second stage. This represents the threshold smoothing operator in the first stage. Indicates the edges of the merged image. This represents the edge after the first stage of smoothing. Represented as the edge image after double thresholding smoothing. This indicates a pixel-level merging operation. This represents the edge enhancement operator. Indicates the edge enhancement threshold. Indicates based on threshold Edge enhancement operator.

5. The method for detecting surface grains of a turbine blade according to claim 3, characterized in that, The enhancement and smoothing of the edges of the fused image includes the following steps: Extract the red, green, and blue channels of the image and store them in the variables redChannel, greenChannel, and blueChannel respectively to achieve color channel separation; A binary image, `redEdges`, is generated by setting a color threshold and using logical operators. Pixels representing red edges are marked as 1, while other pixels are marked as 0, thus detecting red edges. The `bwlabel` function is then used to identify connected regions of all red edges, and the `regionprops` function is used to calculate the bounding box and centroid of each red region. Based on the bounding box and centroid, the positions of the leftmost and rightmost red lines in the middle region of the image are determined, thus analyzing the red edges. The target edge image is converted into a grayscale image and binarized using the imbinarize function. The binarization result is then stored in the bwImg variable. For each row, first determine the position of the red dots, then find the effective area between the red dots. Within the effective area, use the bwlabel function to identify the connected black areas and calculate the midpoint of each area. If the midpoint is not a red line, mark the midpoint in green to distinguish it from the red line. The image is converted from the RGB color space to the HSV color space using the rgb2hsv function and stored in the variable img_hsv; then, the threshold range for red is defined and a red mask red_mask is created to identify the location of red areas in the image; The Canny algorithm is used to perform edge detection on the red mask. Then, the Hough transform is used to detect straight lines in the image. The Hough transform matrix is ​​calculated using the hough function, the houghpeaks function is used to detect peaks, and the houghlines function is used to extract straight lines based on the peaks. Adjust the coordinates of the endpoints of the line; then, create a polygonal mask using the coordinates of the line to identify the location of the blue area. Invert each color channel of the pixels within the blue area to turn black pixels in the mask area white and non-black pixels black. The leftmost and rightmost lines are marked in blue on the image after the inversion operation, and the marked image is displayed.

6. The method for detecting surface grains of a turbine blade according to claim 1, characterized in that, The process involves selecting the actual region of the selected blade to be tested, using the actual region as a template image, extracting the feature region of the target edge image, performing localization matching between the feature regions of the actual region and the target edge image, and drawing a pixel value polyline graph showing the correspondence between the pixel values ​​of the target edge image and the actual position of the blade. This includes the following steps: The ssim function is used to extract regions with defined structural features from the target edge image as feature regions, thereby achieving the first localization between the target edge image and the real region of the blade under test. Based on the difference in grayscale values ​​between the bottom of the blade under test and the background, a correspondence between the pixel size of the target edge image and the real position of the blade is established, thereby achieving a second localization between the target edge image and the real area of ​​the blade under test. The pixel values ​​of the target edge image are counted to obtain the number of grains in the set area. A pixel value line graph is plotted and then denoised.

7. The method for detecting surface grains of a turbine blade according to claim 6, characterized in that, The noise reduction process for the pixel value line chart includes the following steps: An adaptive double-threshold smoothing algorithm is used to denoise the pixel value line graph; the expression for the adaptive double-threshold smoothing algorithm is: ; in, Indicates the pixel value number. Indicates a dynamic threshold. This represents the value of the i-th pixel in the original data sequence. This represents the (i+1)th pixel value in the original data sequence. Indicates the starting index of the segment. Indicates the end index of the segment. This indicates the first dynamic threshold. This indicates the second dynamic threshold. Universal classifiers This represents the value of the i-th pixel in the denoised data sequence. This indicates an iterative operation.

8. The method for detecting grain size on the surface of a turbine blade according to claim 1, characterized in that, By statistically analyzing the number of continuous regions with a slope of zero and the number of abrupt changes in slope sign in the pixel value line graph, the slope of the number of abrupt changes in slope sign is calculated using the first-order difference. Then, points with a slope of zero are detected and inflection points are located. Determine the pixel positions in a specified region of the blade image, calculate the pixel coordinates, and then calculate the number of grains based on the pixel coordinates. The expression for calculating the number of grains is as follows: ; in, This represents the number of continuous regions with a slope of zero. Indicates the number of abrupt changes in the slope sign. Indicates the number of grains.

9. A method for detecting surface grains of a turbine blade according to any one of claims 1 to 8, characterized in that, The process of acquiring the original image of the blade to be tested, generating a grayscale image from the original image, and extracting the foreground portion of the grayscale image includes the following steps: The grayscale image is binarized using the adaptthresh function to obtain the original binary image; Calculate the number of rows and columns of the original binarized image, extract the upper and lower parts of the original binarized image, set an upper binarization threshold for the upper part and a lower binarization threshold for the lower part; use the im2bw function to binarize the upper and lower binarization thresholds respectively, and merge the binarized upper and lower binarization thresholds to form a complete intermediate binarized image; The bwareaopen function is used to perform morphological opening operations to remove connected regions with an area smaller than a set pixel value threshold from the complete intermediate binarized image to obtain the target binarized image; The foreground portion of the grayscale image is extracted by multiplying the grayscale image element by element with the target binarized image.

10. A turbine blade surface grain detection system, characterized in that, A method for detecting surface grains of a turbine blade as described in any one of claims 1 to 9 comprises the following modules connected in sequence: The acquisition and extraction module is used to: acquire the original image of the leaf to be tested, generate a grayscale image based on the original image, and extract the foreground part of the grayscale image; The image generation module is used to: perform edge detection on the foreground part of the grayscale image, extract the edge features of the foreground part and construct an edge image, and fuse the edge image and the original image to generate a target edge image; The positioning module is used to: select the real area of ​​the blade to be tested, use the real area as a template image, extract the feature area of ​​the target edge image, perform positioning matching between the real area and the feature area of ​​the target edge image, and draw a pixel value polyline graph showing the correspondence between the pixel values ​​of the target edge image and the real position of the blade. The quantity extraction module is used to: analyze the pixel value line graph, calculate the number of grains, and determine whether the number of grain boundaries meets the set requirements based on the number of grains; The analysis and judgment module is used to: perform fitting analysis on the grain boundary growth direction axis in the target edge image, determine the shape and growth trend of the grain boundary of the blade to be tested in order to determine the type of grain, and determine whether the type of grain meets the set requirements based on the type of grain. Additionally, the deviation angle between the grain boundary growth direction axis and the main axis is calculated to determine whether the growth angle of the grains in the blade under test meets the set requirements.