A computer vision-based image feature recognition method
By using adaptive bilateral filtering and grayscale histogram equalization preprocessing, combined with Gaussian pyramid and dynamic weight fusion methods, the problems of incomplete preprocessing, multi-scale feature matching mismatch, and threshold incompatibility in existing image feature recognition technologies are solved, achieving high-quality image feature recognition results.
Patent Information
- Application Number
- CN202511660537.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-11-13
AI Technical Summary
Existing image feature recognition technologies suffer from problems such as incomplete preprocessing, mismatch of multi-scale features, insufficient feature fusion, and unsuitable matching thresholds in complex scenarios, resulting in inaccurate recognition results and poor robustness.
An adaptive bilateral filtering algorithm is used for preprocessing, combined with gray-level histogram equalization, multi-scale features are extracted through a Gaussian pyramid hierarchical structure, local texture and global contour features are dynamically weighted and fused, and an adaptive matching threshold is determined based on Euclidean distance for recognition.
It achieves high-quality preprocessing in complex scenarios, multi-scale collaborative feature extraction, dynamic weight fusion and adaptive matching, thereby improving the accuracy and robustness of feature recognition.
Smart Images

Figure CN121121383B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision, and more particularly to an image feature recognition method based on computer vision. Background Technology
[0002] Image feature recognition technology, as a core research direction in the field of computer vision, can be traced back to the early traditional methods based on manually designed features. These methods achieve target recognition by extracting low-level visual features such as edges, textures, and colors from images. In the preprocessing stage, Gaussian filtering or mean filtering with fixed parameters is often used to suppress noise. With the evolution of technology, in order to improve adaptability to complex scenes, multi-scale feature extraction technology has gradually emerged. Among them, the Gaussian pyramid hierarchical structure is widely used because it can simulate the multi-scale characteristics of human vision, while the histogram of oriented gradients has become one of the mainstream features due to its excellent representation ability of local texture information. In recent years, in order to further enhance the robustness of features, multi-feature fusion strategies have begun to attract attention. By combining local texture features with global contour features, the limitations of single features can be made up for. In the matching stage, Euclidean distance, cosine similarity and other measurement methods are often used, and the feature matching results are judged by setting a fixed threshold.
[0003] Although existing image feature recognition technologies have been applied in many fields, they still have significant shortcomings in complex real-world scenarios: In the preprocessing stage, parameters such as kernel radius and gray-level difference threshold in traditional filtering algorithms are mostly set empirically or fixed values, making it difficult to dynamically adjust them according to the gradient magnitude and gray-level distribution of local image regions. This results in incomplete denoising in noisy areas or excessive smoothing in areas rich in detail, leading to the loss of key features. In the multi-scale feature extraction process, the scale parameters of the Gaussian pyramid and the size of the feature extraction unit are often designed independently, without forming a linkage mechanism between scale and feature parameters. This easily leads to a mismatch between the feature resolution of different scale layers and the target size, affecting the collaborative representation ability of multi-scale features. In the feature fusion stage, existing dynamic weight allocation mostly relies on a single indicator, failing to comprehensively consider the inter-class discriminative power and local information complexity of features, resulting in insufficient effective information in the fused features. In the matching stage, the setting of fixed thresholds ignores the differences in sample feature distribution, easily leading to false matches or missed matches when feature distance fluctuates greatly, reducing the reliability of the recognition results. Summary of the Invention
[0004] The purpose of this invention is to overcome the above-mentioned problems and provide an image feature recognition method based on computer vision. To achieve the above objective, this invention adopts the following technical solution:
[0005] A computer vision-based image feature recognition method includes the following steps:
[0006] S1: Preprocess the input image by removing image noise using an adaptive bilateral filtering algorithm and correcting image gray-level deviations using gray-level histogram equalization to obtain the preprocessed image;
[0007] S2: Perform multi-scale feature extraction on the preprocessed image. Obtain local texture features and global contour features at different scales through the hierarchical structure of the Gaussian pyramid. The local texture features are the directional gradient histogram features of each scale layer, and the global contour features are the edge contour features of the top layer of the Gaussian pyramid.
[0008] S3: Perform dynamic weighted fusion of local texture features and global contour features. Calculate dynamic fusion weights based on feature response values and local complexity factors. After weighted fusion of local texture features and global contour features, perform dimensionality reduction on the fused features using principal component analysis algorithm to obtain the target feature set.
[0009] S4: Match the target feature set with the reference features in the preset feature library, calculate the Euclidean distance between the target feature set and the reference features, determine the adaptive matching threshold based on the distribution characteristics of the Euclidean distance, and determine the matching result through the adaptive matching threshold to complete image feature recognition.
[0010] Further, in step S1, the filter kernel radius of the adaptive bilateral filtering algorithm... for:
[0011] ;
[0012] The gray-level difference threshold of the adaptive bilateral filtering algorithm for:
[0013] ;
[0014] in, The radius of the filter kernel. The gradient magnitude is the gradient value of a local region centered on the pixel to be processed. The preset maximum gradient magnitude, The floor is the preset maximum filter kernel radius. This is the floor function. The grayscale difference threshold. This represents the maximum gradient magnitude across all local regions in the image. It represents the minimum gradient magnitude of all local regions in the image.
[0015] Further, in step S1, the grayscale histogram equalization includes: dividing the input image into multiple non-overlapping sub-regions, calculating the grayscale probability density function for each sub-region, constructing a cumulative distribution function based on the probability density function, and mapping the original grayscale values of each sub-region to the target grayscale range through the corresponding cumulative distribution function to obtain the grayscale corrected preprocessed image.
[0016] Further, in step S2, the Gaussian pyramid layered structure includes The scale layer, the first Gaussian standard deviation of layer scale for:
[0017] ;
[0018] The cell unit size of the directional gradient histogram feature is: ;
[0019] in, For the first Gaussian standard deviation of each scale layer A scale factor greater than 1. This refers to the scale layer number. The initial Gaussian standard deviation of the bottom layer is given by the first Gaussian pyramid, and the top layer of the Gaussian pyramid is given by the second Gaussian standard deviation. Each scale layer; The side length of the cell unit. This represents the side length of the preprocessed image. For the first The scaling ratio of each scale layer relative to the underlying layer.
[0020] Further, in step S2, the extraction of the local texture features includes: in the first... At each scale level, the image is divided into segments of size [size missing]. For each cell unit, a gradient histogram of a predetermined number of directions is generated. Adjacent cell units are combined into block units, and the gradient histograms of the block units are normalized to obtain the first... The directional gradient histogram features of each scale layer are concatenated to form local texture features. The extraction of the global contour features includes: extracting edge contours at the top of the Gaussian pyramid using an edge detection algorithm; and converting the pixel coordinate sequence of the edge contours into a fixed-dimensional contour feature vector using a contour descriptor algorithm. This contour feature vector is the global contour feature. .
[0021] Further, in step S3, the dynamic fusion weights are calculated as follows: Calculate local texture features. inter-class variance Within-class variance The local feature response values are obtained. Calculate global contour features inter-class variance Within-class variance To obtain the global feature response value ,
[0022] The local complexity factor of the local texture feature is: ;
[0023] The local complexity factor of the global contour feature is: ;
[0024] The dynamic fusion weight is:
[0025] ;
[0026] ;
[0027] The fusion feature is:
[0028] ;
[0029] The preset feature library contains category information for reference features. For local feature response values, For the inter-class variance of local texture features, For the intra-class variance of local texture features, This is the global characteristic response value. The inter-class variance of the global contour features. The intra-class variance of the global contour features; The local complexity factor for local texture features. This represents the ratio of the number of edge pixels to the total number of pixels in the local texture feature map. The texture entropy of the local texture feature map. The local complexity factor for the global contour features. This is the ratio of the number of edge pixels to the total number of pixels in the global contour feature map. The texture entropy of the global contour feature map; Dynamic fusion weights for local texture features. The dynamic fusion weights for global contour features; As a feature of fusion, For local texture features, This represents the global contour feature.
[0030] Furthermore, in step S3, when the principal component analysis algorithm performs dimensionality reduction on the fused features, the covariance matrix of the fused features is:
[0031] ;
[0032] in, Let covariance matrix be the variance matrix. To fuse the original dimensions of features, For the matrix form of fused features, The mean vector of the fused features; For matrix transpose; for covariance matrix Eigenvalue decomposition is performed to obtain eigenvalues and eigenvectors. The eigenvalues are sorted from largest to smallest. Principal components with a cumulative contribution rate greater than a preset contribution rate threshold are selected. The fused features are projected onto the feature space formed by the selected principal components to obtain the dimensionality-reduced features.
[0033] Further, in step S4, the Euclidean distance for:
[0034] ;
[0035] The adaptive matching threshold is:
[0036] ;
[0037] in, Let Euclidean distance be the target feature set and the reference feature set. For feature dimension index, For the target feature set in the th Numerical values in dimensions For reference features in the first Numerical values in a dimension; For adaptive matching threshold, The mean Euclidean distance between the target feature set and all reference features in the preset feature library. The standard deviation of Euclidean distance. This is the threshold adjustment coefficient; when the Euclidean distance... Less than the adaptive matching threshold When the target feature set matches the corresponding reference feature, it is determined.
[0038] Further, in step S2, the construction of the Gaussian pyramid layer structure includes: performing Gaussian blur processing on the preprocessed image to obtain the first layer sub-image; performing Gaussian blur processing on the first layer sub-image to obtain the second layer sub-image; and so on, to obtain the third layer sub-image. Layered images.
[0039] Further, in step S4, the construction of the preset feature library includes: acquiring sample images, performing steps S1 to S3 sequentially on the sample images to obtain a sample feature set; and storing the sample feature set in association with sample category information to form a preset feature library.
[0040] The advantages of this invention are:
[0041] 1. This invention dynamically adjusts the filter kernel radius and gray-level difference threshold through an adaptive bilateral filtering algorithm, and preprocesses the input image by combining gray-level histogram equalization. This effectively removes image noise and corrects gray-level deviations, avoiding edge blurring or loss of details caused by traditional fixed-parameter filtering. It provides high-quality preprocessed images for multi-scale feature extraction and improves the accuracy of feature extraction.
[0042] 2. This invention constructs a Gaussian pyramid hierarchical structure and links the Gaussian standard deviation of different scale layers with the cell unit size of the directional gradient histogram features to extract local texture features and global contour features. This achieves the collaborative extraction of multi-scale features, enhances the adaptability of features to targets of different sizes, avoids the sensitivity of single-scale features to changes in target size, and improves the representation ability of image features in complex scenes.
[0043] 3. This invention calculates dynamic fusion weights based on feature response values and local complexity factors, performs weighted fusion of local texture features and global contour features, and determines adaptive matching thresholds through Euclidean distance distribution features. This achieves optimized weight allocation for feature fusion, giving higher weights to features with high discriminative power and rich information, while improving the adaptability of the matching threshold to sample distribution, reducing false or missed matches caused by fixed thresholds, and improving the accuracy and robustness of image feature recognition. Attached Figure Description
[0044] The accompanying drawings, which form part of this application, are used to provide a further understanding of the application and to make other features, objects, and advantages of the application more apparent. The illustrative embodiments and descriptions of this application are used to explain the application and do not constitute an undue limitation of the application.
[0045] In the attached diagram:
[0046] Figure 1 This is a flowchart of an image feature recognition method based on computer vision in Example 1.
[0047] Figure 2 This is a flowchart of image preprocessing in image feature recognition based on computer vision in Example 1.
[0048] Figure 3 This is a flowchart of multi-scale feature extraction in image feature recognition based on computer vision in Example 1.
[0049] Figure 4 This is a flowchart of feature fusion and dimensionality reduction in image feature recognition based on computer vision in Example 1.
[0050] Figure 5 This is a flowchart of feature matching and recognition in image feature recognition based on computer vision in Example 1. Detailed Implementation
[0051] The present invention will now be described in detail and specifically through specific embodiments to enable a better understanding of the invention. However, the following embodiments do not limit the scope of protection of the present invention.
[0052] Example 1
[0053] like Figure 1-5 As shown, an image feature recognition method based on computer vision includes the following steps:
[0054] S1: Preprocess the input image by removing image noise using an adaptive bilateral filtering algorithm and correcting image gray-level deviations using gray-level histogram equalization to obtain the preprocessed image;
[0055] S2: Perform multi-scale feature extraction on the preprocessed image. Obtain local texture features and global contour features at different scales through the hierarchical structure of the Gaussian pyramid. The local texture features are the directional gradient histogram features of each scale layer, and the global contour features are the edge contour features of the top layer of the Gaussian pyramid.
[0056] S3: Perform dynamic weighted fusion of local texture features and global contour features. Calculate dynamic fusion weights based on feature response values and local complexity factors. After weighted fusion of local texture features and global contour features, perform dimensionality reduction on the fused features using principal component analysis algorithm to obtain the target feature set.
[0057] S4: Match the target feature set with the reference features in the preset feature library, calculate the Euclidean distance between the target feature set and the reference features, determine the adaptive matching threshold based on the distribution characteristics of the Euclidean distance, and determine the matching result through the adaptive matching threshold to complete image feature recognition.
[0058] In a specific embodiment, the image feature recognition process is achieved through four stages in sequence: preprocessing, multi-scale feature extraction, dynamic weight fusion, and matching.
[0059] In the preprocessing stage, an adaptive bilateral filtering algorithm is used to remove image noise. This algorithm can dynamically adjust the filtering parameters according to the gradient magnitude of local image regions, avoiding the problems of incomplete noise removal in noise-dense areas or over-smoothing in detail-rich areas by traditional fixed parameter filtering. At the same time, gray-level deviation is corrected by gray-level histogram equalization to enhance image contrast, making details in dark areas clearer and gray-level distribution in bright areas more uniform, thus providing a high-quality input image for feature extraction.
[0060] In the multi-scale feature extraction stage, sub-images of different scales are generated using the hierarchical structure of the Gaussian pyramid. The directional gradient histogram features are extracted at each scale layer as local texture features to capture local details of the target. Edge contour features are extracted at the top of the pyramid as global contour features to reflect the overall structure of the target. By combining local and global features, the shortcomings of single features in representing complex targets are compensated.
[0061] In the dynamic weight fusion stage, dynamic fusion weights are calculated based on feature response values and local complexity factors, so that the weights of local textures and global contours in the fused features are adaptively adjusted according to the feature's own discriminative ability and local information complexity, avoiding the problem of insufficient effective information ratio caused by traditional fixed weight fusion. After fusion, the features are dimensionality reduced by principal component analysis algorithm, which reduces the data dimension while retaining the main feature information, thereby reducing the amount of computation in the matching stage.
[0062] In the matching stage, the similarity is measured by calculating the Euclidean distance between the target feature set and the reference features, and an adaptive matching threshold is determined based on the distance distribution characteristics to avoid mismatches or missed matches when the fixed threshold fluctuates in the feature distance, thereby improving the reliability of the recognition results.
[0063] Further, in step S1, the filter kernel radius of the adaptive bilateral filtering algorithm... for:
[0064] ;
[0065] The gray-level difference threshold of the adaptive bilateral filtering algorithm for:
[0066] ;
[0067] in, The radius of the filter kernel. The gradient magnitude is the gradient value of a local region centered on the pixel to be processed. The preset maximum gradient magnitude, The floor is the preset maximum filter kernel radius. This is the floor function. The grayscale difference threshold. This represents the maximum gradient magnitude across all local regions in the image. It represents the minimum gradient magnitude of all local regions in the image.
[0068] In a specific embodiment, the adaptive bilateral filtering algorithm achieves accurate noise reduction by dynamically adjusting the filter kernel radius and the gray-level difference threshold. (Filter kernel radius) The calculation is based on the gradient magnitude in the local region. With maximum gradient magnitude Based on the ratio, combined with the maximum filter kernel radius The ratio is dynamically determined: when the gradient magnitude is large in a local area, the ratio is small, and the kernel radius is reduced to avoid over-smoothing and loss of detail; when the gradient magnitude is small, the ratio is large, and the kernel radius is increased to enhance the denoising effect. Gray-level difference threshold. The threshold is determined by one-quarter of the difference between the maximum and minimum gradient magnitudes of all local regions of the image, so that the threshold can adapt to the global gray-level distribution characteristics of the image. When the gray-level difference of the image is large, the threshold is increased to retain the edge features with obvious gray-level jumps; when the gray-level difference is small, the threshold is decreased to finely distinguish local gray-level changes and improve the clarity and feature integrity of the filtered image.
[0069] Further, in step S1, the grayscale histogram equalization includes: dividing the input image into multiple non-overlapping sub-regions, calculating the grayscale probability density function for each sub-region, constructing a cumulative distribution function based on the probability density function, and mapping the original grayscale values of each sub-region to the target grayscale range through the corresponding cumulative distribution function to obtain the grayscale corrected preprocessed image.
[0070] In a specific embodiment, gray-level histogram equalization achieves precise correction of gray-level deviations through region-based processing. After dividing the input image into multiple non-overlapping sub-regions, the gray-level probability density function and cumulative distribution function are independently calculated for each sub-region, allowing the gray-level mapping process to adapt to the gray-level distribution characteristics of local areas. Compared to global equalization, which can easily lead to reduced local contrast, region-based equalization can stretch the gray-level range in dark areas, enhancing the visibility of details in dark areas, and compress the gray-level range in bright areas, avoiding information loss due to overexposure. This results in a more uniform gray-level distribution and more moderate contrast in the corrected image, providing a more stable gray-level foundation for feature extraction.
[0071] Further, in step S2, the Gaussian pyramid layered structure includes The scale layer, the first Gaussian standard deviation of layer scale for:
[0072] ;
[0073] The cell unit size of the directional gradient histogram feature is: ;
[0074] in, For the first Gaussian standard deviation of each scale layer A scale factor greater than 1. This refers to the scale layer number. The initial Gaussian standard deviation of the bottom layer is given by the first Gaussian pyramid, and the top layer of the Gaussian pyramid is given by the second Gaussian standard deviation. Each scale layer; The side length of the cell unit. This represents the side length of the preprocessed image. For the first The scaling ratio of each scale layer relative to the underlying layer.
[0075] In a specific embodiment, the Gaussian pyramid hierarchical structure enhances the multi-scale feature collaborative representation capability through the coordinated design of scale parameters and feature extraction units. Gaussian standard deviation of layer scale According to the scale layer number The exponential growth pattern causes the blurriness of each scale layer to increase progressively, generating multi-scale sub-images that conform to the characteristics of human visual perception; the cell unit size characteristic of the oriented gradient histogram. Linked to the scaling ratio of the scale layer, according to the scale layer number By increasing the scale and decreasing the cell size, smaller cell units are used in high-scale layers to avoid low feature resolution, while larger cell units are used in low-scale layers to avoid feature redundancy. Through the linkage between scale parameters and cell unit size, the feature resolution of different scale layers is matched to the target size at the corresponding scale, improving the adaptability of multi-scale features to targets of different sizes.
[0076] Further, in step S2, the extraction of the local texture features includes: in the first... At each scale level, the image is divided into segments of size [size missing]. For each cell unit, a gradient histogram of a predetermined number of directions is generated. Adjacent cell units are combined into block units, and the gradient histograms of the block units are normalized to obtain the first... The directional gradient histogram features of each scale layer are concatenated to form local texture features. The extraction of the global contour features includes: extracting edge contours at the top of the Gaussian pyramid using an edge detection algorithm; and converting the pixel coordinate sequence of the edge contours into a fixed-dimensional contour feature vector using a contour descriptor algorithm. This contour feature vector is the global contour feature. .
[0077] In a specific embodiment, local texture features are comprehensively captured by stitching together multi-scale oriented gradient histogram features. At each scale layer, the image is divided into... Cellular units are used to statistically analyze multi-directional gradient histograms and enhance feature robustness through block unit normalization. Local texture features are formed by stitching together features from different scales. This approach can reflect local texture changes of a target at different scales, enhancing the ability to represent surface details. Global contour features characterize the overall structure of the target by vectorizing the top-level edge contour of the pyramid. The top-level image undergoes multiple rounds of Gaussian blurring, resulting in less noise interference and clearer edge contours. A contour descriptor algorithm converts the pixel coordinate sequence into a fixed-dimensional vector. This facilitates integration with local texture features. The combination of local texture and global contour features allows the features to contain both detailed texture information and overall structural information of the target, improving the ability to distinguish complex-shaped targets.
[0078] Further, in step S3, the dynamic fusion weights are calculated as follows: Calculate local texture features. inter-class variance Within-class variance The local feature response values are obtained. Calculate global contour features inter-class variance Within-class variance To obtain the global feature response value ,
[0079] The local complexity factor of the local texture feature is: ;
[0080] The local complexity factor of the global contour feature is: ;
[0081] The dynamic fusion weight is:
[0082] ;
[0083] ;
[0084] The fusion feature is:
[0085] ;
[0086] The preset feature library contains category information for reference features. For local feature response values, For the inter-class variance of local texture features, For the intra-class variance of local texture features, This is the global characteristic response value. The inter-class variance of the global contour features. The intra-class variance of the global contour features; The local complexity factor for local texture features. This represents the ratio of the number of edge pixels to the total number of pixels in the local texture feature map. The texture entropy of the local texture feature map. The local complexity factor for the global contour features. This is the ratio of the number of edge pixels to the total number of pixels in the global contour feature map. The texture entropy of the global contour feature map; Dynamic fusion weights for local texture features. The dynamic fusion weights for global contour features; As a feature of fusion, For local texture features, This represents the global contour feature.
[0087] In a specific embodiment, dynamic weight fusion adaptively adjusts the fusion weights by combining the comprehensive feature response value and the local complexity factor. Local feature response value and global feature response value Calculated based on the ratio of inter-class variance to intra-class variance, a larger ratio indicates stronger inter-class discriminative ability and a higher weighting; local complexity factor. and The complexity of local feature information is measured by multiplying the edge pixel ratio and texture entropy. Higher complexity indicates richer details in the feature, and a higher weighting percentage. Dynamic weight fusion. and based on and The ratio calculation makes the fusion features The weights of local texture and global contour change dynamically with the feature's own discriminative ability and information complexity, avoiding the problem of effective information being diluted in traditional fixed-weight fusion, and improving the comprehensive representation ability of the fused features for the target.
[0088] Furthermore, in step S3, when the principal component analysis algorithm performs dimensionality reduction on the fused features, the covariance matrix of the fused features is:
[0089] ;
[0090] in, Let covariance matrix be the variance matrix. To fuse the original dimensions of features, For the matrix form of fused features, The mean vector of the fused features; For matrix transpose; for covariance matrix Eigenvalue decomposition is performed to obtain eigenvalues and eigenvectors. The eigenvalues are sorted from largest to smallest. Principal components with a cumulative contribution rate greater than a preset contribution rate threshold are selected. The fused features are projected onto the feature space formed by the selected principal components to obtain the dimensionality-reduced features.
[0091] In a specific embodiment, the principal component analysis algorithm simplifies data and preserves key information by reducing the dimensionality of the fused features. (Covariance matrix) The calculation of the fused feature matrix With mean vector Based on the bias, it reflects the correlation between the dimensions of the features; the eigenvalues obtained through eigenvalue decomposition represent the variance contribution of each principal component. After sorting them from largest to smallest, the principal components with a cumulative contribution rate greater than a preset threshold are selected to ensure that the features retain the main information of the original features after dimensionality reduction. By reducing the feature dimensions and the computational load in the matching stage, redundant information and noise interference in the features are removed, thereby improving the stability of the features and the matching efficiency.
[0092] Further, in step S4, the Euclidean distance for:
[0093] ;
[0094] The adaptive matching threshold is:
[0095] ;
[0096] in, Let Euclidean distance be the target feature set and the reference feature set. For feature dimension index, For the target feature set in the th Numerical values in dimensions For reference features in the first Numerical values in a dimension; For adaptive matching threshold, The mean Euclidean distance between the target feature set and all reference features in the preset feature library. The standard deviation of Euclidean distance. This is the threshold adjustment coefficient; when the Euclidean distance... Less than the adaptive matching threshold When the target feature set matches the corresponding reference feature, it is determined.
[0097] In a specific embodiment, the matching stage uses Euclidean distance to measure feature similarity. An adaptive matching threshold is determined based on distance distribution characteristics to improve matching accuracy. (Euclidean distance) The similarity between features is intuitively reflected by calculating the square root of the sum of the squares of the differences between the target feature set and the reference features in each dimension; adaptive matching threshold. Based on distance mean Standard deviation The threshold is dynamically determined, increasing when the feature distance distribution is dispersed to avoid missed matches and decreasing when the distribution is concentrated to avoid false matches. This adaptive thresholding approach avoids the drawback of fixed thresholds ignoring the differences in sample feature distribution, thus improving the reliability of the recognition results.
[0098] Further, in step S2, the construction of the Gaussian pyramid layer structure includes: performing Gaussian blur processing on the preprocessed image to obtain the first layer sub-image; performing Gaussian blur processing on the first layer sub-image to obtain the second layer sub-image; and so on, to obtain the third layer sub-image. Layered images.
[0099] In a specific embodiment, the Gaussian pyramid layered structure generates multi-scale sub-images through layer-by-layer Gaussian blurring, providing a foundation for multi-scale feature extraction. The first layer sub-image is obtained by performing a first round of Gaussian blurring on the preprocessed image; the second layer sub-image is obtained by performing Gaussian blurring on the first layer sub-image, and so on until the next layer is obtained. The method employs a multi-scale sub-image layer approach, where the size and blur level of each sub-image decrease progressively to simulate the visual effect of the human eye observing targets at different distances. By constructing multi-scale sub-images, feature extraction can capture features of targets of different sizes, improving the method's adaptability to changes in target scale.
[0100] Further, in step S4, the construction of the preset feature library includes: acquiring sample images, performing steps S1 to S3 sequentially on the sample images to obtain a sample feature set; and storing the sample feature set in association with sample category information to form a preset feature library.
[0101] In a specific embodiment, the preset feature library is constructed by standardizing sample images, providing a reliable reference benchmark for feature matching. After acquiring sample images, they are processed according to the same preprocessing, multi-scale feature extraction, dynamic weight fusion, and dimensionality reduction process as the image to be identified, resulting in a standardized sample feature set. The sample feature set is then associated with and stored with sample category information to ensure that the target category can be quickly located based on feature similarity during matching. The standardized preset feature library avoids matching deviations caused by inconsistencies between the sample feature extraction process and the image to be identified, improving the consistency and accuracy of recognition.
[0102] The specific embodiments of the present invention have been described in detail above, but they are merely examples, and the present invention is not equivalent to the specific embodiments described above. For those skilled in the art, any equivalent modifications and substitutions to the present invention are also within the scope of the present invention. Therefore, all equivalent transformations and modifications made without departing from the spirit and scope of the present invention should be covered within the scope of the present invention.
Claims
1. A computer vision-based image feature recognition method, characterized in that, Includes the following steps: S1: Preprocess the input image by removing image noise using an adaptive bilateral filtering algorithm and correcting image gray-level deviations using gray-level histogram equalization to obtain the preprocessed image; S2: Perform multi-scale feature extraction on the preprocessed image. Obtain local texture features and global contour features at different scales through the hierarchical structure of the Gaussian pyramid. The local texture features are the directional gradient histogram features of each scale layer, and the global contour features are the edge contour features of the top layer of the Gaussian pyramid. S3: Perform dynamic weighted fusion of local texture features and global contour features. Calculate dynamic fusion weights based on feature response values and local complexity factors. After weighted fusion of local texture features and global contour features, perform dimensionality reduction on the fused features using principal component analysis algorithm to obtain the target feature set. The dynamic fusion weights are calculated as follows: Calculate local texture features. inter-class variance Within-class variance The local feature response values are obtained. Calculate global contour features inter-class variance Within-class variance To obtain the global feature response value , The local complexity factor of the local texture feature is: ; The local complexity factor of the global contour feature is: ; The dynamic fusion weight is: ; ; The fusion feature is: ; The preset feature library contains category information for reference features. For local feature response values, For the inter-class variance of local texture features, For the intra-class variance of local texture features, This is the global characteristic response value. The inter-class variance of the global contour features. The intra-class variance of the global contour features; The local complexity factor for local texture features. This represents the ratio of the number of edge pixels to the total number of pixels in the local texture feature map. The texture entropy of the local texture feature map. The local complexity factor for the global contour features. This is the ratio of the number of edge pixels to the total number of pixels in the global contour feature map. The texture entropy of the global contour feature map; Dynamic fusion weights for local texture features. The dynamic fusion weights for global contour features; As a feature of fusion, For local texture features, For global contour features; S4: Match the target feature set with the reference features in the preset feature library, calculate the Euclidean distance between the target feature set and the reference features, determine the adaptive matching threshold based on the distribution characteristics of the Euclidean distance, and determine the matching result through the adaptive matching threshold to complete image feature recognition.
2. The image feature recognition method based on computer vision according to claim 1, characterized in that, In step S1, the filter kernel radius of the adaptive bilateral filtering algorithm is... for: ; The gray-level difference threshold of the adaptive bilateral filtering algorithm for: ; in, The radius of the filter kernel. The gradient magnitude is the gradient value of a local region centered on the pixel to be processed. The preset maximum gradient magnitude, The floor is the preset maximum filter kernel radius. This is the floor function. The grayscale difference threshold. This represents the maximum gradient magnitude across all local regions in the image. It represents the minimum gradient magnitude of all local regions in the image.
3. The image feature recognition method based on computer vision according to claim 2, characterized in that, In step S1, the grayscale histogram equalization includes: dividing the input image into multiple non-overlapping sub-regions, calculating the grayscale probability density function for each sub-region, constructing a cumulative distribution function based on the probability density function, and mapping the original grayscale values of each sub-region to the target grayscale range through the corresponding cumulative distribution function to obtain the grayscale corrected preprocessed image.
4. The image feature recognition method based on computer vision according to claim 3, characterized in that, In step S2, the Gaussian pyramid layered structure includes The scale layer, the first Gaussian standard deviation of layer scale for: ; The cell unit size of the directional gradient histogram feature is: ; in, For the first Gaussian standard deviation of each scale layer A scale factor greater than 1. This refers to the scale layer number. The initial Gaussian standard deviation of the bottom layer is given by the first Gaussian pyramid, and the top layer of the Gaussian pyramid is given by the second Gaussian standard deviation. Each scale layer; The side length of the cell unit. This represents the side length of the preprocessed image. For the first The scaling ratio of each scale layer relative to the underlying layer.
5. The image feature recognition method based on computer vision according to claim 4, characterized in that, In step S2, the extraction of the local texture features includes: in the first... At each scale level, the image is divided into segments of size [size missing]. For each cell unit, a gradient histogram of a predetermined number of directions is generated. Adjacent cell units are combined into block units, and the gradient histograms of the block units are normalized to obtain the first... The directional gradient histogram features of each scale layer are concatenated to form local texture features. The extraction of the global contour features includes: extracting edge contours at the top of the Gaussian pyramid using an edge detection algorithm; and converting the pixel coordinate sequence of the edge contours into a fixed-dimensional contour feature vector using a contour descriptor algorithm. This contour feature vector is the global contour feature. .
6. The image feature recognition method based on computer vision according to claim 5, characterized in that, In step S3, when the principal component analysis algorithm performs dimensionality reduction on the fused features, the covariance matrix of the fused features is: ; in, Let covariance matrix be the variance matrix. To fuse the original dimensions of features, For the matrix form of fused features, The mean vector of the fused features; For matrix transpose; for covariance matrix Eigenvalue decomposition is performed to obtain eigenvalues and eigenvectors. The eigenvalues are sorted from largest to smallest. Principal components with a cumulative contribution rate greater than a preset contribution rate threshold are selected. The fused features are projected onto the feature space formed by the selected principal components to obtain the dimensionality-reduced features.
7. The image feature recognition method based on computer vision according to claim 6, characterized in that, In step S4, the Euclidean distance for: ; The adaptive matching threshold is: ; in, Let Euclidean distance be the target feature set and the reference feature set. For feature dimension index, For the target feature set in the th Numerical values in dimensions For reference features in the first Numerical values in a dimension; For adaptive matching threshold, The mean Euclidean distance between the target feature set and all reference features in the preset feature library. The standard deviation of Euclidean distance. This is the threshold adjustment coefficient; when the Euclidean distance... Less than the adaptive matching threshold When the target feature set matches the corresponding reference feature, it is determined.
8. The image feature recognition method based on computer vision according to claim 7, characterized in that, In step S2, the construction of the Gaussian pyramid layer structure includes: performing Gaussian blur processing on the preprocessed image to obtain the first layer sub-image; performing Gaussian blur processing on the first layer sub-image to obtain the second layer sub-image; and so on, to obtain the third layer sub-image. Layered images.
9. The image feature recognition method based on computer vision according to claim 8, characterized in that, In step S4, the construction of the preset feature library includes: acquiring sample images, performing steps S1 to S3 sequentially on the sample images to obtain a sample feature set; and storing the sample feature set in association with sample category information to form a preset feature library.
Citation Information
Patent Citations
Pedestrian re-identification method based on weighted feature fusion
CN114639124A
PCB welding-free optical device positioning method
CN118823126A