A method and system for identifying surface defects in the rotor core of a wind turbine generator.
By using frequency domain periodic texture suppression and local histogram equalization, combined with adaptive threshold segmentation and morphological filtering, a refined assessment of surface defects in the rotor core of wind turbines was achieved. This solves the problem of inaccurate identification and classification in existing technologies, and improves the robustness and accuracy of the detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUXI LIANYUANDA PRECISION MACHINED CO LTD
- Filing Date
- 2026-01-19
- Publication Date
- 2026-05-26
AI Technical Summary
Existing technologies cannot meet the requirements of high-precision wind power equipment for precise assessment of the size and severity of defects on the rotor core surface, leading to potential safety hazards and low efficiency.
A joint processing technique combining frequency domain periodic texture suppression and local histogram equalization, along with adaptive threshold segmentation and morphological filtering, is employed to perform sub-pixel-level geometric feature calculation and spatial clustering, thereby constructing a defect distribution map.
It significantly improves the signal-to-noise ratio of defect features in complex backgrounds, reduces the false alarm rate, and enables precise measurement and quantitative grading assessment of minute defects, replacing the highly subjective manual visual inspection.
Smart Images

Figure CN121544618B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of machine vision and wind power inspection technology, and in particular to a method and system for identifying surface defects in the rotor core of a wind turbine. Background Technology
[0002] Currently, with the popularization of intelligent manufacturing technology, automated surface defect detection technology based on industrial vision has gradually replaced traditional manual visual inspection and become an important means to ensure the quality of core wind power components.
[0003] In existing technologies, gradient-based edge detection algorithms (such as the Canny operator and Sobel operator) or global threshold segmentation methods based on grayscale statistics are commonly used to identify surface defects in wind turbine cores. These methods calculate the gradient magnitude or grayscale difference of image pixels, marking areas with drastic changes as suspected defects, or separating dark defects from a bright background using a preset fixed grayscale threshold, thereby achieving automated quality inspection. Wind power generation, as a key pillar of global energy structure transformation, directly impacts the output benefits of clean energy through its operational stability and efficiency. The rotor core, as the core magnetic circuit component of a wind turbine, has a decisive influence on the motor's electromagnetic performance, heat dissipation efficiency, and service life. During the manufacturing process of the rotor core, surface defects such as scratches, pores, and pits are inevitably generated due to stamping, stacking, and handling processes. If these defects are not detected and removed in a timely manner, they will seriously affect the insulation performance of the motor and even lead to serious safety accidents.
[0004] Existing technologies cannot meet the needs of high-precision wind power equipment for refined assessment of defect size and severity classification. Summary of the Invention
[0005] This invention provides a method and system for identifying surface defects in the rotor core of a wind turbine, in order to solve the problem that existing technologies cannot meet the needs of high-precision wind power equipment for refined assessment of defect size and severity classification.
[0006] In a first aspect, to solve the above-mentioned technical problems, the present invention provides a method for identifying surface defects in the rotor core of a wind turbine, comprising:
[0007] Raw image data of the surface of the rotor core of a wind turbine is acquired, and grayscale mapping is performed on the raw image data to obtain a single-channel grayscale image.
[0008] Based on the single-channel grayscale image, frequency domain periodic texture suppression processing is performed to obtain a detextured image, and the detextured image is then subjected to contrast-limited local histogram equalization processing to obtain an enhanced feature image.
[0009] For the enhanced feature image, an illumination distribution is fitted to the enhanced feature image to construct a background fitting model, and the enhanced feature image and the background fitting model are subjected to a difference operation to obtain a background difference image;
[0010] Based on the background difference image, adaptive threshold segmentation is performed to obtain a binarized defect candidate mask;
[0011] The binarized defect candidate mask is subjected to morphological filtering and hole filling based on a preset texture direction to obtain a refined defect connected domain.
[0012] Using the refined defect connected domain as a mask, the corresponding local grayscale distribution is extracted from the single-channel grayscale image, and sub-pixel level geometric feature calculation is performed to obtain defect geometric attribute data.
[0013] Based on the defect geometric attribute data, spatial clustering of defects is performed to obtain independent defect regions. The severity of these independent defect regions is then assessed by combining their geometric attributes to determine the final defect distribution map.
[0014] Secondly, the present invention provides a system for identifying surface defects in the rotor core of a wind turbine, comprising:
[0015] The image acquisition and mapping module is used to acquire raw image data of the surface of the wind turbine rotor core and perform grayscale mapping processing on the raw image data to obtain a single-channel grayscale image.
[0016] The enhancement processing module is used to perform frequency domain periodic texture suppression processing on the single-channel grayscale image to obtain a detextured image, and to perform contrast-limited local histogram equalization processing on the detextured image to obtain an enhanced feature image.
[0017] The background subtraction module is used to fit the illumination distribution of the enhanced feature image to construct a background fitting model, and to perform a difference operation between the enhanced feature image and the background fitting model to obtain a background subtraction image.
[0018] The defect segmentation module is used to perform adaptive threshold segmentation processing based on the background difference image to obtain a binarized defect candidate mask.
[0019] The morphological refinement module is used to perform morphological filtering and hole filling processing on the binarized defect candidate mask based on a preset texture direction to obtain the refined defect connected domain.
[0020] The feature calculation module is used to extract the corresponding local grayscale distribution on the single-channel grayscale image using the refined defect connected domain as a mask, and to perform sub-pixel level geometric feature calculation to obtain defect geometric attribute data.
[0021] The analysis and grading module is used to perform spatial clustering of defects based on the defect geometric attribute data to obtain independent defect regions, and to conduct severity grading assessment based on the geometric attributes of the independent defect regions to determine the final defect distribution map.
[0022] Compared with the prior art, the present invention has the following beneficial effects:
[0023] (1) The invention effectively solves the problems of strong rolling texture interference and uneven illumination on the surface of wind turbine rotor core by using a joint processing technology of frequency domain periodic texture suppression and local histogram equalization with contrast limitation. By using Fourier transform and notch filter to accurately filter out specific frequency components representing texture while retaining high-frequency details of defects, the signal-to-noise ratio of defect features in complex backgrounds is significantly improved, avoiding a large number of false detections caused by texture interference in traditional edge detection algorithms.
[0024] (2) This invention utilizes the morphological filtering achieved by constructing asymmetric structural elements based on a preset texture direction. It leverages the morphological difference between false defect noise distributed along the texture and real defects spanning the texture to accurately remove directional noise. Compared to traditional isotropic filtering, this method preserves the skeleton structure of real defects to the greatest extent while removing artifacts, significantly reducing the false alarm rate of the system and improving the robustness of detection.
[0025] (3) By introducing sub-pixel-level geometric feature calculation and defect spatial clustering and grading mechanism, this invention breaks through the precision limitation of traditional pixel grids and realizes precise measurement of the actual physical size of tiny defects. By combining spatial clustering algorithm to repair broken defect connected domains and classifying the severity according to physical area, it can provide a quantitative, objective and intuitive final defect distribution map for the quality control of the production line, effectively replacing the subjective manual visual inspection. Attached Figure Description
[0026] Figure 1 This is a schematic flowchart of a method for identifying surface defects in the rotor core of a wind turbine provided in the first embodiment of the present invention;
[0027] Figure 2 This is a schematic diagram of a wind turbine rotor core surface defect identification system provided in the second embodiment of the present invention. Detailed Implementation
[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] Reference Figure 1 The first embodiment of the present invention provides a method for identifying surface defects in the rotor core of a wind turbine, comprising the following steps:
[0030] S11, acquire raw image data of the surface of the wind turbine rotor core, and perform grayscale mapping processing on the raw image data to obtain a single-channel grayscale image;
[0031] S12, based on the single-channel grayscale image, frequency domain periodic texture suppression processing is performed to obtain a detextured image, and the detextured image is subjected to contrast-limited local histogram equalization processing to obtain an enhanced feature image.
[0032] S13, For the enhanced feature image, perform illumination distribution fitting on the enhanced feature image to construct a background fitting model, and perform difference operation on the enhanced feature image and the background fitting model to obtain a background difference image;
[0033] S14, perform adaptive threshold segmentation processing based on the background difference image to obtain a binarized defect candidate mask;
[0034] S15, the binarized defect candidate mask is subjected to morphological filtering and hole filling processing based on a preset texture direction to obtain a refined defect connected domain.
[0035] S16, using the refined defect connected domain as a mask, extract the corresponding local grayscale distribution on the single-channel grayscale image, and perform sub-pixel level geometric feature calculation to obtain defect geometric attribute data.
[0036] S17. Based on the defect geometric attribute data, perform defect spatial clustering to obtain independent defect regions, and combine the geometric attributes of the independent defect regions to conduct severity classification assessment to determine the final defect distribution map.
[0037] In step S11, raw image data of the surface of the wind turbine rotor core is acquired, and grayscale mapping processing is performed on the raw image data to obtain a single-channel grayscale image, including:
[0038] A high-speed linear array camera is used to scan the surface of the wind turbine rotor core line by line to obtain raw image data containing light intensity information;
[0039] Based on the scanning row order and pixel order of the high-speed linear array camera, the original image data is mapped into a two-dimensional pixel matrix;
[0040] The values of each pixel in the two-dimensional pixel matrix are quantized to a preset grayscale range to obtain the single-channel grayscale image.
[0041] It should be noted that the line-by-line scanning using a high-speed linear array camera is achieved through external trigger signal control. An incremental rotary encoder is installed on the conveyor belt or rotating platform of the wind turbine rotor core. This encoder monitors the physical movement distance of the core in real time and sends a trigger pulse to the high-speed linear array camera every preset physical step (e.g., 0.05 mm). The camera exposes once upon receiving each pulse, acquiring one line of pixel data. This hardware synchronization mechanism ensures that the acquired image has consistent spatial resolution in both the direction of motion (Y-axis) and the sensor alignment direction (X-axis), thus avoiding image stretching or compression distortion. The acquired raw image data is typically a high-bit-depth (e.g., 12-bit or 16-bit) digital signal, directly reflecting the number of photons received by the sensor's photodiodes.
[0042] It is worth noting that the predetermined physical step size is determined based on statistical analysis of the smallest identifiable defect size in the historical defect sample library. By analyzing the equivalent diameter distribution of typical defects such as cracks and pores, the 1st quantile of this distribution (i.e., the smallest typical defect size, for example, 0.1 mm) is selected as the benchmark. According to the Nyquist sampling theorem, in order to distinguish defects of this size, the sampling interval (i.e., pixel equivalent) should be at least half of the defect size. Therefore, the physical step size is set to be less than or equal to half of the smallest typical defect size (i.e., 0.05 mm) to ensure that minute defect features are captured without aliasing.
[0043] It should be noted that mapping the original image data into a two-dimensional pixel matrix based on the scanning row order and pixel order of the high-speed linear scan camera is achieved using direct memory mapping (DMA) technology. The system pre-allocates a two-dimensional buffer in memory, the width of which... Equal to the number of pixels of the sensor in a line scan camera, height This equals the total number of rows scanned. Each time the camera transmits a row of data, the system uses the current scan row order index. (From 0 to ), the line containing Each pixel is ordered according to pixel number. (From 0 to ) are written sequentially into the buffer. Okay. This operation converts a continuous stream of scans over time into a spatially continuous two-dimensional image matrix.
[0044] It should be noted that quantizing the values of each pixel in the two-dimensional pixel matrix to a preset grayscale range is achieved using a linear stretching mapping method. This method first reads the original bit depth output by the camera. (For example, 12-bit, with a maximum value of 4095), the target preset grayscale range is defined as 8-bit (i.e., [0, 255]). For each original pixel value in the matrix Through the formula:
[0045]
[0046] The quantized grayscale value is calculated, where, The function represents floor function, which rounds down to the largest integer not greater than the parameter value. This process compresses the high dynamic range raw data to a standard single-channel grayscale space to meet the input requirements of subsequent image processing algorithms, while removing minute fluctuations in the sensor's noise floor.
[0047] It is worth noting that the determination of the preset grayscale range (i.e., [0, 255]) is based on a balance analysis of the computational efficiency and feature preservation of subsequent image processing algorithms. Through statistical analysis of grayscale histograms on a large number of original high-bit-depth images, the system found that over 99% of defect features (such as grayscale jumps at crack edges) still retain their gradient information effectively even after compression to 256 grayscale levels (8-bit), and the signal-to-noise ratio does not significantly decrease. Furthermore, [0, 255] is the standard input format for general computer vision libraries (such as OpenCV). Using this range avoids frequent data type conversions in subsequent algorithms and reduces memory usage and transmission bandwidth by 50% compared to 16-bit data, meeting the timeliness requirements of real-time detection in industrial settings.
[0048] For example, in one inspection task, the rotor core moves at a speed of 0.5 m / s. Based on a preset physical step size of 0.05 mm, the rotary encoder emits 10,000 pulses per second (10 kHz line frequency). The high-speed linear scan camera has a resolution of 8192 pixels. After a 10-second scan, the system acquires 100,000 lines of raw data. Through memory mapping, a two-dimensional pixel matrix of size 8192 × 100,000 is generated. The raw data is 12-bit (range 0-4095), and the raw value of a certain pixel is 2048. After linear quantization calculation... The value of this point in the single-channel grayscale image is 127.
[0049] In step S12, based on the single-channel grayscale image, frequency domain periodic texture suppression processing is performed to obtain a detextured image, and the detextured image is then subjected to contrast-limited local histogram equalization processing to obtain an enhanced feature image, including:
[0050] Perform a two-dimensional discrete Fourier transform on the single-channel grayscale image to obtain the frequency domain spectrum distribution map;
[0051] After identifying frequency peak points in the frequency domain spectrum distribution map whose amplitude is greater than a preset frequency threshold and represent periodic texture, and excluding the central DC component, a notch filter is constructed based on the frequency peak points.
[0052] The frequency domain spectrum distribution map is filtered using the notch filter, and an inverse Fourier transform is performed on the filtered spectrum to obtain the detextured image.
[0053] The detextured image is divided into several non-overlapping rectangular sub-blocks, and the grayscale histogram of each rectangular sub-block is calculated.
[0054] Based on a preset contrast limit threshold, the peak portion exceeding the contrast limit threshold in the grayscale histogram of each rectangular sub-block is clipped, and the total number of pixels in the clipped portion is evenly distributed to other grayscale levels in the grayscale histogram.
[0055] Histogram equalization is performed on each processed rectangular sub-block, and bilinear interpolation algorithm is used to smoothly fuse the boundaries of adjacent rectangular sub-blocks to obtain the enhanced feature image.
[0056] It should be noted that performing a two-dimensional discrete Fourier transform (2D DFT) on the single-channel grayscale image aims to transform the image from the spatial domain to the frequency domain in order to separate periodic texture features. Because the rolling texture or machining marks on the surface of the wind turbine rotor core are highly periodic, they will appear as significant high-energy bright spots (i.e., spectral peaks) in the frequency domain, except for the central DC component (DC). The complex spectrum of the image is calculated using the Fast Fourier Transform (FFT) algorithm, and its modulus is then logarithmically transformed to obtain the visualized frequency domain spectral distribution map.
[0057] It should be noted that identifying the frequency peaks in the frequency domain spectrum distribution map whose amplitudes exceed a preset frequency threshold and represent periodic textures, and then constructing a notch filter, is the core step in removing textures. This operation first locates all non-zero frequency coordinate points in the spectrum map whose amplitudes exceed the threshold. These points correspond to specific spatial frequencies of the texture. Subsequently, a Gaussian notch band is constructed for each identified peak point. Specifically, the transfer function of the notch filter... Construct using the following formula:
[0058]
[0059] in, The total number of peak points identified. For any point on the spectrum plane To the Peak points Euclidean distance, This is the preset bandwidth. The function defines a bandwidth centered on the peak point. A smooth concave region with a radius of 0 has a transfer function value of 0 at its center and a smooth transition to 1 at its edges. Specifically, the DC component at the center of the spectrum (representing the average grayscale background of the image) must be forcibly preserved to prevent filtering from causing the image to become entirely black or inverted.
[0060] It is worth noting that the determination of the preset frequency threshold is based on the spectral statistical analysis of historical defect-free iron core samples. The system collects a large number of sample images containing only normal textures, calculates the distribution histogram of their spectral amplitudes, and selects the 99.5th percentile of this distribution as the threshold. This setting ensures that only the texture frequencies with the most concentrated energy are filtered out, while retaining the broadband high-frequency components representing minor defects. The preset bandwidth... The determination is based on statistical measurements of the full width at half maximum (FWHM) of the texture spectrum peaks in historical samples. The system calculates the average bandwidth when the amplitude of each peak point drops to half, and then... The value is set to 1.5 times the average value to ensure that the notch area can fully cover the fluctuation range of the texture frequency, while avoiding damage to the adjacent defect frequency components.
[0061] For example, an image of an iron core containing horizontal rolling texture, after FFT transformation, shows two symmetrical bright spots on the vertical axis of its spectrum, with an amplitude of [value missing]. The frequency values far exceed the preset frequency threshold of 2000. The system identifies these two points as texture features and constructs the aforementioned Gaussian notch filter to suppress them. After the inverse transform, the strong horizontal stripes in the original image disappear, leaving only the background and potential scratch features, resulting in the detextured image.
[0062] It should be noted that the contrast-limited local histogram equalization (CLAHE) applied to the detextured image is to enhance the contrast of defects while preventing noise amplification. This operation first divides the image into M×G non-overlapping rectangular sub-blocks (e.g., 8x8 pixel blocks). After calculating the histogram for each sub-block, a contrast-limiting mechanism is introduced. The pixel count for each gray level in the histogram is checked; if the count for a gray level exceeds a preset contrast-limiting threshold, the excess pixels are clipped. The total number of clipped pixels is counted and evenly distributed among all other gray levels in the histogram. This redistribution process improves the visibility of details in dark areas while limiting excessive enhancement of flat areas (high-frequency counting regions).
[0063] It is worth noting that the determination of the preset contrast limit threshold is based on experimental optimization of the image's local entropy. By testing different thresholds (e.g., 1.0 to 5.0) on historical datasets, the ratio of the average information entropy of the enhanced image to the standard deviation of the background noise is calculated. The threshold at which this ratio reaches its maximum (e.g., 3.0) is selected as the preset value to achieve the best balance between signal enhancement and noise suppression.
[0064] It should be noted that the use of bilinear interpolation to smoothly blend the boundaries of adjacent rectangular sub-blocks is to eliminate the block artifacts caused by block processing. During histogram equalization mapping, for any pixel in the image... The system first determines the center points of the four nearest sub-blocks around the pixel (top left, top right, bottom left, and bottom right, respectively); then it calculates the normalized distance weights from the pixel to these four center points. Let the horizontal normalized distance from the pixel to the left and right center points be... and The normalized vertical distance from the upper and lower center points is and ,in, for Subtract the x-coordinate of the top-left pixel, then divide by the width of the sub-block to get the result; for Subtract the ordinate of the top-left pixel and divide by the height to get the final grayscale value of that pixel. Calculated using the following weighted formula:
[0065]
[0066] in, The grayscale values are obtained by transforming the pixel using the mapping functions of the top-left, top-right, bottom-left, and bottom-right sub-blocks, respectively. This operation ensures a continuous transition of image grayscale at the sub-block boundaries, ultimately generating the enhanced feature image with suppressed texture, highlighted defects, and no artifacts.
[0067] In step S13, for the enhanced feature image, an illumination distribution fitting is performed on the enhanced feature image to construct a background fitting model, and the enhanced feature image and the background fitting model are subjected to a difference operation to obtain a background difference image, including:
[0068] Select structuring elements of a preset scale, perform morphological opening operations or apply large-scale median filtering to the enhanced feature image, and generate a smooth background image that reflects the illumination distribution as the background fitting model.
[0069] Subtract the pixel grayscale value corresponding to the background fitting model from the pixel grayscale value of the enhanced feature image point by point;
[0070] The grayscale difference amplitude is calculated from the subtraction result and normalized to obtain the background difference image.
[0071] It should be noted that in this embodiment, the selection of structuring elements at a preset scale and the generation of a smooth background image are achieved using a large-scale median filtering algorithm. Since illumination distribution is low-frequency information (changing slowly), while defects are high-frequency information (abrupt changes), this algorithm uses a sliding window, much larger than a typical defect, to traverse the enhanced feature image. For the area covered by the window, the grayscale values of all pixels are sorted, and the median value is selected as the output value of the center pixel. This operation effectively filters out local abrupt changes within the window (i.e., defects and texture residues) while preserving the overall brightness gradient trend of the image, thereby fitting a clean, defect-free, ideal illumination background, i.e., the background fitting model.
[0072] It is worth noting that the determination of the pre-scale structural element (i.e., the median filter window size) is based on statistical analysis of the maximum defect size in the historical defect sample library. The system statistically analyzes the diagonal length of the largest bounding rectangle of various defects (such as scratches and dents) in historical data, and selects the 99th percentile of this length distribution (e.g., 40 pixels) as the baseline size. To ensure that the filter can completely smooth out defects, the side length of the filter window should be set to an odd integer significantly larger than this baseline size (e.g., 51×51 pixels). If the window is too small, ghosting of defects will remain in the background model; if the window is too large, it will be unable to fit rapid changes in lighting edges.
[0073] It should be noted that the difference operation between the enhanced feature image and the background fitting model is implemented using a gray-level difference amplitude calculation method. The system traverses every pixel in the image. Calculate the grayscale value of the enhanced feature image. Gray values of the model fitted to the background The difference between them, and take the absolute value of the difference, that is... This operation eliminates the influence of background lighting, retaining only anomalous energy in the image that changes abruptly relative to the background.
[0074] It should be noted that the background difference image obtained through normalization is achieved using a min-max linear mapping method. This is because the absolute value after differencing... The values may be distributed within a small dynamic range (e.g., 0-50), which is detrimental to subsequent segmentation. This process first calculates the maximum values in the difference graph. and minimum value Then, through the formula:
[0075]
[0076] Each pixel value is linearly stretched to the full grayscale range of [0, 255]. This significantly enhances the contrast between defects (high-difference areas) and the background (low-difference areas).
[0077] For example, in a certain region of the enhanced feature image, due to surface reflection, the background grayscale is as high as 200, within which there exists a black crack with a grayscale of 50. A large-scale median filter of 51×51 ignores the narrow crack, and the fitted background grayscale for this location is approximately 198 (close to the ambient lighting). The absolute difference is then calculated. For the defect-free background region, the difference is approximately Assume the maximum difference across the entire image is 150 and the minimum is 0. Pixels at the crack are mapped to... (Highlighted in white), while the background area is mapped to... (Almost black). In the final background difference image, uneven lighting is completely eliminated, and the cracks appear as bright white lines on a black background, making them very easy to segment.
[0078] In step S14, adaptive thresholding is performed based on the background difference image to obtain a binarized defect candidate mask, including:
[0079] The gray-level histogram distribution characteristics of the background difference image are statistically analyzed;
[0080] Based on the statistical characteristics of the background difference image, the gray value at which the inter-class variance between the foreground and background is maximized is calculated using the maximum inter-class variance method, and determined as the optimal segmentation threshold.
[0081] The background difference image is binarized using the optimal segmentation threshold, and pixels with gray values greater than the optimal segmentation threshold are marked as foreground to generate the binarized defect candidate mask.
[0082] It should be noted that the optimal segmentation threshold is determined using the Otsu's algorithm (maximum inter-class variance method) through an exhaustive search. This algorithm first statistically analyzes each gray level in the background difference image. The probability of (0 to 255) occurring Then, iterate through all possible thresholds. Image pixels are divided into background categories. (Grayscale) ) and foreground (Grayscale) For each Calculate the probability of occurrence of the two classes. , and the average gray level of the two classes , Next, the between-class variance is calculated. Its formula is The algorithm searches for... Reaching the maximum value The optimal segmentation threshold is used as the threshold. This method can automatically adapt to differential images with different contrasts and find the optimal separation point based on the gray-level statistical distribution of defects and background.
[0083] It is worth noting that, in order to prevent noise from being mis-segmented as defects in a defect-free pure background image, this embodiment introduces a preset minimum effective threshold. The final determination logic for the optimal segmentation threshold is as follows: ,in This is the lower limit of the minimum effective threshold. The determination of this lower limit is based on statistical analysis of the background difference images of historical defect-free rotor core samples. The system calculates the gray-level histograms of the difference images of a large number of defect-free samples and selects the gray-level value when its cumulative probability distribution reaches 99.9% as the threshold. (For example, set to 15). This mechanism ensures that the segmented region is considered a valid candidate only when the threshold calculated by Otsu is significantly higher than the background noise level.
[0084] For example, in a background difference image containing tiny pores, most background pixels have gray values between 0 and 10, while the pore region has gray values between 80 and 150. After traversing and calculating, the Otsu algorithm found that at a threshold... The inter-class variance is the largest. Since 45 is greater than the preset lower limit of 15, the system determines 45 as the optimal segmentation threshold. Based on this threshold, binarization processing is performed, setting all pixels with gray values greater than 45 to 255 (white) and the rest to 0 (black), generating the binarized defect candidate mask that clearly identifies the location of the pores.
[0085] In step S15, the binarized defect candidate mask is subjected to morphological filtering and hole filling processing based on a preset texture direction to obtain a refined defect connected region, including:
[0086] Construct an asymmetric structural element whose major axis is perpendicular to the preset texture direction;
[0087] The asymmetric structuring element is used to perform a morphological opening operation on the binarized defect candidate mask to obtain an intermediate image after disconnecting the pseudo-defect noise distributed along the texture direction;
[0088] A morphological closing operation is performed on the intermediate image to obtain the refined defect connected region after filling the internal holes of the defect and connecting the fractured area.
[0089] It should be noted that constructing an asymmetric structural element whose major axis is perpendicular to the preset texture direction is achieved using a linear structuring element. The system first obtains the preset texture direction of the wind turbine rotor core. (For example, horizontal rolling texture corresponds to) Then, construct a length of Width is (in A linear matrix kernel, and rotate the kernel to The direction. This asymmetric design takes advantage of the fact that pseudo-defect noise is usually distributed along the texture direction (i.e., parallel to the direction). True defects (such as cracks) typically cross the grain or appear in patches (i.e., not strictly parallel to the grain). Morphological differences.
[0090] It is worth noting that the preset texture direction The determination is based on the fixed record of rotor core manufacturing process parameters; or based on Radon transform of historical defect-free sample images, selecting the angle corresponding to the energy extremum point in the transform domain as the preset value. The length of the linear structural element... The determination is based on statistical analysis of the width of pseudo-defect noise in historical images. The system statistically analyzes the width of noise slices along the direction perpendicular to the texture, calculates the 95th percentile (e.g., 5 pixels) of its distribution, and then... Set to an odd value slightly larger than the width (e.g., 7 pixels) to ensure that the structuring element cannot be embedded inside the spurious defect noise.
[0091] It should be noted that the morphological opening operation performed using the asymmetric structuring element follows an erosion-then-dilation logic. First, the binarized defect candidate mask is eroded using the asymmetric structuring element (such as a vertical line segment). This operation involves sliding the structuring element across the image, retaining only the center pixels of the foreground region that completely contain the structuring element. Since the structuring element is perpendicular to the texture, thin, elongated noise (pseudo-defects) distributed along the texture direction cannot be fully contained geometrically and are thus identified as background and removed during erosion. Real defects, due to their larger size or orientation matching the structuring element, have core regions that can contain it and are therefore retained. Subsequently, a dilation operation is performed to restore the retained core regions to near their original size. The image generated by this process is the intermediate image, in which most of the noise along the texture has been broken or removed.
[0092] It should be noted that the morphological closing operation performed on the intermediate image follows a logic of dilation followed by erosion, and typically uses an isotropic structuring element (such as a circular or square kernel). This operation first dilates the intermediate image, using the physical size of the structuring element to fill in the tiny holes (holes) inside defects and bridge neighboring regions (gaps) that are broken due to thresholding or opening operations; then, erosion is performed to restore the original boundary contours of the connected components.
[0093] It is worth noting that the size of the isotropic structuring element used in morphological closing operations (e.g., The determination of the structuring element size is based on statistical analysis of the internal fracture gaps of defects in historical ground truth data. The system calculates the average fracture gap width generated by real continuous defects during binarization, and selects a size larger than this average width as the structuring element size to ensure that the connectivity of the defects can be effectively reconstructed.
[0094] For example, assume the preset texture direction is horizontal ( ), the system builds a The vertical linear structuring element. In the binarized mask, there exists a horizontal texture noise with a width of 2 pixels and a vertical crack with a width of 6 pixels. During the erosion stage of the opening operation, due to The height of the vertical structuring element (7 pixels) is greater than the height of the horizontal noise (2 pixels), so the structuring element cannot be contained within the noise region, and therefore the noise is removed. However, the width (6 pixels) and height (much greater than 7 pixels) of the vertical crack allow the structuring element to be placed, thus the crack core is preserved, resulting in the noise-removed intermediate image. During the closing operation phase, if there is a 3-pixel-wide breakpoint in the middle of the crack, the system utilizes... The square structural element is processed. During the expansion process, the crack edge extends outward, and the 3-pixel breakpoint is filled and connected; the subsequent erosion process causes the crack boundary to shrink back, but the breakpoint has been connected. Finally, the refined defect connectivity domain is obtained after denoising and connection.
[0095] In step S16, using the refined defect connected component as a mask, the corresponding local grayscale distribution is extracted from the single-channel grayscale image, and sub-pixel-level geometric feature calculations are performed to obtain defect geometric attribute data, including:
[0096] The refined defective connected component is used to extract the region of interest from the single-channel grayscale image;
[0097] Within the region of interest, the sub-pixel coordinates of the defect edge are calculated using the gray-scale centroid method or the orthogonal moment method;
[0098] The centroid position and maximum circumscribed rectangle size of the defect are calculated based on the subpixel coordinates. Combined with the pre-calibrated camera pixel equivalent parameters, the actual physical area of the defect is calculated to obtain the geometric attribute data of the defect.
[0099] It should be noted that the extraction of the region of interest (ROI) from the single-channel grayscale image using the refined defective connected components is achieved through a mask mapping operation. The system iterates through the binarized connected component mask obtained in step S15, obtains the coordinates of the minimum bounding rectangle of each connected component, and expands it outward by a preset buffer (e.g., 5 pixels) to form the ROI window. Subsequently, this window is used to crop the single-channel grayscale image generated in step S11 to obtain a local image matrix containing real grayscale information. This operation ensures that subsequent geometric calculations are based on real surface lighting features, rather than merely on the binarized shape.
[0100] It should be noted that the use of the gray-scale centroid method to calculate the sub-pixel coordinates of the defect edge aims to overcome the precision limitations of traditional pixel grids and achieve 0.1-pixel-level positioning. In this embodiment, the calculation first uses the Sobel operator to calculate the gradient magnitude map of the region of interest and extracts the gradient distribution sequence along the normal direction of the defect contour. Subsequently, the gray-scale centroid formula is applied to this gradient distribution sequence to calculate the precise position of the edge. For a length of... gradient sequence (in (pixel index), its subpixel center coordinates The calculation formula is:
[0101]
[0102] Using this formula, the system can improve the positioning accuracy of defect edges from integer pixel coordinates. Upgrade to floating-point coordinates .
[0103] It is worth noting that, in the specific implementation of calculating the sub-pixel coordinates of the defect edge using the gray-scale centroid method, the gradient sequence... The gradient magnitude sequence is obtained by operators such as Sobel and extracted along the edge normal direction. To ensure computational stability, the gradient magnitude can be normalized or its absolute value can be taken before the calculation to ensure that the denominator is not zero and the calculation is valid. The formula determines the precise position of the edge by finding the centroid of the gradient energy distribution, which is a well-known sub-pixel edge detection method.
[0104] It should be noted that the calculation of the centroid position and maximum circumscribed rectangle size of the defect based on the sub-pixel coordinates is achieved using geometric moment analysis and the Rotating Calipers algorithm. First, a polygonal outline is constructed based on the sub-pixel edge coordinates. Then, Green's Theorem is used to calculate the zeroth moment (area) and first moment of the polygon, thereby deriving the accurate centroid coordinates. Secondly, the minimum area rectangle of the sub-pixel contour is calculated using the rotating caliper algorithm, and its major axis length is obtained. minor axis width The rotation angle is used as the size of the maximum bounding rectangle.
[0105] It is worth noting that the determination of the pre-calibrated camera pixel equivalent parameters is based on a precise calibration process performed during the equipment deployment phase. The system uses a high-precision ceramic checkerboard calibration plate (e.g., grid size accuracy of ±0.001mm) to acquire multiple calibration images in different poses within the camera's depth of field. By detecting the sub-pixel positions of corner points and establishing a homography matrix between the world coordinate system and the image pixel coordinate system, the actual distance represented by a single pixel in physical space is calculated. For example, the pixel equivalent of the central region of the image is determined through calculation. The value is 0.05 mm / pixel. This parameter is embedded in the system's configuration parameters and used for subsequent physical dimension conversions.
[0106] For example, for a detected scratch defect, the system extracts its Region of Interest (ROI) and calculates its sub-pixel contour using the grayscale centroid method. Based on this contour, the length of the defect in the image coordinate system is calculated to be 120.5 pixels, and the average width is 3.2 pixels. The pre-calibrated camera pixel equivalent parameter is read as 0.045 mm / pixel. Based on this, the system calculates the actual physical length of the scratch. Millimeters, actual physical width is The actual physical area is 0.76 square millimeters. These high-precision physical quantification data constitute the defect's geometric attribute data, providing a reliable basis for subsequent classification and evaluation.
[0107] In step S17, based on the defect geometric attribute data, defect spatial clustering is performed to obtain independent defect regions. The severity of these independent defect regions is then assessed using their geometric attributes to determine the final defect distribution map. This includes:
[0108] Calculate the minimum Euclidean distance between edge pixel sets of different defective connected regions, and merge connected regions whose minimum Euclidean distance is less than a preset neighborhood threshold into the same independent defective region;
[0109] Calculate the aspect ratio and area characteristics of the independent defect region;
[0110] If the aspect ratio feature is greater than a preset ratio threshold, it is determined to be a linear scratch; otherwise, it is determined to be a spot-type defect.
[0111] Based on the size of the area features, the defects are divided into different severity levels and mapped with different color labels to generate the final defect distribution map.
[0112] It should be noted that calculating the minimum Euclidean distance between the edge pixel sets of different defective connected regions and merging connected regions with a distance less than a preset neighborhood threshold is achieved using a hierarchical clustering approach based on the distance matrix. The system first extracts the edge contour point set of each refined defective connected region; for any two connected regions... and traversal All edge points in For all edge points, calculate their Euclidean distances and select the minimum value as the distance between them. Then, construct an adjacency matrix, if... If the distance is less than a preset neighborhood threshold, the two are marked as connected. Finally, the Union-Find algorithm is used to traverse the adjacency matrix and merge all directly or indirectly connected subdomains into a complete set, i.e., the defect-independent region. This operation can effectively stitch together long scratches that have broken into multiple segments due to noise interference or uneven lighting into a whole, restoring their true physical form.
[0113] It is worth noting that the determination of the preset neighborhood threshold is based on statistical analysis of fracture gaps in historical defect samples. The system collects a large number of image samples that are confirmed to be the same physical defect but segmented into multiple fragments by the algorithm, and measures the maximum gap width between these fracture fragments. The 95th percentile of this gap width distribution (e.g., 0.5 mm) is selected as the preset neighborhood threshold. This setting ensures that the vast majority of non-physical fractures can be correctly merged, while avoiding the incorrect confusion of two actually independent neighboring defects.
[0114] It should be noted that the calculation of the aspect ratio and area features of the defect-independent regions is based on the merged pixel set. For each merged defect-independent region, the system recalculates its minimum bounding rectangle (MBR). Aspect Ratio Features The calculation formula is ,in The length of the longer side of the minimum bounding rectangle. This is the length of the shorter side. Area characteristics. This is the sum of the physical areas of all original connected domains within the region (accumulated based on the sub-pixel areas already calculated in S16).
[0115] It should be noted that classifying defects into different severity levels and mapping them to color labels based on the size of the area features is achieved using a lookup table mapping method. The system loads a preset defect grading standard table, which defines the area ranges for three levels: "minor," "moderate," and "severe" (e.g., It is mild. Moderate. (Severe). The system assigns a corresponding level label to the region where the defect's area falls, mapping it to green, yellow, and red respectively. Finally, on a blank canvas proportional to the original image, the outlines of each defect's independent region are drawn and filled with the corresponding color to generate a visualized final defect distribution map.
[0116] It is worth noting that the area range thresholds in the aforementioned defect grading standard table are determined based on experimental data on the influence of the magnetic permeability of the wind turbine rotor core. By testing the impact of surface defects of different areas on the magnetic flux density and eddy current losses of the core, the lower limit of the defect area (e.g., 5 square millimeters) that would cause a decrease in motor efficiency exceeding a critical value (e.g., 0.1%) is determined and set as the threshold for the severity level. This ensures that the grading results have clear electrical performance indication significance. It is based on widely accepted internal quality standards or publicly available industry guidelines (e.g., reliability guidelines for relevant components in the IEC 61400 series standards), ensuring that the grading results are correlated with the actual performance risks of the product.
[0117] For example, the system detects two adjacent defective connected regions A and B with a minimum edge distance of 0.3 mm. Since 0.3 mm is less than the preset neighborhood threshold of 0.5 mm, the system merges them into a single defective region C. Recalculation reveals that the total physical area of region C is 6.5 square millimeters, and the aspect ratio of the merged minimum bounding rectangle is 15.0. Since 15.0 is greater than the preset aspect ratio threshold of 3.0, it is classified as a linear scratch. Because 6.5 square millimeters is greater than the severity threshold of 5 square millimeters, the system marks it as "severe" and displays the scratched area in red on the final defect distribution map, prompting quality inspectors to either repair or scrap it.
[0118] In summary, this invention effectively overcomes the technical challenges of strong rolling texture interference and uneven illumination on the surface of wind turbine rotor cores by acquiring high-resolution linear scan images and combining frequency-domain periodic texture suppression with contrast-limited local histogram equalization. By integrating background difference fitting with illumination distribution and asymmetric morphological filtering based on texture direction, it accurately eliminates pseudo-defect noise distributed along the texture and extracts high-confidence defect connected components. Furthermore, by utilizing sub-pixel-level geometric feature calculation and defect spatial clustering and grading mechanisms, it breaks through the accuracy bottleneck of traditional pixel-level detection, achieving precise quantification of the physical size of minute defects and intelligent assessment of their severity. This method can comprehensively replace traditional manual visual inspection, significantly improving the defect detection rate and quality control level in the production process of core wind power components.
[0119] Reference Figure 2 The second embodiment of the present invention provides a surface defect identification system for wind turbine rotor cores, comprising:
[0120] The image acquisition and mapping module is used to acquire raw image data of the surface of the wind turbine rotor core and perform grayscale mapping processing on the raw image data to obtain a single-channel grayscale image.
[0121] The enhancement processing module is used to perform frequency domain periodic texture suppression processing on the single-channel grayscale image to obtain a detextured image, and to perform contrast-limited local histogram equalization processing on the detextured image to obtain an enhanced feature image.
[0122] The background subtraction module is used to fit the illumination distribution of the enhanced feature image to construct a background fitting model, and to perform a difference operation between the enhanced feature image and the background fitting model to obtain a background subtraction image.
[0123] The defect segmentation module is used to perform adaptive threshold segmentation processing based on the background difference image to obtain a binarized defect candidate mask.
[0124] The morphological refinement module is used to perform morphological filtering and hole filling processing on the binarized defect candidate mask based on a preset texture direction to obtain the refined defect connected domain.
[0125] The feature calculation module is used to extract the corresponding local grayscale distribution on the single-channel grayscale image using the refined defect connected domain as a mask, and to perform sub-pixel level geometric feature calculation to obtain defect geometric attribute data.
[0126] The analysis and grading module is used to perform spatial clustering of defects based on the defect geometric attribute data to obtain independent defect regions, and to conduct severity grading assessment based on the geometric attributes of the independent defect regions to determine the final defect distribution map.
[0127] It should be noted that the wind turbine rotor core surface defect identification system provided in this embodiment of the invention is used to execute all the process steps of the wind turbine rotor core surface defect identification method in the above embodiment. The working principle and beneficial effects of the two are one-to-one, so they will not be described again.
[0128] This invention also provides an electronic device. The electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a wind turbine rotor core surface defect identification program. When the processor executes the computer program, it implements the steps described in the embodiments of the wind turbine rotor core surface defect identification method, for example... Figure 1 Step S11 is shown. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the above system embodiments, such as the image acquisition and mapping module.
[0129] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.
[0130] The electronic device may be a desktop computer, laptop, handheld computer, or smart tablet, etc. The electronic device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. It may include more or fewer components than described above, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.
[0131] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the electronic device, connecting all parts of the electronic device via various interfaces and lines.
[0132] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0133] If the modules / units integrated into the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or system capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0134] It should be noted that the system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the system embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0135] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for identifying surface defects in the rotor core of a wind turbine generator, characterized in that, include: Raw image data of the surface of the rotor core of a wind turbine is acquired, and grayscale mapping is performed on the raw image data to obtain a single-channel grayscale image. Based on the single-channel grayscale image, frequency domain periodic texture suppression processing is performed to obtain a detextured image, and the detextured image is subjected to contrast-limited local histogram equalization processing to obtain an enhanced feature image. For the enhanced feature image, an illumination distribution is fitted to the enhanced feature image to construct a background fitting model, and the enhanced feature image and the background fitting model are subjected to a difference operation to obtain a background difference image; Based on the background difference image, adaptive threshold segmentation is performed to obtain a binarized defect candidate mask; The binarized defect candidate mask is subjected to morphological filtering and hole filling based on a preset texture direction to obtain a refined defect connected domain. Using the refined defect connected domain as a mask, the corresponding local grayscale distribution is extracted from the single-channel grayscale image, and sub-pixel level geometric feature calculation is performed to obtain defect geometric attribute data. Based on the defect geometric attribute data, spatial clustering of defects is performed to obtain independent defect regions. The severity of these independent defect regions is then assessed by combining their geometric attributes to determine the final defect distribution map.
2. The method for identifying surface defects in the rotor core of a wind turbine according to claim 1, characterized in that, The process involves acquiring raw image data of the surface of the wind turbine rotor core and performing grayscale mapping on the raw image data to obtain a single-channel grayscale image, including: A high-speed linear array camera is used to scan the surface of the wind turbine rotor core line by line to obtain raw image data containing light intensity information; Based on the scanning row order and pixel order of the high-speed linear array camera, the original image data is mapped into a two-dimensional pixel matrix; The values of each pixel in the two-dimensional pixel matrix are quantized to a preset grayscale range to obtain the single-channel grayscale image.
3. The method for identifying surface defects in the rotor core of a wind turbine according to claim 1, characterized in that, The process of performing frequency domain periodic texture suppression processing on the single-channel grayscale image to obtain a detextured image, and then performing contrast-limited local histogram equalization processing on the detextured image to obtain an enhanced feature image includes: Perform a two-dimensional discrete Fourier transform on the single-channel grayscale image to obtain the frequency domain spectrum distribution map; After identifying frequency peak points in the frequency domain spectrum distribution map whose amplitude is greater than a preset frequency threshold and represent periodic texture, and excluding the central DC component, a notch filter is constructed based on the frequency peak points. The frequency domain spectrum distribution map is filtered using the notch filter, and an inverse Fourier transform is performed on the filtered spectrum to obtain the detextured image. The detextured image is divided into several non-overlapping rectangular sub-blocks, and the grayscale histogram of each rectangular sub-block is calculated. Based on a preset contrast limit threshold, the peak portion exceeding the contrast limit threshold in the grayscale histogram of each rectangular sub-block is clipped, and the total number of pixels in the clipped portion is evenly distributed to other grayscale levels in the grayscale histogram. Histogram equalization is performed on each processed rectangular sub-block, and bilinear interpolation algorithm is used to smoothly fuse the boundaries of adjacent rectangular sub-blocks to obtain the enhanced feature image.
4. The method for identifying surface defects in the rotor core of a wind turbine according to claim 1, characterized in that, The process of fitting an illumination distribution to the enhanced feature image to construct a background fitting model, and then performing a difference operation between the enhanced feature image and the background fitting model to obtain a background difference image includes: Select structuring elements of a preset scale, perform morphological opening operations or apply large-scale median filtering to the enhanced feature image, and generate a smooth background image that reflects the illumination distribution as the background fitting model. Subtract the pixel grayscale value corresponding to the background fitting model from the pixel grayscale value of the enhanced feature image point by point; The grayscale difference amplitude is calculated from the subtraction result and normalized to obtain the background difference image.
5. The method for identifying surface defects in the rotor core of a wind turbine according to claim 1, characterized in that, The step of performing adaptive threshold segmentation processing based on the background difference image to obtain a binarized defect candidate mask includes: The gray-level histogram distribution characteristics of the background difference image are statistically analyzed; Based on the statistical characteristics of the background difference image, the gray value at which the inter-class variance between the foreground and background is maximized is calculated using the maximum inter-class variance method, and determined as the optimal segmentation threshold. The background difference image is binarized using the optimal segmentation threshold, and pixels with gray values greater than the optimal segmentation threshold are marked as foreground to generate the binarized defect candidate mask.
6. The method for identifying surface defects in the rotor core of a wind turbine according to claim 1, characterized in that, The binarized defect candidate mask is subjected to morphological filtering and hole filling processing based on a preset texture direction to obtain a refined defect connected component, including: Construct an asymmetric structural element whose major axis is perpendicular to the preset texture direction; The asymmetric structuring element is used to perform a morphological opening operation on the binarized defect candidate mask to obtain an intermediate image after disconnecting the pseudo-defect noise distributed along the texture direction; A morphological closing operation is performed on the intermediate image to obtain the refined defect connected region after filling the internal holes of the defect and connecting the fractured area.
7. The method for identifying surface defects in the rotor core of a wind turbine according to claim 1, characterized in that, The process involves using the refined defect connected component as a mask to extract the corresponding local grayscale distribution on the single-channel grayscale image, and performing sub-pixel-level geometric feature calculations to obtain defect geometric attribute data, including: The refined defective connected component is used to extract the region of interest from the single-channel grayscale image; Within the region of interest, the sub-pixel coordinates of the defect edge are calculated using the gray-scale centroid method or the orthogonal moment method; The centroid position and maximum circumscribed rectangle size of the defect are calculated based on the subpixel coordinates. Combined with the pre-calibrated camera pixel equivalent parameters, the actual physical area of the defect is calculated to obtain the geometric attribute data of the defect.
8. The method for identifying surface defects in the rotor core of a wind turbine according to claim 1, characterized in that, The step of performing defect spatial clustering based on the defect geometric attribute data to obtain independent defect regions, and then combining the geometric attributes of the independent defect regions to perform severity classification assessment to determine the final defect distribution map, includes: Calculate the minimum Euclidean distance between edge pixel sets of different defective connected regions, and merge connected regions whose minimum Euclidean distance is less than a preset neighborhood threshold into the same independent defective region; Calculate the aspect ratio and area characteristics of the independent defect region; If the aspect ratio feature is greater than a preset ratio threshold, it is determined to be a linear scratch; otherwise, it is determined to be a spot-type defect. Based on the size of the area features, the defects are divided into different severity levels and mapped with different color labels to generate the final defect distribution map.
9. A system for identifying surface defects in the rotor core of a wind turbine generator, characterized in that, include: The image acquisition and mapping module is used to acquire raw image data of the surface of the wind turbine rotor core and perform grayscale mapping processing on the raw image data to obtain a single-channel grayscale image. The enhancement processing module is used to perform frequency domain periodic texture suppression processing on the single-channel grayscale image to obtain a detextured image, and to perform contrast-limited local histogram equalization processing on the detextured image to obtain an enhanced feature image. The background subtraction module is used to fit the illumination distribution of the enhanced feature image to construct a background fitting model, and to perform a difference operation between the enhanced feature image and the background fitting model to obtain a background subtraction image. The defect segmentation module is used to perform adaptive threshold segmentation processing based on the background difference image to obtain a binarized defect candidate mask. The morphological refinement module is used to perform morphological filtering and hole filling processing on the binarized defect candidate mask based on a preset texture direction to obtain the refined defect connected domain. The feature calculation module is used to extract the corresponding local grayscale distribution on the single-channel grayscale image using the refined defect connected domain as a mask, and to perform sub-pixel level geometric feature calculation to obtain defect geometric attribute data. The analysis and grading module is used to perform spatial clustering of defects based on the defect geometric attribute data to obtain independent defect regions, and to conduct severity grading assessment based on the geometric attributes of the independent defect regions to determine the final defect distribution map.