Image feature focusing method based on linear Mama and convolutional neural network
By combining hyperspherical transformation and hyperspherical convolutional neural network with the Mamba algorithm, the computational efficiency and accuracy problems of existing image recognition methods in complex scenes are solved, and efficient and accurate image feature extraction and target recognition are achieved.
Patent Information
- Application Number
- CN202511722062.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-02-24
AI Technical Summary
Existing image recognition methods suffer from high computational requirements, low processing efficiency, and an inability to effectively handle high-dimensional and complex image information when dealing with complex scenes, improving recognition accuracy, and dealing with image noise and low contrast. In particular, the image recognition performance is unstable under different scales, angles, and complex backgrounds.
By combining hyperspherical transformation and hyperspherical convolutional neural network with the Mamba algorithm, and optimizing feature response through Bayesian inference and linear regression, local and global features of the image are extracted, background interference is suppressed, and the target region is accurately located.
It significantly improves the accuracy and efficiency of image feature extraction and target recognition, can efficiently and accurately focus on target areas in complex image scenes, reduces computing resource requirements, and is suitable for complex backgrounds and low-contrast images.
Smart Images

Figure CN121564362A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a linear image feature focusing method based on Mamba and convolutional neural networks. Background Technology
[0002] With the continuous development of computer vision and image processing technologies, image recognition and object detection are increasingly widely used in various fields, such as autonomous driving, medical image analysis, and security monitoring. However, existing image recognition methods still have certain limitations in handling complex scenes, improving recognition accuracy, and dealing with image noise and low contrast. Traditional image recognition methods typically rely on convolutional neural networks (CNNs) to extract image features, but these methods often face problems such as high computational requirements for large-scale data, low processing efficiency, and inability to effectively handle high-dimensional and complex image information. Especially when processing images of different scales, angles, and with complex backgrounds, the performance of traditional methods is unstable, making it difficult to meet the accuracy and real-time requirements of practical applications.
[0003] Furthermore, most current CNN-based image processing methods typically rely solely on fixed convolutional kernels to extract features from two-dimensional planar images, lacking the ability to capture deep geometric structures and topological features within the image. When faced with images possessing complex geometries, non-Euclidean structures, or different viewpoints, traditional CNNs cannot effectively transform this information into highly expressive features. Moreover, they are computationally intensive, especially when processing high-resolution or large-scale images, consuming significant computational resources and hindering real-time processing.
[0004] Existing image processing methods also have certain shortcomings in optimizing image features. Although deep learning methods can optimize feature extraction networks through backpropagation, the optimization process is overly dependent on network parameters, and the optimization effect is limited by the training data and network structure. Especially in the process of multi-level image feature extraction, due to the difference in importance of features at different levels, existing methods struggle to organically combine global and local features, resulting in the inability to accurately focus on the target region of the image, thus affecting the final target recognition effect. There is an urgent need for a novel image processing method that can extract efficient local and global features from large-scale image data and effectively address challenges such as image noise, low contrast, and complex backgrounds. Simultaneously, this method should be able to accurately focus on the target region in the image through an effective optimization mechanism, thereby improving the accuracy and efficiency of target detection and recognition.
[0005] Therefore, how to provide a linear image feature focusing method based on Mamba and convolutional neural networks is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] One objective of this invention is to propose a linear image feature focusing method based on Mamba and convolutional neural networks. This invention effectively extracts local and global features of an image by combining hyperspherical transformation and hyperspherical convolutional neural networks, optimizes feature weighting, and accurately locates the target region. Bayesian inference and linear regression are used to optimize the feature response, suppress background interference, and improve target recognition accuracy. This method achieves efficient image feature extraction, target region focusing, and accurate target recognition, making it particularly suitable for target detection tasks in complex image scenes.
[0007] The linear image feature focusing method based on Mamba and convolutional neural networks according to embodiments of the present invention includes the following steps:
[0008] Step 1: Obtain the original image to be processed, and preprocess the original image to obtain a preprocessed image with a uniform structure;
[0009] Step 2: Map the preprocessed image to a hyperspherical space using a hyperspherical transformation to obtain a hyperspherical image;
[0010] Step 3: Extract local and global features of the hyperspherical image using a spherical convolutional neural network, and generate multi-level extracted feature maps;
[0011] Step 4: Optimize the multi-level extracted feature maps using the Mamba algorithm to obtain optimized feature maps;
[0012] Step 5: Based on the optimized feature map, locate the target area through spatial localization analysis to obtain the localization feature map;
[0013] Step 6: Accurately focus and determine the focus area by calculating the feature response value of the target area in the positioning feature map, and obtain the focus feature map;
[0014] Step 7: Perform target recognition based on the focused feature map, output the target location box and category information, and obtain the recognition result image.
[0015] Optionally, the preprocessing step includes removing noise from the original image using Gaussian filtering, adjusting the denoised original image to a predetermined size, and performing Z-score normalization to obtain a preprocessed image with a uniform structure.
[0016] Optionally, the hyperspherical transformation specifically includes:
[0017] The two-dimensional coordinates of each pixel in the preprocessed image are normalized to obtain normalized image coordinates. The two-dimensional coordinates are the horizontal and vertical coordinates of each pixel in the preprocessed image. The normalized image coordinates include the normalized horizontal coordinates and normalized vertical coordinates of each pixel.
[0018] The normalization process is as follows:
[0019] Divide the horizontal coordinate of each pixel by the width of the preprocessed image to obtain the normalized horizontal coordinates;
[0020] Divide the vertical coordinate of each pixel by the height of the preprocessed image to obtain the normalized vertical coordinates.
[0021] Define a hyperspherical coordinate system, wherein the angle parameters of the hyperspherical coordinate system include longitude and latitude; the longitude determines the horizontal position of each pixel on the hypersphere, and the latitude determines the vertical position of each pixel on the hypersphere;
[0022] Multiply the normalized horizontal coordinates by 2π to map the horizontal position of the preprocessed image to the horizontal angle of the hypersphere, thus obtaining the longitude corresponding to the hypersphere coordinate system.
[0023] Subtract 0.5 from the normalized vertical coordinates and then multiply by π to map the vertical position of the preprocessed image to the vertical angle of the hypersphere, thus obtaining the latitude corresponding to the hypersphere coordinate system.
[0024] Based on the calculated longitude and latitude, the three-dimensional coordinates of each pixel in the preprocessed image in the hyperspherical coordinate system are obtained, resulting in the hyperspherical image, specifically:
[0025] In the hyperspherical coordinate system, the horizontal coordinate is the product of the hypersphere radius multiplied by the cosine of the latitude and the cosine of the longitude;
[0026] In the hyperspherical coordinate system, the vertical coordinate is the product of the hypersphere radius multiplied by the cosine of the latitude and the sine of the longitude;
[0027] In the hyperspherical coordinate system, the depth coordinate is the sine of the hypersphere radius multiplied by the latitude.
[0028] Optionally, step three specifically includes:
[0029] The hyperspherical convolution kernel is designed based on the hyperspherical coordinate system in which the hyperspherical image is located. The designed hyperspherical convolution kernel is as follows:
[0030] The spherical Gaussian kernel is obtained by selecting the spherical Gaussian function as the kernel function.
[0031] Use the spherical Gaussian kernel as the hyperspherical convolution kernel of the hyperspherical coordinate system;
[0032] A convolution operation is performed on each pixel of the hyperspherical image using a hyperspherical convolution kernel. The convolution operation is as follows:
[0033] The hyperspherical convolution kernel slides along the coordinates of the hyperspherical image in the hyperspherical coordinate system;
[0034] The hyperspherical convolution kernel performs pixel-wise element-wise multiplication with a local region of the hyperspherical image, and sums the results to generate a convolutional feature map of local features, including edge features, color features, and texture features.
[0035] The convolutional feature map is nonlinearly transformed using the ReLU nonlinear activation function to obtain the activation feature map;
[0036] Global features of hyperspherical images are extracted through multi-level hyperspherical convolution operations;
[0037] In each convolutional operation, the parameters of the hyperspherical convolution kernel are updated based on the activation feature map of the previous layer, and global features are extracted step by step. Through max pooling, multi-level extracted feature maps are obtained, which contain local and global information of the hyperspherical image.
[0038] Optionally, the feature optimization algorithm is specifically as follows:
[0039] The size of each image region in the multi-layered feature map is determined according to the required resolution;
[0040] The multi-level extracted feature map is segmented into multiple image regions according to a defined size using a sliding window method;
[0041] The Mamba algorithm is used to extract the regional features of each image region to form a regional feature vector. The regional features include edge features, color features, and texture features.
[0042] The cosine similarity between the feature vectors of each pair of image regions is calculated to measure the correlation, and a feature correlation matrix is generated. The elements in the feature correlation matrix represent the cosine similarity between the two image regions.
[0043] In the feature correlation matrix, the maximum cosine similarity of each image region is selected as the weight of the current image region;
[0044] Multiply the weight of each current image region by the feature vector of the corresponding current image region to obtain the updated feature distribution of the image region;
[0045] The prior distribution of the updated image region's feature distribution is constructed using a Gaussian distribution;
[0046] The posterior distribution is obtained by performing Bayesian inference on the prior distribution.
[0047] The optimized feature map is obtained by optimizing the feature distribution of each image region by selecting the mean of the posterior distribution.
[0048] Optionally, step five specifically includes:
[0049] Calculate the gradient of the optimized feature map in the horizontal and vertical directions to obtain the gradient magnitude and gradient direction of each pixel;
[0050] The gradient magnitude represents the intensity of the edge, and the gradient direction represents the direction of the edge;
[0051] By scanning along the gradient direction of the edge, the pixel with the largest gradient value is retained as the edge pixel;
[0052] Edge determination is performed based on preset high and low thresholds, specifically as follows:
[0053] Pixels exceeding a high threshold are considered strong edge points;
[0054] Pixels below a low threshold are considered non-edge points;
[0055] Pixels between the high and low thresholds are considered weak edge points. When a weak edge is connected to a strong edge, it is considered part of the edge.
[0056] Connect all the pixels identified as edge points to obtain the localization feature map of the target region.
[0057] Optionally, step six specifically includes:
[0058] Calculate the color feature response value of each pixel in the localization feature map. The color feature response value is the sum of the hue, saturation and brightness of the current pixel.
[0059] Calculate the texture feature response value of each pixel in the localization feature map. The texture feature response value is the sum of the contrast and entropy of the current pixel.
[0060] The color feature response value, texture feature response value, and edge feature response value are weighted according to preset weights to obtain the feature response value of each pixel.
[0061] The edge feature response value is the gradient magnitude of the pixel.
[0062] The set of pixels whose feature response values are higher than a preset threshold is calculated to form a focused region, thus obtaining a focused feature map.
[0063] Optionally, step seven specifically includes:
[0064] The target category is determined by calculating the mean and standard deviation of the color distribution and texture features of the focused area and based on the set threshold range.
[0065] Determine the target location bounding box for each identified target category;
[0066] The target location box is determined by selecting the maximum value of the upper left corner and the maximum value of the lower right corner of the feature response value of the region where the target category is located, thus obtaining the upper left corner coordinates and lower right corner coordinates of the target location box;
[0067] Based on the target category and the target location bounding box, a marker box is drawn on the focused feature map to obtain the recognition result image. The marker box includes the target category and the target location bounding box.
[0068] The beneficial effects of this invention are:
[0069] This invention significantly improves the accuracy and efficiency of image feature extraction, optimization, and target recognition by introducing techniques such as hyperspherical transformation, hyperspherical convolutional neural networks, and the Mamba algorithm. The image feature focusing method of this invention overcomes the bottlenecks of existing technologies in several aspects, especially in image feature extraction, optimization processing, and target recognition, providing an efficient, accurate, and computationally inefficient solution, offering more reliable technical support for image recognition and target detection tasks in practical applications. Specifically:
[0070] 1. Hyperspherical transformation maps images from Euclidean space to hyperspherical space, preserving their geometric structure and topological features. This is particularly beneficial when processing images with complex shapes or angles, as it better retains spatial information. This transformation makes image edges and textures more prominent, avoiding feature loss caused by improper coordinate transformation in traditional methods, thus improving the accuracy and robustness of feature extraction. Hyperspherical convolutional neural networks further effectively capture local and global features in images through spherical convolution operations, especially when image scale and viewpoint vary significantly, enabling more accurate extraction of representative features.
[0071] 2. By combining the Mamba algorithm to extract multi-level features and optimizing the feature map, the features of different regions in the image are accurately weighted, and interference from background regions is effectively suppressed. Through Bayesian inference and linear regression optimization mechanisms, the importance of each feature can be dynamically adjusted, making the feature response of the target region more prominent, thereby improving the accuracy of target localization and recognition. In addition, the feature optimization process based on the Mamba algorithm requires less computational resources, significantly reducing the computational and storage resource requirements of traditional deep learning models, making this method more efficient in practical applications.
[0072] 3. By performing precise spatial positioning analysis of the target area, this invention can accurately determine the location of the target area and ensure effective enhancement of the focused area by calculating the feature response value of the target area. This process greatly improves the accuracy of image recognition, especially in complex backgrounds and low-contrast images, enabling clear identification of targets and accurate output of target location boxes and category information. This method not only enhances the accuracy of target recognition but also effectively improves the ability to handle complex image scenes through precise focusing of feature response values. Attached Figure Description
[0073] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0074] Figure 1 This is an overall flowchart of the linear image feature focusing method based on Mamba and convolutional neural networks proposed in this invention;
[0075] Figure 2 This is a schematic diagram of the hyperspherical transformation process of the linear image feature focusing method based on Mamba and convolutional neural networks proposed in this invention.
[0076] Figure 3 This is a flowchart of the Mamba algorithm steps for the linear image feature focusing method based on Mamba and convolutional neural networks proposed in this invention. Detailed Implementation
[0077] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0078] refer to Figure 1-3 A linear image feature focusing method based on Mamba and convolutional neural networks includes the following steps:
[0079] Step 1: Obtain the original image to be processed, and preprocess the original image to obtain a preprocessed image with a uniform structure;
[0080] Step 2: Map the preprocessed image to a hyperspherical space using a hyperspherical transformation to obtain a hyperspherical image;
[0081] Step 3: Extract local and global features of the hyperspherical image using a spherical convolutional neural network, and generate multi-level extracted feature maps;
[0082] Step 4: Optimize the multi-level extracted feature maps using the Mamba algorithm to obtain optimized feature maps;
[0083] Step 5: Based on the optimized feature map, locate the target area through spatial localization analysis to obtain the localization feature map;
[0084] Step 6: Accurately focus and determine the focus area by calculating the feature response value of the target area in the positioning feature map, and obtain the focus feature map;
[0085] Step 7: Perform target recognition based on the focused feature map, output the target location box and category information, and obtain the recognition result image.
[0086] This step maps the image from Euclidean space to hyperspherical space through hyperspherical transformation, enhancing the image's geometric and topological information. A spherical convolutional neural network is used to extract local and global features of the image, and the Mamba algorithm is combined to optimize the feature map, enhancing the feature response of the target region. Through precise spatial localization and target region focusing, the target region can be accurately located in complex backgrounds, improving the accuracy and efficiency of target recognition and providing a high-precision, low-interference solution for various image recognition tasks.
[0087] In this embodiment, the preprocessing step includes removing noise from the original image using Gaussian filtering, adjusting the denoised original image to a predetermined size, and performing Z-score normalization to obtain a preprocessed image with a uniform structure.
[0088] This step effectively improves image quality and the stability of feature extraction by introducing Gaussian filtering, resizing, and Z-score normalization during image preprocessing. Gaussian filtering removes noise from the image, preventing it from interfering with subsequent processing and ensuring image clarity and accuracy. Resizing ensures consistency in subsequent processing, while Z-score normalization makes the pixel values more evenly distributed, contributing to improved accuracy in feature extraction and target recognition. This preprocessing lays a solid foundation for further image processing and enhances the robustness of image analysis methods in varying environments.
[0089] In this embodiment, the hyperspherical transformation specifically refers to:
[0090] The two-dimensional coordinates of each pixel in the preprocessed image are normalized to obtain normalized image coordinates. The two-dimensional coordinates are the horizontal and vertical coordinates of each pixel in the preprocessed image. The normalized image coordinates include the normalized horizontal coordinates and normalized vertical coordinates of each pixel.
[0091] The normalization process is as follows:
[0092] Divide the horizontal coordinate of each pixel by the width of the preprocessed image to obtain the normalized horizontal coordinates;
[0093] Divide the vertical coordinate of each pixel by the height of the preprocessed image to obtain the normalized vertical coordinates.
[0094] Define a hyperspherical coordinate system, wherein the angle parameters of the hyperspherical coordinate system include longitude and latitude; the longitude determines the horizontal position of each pixel on the hypersphere, and the latitude determines the vertical position of each pixel on the hypersphere;
[0095] Multiply the normalized horizontal coordinates by 2π to map the horizontal position of the preprocessed image to the horizontal angle of the hypersphere, thus obtaining the longitude corresponding to the hypersphere coordinate system.
[0096] Subtract 0.5 from the normalized vertical coordinates and then multiply by π to map the vertical position of the preprocessed image to the vertical angle of the hypersphere, thus obtaining the latitude corresponding to the hypersphere coordinate system.
[0097] Based on the calculated longitude and latitude, the three-dimensional coordinates of each pixel in the preprocessed image in the hyperspherical coordinate system are obtained, resulting in the hyperspherical image, specifically:
[0098] In the hyperspherical coordinate system, the horizontal coordinate is the product of the hypersphere radius multiplied by the cosine of the latitude and the cosine of the longitude;
[0099] In the hyperspherical coordinate system, the vertical coordinate is the product of the hypersphere radius multiplied by the cosine of the latitude and the sine of the longitude;
[0100] In the hyperspherical coordinate system, the depth coordinate is the sine of the hypersphere radius multiplied by the latitude.
[0101] This step maps the image from the traditional two-dimensional coordinate system to a hyperspherical coordinate system through hyperspherical transformation, effectively preserving the image's geometric and topological features. Normalization ensures that each pixel is mapped within a unified coordinate system, avoiding the impact of image size differences on subsequent processing. The introduction of the hyperspherical coordinate system allows the image to exhibit a more natural structure in three-dimensional space, especially effective in capturing deep-level features when processing images with complex geometries, curved surfaces, or significant angular variations. By converting the image's two-dimensional coordinates to longitude and latitude, and calculating hyperspherical coordinates based on these angles, the image's expressiveness and representational power in hyperspherical space are enhanced, providing richer information for subsequent convolution processing and feature extraction. This transformation method improves the image processing capability from different perspectives, overcomes the shortcomings of traditional image processing methods when dealing with complex geometric structures, and improves the accuracy of target recognition and localization.
[0102] In this embodiment, step three specifically includes:
[0103] The hyperspherical convolution kernel is designed based on the hyperspherical coordinate system in which the hyperspherical image is located. The designed hyperspherical convolution kernel is as follows:
[0104] The spherical Gaussian kernel is obtained by selecting the spherical Gaussian function as the kernel function.
[0105] Use the spherical Gaussian kernel as the hyperspherical convolution kernel of the hyperspherical coordinate system;
[0106] A convolution operation is performed on each pixel of the hyperspherical image using a hyperspherical convolution kernel. The convolution operation is as follows:
[0107] The hyperspherical convolution kernel slides along the coordinates of the hyperspherical image in the hyperspherical coordinate system;
[0108] The hyperspherical convolution kernel performs pixel-wise element-wise multiplication with a local region of the hyperspherical image, and sums the results to generate a convolutional feature map of local features, including edge features, color features, and texture features.
[0109] The convolutional feature map is nonlinearly transformed using the ReLU nonlinear activation function to obtain the activation feature map;
[0110] Global features of hyperspherical images are extracted through multi-level hyperspherical convolution operations;
[0111] In each convolutional operation, the parameters of the hyperspherical convolution kernel are updated based on the activation feature map of the previous layer, and global features are extracted step by step. Through max pooling, multi-level extracted feature maps are obtained, which contain local and global information of the hyperspherical image.
[0112] This step improves the accuracy and efficiency of image feature extraction by designing a convolution kernel adapted to the hyperspherical coordinate system. Choosing a spherical Gaussian function as the convolution kernel ensures its smooth response characteristics, effectively capturing local features in the image, such as edges, colors, and textures. When using a hyperspherical convolution kernel for convolution operations, not only local image information is considered, but the geometric properties of the hyperspherical coordinate system are also fully utilized, enabling more accurate feature extraction in three-dimensional space. The introduction of a nonlinear transformation through the ReLU nonlinear activation function enhances the expressive power of the feature map, effectively improving the processing capability of the convolutional neural network in complex images. In multi-level convolution operations, the dynamic updating of the hyperspherical convolution kernel parameters makes feature extraction more refined, ensuring the organic combination of local and global features. Finally, the multi-level extracted feature map obtained through max pooling contains rich image information, providing efficient and accurate feature representation for subsequent target localization and recognition. This method can significantly improve the robustness of image feature extraction at different scales and from different perspectives, overcome the limitations of traditional convolutional neural networks in processing high-dimensional complex images, and provide more flexible and efficient image processing capabilities.
[0113] In this embodiment, the feature optimization algorithm is specifically as follows:
[0114] The size of each image region in the multi-layered feature map is determined according to the required resolution;
[0115] The multi-level extracted feature map is segmented into multiple image regions according to a defined size using a sliding window method;
[0116] The Mamba algorithm is used to extract the regional features of each image region to form a regional feature vector. The regional features include edge features, color features, and texture features.
[0117] The cosine similarity between the feature vectors of each pair of image regions is calculated to measure the correlation, and a feature correlation matrix is generated. The elements in the feature correlation matrix represent the cosine similarity between the two image regions.
[0118] In the feature correlation matrix, the maximum cosine similarity of each image region is selected as the weight of the current image region;
[0119] Multiply the weight of each current image region by the feature vector of the corresponding current image region to obtain the updated feature distribution of the image region;
[0120] The prior distribution of the updated image region's feature distribution is constructed using a Gaussian distribution;
[0121] The posterior distribution is obtained by performing Bayesian inference on the prior distribution.
[0122] The optimized feature map is obtained by optimizing the feature distribution of each image region by selecting the mean of the posterior distribution.
[0123] This step optimizes the image feature extraction and processing using the Mamba algorithm, effectively improving the accuracy and efficiency of image recognition. The image is segmented into multiple regions using a sliding window method, with the size of each region determined according to the required resolution, ensuring the rationality and precision of the image region division. Feature vectors for each region are extracted, including edge, color, and texture features. A feature correlation matrix is generated by calculating the cosine similarity between region feature vectors, thus measuring the similarity between different image regions. By selecting the maximum similarity between each region and other regions as the weight, the Mamba algorithm achieves selective preservation of feature information with linear computational complexity, better modeling local details and global structure, and enhancing content awareness. Bayesian inference is used to optimize region features, enhancing important features in the image while suppressing the influence of irrelevant information. Finally, the resulting optimized feature map has strong image recognition capabilities, accurately focusing on the target region, overcoming the limitations of traditional methods in image region segmentation and feature extraction, and improving the accuracy of image recognition and target localization.
[0124] In this embodiment, step five specifically includes:
[0125] Calculate the gradient of the optimized feature map in the horizontal and vertical directions to obtain the gradient magnitude and gradient direction of each pixel;
[0126] The gradient magnitude represents the intensity of the edge, and the gradient direction represents the direction of the edge;
[0127] By scanning along the gradient direction of the edge, the pixel with the largest gradient value is retained as the edge pixel;
[0128] Edge determination is performed based on preset high and low thresholds, specifically as follows:
[0129] Pixels exceeding a high threshold are considered strong edge points;
[0130] Pixels below a low threshold are considered non-edge points;
[0131] Pixels between the high and low thresholds are considered weak edge points. When a weak edge is connected to a strong edge, it is considered part of the edge.
[0132] Connect all the pixels identified as edge points to obtain the localization feature map of the target region.
[0133] This step calculates and optimizes the gradient magnitude and direction of the feature map to accurately extract edge information from the image, effectively enhancing the localization accuracy of the target region. By calculating the gradient of each pixel, the strength and direction of edges in the image can be distinguished, thus helping to identify the boundaries of the target region. Based on this, the image is scanned along the gradient direction, and the pixels with the largest gradient values are retained as edge pixels, avoiding interference from background noise. By setting preset high and low thresholds, edge points in the image are further classified to determine strong edge points, weak edge points, and non-edge points, ensuring the accuracy of image edges. When a weak edge is connected to a strong edge, it is considered to be part of the edge, thereby improving the coherence of edge detection. Finally, by connecting all edge points, an accurate target region localization feature map is obtained, providing a precise foundation for subsequent target focusing and recognition. This method can effectively identify target regions in complex backgrounds and low-contrast images, greatly improving the robustness of image processing and the accuracy of target detection.
[0134] In this embodiment, step six specifically includes:
[0135] Calculate the color feature response value of each pixel in the localization feature map. The color feature response value is the sum of the hue, saturation and brightness of the current pixel.
[0136] Calculate the texture feature response value of each pixel in the localization feature map. The texture feature response value is the sum of the contrast and entropy of the current pixel.
[0137] The color feature response value, texture feature response value, and edge feature response value are weighted according to preset weights to obtain the feature response value of each pixel.
[0138] The edge feature response value is the gradient magnitude of the pixel.
[0139] The set of pixels whose feature response values are higher than a preset threshold is calculated to form a focused region, thus obtaining a focused feature map.
[0140] This step accurately determines the focal region of the target area by comprehensively calculating the color, texture, and edge feature response values of each pixel in the localization feature map. The color feature response value, calculated through weighted hue, saturation, and brightness, comprehensively reflects the significance of color changes in the image. The texture feature response value, weighted by contrast and entropy, effectively captures the texture structure of the image, further enhancing the texture information of the target region. Based on this, the edge feature response value, by calculating gradient magnitude, helps determine the intensity of edges in the image. These three features are weighted using preset weights, comprehensively considering color, texture, and edge information to obtain the feature response value of each pixel. By setting a response value threshold, pixels exceeding the threshold are considered part of the focal region, thus forming a focal feature map. This method can accurately focus on the target region in complex backgrounds and with noise interference, effectively improving the accuracy of target localization, and is particularly suitable for high-precision target detection and recognition tasks.
[0141] In this embodiment, step seven specifically includes:
[0142] The target category is determined by calculating the mean and standard deviation of the color distribution and texture features of the focused area and based on the set threshold range.
[0143] Determine the target location bounding box for each identified target category;
[0144] The target location box is determined by selecting the maximum value of the upper left corner and the maximum value of the lower right corner of the feature response value of the region where the target category is located, thus obtaining the upper left corner coordinates and lower right corner coordinates of the target location box;
[0145] Based on the target category and the target location bounding box, a marker box is drawn on the focused feature map to obtain the recognition result image. The marker box includes the target category and the target location bounding box.
[0146] This step calculates the mean and standard deviation of the color distribution and texture features of the focused area, and combines this with a set threshold range to effectively determine the target category and identify the target in the image. By accurately calculating the feature response values of the target category region, the coordinates of the target's bounding box are further determined. This method ensures accurate target location by selecting the maximum values at the top left and bottom right corners of the target region's feature response values. By drawing a marker box on the focused feature map, containing the target's category and location, an accurate recognition result image is generated. This process not only improves the accuracy of target detection but also effectively reduces the interference of background noise on target recognition, ensuring high accuracy and robustness of the recognition results, especially demonstrating superior performance in complex image scenes.
[0147] Example 1:
[0148] To verify the feasibility of this invention in practice, it was applied to...
[0149] In an intelligent security monitoring application scenario, an image feature focusing method based on linear Mamba and convolutional neural networks is used to process the video stream captured by surveillance cameras. The aim is to accurately identify and locate moving objects in the scene, especially pedestrians and vehicles, through image processing, thereby helping security personnel to identify potential security risks in real time. Traditional security monitoring systems often can only detect significantly moving objects and are not ideal for scenes with large background changes, leading to frequent false alarms or failure to detect important targets.
[0150] In this scenario, the first step is to acquire raw video images from surveillance cameras and perform preprocessing. The images undergo Gaussian filtering to remove image interference caused by uneven lighting or environmental noise, ensuring image quality. Next, Z-score normalization is used to normalize the pixel values, ensuring data consistency across different camera shooting conditions. All images are resized to a uniform size to ensure data standardization in subsequent processing.
[0151] Then, through hyperspherical transformation, the image is mapped from a two-dimensional plane to a hyperspherical coordinate system. During this process, the coordinates of each pixel in the image are normalized to ensure image uniformity. The introduction of hyperspherical transformation preserves the geometric and topological features of the image. Especially for objects with complex geometries or different viewpoints, this method can better capture the spatial features of the target, thus avoiding the problem that traditional image processing methods cannot effectively handle complex backgrounds and target variations.
[0152] By employing a spherical convolutional neural network, local and global features in the image are further extracted. During this process, details such as edges, textures, and colors are effectively captured, which helps to further enhance the saliency of the target region and reduce background interference. Through multi-level feature extraction, we can obtain rich image features, which provide strong support for subsequent target localization and recognition.
[0153] In the application of feature optimization algorithms, the extracted multi-level feature map is first segmented into multiple small regions using a sliding window method, and the Mamba algorithm is used to extract features from each region. A feature correlation matrix is generated by calculating the cosine similarity between the feature vectors of every two image regions. By maximizing the correlation, the weight of each region is determined, and then the image regions are optimized using a weighted approach. Utilizing Bayesian inference and linear regression optimization mechanisms, we can accurately optimize the target region based on the prior distribution, obtaining the final optimized feature map, which greatly improves the feature representation of the target region and makes the target location in the image more accurate.
[0154] Next, spatial localization analysis is performed based on the optimized feature map to accurately determine the location of the target area. By calculating the feature response value of the target area in the localization feature map and precisely focusing on the focal area, the clarity and recognizability of the target area are further improved. In practical applications, the system can accurately identify targets such as people or vehicles and output the target's category information and location bounding box in real time.
[0155] Table 1 Performance Comparison of Image Processing Methods
[0156] Method type Recognition accuracy (%) False alarm rate (%) Processing time (seconds) System response time (seconds) Traditional CNN methods 78 10 4.0 1.5 Target recognition method based on edge detection 69 20 3.8 1.3 Background difference method (motion detection method) 65 25 2.5 1.0 Method of the present invention 94 3 2.8 0.8
[0157] As shown in Table 1, the method of this invention outperforms the three traditional methods in terms of recognition accuracy, false alarm rate, processing time, and system response time. Specifically, the recognition accuracy of the method of this invention reaches 94%, significantly higher than the traditional CNN method (78%), edge detection method (69%), and background subtraction method (65%), indicating that it can more accurately identify targets in complex scenes. Regarding the false alarm rate, the method of this invention is only 3%, significantly lower than traditional methods, especially the background subtraction method (25%), effectively reducing false alarms. Although the processing time of the method of this invention (2.8 seconds) is slightly longer than the background subtraction method (2.5 seconds), it still performs better than the traditional CNN method (4.0 seconds) and maintains high recognition accuracy. In terms of system response time, the method of this invention (0.8 seconds) also shows a significant advantage, making it suitable for real-time image processing tasks. Therefore, this invention improves target recognition accuracy while maintaining high processing speed, making it suitable for practical application scenarios requiring rapid response.
[0158] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A linear image feature focusing method based on Mamba and convolutional neural networks, characterized in that, Includes the following steps: Step 1: Obtain the original image to be processed, and preprocess the original image to obtain a preprocessed image with a uniform structure; Step 2: Map the preprocessed image to a hyperspherical space using a hyperspherical transformation to obtain a hyperspherical image; Step 3: Extract local and global features of the hyperspherical image using a spherical convolutional neural network, and generate multi-level extracted feature maps; Step 4: Optimize the multi-level extracted feature maps using the Mamba algorithm to obtain optimized feature maps; Step 5: Based on the optimized feature map, locate the target area through spatial localization analysis to obtain the localization feature map; Step 6: Accurately focus and determine the focus area by calculating the feature response value of the target area in the positioning feature map, and obtain the focus feature map; Step 7: Perform target recognition based on the focused feature map, output the target location box and category information, and obtain the recognition result image.
2. The linear image feature focusing method based on Mamba and convolutional neural networks according to claim 1, characterized in that, The preprocessing steps include removing noise from the original image using Gaussian filtering, adjusting the denoised original image to a predetermined size, and performing Z-score normalization to obtain a preprocessed image with a uniform structure.
3. The linear image feature focusing method based on Mamba and convolutional neural networks according to claim 1, characterized in that, The hyperspherical transformation specifically refers to: The two-dimensional coordinates of each pixel in the preprocessed image are normalized to obtain normalized image coordinates. The two-dimensional coordinates are the horizontal and vertical coordinates of each pixel in the preprocessed image. The normalized image coordinates include the normalized horizontal coordinates and normalized vertical coordinates of each pixel. The normalization process is as follows: Divide the horizontal coordinate of each pixel by the width of the preprocessed image to obtain the normalized horizontal coordinates; Divide the vertical coordinate of each pixel by the height of the preprocessed image to obtain the normalized vertical coordinates. Define a hyperspherical coordinate system, wherein the angle parameters of the hyperspherical coordinate system include longitude and latitude; the longitude determines the horizontal position of each pixel on the hypersphere, and the latitude determines the vertical position of each pixel on the hypersphere; Multiply the normalized horizontal coordinates by 2π to map the horizontal position of the preprocessed image to the horizontal angle of the hypersphere, thus obtaining the longitude corresponding to the hypersphere coordinate system. Subtract 0.5 from the normalized vertical coordinates and then multiply by π to map the vertical position of the preprocessed image to the vertical angle of the hypersphere, thus obtaining the latitude corresponding to the hypersphere coordinate system. Based on the calculated longitude and latitude, the three-dimensional coordinates of each pixel in the preprocessed image in the hyperspherical coordinate system are obtained, resulting in the hyperspherical image, specifically: In the hyperspherical coordinate system, the horizontal coordinate is the product of the hypersphere radius multiplied by the cosine of the latitude and the cosine of the longitude; In the hyperspherical coordinate system, the vertical coordinate is the product of the hypersphere radius multiplied by the cosine of the latitude and the sine of the longitude; In the hyperspherical coordinate system, the depth coordinate is the sine of the hypersphere radius multiplied by the latitude.
4. The linear image feature focusing method based on Mamba and convolutional neural networks according to claim 1, characterized in that, Step three specifically involves: The hyperspherical convolution kernel is designed based on the hyperspherical coordinate system in which the hyperspherical image is located. The designed hyperspherical convolution kernel is as follows: The spherical Gaussian kernel is obtained by selecting the spherical Gaussian function as the kernel function. Use the spherical Gaussian kernel as the hyperspherical convolution kernel of the hyperspherical coordinate system; A convolution operation is performed on each pixel of the hyperspherical image using a hyperspherical convolution kernel. The convolution operation is as follows: The hyperspherical convolution kernel slides along the coordinates of the hyperspherical image in the hyperspherical coordinate system; The hyperspherical convolution kernel performs pixel-wise element-wise multiplication with a local region of the hyperspherical image, and sums the results to generate a convolutional feature map of local features, including edge features, color features, and texture features. The convolutional feature map is nonlinearly transformed using the ReLU nonlinear activation function to obtain the activation feature map; Global features of hyperspherical images are extracted through multi-level hyperspherical convolution operations; In each convolutional operation, the parameters of the hyperspherical convolution kernel are updated based on the activation feature map of the previous layer, and global features are extracted step by step. Through max pooling, multi-level extracted feature maps are obtained, which contain local and global information of the hyperspherical image.
5. The linear image feature focusing method based on Mamba and convolutional neural networks according to claim 1, characterized in that, Step four specifically involves: The size of each image region in the multi-layered feature map is determined according to the required resolution; The multi-level extracted feature map is segmented into multiple image regions according to a defined size using a sliding window method; The Mamba algorithm is used to extract the regional features of each image region to form a regional feature vector. The regional features include edge features, color features, and texture features. The cosine similarity between the feature vectors of each pair of image regions is calculated to measure the correlation, and a feature correlation matrix is generated. The elements in the feature correlation matrix represent the cosine similarity between the two image regions. In the feature correlation matrix, the maximum cosine similarity of each image region is selected as the weight of the current image region; Multiply the weight of each current image region by the feature vector of the corresponding current image region to obtain the updated feature distribution of the image region; The prior distribution of the updated image region's feature distribution is constructed using a Gaussian distribution; The posterior distribution is obtained by performing Bayesian inference on the prior distribution. The optimized feature map is obtained by optimizing the feature distribution of each image region by selecting the mean of the posterior distribution.
6. The linear image feature focusing method based on Mamba and convolutional neural networks according to claim 1, characterized in that, Step five specifically involves: Calculate the gradient of the optimized feature map in the horizontal and vertical directions to obtain the gradient magnitude and gradient direction of each pixel; The gradient magnitude represents the intensity of the edge, and the gradient direction represents the direction of the edge; By scanning along the gradient direction of the edge, the pixel with the largest gradient value is retained as the edge pixel; Edge determination is performed based on preset high and low thresholds, specifically as follows: Pixels exceeding a high threshold are considered strong edge points; Pixels below a low threshold are considered non-edge points; Pixels between the high and low thresholds are considered weak edge points. When a weak edge is connected to a strong edge, it is considered part of the edge. Connect all the pixels identified as edge points to obtain the localization feature map of the target region.
7. The linear image feature focusing method based on Mamba and convolutional neural networks according to claim 1, characterized in that, Step six specifically involves: Calculate the color feature response value of each pixel in the localization feature map. The color feature response value is the sum of the hue, saturation and brightness of the current pixel. Calculate the texture feature response value of each pixel in the localization feature map. The texture feature response value is the sum of the contrast and entropy of the current pixel. The color feature response value, texture feature response value, and edge feature response value are weighted according to preset weights to obtain the feature response value of each pixel. The edge feature response value is the gradient magnitude of the pixel. The set of pixels whose feature response values are higher than a preset threshold is calculated to form a focused region, thus obtaining a focused feature map.
8. The linear image feature focusing method based on Mamba and convolutional neural networks according to claim 1, characterized in that, Step seven specifically involves: The target category is determined by calculating the mean and standard deviation of the color distribution and texture features of the focused area and based on the set threshold range. Determine the target location bounding box for each identified target category; The target location box is determined by selecting the maximum value of the upper left corner and the maximum value of the lower right corner of the feature response value of the region where the target category is located, thus obtaining the upper left corner coordinates and lower right corner coordinates of the target location box; Based on the target category and the target location bounding box, a marker box is drawn on the focused feature map to obtain the recognition result image. The marker box includes the target category and the target location bounding box.