Image key feature extraction processing method

Through precise pooling and multi-level pooling of differential value weights, a differential image pyramid is constructed, which solves the problems of information loss and feature blurring in traditional pooling algorithms, and realizes the precise extraction and expression of edges and textures in the image.

CN120451584AInactive Publication Date: 2025-08-08杨小文
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510535952.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-08-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional pooling algorithms are prone to loss of detailed information in image processing, blur edges and texture features, and feature extraction is difficult and insufficient interpretability.

Method used

Accurate pooling operation based on differential value weights is adopted, combined with multi-level pooling and differential image pyramids, and multi-scale feature pyramids are constructed by updating the absolute position information of pixels during each level of pooling.

Benefits of technology

Effectively preserve edge structure and texture distribution in the image, enhance the ability to maintain key details, and improve the accuracy of image analysis and understanding and feature expression capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451584A_ABST
    Figure CN120451584A_ABST
Patent Text Reader

Abstract

The invention discloses an image key feature extraction processing method, and particularly relates to the technical field of image processing. The method comprises the steps of obtaining an original image and generating a differential image; precise pooling operation based on differential value weight is carried out on the differential image; constructing a multi-level difference image pyramid by utilizing a pooling result; in the pooling process of each layer, the absolute position information of the pixels is updated step by step by combining the weighted position information of the previous layer and the spatial index of the current pooling window. Edge details and texture structures can be reserved to the maximum extent in the image feature extraction process, and more accurate spatial feature support is provided for image processing tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and more particularly to a method for extracting and processing key features of an image. Background Art

[0002] In image processing and computer vision tasks, pooling is a commonly used downsampling operation and an important step in reducing the amount of image data while retaining key features. However, traditional pooling algorithms such as max pooling and average pooling have limitations: the former is prone to losing detailed information, while the latter blurs detailed features such as edges and textures. Difference images are generated by calculating the differences between adjacent pixels or multiple frames of images. In traditional image processing algorithms, feature extraction from difference images mainly relies on a series of predefined operators (such as the Sobel edge detector and the Prewitt operator) or convolution kernel parameters obtained through neural network training. However, this method has certain limitations, including the difficulty of feature extraction and insufficient interpretability of the algorithm.

[0003] In order to solve the above problems, a technical solution is now provided. Summary of the Invention

[0004] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides an image key feature extraction and processing method to solve the problems raised in the above-mentioned background technology.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] A method for extracting and processing key features of an image comprises the following steps:

[0007] S1: Obtain the original image. When differential processing is required, generate a differential image based on the original image.

[0008] S2: Perform precise pooling operation based on difference value weights on the difference image or original image;

[0009] S3: Perform multi-level pooling based on the obtained pooling results to construct a differential image pyramid, and the output of each level of pooling serves as the input of the next pooling;

[0010] S4: In each level of pooling, the absolute position information of each pixel in the current level is updated based on the combination of the position information in the previous level of pooling output and the current pooling window index.

[0011] In a preferred embodiment, the original image is obtained, and the differential image is generated based on the original image, specifically:

[0012] Performing differential processing on the pixel values of adjacent pixels or corresponding pixels of multiple frames of images to obtain differential values;

[0013] For multi-channel images, calculate the difference value of each channel separately;

[0014] Take the absolute value of the difference value of each channel and sum them to obtain the total difference value of each pixel.

[0015] In a preferred embodiment, a precise pooling operation based on the difference value weight is performed on the difference image, specifically:

[0016] Set the pooling window, and extract the total difference value and corresponding position information of each pixel within the pooling window;

[0017] Normalize the total difference value of each pixel in the pooling window to obtain the normalized value of each pixel;

[0018] Multiply the position information of each pixel by the corresponding normalized value, and then perform weighted average on the product results to obtain the pooled position information corresponding to the pooling window.

[0019] In a preferred embodiment, multi-level pooling is performed based on the obtained pooling results, and the multi-level pooling process is repeated to construct a differential image pyramid. The output of each level of pooling is used as the input of the next pooling, specifically:

[0020] Set the number of multi-level pooling layers and the size parameters of each pooling window, and perform pooling operations on the differential image in sequence;

[0021] Each level of pooling operation takes the output of the previous level of pooling operation as input data and follows the same pooling processing logic;

[0022] In each level of pooling operation, the weighted position information and cumulative difference value corresponding to each pooling window area are retained and used as the output of the current layer;

[0023] A pyramid structure consisting of multi-scale image features is constructed to extract key differential features and position features at different scales in the image.

[0024] In a preferred embodiment, in each level of pooling, the absolute position information of each pixel in the current level is updated based on the combination of the position information in the previous level pooling output and the current pooling window index, specifically:

[0025] In any level of pooling, for each pixel in the current pooling window area, the weighted position information obtained in the previous pooling operation is extracted;

[0026] Get the two-dimensional index coordinates of the current pooling window in the pooling image of this layer, and calculate the absolute position information of the current pixel based on the combined relationship between the weighted position information corresponding to each pixel in the pooling image of the previous layer and the index coordinates of this layer;

[0027] The absolute position information of the current pixel is obtained by multiplying the position information of the previous layer by the window dimension and adding it to the offset in the current window to form a continuous spatial position mapping relationship across layers;

[0028] The updated absolute position information in each level is used as the initial position information input for the next layer of pooling processing.

[0029] In a preferred embodiment, the two-dimensional index coordinates of the current pooling window in the current pooling image are obtained, and the absolute position information of the current pixel is calculated based on the combined relationship between the weighted position information corresponding to each pixel in the previous pooling image and the current index coordinates, specifically:

[0030] Get the row and column position coordinates of the current pooling processing area in the current pooling layer image data, and multiply the row and column position coordinates by the size of the previous level pooling window to obtain the starting reference position of the current window in the previous layer pooling image data;

[0031] Traverse all pixels in the current pooling area, extract the corresponding weighted position information in the previous layer of pooled image data for each pixel, and calculate the actual spatial position of each pixel in the current image level;

[0032] The spatial position is obtained by adding the starting reference position and the relative offset position within the current window to obtain the absolute position information of the current pixel that is continuously updated in the entire image.

[0033] The technical effects and advantages of the image key feature extraction and processing method of the present invention are as follows:

[0034] Through a precise pooling mechanism based on differential value weights, the edge structure and texture distribution in the image are effectively retained, the ability to retain key details is significantly enhanced, and the problem of feature blurring and information loss that are easily caused by traditional pooling methods is avoided; at the same time, by introducing the coupling calculation of differential values and position information in the pooling process, the pixel space position information is accurately tracked layer by layer, making the expression of the structural contour in the image closer to the real form, with good feature expression ability and structural interpretability, which is conducive to improving the accuracy of image analysis and understanding. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 The figure is a schematic diagram of a method for extracting and processing key features of an image according to the present invention. DETAILED DESCRIPTION

[0036] The following will provide a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0037] Example

[0038] Figure 1 The present invention provides a method for extracting key features of an image, which includes the following steps:

[0039] S1: Obtain the original image. When differential processing is required, generate a differential image based on the original image.

[0040] S2: Perform precise pooling operation based on difference value weights on the difference image or original image;

[0041] S3: Perform multi-level pooling based on the obtained pooling results to construct a differential image pyramid, and the output of each level of pooling serves as the input of the next pooling;

[0042] S4: In each level of pooling, the absolute position information of each pixel in the current level is updated based on the combination of the position information in the previous level of pooling output and the current pooling window index.

[0043] Specifically, obtaining an original image and generating a differential image based on the original image includes:

[0044] Performing differential processing on the pixel values of adjacent pixels or corresponding pixels of multiple frames of images to obtain differential values;

[0045] Specifically, in the original image or the image of the continuous time frame, the pixel values at adjacent positions are compared, and the numerical difference of the pixel values at adjacent positions is calculated, and the difference result is recorded as the differential value.

[0046] Exemplarily, for a single grayscale image, for example, assuming that in a grayscale image, the grayscale value of the pixel in the 1st row and 1st column is 120, and the grayscale value of the pixel in the 1st row and 2nd column is 115, then the difference between the grayscale value of the pixel in the 1st row and 1st column and the grayscale value of the pixel in the 1st row and 2nd column can be calculated as |120-115|=5.

[0047] For multiple frames of continuous images, if the grayscale values of the same pixel position in two frames are 100 and 105 respectively, the difference in the grayscale values of the two frames is |100-105|=5.

[0048] This step is used to reflect local changes in the image. The difference value reflects the instantaneous fluctuation of pixel intensity, which is helpful for feature extraction.

[0049] For multi-channel images, calculate the difference value of each channel separately;

[0050] Specifically, for multi-channel images such as color images, each pixel contains multiple color channel information (such as red, green, and blue). It is required to perform independent differential calculations on adjacent pixels of each color channel or corresponding pixels in multiple frames.

[0051] For example, assuming that in a color image, the pixel values in the red channel are 110 and 105, the green channel are 130 and 128, and the blue channel are 90 and 87, then:

[0052] Red channel difference value = |110-105| = 5;

[0053] Green channel difference value = |130-128| = 2;

[0054] Blue channel difference value = |90-87| = 3.

[0055] The differential values of each channel can reflect the local changes in different color information, which is convenient for weight calculation and feature aggregation.

[0056] Take the absolute value of the difference value of each channel and sum them to obtain the total difference value of each pixel;

[0057] Specifically, after calculating the differential value for each channel, first take the absolute value of the differential value obtained for each channel, then add up the absolute values of all channels to obtain the total differential value for a pixel in the multi-channel case. Assuming that the differential values of a pixel in the red, green, and blue channels are the first differential value, the second differential value, and the third differential value, respectively, the total differential value is the sum of the absolute value of the first differential value, the absolute value of the second differential value, and the absolute value of the third differential value.

[0058] For example, when the red channel differential value is 5, the green channel differential value is 2, and the blue channel differential value is 3, the calculated total differential value is 5+2+3=10, which represents the local change size of the pixel in each channel.

[0059] By summing the difference values, multi-channel data can be fused into a single value, which facilitates the processing of pixel difference features in the pooling process.

[0060] Specifically, a precise pooling operation based on the difference value weight is performed on the difference image, including:

[0061] Set the pooling window, and extract the total difference value and corresponding position information of each pixel within the pooling window;

[0062] Specifically, the difference image is divided into several fixed-size regions according to preset rules. Each region is called a pooling window. The pooling window can usually be set to a fixed small block, such as 2×2 or 3×3. For each pooling window, the total difference value of all pixels in the pooling window and the two-dimensional position coordinates of all pixels within the pooling window are extracted (for example, expressed in row and column coordinate form, with row and column values starting from 0 and ending at the window size minus 1).

[0063] For example, assuming the difference image is divided into 2×2 pooling windows, the row and column coordinates of four pixels within a pooling window can be (0,0), (0,1), (1,0), and (1,1), respectively. The total difference values corresponding to these four pixels are v1, v2, v3, and v4, respectively. This operation ensures that all pixel information within the local area is fully extracted, preparing for weighted averaging.

[0064] Normalize the total difference value of each pixel in the pooling window to obtain the normalized value of each pixel;

[0065] Specifically, suppose there are N pixels in the pooling window and the total difference value of the i-th pixel is vi. Then the normalized value is calculated as Vi = vi / (v1 + v2 + ... + vN). If the denominator is zero, the average distribution method can be used, for example, evenly divided into 1 / N.

[0066] For example, assuming that the total difference values in a 2×2 window are 5, 10, 15, and 20 respectively, the sum of the total difference values in the window is 50.

[0067] Then the normalized value of the first pixel is V1 = 5 / 50 = 0.1; the second pixel is V2 = 10 / 50 = 0.2; the third pixel is V3 = 15 / 50 = 0.3; and the fourth pixel is V4 = 20 / 50 = 0.4.

[0068] After normalization, the normalized value of each pixel represents the proportion of the total differential value of the pixel in the window, which is used for the subsequent calculation of weighted position information.

[0069] Multiply the position information of each pixel by the corresponding normalized value, and then perform weighted average on the product results to obtain the pooled position information corresponding to the pooling window;

[0070] Specifically, the position information of each pixel in the pooling window is weighted using the normalized value reflecting the pixel weight. The calculation method is:

[0071] For each pixel in the window, take its two-dimensional coordinates (such as row coordinates and column coordinates) and multiply them by their normalized values.

[0072] The row coordinate components of all processed pixels are summed to obtain a weighted average row coordinate; the column coordinate components of all processed pixels are summed to obtain a weighted average column coordinate.

[0073] By utilizing the proportion of the differential contribution of each pixel in the local area and performing weighted averaging on the pixel positions, the position distribution of local edge and texture features can be more accurately reflected.

[0074] Specifically, multi-level pooling is performed based on the obtained pooling results to construct a differential image pyramid. The output of each level of pooling is used as the input of the next pooling, including:

[0075] Set the number of multi-level pooling layers and the size parameters of each pooling window, and perform pooling operations on the differential image in sequence;

[0076] Specifically, first determine the total number of layers of multi-level pooling and the pooling window size used in each layer. For example, if three layers of pooling are set, the first layer window is 2×2, the second layer window is 2×2, and the third layer window is 2×2.

[0077] In each level, the image data obtained after pooling in the previous level is used as input, and the data is processed with the same pooling rules to achieve the purpose of hierarchical extraction of local features.

[0078] For example, assuming the size of the original differential image is 256×256, if a 2×2 window is used in the first layer, the image size becomes 128×128 after pooling; and then a 2×2 window is used in the second layer, a 64×64 image is obtained; and so on, a pyramid structure is formed.

[0079] Hierarchical pooling allows the extraction of local features of images at different scales, so that each layer in the pyramid structure can capture feature information from details to the global level.

[0080] Each level of pooling operation takes the output of the previous level of pooling operation as input data and follows the same pooling processing logic;

[0081] Specifically, each layer of pooling adopts the same weighted pooling method as the first layer (including normalization, multiplication weighting, and weighted averaging), and the pooled difference value and weighted position information generated by the previous layer constitute the original input data of this layer.

[0082] For example, if the pooled position information of a window after the first layer of pooling is (0.7, 0.6) and the cumulative difference value is 10, then in the second layer, the window participates in a new pooling operation as input data.

[0083] The use of unified processing logic ensures the consistency of data and the continuity of feature mapping relationships during multi-layer processing.

[0084] In each level of pooling operation, the weighted position information and cumulative difference value corresponding to each pooling window area are retained and used as the output of the current layer;

[0085] Specifically, in each level of pooling, the pooled position information calculated by the weighted average method and the cumulative difference value of each pixel in the window will be retained together to form the output feature of the layer.

[0086] For example, in a pooling window of the first layer, assuming that the calculated weighted position information is (0.7, 0.6) and the cumulative difference value is 10; these data will be output to prepare for the input of the next layer.

[0087] The purpose of retaining these two pieces of information is to enable subsequent levels to rely on the detailed features of the previous level to perform accurate spatial position updates.

[0088] Construct a pyramid structure composed of multi-scale image features to extract key differential features and position features at different scales in the image;

[0089] Specifically, after multi-level pooling processing, a structure consisting of image data of different resolutions (scales) is formed, each level contains the feature information of this layer, and the whole constitutes a pyramid.

[0090] For example, the bottom layer of the pyramid (high resolution) contains detailed local difference information, while the top layer of the pyramid (low resolution) captures the overall contour features. The pyramid structure can integrate multi-scale information for image analysis.

[0091] The pyramid structure provides a data basis for multi-scale feature extraction in image processing and can make full use of local and global information.

[0092] Specifically, in each level of pooling, the absolute position information of each pixel in the current level is updated based on the combined relationship between the position information in the previous level pooling output and the current pooling window index, including:

[0093] In any level of pooling, for each pixel in the current pooling window area, the weighted position information obtained in the previous pooling operation is extracted;

[0094] Specifically, when performing pooling on the current layer, the weighted position information of each pixel calculated and retained from the pooling operation of the previous layer is used as the basic data. This weighted position information reflects the relative position of the pixel after weighted averaging in the previous layer.

[0095] For example, in a pooling window in the previous layer, the weighted position information obtained by weighted averaging is (0.7, 0.6); in the current layer, each pixel to be processed will be associated with this information as reference data.

[0096] Get the two-dimensional index coordinates of the current pooling window in the pooling image of this layer, and calculate the absolute position information of the current pixel based on the combined relationship between the weighted position information corresponding to each pixel in the pooling image of the previous layer and the index coordinates of this layer;

[0097] Specifically, the 2D index coordinates refer to the row and column position of the current pooling window in the current layer's image data, for example, represented by (i, j). They reflect the position of the pooling window in the current layer's layout, not the absolute position of the pixel in the original image. Assuming the current layer's image data consists of multiple 2×2 pooling windows, and a pooling window is located at row 3 and column 4, its 2D index coordinates are (3, 4).

[0098] Using the weighted position information obtained in the previous layer and the two-dimensional index coordinates of the pooling window in the current layer, the absolute position of the current pixel in the entire image is calculated through a specific combination formula:

[0099] During the current level of pooling, the row and column numbers of the current pooling window in the current image layer are first determined as the two-dimensional position coordinates of the current pooling window. The row number is multiplied by the height of the pooling window used in the previous pooling operation to obtain the starting row coordinates of the corresponding area of the current pooling window in the previous image layer. The column number is then multiplied by the width of the pooling window used in the previous pooling operation to obtain the starting column coordinates of the corresponding area of the current pooling window in the previous image layer.

[0100] After the reference starting coordinates are calculated, for each pixel in the current pooling window, the row and column offsets of the pixel within the window are first determined. For example, if the current pooling window size is two rows and two columns, the relative offsets of the four pixels can be expressed as row 1, column 1, row 1, column 2, row 2, column 1, and row 2, column 2, respectively.

[0101] Then, the starting row coordinate is added to the row offset value of the pixel to obtain the actual row coordinate of the current pixel in the overall image coordinate system; the starting column coordinate is added to the column offset value of the pixel to obtain the actual column coordinate of the current pixel in the overall image coordinate system.

[0102] Finally, this set of two-dimensional values consisting of row coordinates and column coordinates is used as the absolute position information of the current pixel, which is used to continuously track the spatial position of the pixel in the original image during the subsequent processing of the image pyramid structure.

[0103] The absolute position information of the current pixel is obtained by multiplying the position information of the previous layer by the window dimension and adding it to the offset in the current window to form a continuous spatial position mapping relationship across layers;

[0104] Specifically, the position information of the previous layer is first amplified (multiplied by the window dimension), and then the relative position offset within the current window is added to obtain a continuous absolute position.

[0105] Exemplarily, absolute position = (weighted position information of the previous layer * pooling window size) + relative offset within the current window.

[0106] The updated absolute position information in each level is used as the initial position information input for the next layer of pooling processing;

[0107] Specifically, the absolute position information of each pixel calculated after the update is completed will be passed to the next layer as the initial position information for the new layer of pooling operation, ensuring that the spatial structure of the entire image remains continuous during the multi-layer processing process.

[0108] For example, assuming that the absolute position information of a pixel after the first layer is updated is (1.4, 2.2), then during the second layer pooling, this information will be used as the calculation basis and participate in the further update of the absolute position of the second layer.

[0109] This design enables a clear spatial mapping relationship to be maintained between the entire pooling level, laying the foundation for multi-scale feature fusion.

[0110] Specifically, the two-dimensional index coordinates of the current pooling window in the pooling image of this layer are obtained, and the absolute position information of the current pixel is calculated based on the combined relationship between the weighted position information corresponding to each pixel in the pooling image of the previous layer and the index coordinates of this layer, including:

[0111] Get the row and column position coordinates of the current pooling processing area in the current pooling layer image data, and multiply the row and column position coordinates by the size of the previous level pooling window to obtain the starting reference position of the current window in the previous layer pooling image data;

[0112] Traverse all pixels in the current pooling area, extract the corresponding weighted position information in the previous layer of pooled image data for each pixel, and calculate the actual spatial position of each pixel in the current image level;

[0113] The spatial position is obtained by adding the starting reference position and the relative offset position within the current window to obtain the absolute position information of the current pixel that is continuously updated in the entire image.

[0114] The above formulas are all dimensionless and numerical calculations. The formulas are obtained by collecting a large amount of data and performing software simulation to obtain the most recent real situation. The preset parameters and thresholds in the formulas are set by technicians in this field according to actual conditions.

[0115] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer program are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.

[0116] Those skilled in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0117] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0118] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0119] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, and may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected to achieve the purpose of this embodiment according to actual needs.

[0120] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0121] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0122] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0123] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for extracting key features of an image, characterized in that: The steps include: S1: Obtain the original image. When differential processing is required, generate a differential image based on the original image. S2: Perform precise pooling operation based on difference value weights on the difference image or original image; S3: Perform multi-level pooling based on the obtained pooling results to construct a differential image pyramid, and the output of each level of pooling serves as the input of the next pooling; S4: In each level of pooling, the absolute position information of each pixel in the current level is updated based on the combination of the position information in the previous level of pooling output and the current pooling window index.

2. The method for extracting key features of an image according to claim 1, wherein: S1, specifically: Performing differential processing on the pixel values of adjacent pixels or corresponding pixels of multiple frames of images to obtain differential values; For multi-channel images, calculate the difference value of each channel separately; Take the absolute value of the difference value of each channel and sum them to obtain the total difference value of each pixel.

3. The method for extracting key features of an image according to claim 1, wherein: S2, specifically: Set the pooling window, and extract the total difference value and corresponding position information of each pixel within the pooling window; Normalize the total difference value of each pixel in the pooling window to obtain the normalized value of each pixel; Multiply the position information of each pixel by the corresponding normalized value, and then perform weighted average on the product results to obtain the pooled position information corresponding to the pooling window.

4. The method for extracting key features of an image according to claim 1, wherein: S3, specifically: Set the number of multi-level pooling layers and the size parameters of each pooling window, and perform pooling operations on the differential image in sequence; Each level of pooling operation takes the output of the previous level of pooling operation as input data and follows the same pooling processing logic; In each level of pooling operation, the weighted position information and cumulative difference value corresponding to each pooling window area are retained and used as the output of the current layer; A pyramid structure consisting of multi-scale image features is constructed to extract key differential features and position features at different scales in the image.

5. The method for extracting key features of an image according to claim 1, wherein: S4, specifically: In any level of pooling, for each pixel in the current pooling window area, the weighted position information obtained in the previous pooling operation is extracted; Get the two-dimensional index coordinates of the current pooling window in the pooling image of this layer, and calculate the absolute position information of the current pixel based on the combined relationship between the weighted position information corresponding to each pixel in the pooling image of the previous layer and the index coordinates of this layer; The absolute position information of the current pixel is obtained by multiplying the position information of the previous layer by the window dimension and adding it to the offset in the current window to form a continuous spatial position mapping relationship across layers; The updated absolute position information in each level is used as the initial position information input for the next layer of pooling processing.

6. The method for extracting key features of an image according to claim 5, wherein: Get the two-dimensional index coordinates of the current pooling window in the pooling image of this layer, and calculate the absolute position information of the current pixel based on the combined relationship between the weighted position information corresponding to each pixel in the pooling image of the previous layer and the index coordinates of this layer, specifically: Get the row and column position coordinates of the current pooling processing area in the current pooling layer image data, and multiply the row and column position coordinates by the size of the previous level pooling window to obtain the starting reference position of the current window in the previous layer pooling image data; Traverse all pixels in the current pooling area, extract the corresponding weighted position information in the previous layer of pooled image data for each pixel, and calculate the actual spatial position of each pixel in the current image level; The spatial position is obtained by adding the starting reference position and the relative offset position within the current window to obtain the absolute position information of the current pixel that is continuously updated in the entire image.