Image texture feature extraction method based on local counting projection
By using the local counting projection method, combined with a 5×5 rectangular star structure and the Hamiltonian operator, local counting and Hamiltonian statistics of the image are extracted, which solves the problem of insufficient robustness of existing technologies in texture feature extraction in complex texture scenes, and achieves more efficient texture feature extraction and description.
Patent Information
- Application Number
- CN202511134151.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-08-14
AI Technical Summary
Existing technologies struggle to accurately capture key information in complex textured scenes, particularly in maintaining the robustness of textures to rotation and differences.
A local counting projection-based method is adopted to extract local counting statistics and Hamiltonian statistics of the image through a 5×5 rectangular star structure and Hamiltonian operator. Combined with statistical histograms to form a joint histogram, the local counting-Hamilton texture features of the image are extracted.
It improves the robustness, discriminative power, and applicability of texture feature extraction, enhances the accuracy and stability of texture description, and ensures the robustness of texture description capabilities.
Smart Images

Figure CN120747529B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and more specifically, to an image texture feature extraction method based on local counting projection. Background Technology
[0002] Image texture, a key element in computer vision, is defined as the dynamic changes in pixel intensity and orientation within a local space. In today's digital age, its importance permeates various application scenarios. From target recognition in intelligent security systems to ensure accurate locking of suspicious targets; to visual navigation in autonomous driving to provide reliable environmental perception for vehicle operation; to image segmentation in medical image analysis to assist doctors in accurately identifying lesion areas; to image retrieval on e-commerce platforms to help users quickly locate desired products; and to tasks such as complex scene understanding and stringent industrial inspection, establishing efficient and accurate texture representation methods has always been the key to success. However, as real-world applications become more complex, these traditional methods have gradually revealed their limitations. When faced with complex textures, they struggle to accurately capture key information, leading to poor performance in some complex image analysis tasks. Especially in maintaining the robustness of textures to rotation and differences, existing improved methods still have shortcomings, urgently requiring further exploration of new technological paths to overcome these bottlenecks.
[0003] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The purpose of this invention is to provide an image texture feature extraction method based on local counting projection, which can extract local texture structure and difference information of an image.
[0005] This invention provides an image texture feature extraction method based on local counting projection, comprising the following steps:
[0006] S1: Perform grayscale preprocessing on the image to be tested to obtain a grayscale image;
[0007] S2: Based on the grayscale image, perform grayscale difference calculation and binarization statistics using a 5×5 rectangular star structure to obtain local count statistics;
[0008] S3: Based on the grayscale image, Hamiltonian statistics are obtained using a 5×5 rectangular star structure, a 3×3 rectangular structure, and the Hamiltonian operator.
[0009] S4: Based on the local count statistics and the Hamiltonian statistics, the local count-Hamilton texture features of the image to be tested are obtained using the statistical histogram.
[0010] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the image texture feature extraction method based on local counting projection described above.
[0011] The image texture feature extraction method based on local counting projection provided by this invention has the following beneficial effects:
[0012] This invention scans the entire grayscale image using a 5×5 rectangular star-shaped structure, extracts three pixels on the star-shaped rays at various locations in the grayscale image, and calculates their grayscale difference pairs. Then, the grayscale difference pairs are compared and binarized. Next, the number of grayscale difference pairs with a binarized value of 1 in the 5×5 rectangular star-shaped structure is counted to calculate the Local Count Statistics (LCS). Simultaneously, using the eight adjacent pixels of the center pixel of the 5×5 rectangular structure as their respective centers, 3×3 rectangular structures are constructed. For each 3×3 rectangular structure, the divergence of its vector field is calculated using the Hamiltonian operator. Then, the number of convergences (divergences) in the eight vector fields is counted as Hamiltonian statistics (HS). Finally, the statistical histograms of the LCS descriptors and the HS descriptors are merged into a joint histogram as the LCS of the image under test. This invention extracts local texture structure and difference information of an image by extracting the Local Count-Hamilton Pattern (LCS_HS) feature. It compares the central pixel with three pixels formed by elements on its stellar rays, taking into account both the central pixel and its neighboring pixels. Furthermore, it improves the robustness, discriminative power, and applicability of the texture feature extraction operator through summation statistics. The invention introduces the Hamiltonian operator to calculate the divergence of its vector field, improving the accuracy of image texture description. Finally, it integrates the statistical histograms of LCS and HS into a joint histogram, achieving a more intuitive and effective representation of image texture, greatly enhancing the expressive power of texture features, and ensuring higher robustness and stability in texture description. Attached Figure Description
[0013] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:
[0014] Figure 1 This is a flowchart of the image texture feature extraction method based on local counting projection provided by the present invention;
[0015] Figure 2 This is a 5×5 star-shaped ray structure diagram provided by the present invention;
[0016] Figure 3 This is a diagram illustrating the effect of Local Count Statistics (LCS) in an image provided by the present invention.
[0017] Figure 4 This is a 3×3 rectangular structure diagram provided by the present invention;
[0018] Figure 5 This is a rendering of Hamiltonian statistics (HS) in an image provided by the present invention;
[0019] Figure 6 This is a diagram illustrating the effect of concatenating the LCS and HS histograms into a joint LCS_HS histogram provided by the present invention. Detailed Implementation
[0020] To provide a clearer understanding of the technical features, objectives, and effects of the present invention, specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0021] Figure 1 A schematic diagram of the image texture feature extraction method based on local counting projection according to this embodiment is shown. In this embodiment, the image texture feature extraction method based on local counting projection includes the following steps:
[0022] S1: Perform grayscale preprocessing on the image to be tested to obtain a grayscale image;
[0023] S2: Based on the grayscale image, perform grayscale difference calculation and binarization statistics using a 5×5 rectangular star structure to obtain local count statistics;
[0024] In one exemplary embodiment, step S2 specifically includes:
[0025] S21: Based on the grayscale image, a grayscale difference pair is obtained using a 5×5 rectangular star structure;
[0026] In one exemplary embodiment, step S21 specifically includes: obtaining grayscale difference pairs based on the grayscale image using a 5×5 rectangular star structure, as shown in the formula:
[0027] ,
[0028] in, These are the center pixel, the second pixel, and the third pixel in the direction of the star-shaped ray from the inside out; It is a unit step function;
[0029] S22: Compare the magnitudes of the grayscale difference pairs and binarize them to obtain binarized grayscale difference pairs;
[0030] In one exemplary embodiment, step S22 specifically includes: comparing the magnitudes of the grayscale difference pairs and binarizing them to obtain binarized grayscale difference pairs, as shown in the formula:
[0031]
[0032] in, express Binarized grayscale difference pairs in direction;
[0033] S23: Perform statistics on the binarized grayscale difference pairs to obtain local count statistics;
[0034] In one exemplary embodiment, step S23 specifically includes: performing statistical analysis on the binarized grayscale difference pairs to obtain local count statistics, as shown in the formula:
[0035]
[0036] in, For local counting statistics, Center pixel The direction of the star-shaped rays Binarized grayscale difference pairs in direction;
[0037] S3: Based on the grayscale image, Hamiltonian statistics are obtained using a 5×5 rectangular star structure, a 3×3 rectangular structure, and the Hamiltonian operator.
[0038] In one exemplary embodiment, step S3 specifically includes:
[0039] S31: Based on the grayscale image, construct 8 3×3 rectangular structures with the adjacent pixels of the center pixel of the 5×5 rectangular star structure as the center, and solve the vector field divergence for each 3×3 rectangular structure using the Hamiltonian operator.
[0040] In an exemplary embodiment, step S31 specifically includes: based on the grayscale image, constructing eight 3×3 rectangular structures centered on the neighboring pixels of the center pixel of the 5×5 rectangular star structure, and calculating the vector field divergence for each 3×3 rectangular structure using the Hamiltonian operator, as shown in the formula:
[0041] ,
[0042] ,
[0043] in, For Hamiltonian operators, and Center pixel The Hamiltonian operator in two-dimensional coordinates is a vector. For vector field divergence, These are the x and y coordinates of the center pixel, respectively.
[0044] S32: Based on the vector field divergence, obtain the pixel grayscale change trend;
[0045] In one exemplary embodiment, step S32 specifically includes: obtaining the pixel grayscale change trend based on the vector field divergence, as shown in the formula:
[0046]
[0047] in, This shows the trend of pixel grayscale changes.
[0048] S33: Obtain Hamiltonian statistics based on the grayscale change trend of the pixels;
[0049] In one exemplary embodiment, step S33 specifically includes: obtaining Hamiltonian statistics based on the pixel grayscale change trend, as shown in the formula:
[0050]
[0051] in, This indicates Hamilton's statistics. Center pixel The The grayscale change trend of adjacent pixels;
[0052] S4: Based on the local count statistics and the Hamiltonian statistics, the local count-Hamilton texture features of the image to be tested are obtained using the statistical histogram;
[0053] As an exemplary embodiment, in step S4, histogram statistics are performed on the local count statistics (LCS) descriptors of each pixel in the entire image to obtain a histogram. Simultaneously, histogram statistics were also performed on the Hamiltonian (HS) descriptors, resulting in another histogram. The two histograms are concatenated to form a joint histogram. LCS_HS texture features of the image under test:
[0054]
[0055] in, This represents a histogram of local count statistics (LCS) descriptors. This represents a Hamiltonian statistics (HS) descriptor histogram. The histogram of LCS_HS descriptors representing the union.
[0056] In some embodiments, the image texture feature extraction method based on local counting projection described above can also be implemented in the following ways.
[0057] In this embodiment, the specific steps of the image texture feature extraction method based on local counting projection are as follows:
[0058] Step 1: Perform grayscale preprocessing on the image to be tested to obtain a grayscale image;
[0059] Step 2: Scan the entire grayscale image using a 5×5 rectangular star structure, extract three pixels on the star rays at each position in the grayscale image and calculate their grayscale difference pairs. Then, compare the size of the grayscale difference pairs and binarize them. Next, count the number of grayscale difference pairs with a binarized value of 1 in the 5×5 rectangular star structure to calculate its Local Count Statistics (LCS).
[0060] In step 2, let x and y be grayscale images. The coordinates are used to traverse the entire image using a 5×5 window. The center pixel of the window and its 8 neighboring elements form a star-shaped ray structure, such as... Figure 2 Therefore, each window has a total of 8 ray-structured paths, and the pixel set in the path is defined as: ,in Center pixel This represents the grayscale value of the inner ring pixels. This represents the grayscale value of the outer ring pixels. The pixel combinations corresponding to each path are as follows:
[0061]
[0062] Then calculate the grayscale difference pairs of three pixels on each path:
[0063] .
[0064] The comparison of grayscale difference pairs can be described by a mathematical expression, namely:
[0065]
[0066] when A value of 1 indicates that the current center pixel generally tends to brighten along the path; conversely, a value of 1 indicates that the current center pixel generally tends to darken along the path. The center pixel... There are a total of 8 grayscale difference pairs:
[0067] ;
[0068] Then, the number of gray-level difference pairs with a binarized value of 1 in the 5×5 rectangular star structure is counted to calculate its Local Count Statistics (LCS):
[0069]
[0070] like Figure 3 In the 8 ray paths, the number of grayscale difference pairs with a value of 1 is 3, therefore the pixel... Its LCS value is 3.
[0071] Step 3: Using the 8 neighboring pixels of the center pixel of the 5×5 rectangular structure as their respective centers, construct 3×3 rectangular structures respectively. Use the Hamiltonian operator to calculate the divergence of the vector field of each 3×3 rectangular structure, and then count the number of convergence (divergence) in these 8 vector fields as Hamiltonian statistics (HS).
[0072] In step 3, the pixels adjacent to the center pixel of the 5×5 window are used as the center, such as... Figure 4 Construct 3×3 rectangular structures, with the red dot in the diagram as the center. A total of 8 such structures can be constructed. For each 3×3 rectangular structure, use the Hamiltonian operator to calculate the divergence of its vector field. Let the center pixel of the 3×3 rectangular structure be . The Hamiltonian operator at this point in two-dimensional coordinates is:
[0073]
[0074] The divergence of its vector field is:
[0075]
[0076] In the discrete case, the Hamiltonian divergence can be calculated using a 4-neighborhood (or 8-neighborhood) Laplacian matrix. Considering the four adjacent pixels (top, bottom, left, and right) of a pixel, the Laplacian matrix is set as follows:
[0077]
[0078] Convolution is performed using the Laplacian matrix and a 3×3 rectangular image structure. This means the center pixel is weighted by the sum of its four adjacent pixels (top, bottom, left, and right) minus four times its own weight. The discrete Hamiltonian divergence can then be approximated as follows:
[0079]
[0080]
[0081] The Hamiltonian divergence can be used to determine the grayscale trend of a pixel. A positive divergence value indicates that the grayscale value at that point tends to increase within its neighborhood (divergence); a negative divergence value indicates that the grayscale value tends to decrease (convergence); and a zero divergence value means that the grayscale value at that point is relatively stable within its neighborhood, without a significant increasing or decreasing trend. Therefore, a threshold function is used to handle the pixel divergence.
[0082]
[0083] Calculate the number of convergences (divergences) in 8 directions within a 5×5 window, as Hamiltonian statistics (HS):
[0084]
[0085] like Figure 5 The aggregation quantity is 5 in 8 directions, therefore the number of pixels is 5. Its HS value is 5.
[0086] Step 4: Combine the statistical histograms of the LCS descriptors and the statistical histograms of the HS descriptors into a joint histogram as the LCS_HS texture feature of the image under test.
[0087] In step 4, as Figure 6 A histogram is obtained by performing histogram analysis on the LCS descriptors of each pixel in the entire image. Simultaneously, histogram statistics were also performed on the HS descriptors, resulting in another histogram. The two histograms are concatenated to form a joint histogram. LCS_HS texture features in the image:
[0088]
[0089] in, This represents a histogram of local count statistics (LCS) descriptors. This represents a Hamiltonian statistics (HS) descriptor histogram. The histogram of LCS_HS descriptors representing the union.
[0090] This embodiment provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the image texture feature extraction method based on local counting projection described above.
[0091] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A method for extracting image texture features based on local counting projection, characterized in that, Includes the following steps: S1: Perform grayscale preprocessing on the image to be tested to obtain a grayscale image; S2: Based on the grayscale image, perform grayscale difference calculation and binarization statistics using a 5×5 rectangular star structure to obtain local count statistics; S3: Based on the grayscale image, Hamiltonian statistics are obtained using a 5×5 rectangular star structure, a 3×3 rectangular structure, and the Hamiltonian operator; S4: Based on the local count statistics and the Hamiltonian statistics, the local count-Hamilton texture features of the image to be tested are obtained using the statistical histogram; Step S2 specifically includes: S21: Based on the grayscale image, a grayscale difference pair is obtained using a 5×5 rectangular star structure; S22: Compare the magnitudes of the grayscale difference pairs and binarize them to obtain binarized grayscale difference pairs; S23: Perform statistics on the binarized grayscale difference pairs to obtain local count statistics; Step S3 specifically includes: S31: Based on the grayscale image, construct 8 3×3 rectangular structures with the adjacent pixels of the center pixel of the 5×5 rectangular star structure as the center, and solve the vector field divergence for each 3×3 rectangular structure using the Hamiltonian operator. S32: Based on the vector field divergence, obtain the pixel grayscale change trend; S33: Hamiltonian statistics are obtained based on the grayscale change trend of the pixels.
2. The image texture feature extraction method based on local counting projection according to claim 1, characterized in that, Step S21 specifically includes: based on the grayscale image, using a 5×5 rectangular star structure, obtaining grayscale difference pairs, as shown in the formula: , in, These are the center pixel, the second pixel, and the third pixel in the direction of the star-shaped ray from the inside out; It is a unit step function.
3. The image texture feature extraction method based on local counting projection according to claim 1, characterized in that, Step S22 specifically includes: comparing the magnitudes of the grayscale difference pairs and binarizing them to obtain binarized grayscale difference pairs, as shown in the formula: in, express Binarization of grayscale difference pairs in direction.
4. The image texture feature extraction method based on local counting projection according to claim 1, characterized in that, Step S23 specifically includes: performing statistical analysis on the binarized grayscale difference pairs to obtain local count statistics, as shown in the formula: in, For local counting statistics, Center pixel The first of the stellar rays Binarization of grayscale difference pairs in direction.
5. The image texture feature extraction method based on local counting projection according to claim 1, characterized in that, Step S31 specifically includes: based on the grayscale image, constructing eight 3×3 rectangular structures centered on the neighboring pixels of the center pixel of the 5×5 rectangular star structure, and calculating the vector field divergence for each 3×3 rectangular structure using the Hamiltonian operator, as shown in the formula: , , in, For Hamiltonian operators, and Center pixel The Hamiltonian operator in two-dimensional coordinates is a vector. For vector field divergence, These are the x and y coordinates of the center pixel, respectively.
6. The image texture feature extraction method based on local counting projection according to claim 1, characterized in that, Step S32 specifically includes: obtaining the pixel grayscale change trend based on the vector field divergence, as shown in the formula: in, This represents the grayscale variation trend of pixels.
7. The image texture feature extraction method based on local counting projection according to claim 1, characterized in that, Step S33 specifically includes: obtaining Hamiltonian statistics based on the grayscale change trend of the pixels, as shown in the formula: in, This indicates Hamilton's statistics. Center pixel The The grayscale change trend of adjacent pixels.
8. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the image texture feature extraction method based on local counting projection as described in any one of claims 1-7.
Citation Information
Patent Citations
Method and system for extracting texture feature of image based on local specification difference
CN107092916A
Texture image feature extraction method and texture image feature extraction system
CN107292313A