GLCM texture feature extraction method and system based on dynamic multi-scale weighting

By using a dynamic multi-scale weighted GLCM texture feature extraction method, the problems of texture scale adaptability and noise sensitivity of traditional GLCM methods are solved, and higher accuracy texture feature extraction and recognition are achieved.

CN121147547BActive Publication Date: 2026-02-03SHANDONG AGRICULTURAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511659823.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-13
Publication Date
2026-02-03
Estimated Expiration
2045-11-13

AI Technical Summary

Technical Problem

Traditional GLCM methods cannot adapt to the differences in texture scale in different scenes, and feature redundancy and sensitivity to noise affect recognition accuracy.

Method used

A dynamic multi-scale weighted GLCM texture feature extraction method is adopted. Through image preprocessing and texture scale awareness, the gray level and orientation of the gray-level co-occurrence matrix are dynamically adjusted. Combined with adaptive weight allocation, feature extraction and noise reduction optimization are performed.

Benefits of technology

It improves the adaptability and robustness of texture features, and enhances feature discrimination and recognition accuracy in complex scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121147547B_ABST
    Figure CN121147547B_ABST
Patent Text Reader

Abstract

The application discloses a GLCM texture feature extraction method and system based on dynamic multi-scale weighting, relates to the technical field of image feature extraction, and performs image preprocessing and texture scale sensing on an input image; performs accurate adaptation of pixel distance and texture scale on the processed image, dynamically adjusts the gray level of a gray level co-occurrence matrix GLCM according to image texture complexity, and constructs a dynamic multi-scale GLCM; performs weight self-adaptive distribution for each texture scale and direction of the dynamic multi-scale GLCM, performs original feature extraction in combination with the distributed weight; performs weighted fusion on the extracted original features to obtain fused features, and performs anti-noise optimization to obtain standardized texture features. The scale parameter dynamic adjustment and feature weighting mechanism are adopted, the problems of poor adaptability of traditional GLCM to complex texture scenes and insufficient feature distinguishability are solved, and the representation ability of texture features to a measured sample and the feature distinguishability and robustness in a complex texture scene are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image feature extraction technology, specifically to a GLCM texture feature extraction method and system based on dynamic multi-scale weighting. Background Technology

[0002] Texture feature extraction plays a core role in detection and recognition tasks across many fields. Gray-Level Co-Occurrence Matrix (GLCM) is currently the mainstream texture feature extraction tool, which discovers the spatial distribution pattern of texture by statistically analyzing the co-occurrence probability of different pixel gray levels in an image.

[0003] However, traditional GLCM methods have significant technical limitations. Traditional GLCM uses a single, fixed pixel distance (e.g., 1 or 2 pixels) and grayscale levels (e.g., 64 or 256 levels), which cannot adapt to the differences in texture scale across different scenes. Furthermore, it only calculates texture features in four directions: 0°, 45°, 90°, and 135°, without considering the different contributions of texture from different directions to the target attributes. Simultaneously, the contrast, energy, and other features extracted by traditional GLCM exhibit strong correlations, easily leading to feature redundancy, and are sensitive to image noise, directly affecting the recognition accuracy of subsequent models.

[0004] To address the shortcomings of traditional GLCM methods, existing improvements often focus on single-parameter optimization (such as adaptive grayscale) or feature post-processing (such as PCA dimensionality reduction), neglecting to consider a comprehensive improvement mechanism across the entire process. This makes it difficult to meet the demands for high-precision texture feature extraction in complex scenarios. Therefore, there is an urgent need for a GLCM texture feature extraction method that can dynamically adapt parameters based on image texture characteristics and enhance key information. Summary of the Invention

[0005] In order to solve the above-mentioned technical problems, this application proposes the following technical solution:

[0006] In a first aspect, embodiments of this application provide a GLCM texture feature extraction method based on dynamic multi-scale weighting, including:

[0007] Image preprocessing and texture scale awareness are performed on the input image to achieve differential fusion of multi-scale information in the image;

[0008] The processed image is precisely adapted to pixel distance and texture scale, and the gray level of the gray-level co-occurrence matrix (GLCM) is dynamically adjusted according to the image texture complexity to construct a dynamic multi-scale GLCM.

[0009] For each texture scale and direction of the dynamic multi-scale GLCM, adaptive weight allocation is performed, and the original features are extracted in combination with the allocated weights.

[0010] The extracted original features are weighted and fused to obtain fused features, and noise reduction optimization is performed to obtain standardized texture features.

[0011] In one possible implementation, the image preprocessing and texture scale awareness of the input image to achieve differential fusion of multi-scale information of the image includes:

[0012] The combined algorithm of bilateral filtering and wavelet thresholding denoising first preserves texture edge information while suppressing Gaussian noise through bilateral filtering;

[0013] The image is then subjected to wavelet decomposition, and a modified exponential threshold function is used to process the high-frequency coefficients to further eliminate salt-and-pepper noise.

[0014]

[0015] in: These are wavelet high-frequency coefficients. For adaptive threshold, , This represents the total number of high-frequency coefficients.

[0016] An adaptive grayscale stretching algorithm is used to obtain the foreground and background regions of the image through Otsu threshold segmentation, and the grayscale of the foreground region is normalized.

[0017]

[0018] in: These are the pixel values ​​of the preprocessed image. , These represent the minimum and maximum grayscale values ​​of the foreground region, respectively. This is the normalized grayscale image;

[0019] Multiple Sobel operators of different sizes were used to calculate the gradient maps of the image in the x and y directions. , , And calculate the gradient energy map at each scale:

[0020]

[0021] Gradient energy map for each scale Perform histogram statistics and calculate gradient energy entropy. :

[0022]

[0023] in: Let be the gray-level probability distribution of the gradient energy map at the k-th scale. The gradient energy level number;

[0024] Select the two scales with the largest gradient energy entropy , As the core scale for subsequent GLCM, the weighting coefficients of both scales are calculated simultaneously. , To achieve differentiated fusion of multi-scale information:

[0025] .

[0026] In one possible implementation, the precise adaptation of the processed image to pixel distance and texture scale, and the dynamic adjustment of the gray levels of the Gray-Level Co-occurrence Matrix (GLCM) based on the image texture complexity to construct a dynamic multi-scale GLCM, includes:

[0027] According to the scale , Calculate the corresponding GLCM pixel distance , This achieves precise adaptation between distance and texture scale.

[0028]

[0029] Dynamically adjust the GLCM grayscale level L based on the image texture complexity;

[0030] For each optimal scale According to distance grayscale ,direction By combining parameters, a multi-directional GLCM can be constructed: Then, normalization processing is performed to eliminate the influence of image brightness differences:

[0031]

[0032] in: For the k-th scale, Directional grayscale and The number of times they coexist.

[0033] In one possible implementation, the dynamic adjustment of the GLCM grayscale level L based on the image texture complexity includes:

[0034] Texture complexity is used to calculate the richness of grayscale variations in a reaction image. :

[0035]

[0036] in: , These are the image width and height, respectively.

[0037] Based on the texture complexity Dynamically adjust grayscale levels according to preset range This ensures that the grayscale level matches the texture information density.

[0038] In one possible implementation, the step of adaptively assigning weights to each texture scale and orientation of the dynamic multi-scale GLCM, and then extracting the original features based on the assigned weights, includes:

[0039] Differentiated weights are assigned to each direction of the dynamic multi-scale GLCM to enhance the feature information of key directions;

[0040] For each scale ,direction From the above Multiple core texture features are extracted and combined with directional weights. Calculate the weighted features within the scale.

[0041] In one possible implementation, assigning differentiated weights to each direction of the dynamic multi-scale GLCM to enhance the feature information of key directions includes:

[0042] For each scale ,direction GLCM Extract contrast As a quantitative indicator of directional texture contribution: ;

[0043] For the same scale Calculate the weight for each of the four directions. To achieve weight enhancement in key areas: .

[0044] In one possible implementation, the statement for each scale ,direction From the above Multiple core texture features are extracted and combined with directional weights. Calculate the weighted features within the scale, including:

[0045] Contrast, which reflects the sharpness and depth of textures, is extracted separately. Energy reflecting the uniformity of texture The correlation reflecting the directionality and continuity of texture. Inverse difference moment, reflecting the smoothness of the texture Entropy, which reflects texture complexity Texture uniformity deviation and the uniformity deviation of quantized texture in spatial distribution As a core texture feature ,in, for The mean;

[0046] For each feature Calculation scale Weighted features :

[0047] ,in: For scale ,direction The original eigenvalues ​​below.

[0048] In one possible implementation, the step of weighted fusing of the extracted original features to obtain fused features and performing noise reduction optimization to obtain standardized texture features includes:

[0049] Based on the obtained scale weights , By fusing the weighted features from both scales, preliminary fused features are obtained. :

[0050] ;

[0051] Based on the feature robustness screening mechanism, the improvement of the The ability to resist noise is used to obtain the final standardized texture feature vector. .

[0052] In one possible implementation, the feature-based robustness screening mechanism improves the... The ability to resist noise is used to obtain the final standardized texture feature vector. ,include:

[0053] For multiple similar images of the same scene, preliminary fusion features are extracted separately. ;

[0054] Calculate the coefficient of variation for each feature. : ,in: Standard deviation The mean;

[0055] Set the coefficient of variation threshold ,reserve Less than or equal to The characteristics of high-variance unstable features are eliminated;

[0056] The preserved features are mapped to the [0,1] interval using min-max normalization to obtain the final standardized texture feature vector. : ,in, The minimum value of the feature The maximum value of the feature.

[0057] Secondly, embodiments of this application provide a GLCM texture feature extraction system based on dynamic multi-scale weighting, including:

[0058] The image processing module is used to perform image preprocessing and texture scale perception on the input image to achieve differential fusion of multi-scale information in the image;

[0059] The Dynamic Multi-Scale GLCM construction module is used to accurately adapt the processed image to pixel distance and texture scale, and dynamically adjust the gray level of the Gray-Level Co-occurrence Matrix (GLCM) according to the image texture complexity to construct the Dynamic Multi-Scale GLCM.

[0060] The original feature extraction module is used to adaptively allocate weights for each texture scale and direction of the dynamic multi-scale GLCM, and extract original features by combining the allocated weights.

[0061] The texture feature extraction module is used to perform weighted fusion of the extracted original features to obtain fused features and perform noise reduction optimization to obtain standardized texture features.

[0062] In the embodiments of this application, a dynamic adjustment of scale parameters and a feature weighting mechanism are adopted to solve the problems of poor adaptability and insufficient feature discrimination of traditional GLCM to complex texture scenes, thereby improving the ability of texture features to characterize the measured samples and the feature discrimination and robustness in complex texture scenes. Attached Figure Description

[0063] Figure 1 A flowchart illustrating a GLCM texture feature extraction method based on dynamic multi-scale weighting provided in this application embodiment;

[0064] Figure 2 This is a schematic diagram of the discrimination results of a conventional fixed-parameter GLCM model provided in an embodiment of this application;

[0065] Figure 3 A schematic diagram of the discrimination results of the dynamic multi-scale weighted GLCM model provided in the embodiments of this application;

[0066] Figure 4 This is a schematic diagram of a GLCM texture feature extraction system based on dynamic multi-scale weighting, provided in an embodiment of this application. Detailed Implementation

[0067] The present solution will now be described in conjunction with the accompanying drawings and specific embodiments.

[0068] See Figure 1 The GLCM texture feature extraction method based on dynamic multi-scale weighting provided in this embodiment includes:

[0069] S101 performs image preprocessing and texture scale perception on the input image to achieve differential fusion of multi-scale information of the image.

[0070] This embodiment first performs standardization processing on the input image, employing a combined algorithm of bilateral filtering and wavelet thresholding for denoising. The bilateral filtering (spatial standard deviation σ) is used first. s =2-5, grayscale standard deviation σᵣ=10-20) preserves texture edge information while suppressing Gaussian noise. Then, the image is decomposed into 3 layers of wavelet using the sym8 wavelet basis, and the high-frequency coefficients are processed using an improved exponential threshold function (Formula 1) to further eliminate salt-and-pepper noise.

[0071] (1)

[0072] in: These are wavelet high-frequency coefficients. For adaptive threshold ( , (Total number of high-frequency coefficients).

[0073] An "adaptive grayscale stretching" algorithm is employed, using Otsu thresholding to obtain the image foreground (target region) and background. Grayscale normalization is performed only on the foreground region (Formula 2) to avoid background grayscale fluctuations interfering with texture statistics.

[0074] (2)

[0075] in, These are the pixel values ​​of the preprocessed image. , These represent the minimum and maximum grayscale values ​​of the foreground region, respectively. This is a normalized 8-bit grayscale image (0-255).

[0076] A multi-scale gradient energy entropy algorithm is designed to achieve automatic perception of image texture scale. Three Sobel operators of different sizes (3×3, 5×5, and 7×7) are used to calculate the gradient maps of the image in the x and y directions, respectively. , ( ), and calculate the gradient energy map at each scale. :

[0077] (3)

[0078] Gradient energy map for each scale Perform histogram statistics and calculate gradient energy entropy. (Formula 4) A higher entropy value indicates richer texture information at that scale:

[0079] (4)

[0080] in: Let be the gray-level probability distribution of the gradient energy map at the k-th scale. The gradient energy level is set to 32 levels in this embodiment.

[0081] Select the two scales with the largest gradient energy entropy , (like , As the core scale for subsequent GLCM, the weighting coefficients of both scales are calculated simultaneously. , To achieve differentiated fusion of multi-scale information:

[0082] (5)

[0083] S102 performs precise matching of pixel distance and texture scale on the processed image, and dynamically adjusts the gray level of the GLCM according to the image texture complexity to construct a dynamic multi-scale GLCM.

[0084] First, based on the optimal scale , Calculate the corresponding GLCM pixel distance , This achieves precise adaptation between distance and texture scale.

[0085] (6)

[0086] For example, when hour, (Adapts to micro-textures), when hour, (Adapts to mid-scale textures), avoiding the shortcomings of traditional fixed-distance adaptation to textures of different scales.

[0087] In this embodiment, a texture complexity-grayscale mapping mechanism is proposed, which dynamically adjusts the GLCM grayscale level L according to the image texture complexity.

[0088] Specifically, the texture complexity, which reflects the richness of grayscale variations in the image, is first calculated. :

[0089] (7)

[0090] in: , These are the image width and height, respectively.

[0091] Then, based on texture complexity Dynamically adjust gray levels according to Table 1. This ensures that the grayscale level matches the texture information density.

[0092] Table 1 Texture Complexity and Gray Level Adaptation Table

[0093]

[0094] This embodiment not only includes the traditional approach in calculating GLCM. Four directions, plus an additional Four directions, for a total of eight directions, enable more precise capture of texture directionality information. For each optimal scale... ( , ), by "distance" grayscale ,direction The parameter combination is used to construct an 8-direction GLCM matrix. ( Then, normalization processing is performed to eliminate the influence of image brightness differences:

[0095] (8)

[0096] in: For the k-th scale, Directional grayscale and The number of times they coexist.

[0097] S103, perform adaptive weight allocation for each texture scale and direction of the dynamic multi-scale GLCM, and extract the original features by combining the allocated weights.

[0098] In this embodiment, in order to extract the original features, a differentiated weight is first assigned to each direction to enhance the feature information of the key directions.

[0099] Specifically, this includes calculating the directional texture contribution: for each scale ,direction GLCM matrix Extract contrast As a quantitative indicator of the contribution of directional texture, higher contrast indicates a greater contribution of the directional texture to the target attribute.

[0100] (9)

[0101] Orientation weight calculation: for the same scale Calculate the weight for each of the four directions. To achieve weight enhancement in key areas:

[0102] (10)

[0103] Then, for each scale ,direction From GLCM matrix Six core texture features were extracted and combined with directional weights. Calculate weighted features within the scale. Specifically, this includes:

[0104] First, core texture features are extracted. In this embodiment, the extracted features include: contrast ( ): Reflects the clarity and depth of texture; energy ( ): Reflects the uniformity of the texture; the higher the energy, the more regular the texture; correlation ( ): Reflects the directionality and continuity of texture; inverse difference moment ( ): Reflects the smoothness of the texture; entropy ( ): Reflects the complexity of the texture; a new term "texture uniformity deviation" is introduced. "): Quantifies the uniformity deviation of texture in spatial distribution, making up for the inadequacy of traditional features in representing local texture unevenness.

[0105] (11)

[0106] in, for The mean;

[0107] Then for each feature Calculation scale Weighted features :

[0108] (12)

[0109] in: For scale ,direction The original eigenvalues ​​below.

[0110] S104, the extracted original features are weighted and fused to obtain fused features, and noise reduction optimization is performed to obtain standardized texture features.

[0111] This example incorporates the scale weights calculated in step S101. , By fusing the weighted features from both scales, preliminary fused features are obtained. :

[0112] (13)

[0113] A robust feature selection mechanism is introduced to improve the feature's resistance to noise. Specifically, this includes: feature variation coefficient calculation: for 10 similar images of the same scene (e.g., 10 images of healthy crop leaves), preliminary fusion features are extracted. Calculate the coefficient of variation for each feature. A smaller coefficient of variation indicates a more stable characteristic.

[0114] (14)

[0115] in: Standard deviation This is the mean.

[0116] Robust Feature Selection: Setting a Threshold for the Coefficient of Variation ,reserve The features are analyzed, and unstable features with high coefficients of variation are removed. For the retained features, "min-max normalization" is used to map them to the [0,1] interval to obtain the final standardized texture feature vector. :

[0117] (15)

[0118] in, , These are the minimum and maximum values ​​of the feature, respectively.

[0119] The obtained standardized texture feature vector The output can be directly used as input for subsequent machine learning models (such as SVM, ANN, CNN) for tasks such as object detection, attribute recognition, and state classification.

[0120] To verify the above-mentioned GLCM texture feature extraction method based on dynamic multi-scale weighting, this embodiment applies the method to the discrimination of different types of pork.

[0121] The specific experimental steps are as follows:

[0122] 1. Sample collection and standardization.

[0123] Longissimus dorsi muscle was collected from the same batch of three-way crossbred (Duroc × Landrace × Large White) pigs at the same commercial slaughterhouse. After removing tendons and fascia from the back, the meat was cut into uniform 2-3 cm thick cuts. Hyperspectral images of the fresh meat were collected immediately post-slaughter on day 0. The remaining samples were numbered, packaged in trays and plastic wrap, and placed in a 4°C cold storage for aging and maturation. Hyperspectral images of the chilled meat were collected on days 2 and 4.

[0124] 2. Collect hyperspectral images.

[0125] Start the hyperspectral imaging system and preheat for 30 minutes (to ensure stable halogen lamp brightness and constant camera sensor temperature). During the preheating period, maintain the laboratory ambient temperature at 25±1℃ and humidity at 55±1%, and avoid airflow and light interference. Specifically, set the parameters according to the parameters in Table 2.

[0126] Table 2 Parameter Setting Reference Table

[0127]

[0128] 3. Texture features are extracted by using a dynamic multi-scale weighting method combined with a gray-level co-occurrence matrix.

[0129] Open ENVI 5.6, import the corrected hyperspectral image, manually select pure muscle regions avoiding fat and fascia, then filter pure muscle pixels using a grayscale threshold (120-200), finally determining the ROI for each sample to be 2×2cm² (pixel size 200×200), ensuring that the ROI contains only muscle fiber tissue without other interference. Extract the average reflectance spectrum of the ROI to generate a hyperspectral average reflectance map, save it as a "TXT" file for subsequent feature extraction.

[0130] Using bilateral filtering (spatial standard deviation σ) s =3, grayscale standard deviation σᵣ=15) + 3rd order SG convolution smoothing (window size 9)" combined algorithm, while preserving texture edge information, reduces spectral noise intensity by more than 60%. Convert the ROI image to an 8-bit grayscale image (0-255), where For ROI pixel values, , These are the minimum and maximum pixel values ​​of the ROI, respectively, to eliminate brightness differences between different samples.

[0131] Using Sobel operators of sizes 3×3, 5×5, and 7×7, the gradient maps of the grayscale image in the x and y directions are calculated respectively. , ( ), calculate gradient energy maps at various scales .

[0132] For each scale Perform 32 levels of grayscale and statistically analyze the grayscale probability distribution. Calculate gradient energy entropy Select The two largest scales are used as core scales (in this embodiment, the optimal scale for hot fresh meat is...). , The optimal size for chilled fresh meat is , ), and calculate the scale weights (hot fresh meat) , chilled meat , ).

[0133] According to the optimal scale According to the formula Calculate the pixel distance of GLCM ( hour , hour , hour This adapts to different sample texture scales. It calculates the sample texture complexity. Hot fresh meat (Medium complexity), with gray levels chilled meat (Low complexity), set gray levels This ensures that the grayscale level matches the texture information density.

[0134] For each optimal scale Pixel distance grayscale ,exist Constructing GLCM matrices in eight directions ( The texture contribution in each direction was calculated using contrast as an indicator, and the values ​​were 92.5, 89.3, 88.3, ​​85.7, 90.1, 87.2, 86.7, and 84.9, respectively.

[0135] Calculate the directional weights, and the 0° directional weights for hot fresh meat. 22.5° direction 45° direction 67.5° direction 90° direction weight 112.5° direction 135° direction 157.5° direction This achieves weight enhancement in the critical direction (0°).

[0136] From each scale ,direction Six types of texture features are extracted from the GLCM matrix, including contrast (Con), energy (Eng), correlation (Cor), inverse moment (Hom), entropy (Ent), and the newly created "texture uniformity deviation Dev" in this embodiment.

[0137] Calculate the weighted features for each scale, such as hot fresh meat. Scale-weighted contrast Combining scale weights , Preliminary fusion characteristics were obtained, and the fusion contrast of hot fresh meat was observed. .

[0138] The coefficient of variation was calculated based on the preliminary fusion characteristics of 225 samples. ,set up ,reserve The 5 types of features (removed) The entropy value features are then mapped to the [0,1] interval to obtain the final 5-dimensional texture feature vector (e.g., the feature vector of the hot fresh meat sample is [0.72, 0.35, 0.61, 0.48, 0.53]).

[0139] 4. Establish a discriminant model.

[0140] The 5D texture feature vectors of 225 samples were divided into a training set (180 samples) and a test set (45 samples) in an 8:2 ratio. Support Vector Machine (SVM) was used as the discriminant model, with the radial basis function (RBF) chosen as the kernel function. The parameters were optimized using a grid search: penalty coefficient... nuclear parameters To avoid overfitting while ensuring classification accuracy, the evaluation metrics used are accuracy, sensitivity, specificity, and F1 score as the core evaluation indicators, calculated as follows:

[0141] Accuracy:

[0142] Sensitivity:

[0143] Specificity:

[0144] F1 score: ( , )

[0145] The results of the discrimination are shown in Figure 2 and 3. Figure 3 ,according to Figure 2 and Figure 3 As can be seen, the accuracy of the test set reached 95.56%, with only 2 hot fresh samples being misclassified as chilled fresh. The reason for the misclassification was that the myofibril contraction of these samples was low, and their texture features were highly similar to those of hot fresh meat. Overall, the results show that the dynamic multi-scale weighted GLCM feature + SVM model of this invention can effectively distinguish between hot and chilled fresh meat, and its performance is better than that of the traditional fixed parameter GLCM method (the traditional method has an accuracy of 88.89% on the test set).

[0146] Corresponding to the GLCM texture feature extraction method based on dynamic multi-scale weighting provided in the above embodiments, this application also provides an embodiment of a GLCM texture feature extraction system based on dynamic multi-scale weighting.

[0147] See Figure 4 A GLCM texture feature extraction system 20 based on dynamic multi-scale weighting includes:

[0148] Image processing module 201 is used to perform image preprocessing and texture scale perception on the input image to achieve differential fusion of multi-scale information of the image.

[0149] The dynamic multi-scale GLCM construction module 202 is used to accurately adapt the processed image to pixel distance and texture scale, and dynamically adjust the gray level of the gray-level co-occurrence matrix GLCM according to the image texture complexity to construct a dynamic multi-scale GLCM.

[0150] The original feature extraction module 203 is used to adaptively allocate weights for each texture scale and direction of the dynamic multi-scale GLCM, and extract original features in combination with the allocated weights.

[0151] The texture feature extraction module 204 is used to perform weighted fusion of the extracted original features to obtain fused features and perform noise reduction optimization to obtain standardized texture features.

[0152] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, or the existence of B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects have an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0153] The above description is merely a specific embodiment of this application. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application. The protection scope of this application should be determined by the protection scope of the claims.

Claims

1. A GLCM texture feature extraction method based on dynamic multi-scale weighting, characterized in that, include: Image preprocessing and texture scale awareness are performed on the input image to achieve differential fusion of multi-scale information, including: The combined algorithm of bilateral filtering and wavelet thresholding denoising first preserves texture edge information while suppressing Gaussian noise through bilateral filtering; The image is then subjected to wavelet decomposition, and a modified exponential threshold function is used to process the high-frequency coefficients to further eliminate salt-and-pepper noise. in: These are wavelet high-frequency coefficients. For adaptive threshold, , This represents the total number of high-frequency coefficients. An adaptive grayscale stretching algorithm is used to obtain the foreground and background regions of the image through Otsu threshold segmentation, and the grayscale of the foreground region is normalized. in: These are the pixel values ​​of the preprocessed image. , These represent the minimum and maximum grayscale values ​​of the foreground region, respectively. This is the normalized grayscale image; Multiple Sobel operators of different sizes were used to calculate the gradient maps of the image in the x and y directions. , , And calculate the gradient energy map at each scale: Gradient energy map for each scale Perform histogram statistics and calculate gradient energy entropy. : in: Let be the gray-level probability distribution of the gradient energy map at the k-th scale. The gradient energy level number; Select the two scales with the largest gradient energy entropy , As the core scale for subsequent GLCM, the weighting coefficients of both scales are calculated simultaneously. , To achieve differentiated fusion of multi-scale information: ; The processed image undergoes precise adaptation between pixel distance and texture scale, and the gray levels of the Gray-Level Co-occurrence Matrix (GLCM) are dynamically adjusted based on the image texture complexity to construct a dynamic multi-scale GLCM, including: According to the scale , Calculate the corresponding GLCM pixel distance , This achieves precise adaptation between distance and texture scale. Dynamically adjust the GLCM grayscale level L based on the image texture complexity; For each optimal scale According to distance grayscale ,direction By combining parameters, a multi-directional GLCM can be constructed: Then, normalization processing is performed to eliminate the influence of image brightness differences: in: For the k-th scale, Directional grayscale and The number of times of symbiosis; For each texture scale and direction of the dynamic multi-scale GLCM, adaptive weight allocation is performed, and the original features are extracted in combination with the allocated weights. The extracted original features are weighted and fused to obtain fused features, and noise reduction optimization is performed to obtain standardized texture features.

2. The GLCM texture feature extraction method based on dynamic multi-scale weighting according to claim 1, characterized in that, The dynamic adjustment of GLCM grayscale level L based on image texture complexity includes: Texture complexity is used to calculate the richness of grayscale variations in a reaction image. : in: , These are the image width and height, respectively. Based on the texture complexity Dynamically adjust grayscale levels according to preset range This ensures that the grayscale level matches the density of the texture information.

3. The GLCM texture feature extraction method based on dynamic multi-scale weighting according to claim 2, characterized in that, The step involves adaptively assigning weights to each texture scale and direction of the dynamic multi-scale GLCM, and then extracting the original features based on the assigned weights, including: Differentiated weights are assigned to each direction of the dynamic multi-scale GLCM to enhance the feature information of key directions; For each scale ,direction From the above Multiple core texture features are extracted and combined with directional weights. Calculate the weighted features within the scale.

4. The GLCM texture feature extraction method based on dynamic multi-scale weighting according to claim 3, characterized in that, The process of assigning differentiated weights to each direction of the dynamic multi-scale GLCM to enhance the feature information of key directions includes: For each scale ,direction GLCM Extract contrast As a quantitative indicator of directional texture contribution: ; For the same scale Calculate the weight for each of the four directions. To achieve weight enhancement in key areas: .

5. The GLCM texture feature extraction method based on dynamic multi-scale weighting according to claim 4, characterized in that, The specific scale ,direction From the above Multiple core texture features are extracted and combined with directional weights. Calculate the weighted features within the scale, including: Contrast, which reflects the sharpness and depth of textures, is extracted separately. Energy reflecting the uniformity of texture The correlation reflecting the directionality and continuity of texture. Inverse difference moment, reflecting the smoothness of the texture Entropy, which reflects texture complexity Texture uniformity deviation and the uniformity deviation of quantized texture in spatial distribution As a core texture feature ,in, for The mean; For each feature Calculation scale Weighted features : ,in: For scale ,direction The original eigenvalues ​​below.

6. The GLCM texture feature extraction method based on dynamic multi-scale weighting according to claim 5, characterized in that, The step of weighted fusing of the extracted original features to obtain fused features and performing noise reduction optimization to obtain standardized texture features includes: Based on the obtained scale weights , By fusing the weighted features from both scales, preliminary fused features are obtained. : ; Based on the feature robustness screening mechanism, the improvement of the The ability to resist noise is used to obtain the final standardized texture feature vector. .

7. The GLCM texture feature extraction method based on dynamic multi-scale weighting according to claim 6, characterized in that, The feature-based robust screening mechanism improves the The ability to resist noise is used to obtain the final standardized texture feature vector. ,include: For multiple similar images of the same scene, preliminary fusion features are extracted separately. ; Calculate the coefficient of variation for each feature. : ,in: Standard deviation, The mean; Set the coefficient of variation threshold ,reserve Less than or equal to The characteristics of high-variance unstable features are eliminated; The preserved features are mapped to the [0,1] interval using min-max normalization to obtain the final standardized texture feature vector. : ,in, The minimum value of the feature The maximum value of the feature.

8. A GLCM texture feature extraction system based on dynamic multi-scale weighting, characterized in that, include: The image processing module is used to perform image preprocessing and texture scale awareness on the input image to achieve differential fusion of multi-scale information, including: The combined algorithm of bilateral filtering and wavelet thresholding denoising first preserves texture edge information while suppressing Gaussian noise through bilateral filtering; The image is then subjected to wavelet decomposition, and a modified exponential threshold function is used to process the high-frequency coefficients to further eliminate salt-and-pepper noise. in: These are wavelet high-frequency coefficients. For adaptive threshold, , This represents the total number of high-frequency coefficients. An adaptive grayscale stretching algorithm is used to obtain the foreground and background regions of the image through Otsu threshold segmentation, and the grayscale of the foreground region is normalized. in: These are the pixel values ​​of the preprocessed image. , These represent the minimum and maximum grayscale values ​​of the foreground region, respectively. This is the normalized grayscale image; Multiple Sobel operators of different sizes were used to calculate the gradient maps of the image in the x and y directions. , , And calculate the gradient energy map at each scale: Gradient energy map for each scale Perform histogram statistics and calculate gradient energy entropy. : in: Let be the gray-level probability distribution of the gradient energy map at the k-th scale. The gradient energy level number; Select the two scales with the largest gradient energy entropy , As the core scale for subsequent GLCM, the weighting coefficients of both scales are calculated simultaneously. , To achieve differentiated fusion of multi-scale information: ; The Dynamic Multi-Scale GLCM construction module is used to accurately adapt the processed image to pixel distance and texture scale, and dynamically adjust the gray levels of the Gray-Level Co-occurrence Matrix (GLCM) according to the image texture complexity to construct a dynamic multi-scale GLCM, including: According to the scale , Calculate the corresponding GLCM pixel distance , This achieves precise adaptation between distance and texture scale. Dynamically adjust the GLCM grayscale level L based on the image texture complexity; For each optimal scale According to distance grayscale ,direction By combining parameters, a multi-directional GLCM can be constructed: Then, normalization processing is performed to eliminate the influence of image brightness differences: in: For the k-th scale, Directional grayscale and The number of times of symbiosis; The original feature extraction module is used to adaptively allocate weights for each texture scale and direction of the dynamic multi-scale GLCM, and extract original features by combining the allocated weights. The texture feature extraction module is used to perform weighted fusion of the extracted original features to obtain fused features and perform noise reduction optimization to obtain standardized texture features.

Citation Information

Patent Citations

  • Intelligent identification method and system for asymmetric plate shape defects

    CN120580506A

  • External facade crack detection method and device based on multi-scale feature fusion, equipment and medium

    CN120635015A