Image texture feature extraction method based on local differential projection
By combining local differential projection and concave-convex projection, the problem of incomplete extraction of fine texture structure features in images in existing technologies is solved, achieving more stable and accurate texture feature extraction, which is suitable for applications such as anti-counterfeiting.
Patent Information
- Application Number
- CN202511122483.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-08-12
AI Technical Summary
Existing technologies struggle to effectively extract subtle texture features from images, resulting in incomplete texture image information and affecting the integrity of image information in subsequent research.
A method based on local difference projection is adopted. By using a 5×5 rectangular star structure and Weber's law, local difference projection and local concavity-convexity projection are calculated. Combined with statistical histograms, the difference-convexity texture features of the image are extracted.
It improves the stability and accuracy of texture feature extraction, can clearly express subtle changes in image texture structure, enhances the robustness and stability of texture description, and is suitable for applications such as anti-counterfeiting.
Smart Images

Figure CN120612353B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and more specifically, to a method for extracting image texture features based on local difference projection. Background Technology
[0002] Image texture refers to the visual patterns and details of surfaces or objects in an image. It reflects the surface structure, physical properties, and visual perception of an image region. Texture has important applications in computer vision, image processing, and computer graphics, especially in object recognition, scene reconstruction, image segmentation, and image enhancement. To meet different application needs, various algorithms are typically used to extract and analyze texture features, mainly including statistical methods, structured methods, and model-based methods. Each method has its own strengths and weaknesses, exhibiting unique advantages in specific scenarios. Currently, most existing methods struggle to properly consider the subtle relationships between central pixels and neighboring pixels when processing texture information, thus failing to extract subtle texture structure features. This directly leads to incomplete texture image information, posing a risk of missing image information for subsequent research based on this texture information. A new technological approach is urgently needed to overcome this challenge and improve the image texture analysis system.
[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 difference projection, which can extract subtle texture structure changes in images and ensure more robust and stable texture description capabilities.
[0005] This invention provides a method for extracting image texture features based on local difference 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, local difference projection is obtained using a 5×5 rectangular star structure and Weber's law;
[0008] S3: Based on the grayscale image, perform difference calculation and concavity / convexity statistics using a 5×5 rectangular star structure to obtain the local concavity / convexity projection;
[0009] S4: Based on the local difference projection and the local concave-convex projection, the difference-convex 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 differential projection described above.
[0011] The image texture feature extraction method based on local difference 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, calculates the grayscale central difference of each star-shaped ray from the inside out, then uses Weber's law to calculate the Local Difference Projection (LDP) of the central difference. Next, it calculates the second-order grayscale difference of each star-shaped ray from the inside out, and counts the number of concave (convex) tendencies in the 5×5 rectangular star-shaped structure to calculate its Local Concavity-Convexity Projection (LCP). Finally, it merges the statistical histograms of the LDP descriptors and the LCP descriptors into a joint histogram as the LDP_ of the image under test. LCP texture features; This invention uses statistical projection based on the gray-level center difference and concavity / convexity of rays in a 5×5 rectangular star structure to improve the stability and discriminative power of the texture feature extraction operator; This invention introduces the concept of Weber's law to describe the relationship between local fluctuation changes and initial intensity, improving the accuracy of image texture description; This invention extracts the Local Difference-Concavity / Concavity Projection Pattern (LDP_LCP) features of the image by merging the statistical histograms of LDP and LCP into a joint histogram, thereby achieving a clearer and more effective expression of image texture features, significantly improving the expressive power of texture features, realizing the extraction of subtle texture structure changes in the image, intuitively and effectively characterizing the image texture status, and ensuring that the texture description exhibits stronger advantages in robustness and stability, making it suitable for applications such as anti-counterfeiting. 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 difference projection provided by the present invention;
[0015] Figure 2 This is the grayscale center difference image of the star-shaped ray structure provided by the present invention;
[0016] Figure 3 This is a diagram illustrating the effect of Local Difference Projection (LDP) in an image provided by the present invention.
[0017] Figure 4 This is the grayscale second-order difference image of the star-shaped ray structure provided by the present invention;
[0018] Figure 5 This is a rendering of the Local Concave-Concave Projection (LCP) effect in an image provided by the present invention;
[0019] Figure 6 This is a diagram illustrating the effect of concatenating the LDP and LCP histograms into a joint LDP_LCP 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 difference projection according to this embodiment is shown. In this embodiment, the image texture feature extraction method based on local difference 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, local difference projection is obtained using a 5×5 rectangular star structure and Weber's law;
[0024] In one exemplary embodiment, step S2 specifically includes:
[0025] S21: Based on the grayscale image, the grayscale center difference is obtained using a 5×5 rectangular star structure;
[0026] In one exemplary embodiment, step S21 specifically includes: obtaining the grayscale center difference based on the grayscale image using a 5×5 rectangular star structure, as shown in the formula:
[0027] ,
[0028] in, The gray-level center difference is along one of the star-shaped rays. Center pixel The third pixel in the direction of the inward-outward star-shaped ray;
[0029] S22: Based on the gray-scale center difference, the local difference projection is obtained using Weber's law;
[0030] In one exemplary embodiment, step S22 specifically includes: obtaining the local difference projection based on the gray-level center difference using Weber's law, as shown in the formula:
[0031] ,
[0032] ,
[0033] in, For local difference projection, It is a unit step function. For Weber fractions, For changes in stimuli, This is the rounding function. Center pixel The direction of the star-shaped rays Gray-scale center difference in direction;
[0034] S3: Based on the grayscale image, perform difference calculation and concavity / convexity statistics using a 5×5 rectangular star structure to obtain the local concavity / convexity projection;
[0035] In one exemplary embodiment, step S3 specifically includes:
[0036] S31: Based on the grayscale image, the first first-order difference is obtained using a 5×5 rectangular star structure;
[0037] In one exemplary embodiment, step S31 specifically includes: obtaining a first-order difference based on the grayscale image using a 5×5 rectangular star structure, as shown in the formula:
[0038] ,
[0039] in, For the first-order difference, The second pixel in the direction of the inward-outward star-shaped ray;
[0040] S32: Based on the grayscale image, a second first-order difference is obtained using a 5×5 rectangular star structure;
[0041] In one exemplary embodiment, step S32 specifically includes: obtaining a second first-order difference based on the grayscale image using a 5×5 rectangular star structure, as shown in the formula:
[0042] ,
[0043] in, This is the second first-order difference;
[0044] S33: Based on the first first-order difference and the second first-order difference, the second-order difference is obtained;
[0045] In an exemplary embodiment, step S33 specifically includes: obtaining the second-order difference of the ray based on the first first-order difference and the second first-order difference, as shown in the formula:
[0046] ,
[0047] in, for Second-order difference of direction;
[0048] S34: Obtain the concavity / convexity based on the second-order difference;
[0049] In one exemplary embodiment, step S34 specifically includes: obtaining the concavity / convexity based on the second-order difference, as shown in the formula:
[0050] ,
[0051] in, It is concave-convex;
[0052] S35: Obtain a local concave-convex projection based on the concave-convexity;
[0053] In one exemplary embodiment, step S35 specifically includes: obtaining a local concavity / convexity projection based on the concavity / convexity, as shown in the formula:
[0054] ,
[0055] in, For local concave-convex projection, Center pixel The direction of the star-shaped rays Concavity and convexity in direction;
[0056] S4: Based on the local difference projection and the local concave-convex projection, the difference-convex texture features of the image to be tested are obtained using the statistical histogram;
[0057] As an exemplary embodiment, in step S4, histogram statistics are performed on each pixel of the entire image using Local Difference Projection (LDP) descriptors and Local Concavity-Bump Projection (LCP) descriptors, and the two are combined using a concatenation method to form a joint LDP_LCP descriptor histogram:
[0058] ,
[0059] in, This represents the histogram of the Local Difference Projection (LDP) descriptor. This represents the histogram of the Local Concave-Concave Projection (LCP) descriptor. The LDP_LCP descriptor histogram represents the union.
[0060] In some embodiments, the image texture feature extraction method based on local difference projection described above can also be implemented in the following ways.
[0061] In this embodiment, the specific steps of the image texture feature extraction method based on local difference projection are as follows:
[0062] Step 1: Perform grayscale preprocessing on the image to be tested to obtain a grayscale image.
[0063] Step 2: Scan the entire grayscale image using a 5×5 rectangular star structure, and calculate the grayscale center difference of each star ray from the inside out. Then, use Weber's law to calculate the local difference projection (LDP) on the center difference.
[0064] 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 Starting from the center of the star-shaped structure, the gray-level center difference along these eight star-shaped rays is calculated from the inside out. Let the center pixel be... The pixel combinations corresponding to each path are:
[0065]
[0066] One of the star-shaped rays running from the inside out is set to a pixel direction. Then its gray-level center difference is calculated as follows:
[0067]
[0068] To describe the relationship between changes in stimulus intensity and initial stimulus strength, Weber's law can be used to calculate the local difference projection (LDP) of the central difference:
[0069]
[0070] in For Weber fractions, This is the rounding function. The change in stimulus is caused by the central pixel. The sum of the changes in adjacent pixels constitutes the grayscale value, which can be calculated using the sum of the grayscale center differences:
[0071]
[0072] If LDP is positive, it means the current pixel is relatively brighter than its surrounding pixels. Conversely, it means the current pixel is relatively darker than its surrounding pixels. For example... Figure 3 The pixel is obtained by calculating the gray-level center difference of the eight ray paths. The LDP value is 0.
[0073] Step 3: Further calculate the second-order difference of gray level for each star-shaped ray from the inside out, and then count the number of concave (convex) tendencies in the 5×5 rectangular star-shaped structure to calculate its local concave-convex projection (LCP).
[0074] In step 3, the second-order difference of gray level for each star-shaped ray is calculated from the inside out. ,like Figure 4 First calculate arrive First-order difference:
[0075]
[0076] Then calculate arrive First-order difference:
[0077]
[0078] Next, the second difference of the ray is calculated using the first-order difference:
[0079]
[0080] The second-order difference reflects the concavity / convexity of the ray. If the second-order difference is greater than zero, the ray is concave; if the second-order difference is less than zero, the ray is convex. Therefore, a threshold function is used to analyze its concavity / convexity:
[0081]
[0082] The number of stars with concave (convex) tendencies along the directions of the eight star-shaped rays in a 5×5 rectangular star structure is counted and used as its Local Concave-Convex Projection (LCP):
[0083]
[0084] like Figure 5 In the 8 ray paths, the number of concavities is 3, therefore the number of pixels is... The LCP value is 3.
[0085] Step 4: Combine the statistical histograms of the LDP descriptor and the LCP descriptor into a joint histogram as the LDP_LCP texture feature of the image under test.
[0086] In step 4, as Figure 6 Histogram analysis was performed on the LDP descriptors of each pixel in the entire image, resulting in a histogram with 257 groups. Simultaneously, histogram statistics were also performed on the LCP descriptors, resulting in a histogram with 8 groups. The two histograms are concatenated to form a joint histogram with 265 groups. LDP_LCP texture features in the image:
[0087]
[0088] in, This represents the histogram of the Local Difference Projection (LDP) descriptor. This represents the histogram of the Local Concave-Concave Projection (LCP) descriptor. The LDP_LCP descriptor histogram represents the union.
[0089] 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 differential projection described above.
[0090] 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 difference 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, local difference projection is obtained using a 5×5 rectangular star structure and Weber's law; S3: Based on the grayscale image, perform difference calculation and concavity / convexity statistics using a 5×5 rectangular star structure to obtain the local concavity / convexity projection; S4: Based on the local difference projection and the local concave-convex projection, the difference-convex texture features of the image to be tested are obtained using the statistical histogram; Step S2 specifically includes: S21: Based on the grayscale image, the grayscale center difference is obtained using a 5×5 rectangular star structure; S22: Based on the gray-scale center difference, the local difference projection is obtained using Weber's law; Step S21 specifically includes: based on the grayscale image, using a 5×5 rectangular star structure, obtaining the grayscale center difference, as shown in the formula: , in, The gray-level center difference is along one of the star-shaped rays. Center pixel The third pixel in the direction of the inward-outward star-shaped ray; Step S22 specifically includes: based on the gray-level center difference, using Weber's law, obtaining the local difference projection, as shown in the formula: , , in, For local difference projection, It is a unit step function. For Weber fractions, For changes in stimuli, This is the rounding function. Center pixel The direction of the star-shaped rays Gray-scale center difference in direction.
2. The image texture feature extraction method based on local difference projection according to claim 1, characterized in that, Step S3 specifically includes: S31: Based on the grayscale image, the first first-order difference is obtained using a 5×5 rectangular star structure; S32: Based on the grayscale image, a second first-order difference is obtained using a 5×5 rectangular star structure; S33: Based on the first first-order difference and the second first-order difference, the second-order difference is obtained; S34: Obtain the concavity / convexity based on the second-order difference; S35: Obtain the local concave-convex projection based on the concave-convexity.
3. The image texture feature extraction method based on local difference projection according to claim 2, characterized in that, Step S31 specifically includes: based on the grayscale image, using a 5×5 rectangular star structure, obtaining the first first-order difference, as shown in the formula: , in, For the first-order difference, The second pixel in the direction of the inward-outward star-shaped ray; Step S32 specifically includes: based on the grayscale image, using a 5×5 rectangular star structure, obtaining the second first-order difference, as shown in the formula: , in, This is the second first-order difference.
4. The image texture feature extraction method based on local difference projection according to claim 2, characterized in that, Step S33 specifically includes: obtaining the second-order difference based on the first-order difference and the second-order difference, as shown in the formula: , in, for Second-order difference in direction.
5. The image texture feature extraction method based on local difference projection according to claim 2, characterized in that, Step S34 specifically includes: obtaining the concavity / convexity based on the second-order difference, as shown in the formula: , in, It is concave-convex.
6. The image texture feature extraction method based on local difference projection according to claim 2, characterized in that, Step S35 specifically includes: obtaining the local concavity / convexity projection based on the concavity / convexity, as shown in the formula: , in, For local concave-convex projection, Center pixel The direction of the star-shaped rays Concavity and convexity in direction.
7. 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 differential projection as described in any one of claims 1-6.
Citation Information
Patent Citations
Right-angle welding seam feature point identification method based on image contour second-order difference
CN117455831A
Visual enhancement method and system of LED creative spherical display screen
CN119417718A