A texture feature extraction method and device

By using LBP and symbiotic matrix parameters in texture feature extraction, combined with the concept of subpixels, the shortcomings of texture feature extraction in the prior art are solved, and higher texture detail grasp and rotation robustness are achieved.

CN114627314BActive Publication Date: 2025-03-11AGRICULTURAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210281817.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-22
Publication Date
2025-03-11
Estimated Expiration
2042-03-22

AI Technical Summary

Technical Problem

The prior art cannot effectively realize texture feature extraction, especially in terms of grasping texture details and robustness of texture rotation.

Method used

By converting the target texture image into the target grayscale image, and determining the domain points and grayscale values ​​of each pixel and subpixel based on the local binary mode (LBP) and symbiosis matrix parameters, the LBP symbiosis matrix is ​​constructed to extract texture features.

Benefits of technology

It improves the ability to grasp texture details, enhances the robustness of texture rotation, and improves the accuracy of extracted texture features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114627314B_ABST
    Figure CN114627314B_ABST
Patent Text Reader

Abstract

The invention discloses a texture feature extraction method and device, which can obtain a target texture image; convert the target texture image into a corresponding target grayscale image; determine the local binary pattern LBP parameters and the co-occurrence matrix parameters; determine the sub-pixel of each pixel in the target grayscale image based on the co-occurrence matrix parameters; determine the domain points of each pixel and each sub-pixel based on the LBP parameters; determine the grayscale value of each sub-pixel and each domain point; determine the LBP value of each pixel based on the grayscale value of each pixel and the related domain point respectively; determine the LBP value of each sub-pixel based on the grayscale value of each sub-pixel and the related domain point respectively; construct an LBP co-occurrence matrix based on the LBP values ​​of each pixel and each sub-pixel, and the LBP co-occurrence matrix is ​​a symmetric matrix; and determine the symmetric part in the LBP co-occurrence matrix as the final texture feature. The invention can effectively improve the ability to grasp texture details, enhance the robustness of texture rotation, and improve the accuracy of extracted texture features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to image processing technology, and in particular to a texture feature extraction method and device. Background Art

[0002] With the development of image processing technology, the image texture feature extraction technology is constantly improving.

[0003] Specifically, texture is the spatial distribution of grayscale in a certain image area. The spatial distribution may have a certain regularity. The process of expressing this regularity in a digital form using a certain method is called texture feature extraction.

[0004] Specifically, texture features can be a digital description of texture information, and texture information can include two aspects, one is local information and the other is global information. Ideal texture features can effectively describe both local information and global information at the same time. At present, texture feature extraction has a wide range of applications in species identification, fingerprint recognition, face recognition, remote sensing, monitoring, text segmentation and video depth extraction.

[0005] However, the texture feature extraction method in the prior art cannot effectively realize texture feature extraction. Summary of the invention

[0006] In view of the above problems, the present invention provides a texture feature extraction method and device that overcomes the above problems or at least partially solves the above problems. The technical solution is as follows:

[0007] A texture feature extraction method, comprising:

[0008] Obtaining a target texture image to be subjected to texture feature extraction;

[0009] Converting the target texture image into a corresponding target grayscale image;

[0010] Determining predefined feature extraction parameters, wherein the feature extraction parameters include local binary pattern (LBP) parameters and co-occurrence matrix parameters;

[0011] Determining the sub-pixel of each pixel in the target grayscale image based on the co-occurrence matrix parameters;

[0012] Based on the LBP parameters, determining the domain point of each pixel and the domain point of each sub-pixel;

[0013] Determining the grayscale value of each of the sub-pixels and the grayscale value of each of the field points;

[0014] Determine the LBP value of each pixel based on the grayscale value of each pixel and the related field point respectively;

[0015] Determine the LBP value of each of the sub-pixels based on the grayscale value of each of the sub-pixels and the related field points;

[0016] Based on the LBP value of each pixel and the LBP value of each sub-pixel, construct an LBP co-occurrence matrix, wherein the LBP co-occurrence matrix is ​​a symmetric matrix;

[0017] The symmetric part in the LBP co-occurrence matrix is ​​determined as the final texture feature extracted from the target texture image.

[0018] Optionally, the co-occurrence matrix parameters include: statistical distance and statistical direction; and determining the sub-pixel of each pixel in the target grayscale image based on the co-occurrence matrix parameters includes:

[0019] For any pixel: based on the statistical distance and the statistical direction, determine the sub-pixel of the pixel.

[0020] Optionally, the LBP parameters include: a domain radius and a number of domain points; and determining the domain point of each pixel and the domain point of each sub-pixel based on the LBP parameters includes:

[0021] For any pixel object in each of the pixels and each of the sub-pixels: based on the field radius and the number of field points, determine the field point of the pixel object.

[0022] Optionally, determining the grayscale value of each of the sub-pixels and the grayscale value of each of the domain points includes:

[0023] For any object in each of the sub-pixels and each of the field points: determine a target square containing the object, there is a pixel at each of the four corner points of the target square, determine the distance between the object and each boundary in the target square, and determine the grayscale value of the object based on the grayscale values ​​of the four pixels on the target square and the distances.

[0024] Optionally, determining the LBP value of each pixel based on the grayscale value of each pixel and the related field point respectively includes:

[0025] For any of the pixels: based on the grayscale value of the pixel and the grayscale values ​​of each of the field points of the pixel, determine the basic LBP value of the pixel; based on the basic LBP value, calculate the rotational invariant LBP value of the pixel; and use the rotational invariant LBP value to determine the LBP value of the pixel.

[0026] Optionally, determining the LBP value of each sub-pixel based on the grayscale value of each sub-pixel and the related field point respectively includes:

[0027] For any of the sub-pixels: based on the grayscale value of the sub-pixel and the grayscale values ​​of each of the domain points of the sub-pixel, determine the basic LBP value of the sub-pixel, calculate the rotation-invariant LBP value of the sub-pixel based on the basic LBP value, and use the rotation-invariant LBP value to determine the LBP value of the sub-pixel.

[0028] Optionally, constructing an LBP co-occurrence matrix based on the LBP value of each pixel and the LBP value of each sub-pixel includes:

[0029] Determine the number of LBP value categories based on the number of field points and the calculation formula of the LBP value;

[0030] The square value of the number of LBP value categories is determined as the size of the target matrix; each element in the target matrix is ​​0;

[0031] For any pixel: determine the LBP value i of the pixel, determine the LBP value j of a sub-pixel of the pixel, in the target matrix, set the element located in the i-th row and the j-th column in the target matrix to 1, return to execute the step of determining the LBP value j of a sub-pixel of the pixel, until the elements corresponding to each sub-pixel of the pixel are set to 1.

[0032] A texture feature extraction device comprises: a first obtaining unit, a first converting unit, a first determining unit, a second determining unit, a third determining unit, a fourth determining unit, a fifth determining unit, a sixth determining unit, a first constructing unit and a seventh determining unit, wherein:

[0033] The first obtaining unit is used to obtain a target texture image to be subjected to texture feature extraction;

[0034] The first conversion unit is used to convert the target texture image into a corresponding target grayscale image;

[0035] The first determining unit is used to determine predefined feature extraction parameters, wherein the feature extraction parameters include local binary pattern LBP parameters and co-occurrence matrix parameters;

[0036] The second determining unit is used to determine the sub-pixel of each pixel in the target grayscale image based on the co-occurrence matrix parameters;

[0037] The third determining unit is used to determine the area point of each pixel and the area point of each sub-pixel based on the LBP parameter;

[0038] The fourth determining unit is used to determine the grayscale value of each of the sub-pixels and the grayscale value of each of the domain points;

[0039] The fifth determining unit is used to determine the LBP value of each pixel based on the grayscale value of each pixel and the related field point respectively;

[0040] The sixth determining unit is used to determine the LBP value of each of the sub-pixels based on the grayscale value of each of the sub-pixels and the related field points;

[0041] The first construction unit is used to construct an LBP co-occurrence matrix based on the LBP value of each pixel and the LBP value of each sub-pixel, wherein the LBP co-occurrence matrix is ​​a symmetric matrix;

[0042] The seventh determination unit is used to determine the symmetric part in the LBP co-occurrence matrix as the final texture feature extracted from the target texture image.

[0043] Optionally, the co-occurrence matrix parameters include: a statistical distance and a statistical direction; and the second determination unit is used to determine, for any of the pixels: a sub-pixel of the pixel based on the statistical distance and the statistical direction.

[0044] Optionally, the LBP parameters include: a domain radius and a number of domain points; the third determination unit is used to determine, for any pixel object in each of the pixels and each of the sub-pixels: based on the domain radius and the number of domain points, the domain point of the pixel object.

[0045] The texture feature extraction method and device proposed in this embodiment can obtain a target texture image to be subjected to texture feature extraction; convert the target texture image into a corresponding target grayscale image; determine predefined feature extraction parameters, which include local binary pattern LBP parameters and co-occurrence matrix parameters; determine the subpixels of each pixel in the target grayscale image based on the co-occurrence matrix parameters; determine the domain points of each pixel and the domain points of each subpixel based on the LBP parameters; determine the grayscale value of each subpixel and the grayscale value of each domain point; determine the LBP value of each pixel based on the grayscale values ​​of each pixel and the related domain points respectively; determine the LBP value of each subpixel based on the grayscale values ​​of each subpixel and the related domain points respectively; construct an LBP co-occurrence matrix based on the LBP values ​​of each pixel and the LBP values ​​of each subpixel, and the LBP co-occurrence matrix is ​​a symmetric matrix; and determine the symmetric part in the LBP co-occurrence matrix as the final texture feature extracted from the target texture image. The present invention can extract texture features based on the texture feature extraction method of the sub-pixel LBP co-occurrence matrix. It combines the sub-pixel with the LBP co-occurrence matrix, and proposes the concept of sub-pixel local binary pattern. The co-occurrence matrix is ​​used to extract texture features in the sub-pixel LBP image, which can effectively improve the ability to grasp texture details, enhance the robustness of texture rotation, and improve the accuracy of the extracted texture features.

[0046] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0048] Figure 1 A flow chart of a first texture feature extraction method provided by an embodiment of the present invention is shown;

[0049] Figure 2 A schematic diagram showing the distribution of statistical directions in a co-occurrence matrix parameter provided by an embodiment of the present invention is shown;

[0050] Figure 3 A schematic diagram showing the positional relationship between a pixel and its domain point provided by an embodiment of the present invention is shown;

[0051] Figure 4 A schematic diagram showing calculation of sub-pixel or domain point grayscale values ​​provided by an embodiment of the present invention is shown;

[0052] Figure 5 A schematic structural diagram of a texture feature extraction device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0053] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0054] like Figure 1 As shown, this embodiment proposes a first texture feature extraction method, which may include the following steps:

[0055] S101, obtaining a target texture image to be subjected to texture feature extraction;

[0056] The target texture image may be an image with texture features.

[0057] S102, converting the target texture image into a corresponding target grayscale image;

[0058] The target grayscale image may be a grayscale image obtained by performing grayscale conversion on the target texture image.

[0059] Specifically, after obtaining the target texture image, the present invention can perform grayscale conversion on the target texture image to obtain a corresponding target grayscale image.

[0060] S103, determining predefined feature extraction parameters, the feature extraction parameters including local binary patterns (LBP) parameters and co-occurrence matrix parameters;

[0061] The feature extraction parameters may be pre-set related parameters for extracting texture features from a target texture image. It should be noted that the feature extraction parameters may be pre-determined by technicians according to actual conditions.

[0062] Optionally, the LBP parameters may include a domain radius and a number of domain points; optionally, the co-occurrence matrix parameters may include a statistical distance and a statistical direction.

[0063] S104, determining the sub-pixel of each pixel in the target grayscale image based on the co-occurrence matrix parameters;

[0064] Specifically, after determining the co-occurrence matrix parameters, the present invention can use the co-occurrence matrix parameters to determine the sub-pixels of each pixel in the target grayscale image.

[0065] Optionally, in other texture feature extraction methods proposed in this embodiment, the co-occurrence matrix parameters include: statistical distance and statistical direction; in this case, step S104 may include:

[0066] For any pixel: determine the sub-pixel of the pixel based on the statistical distance and statistical direction.

[0067] Optionally, the value of the statistical distance may be smaller, and may generally be set to be less than 5 pixels, such as 3 pixels.

[0068] Optionally, multiple statistical directions can be selected. When there are more statistical directions, the feature has a stronger ability to describe the rotation texture. Figure 2 As shown, the statistical directions may include 4 evenly distributed directions and their opposite directions, for a total of 8 statistical directions.

[0069] Specifically, the present invention can pre-set statistical distances and statistical directions to respectively determine the sub-pixels corresponding to each pixel in the target grayscale image, wherein the number of sub-pixels corresponding to a pixel is the same as the number of statistical directions, that is, the number of sub-pixels corresponding to the pixel is the same as the number of statistical directions.

[0070] S105, determining the neighborhood point of each pixel and the neighborhood point of each sub-pixel based on the LBP parameters;

[0071] Specifically, after determining the LBP parameters, the present invention can determine the neighborhood point of each pixel and the neighborhood point of each sub-pixel according to the LBP parameters.

[0072] Optionally, in other texture feature extraction methods proposed in this embodiment, the LBP parameters include: a domain radius and a number of domain points; step S105 may include:

[0073] For any pixel object in each pixel and each sub-pixel: based on the domain radius and the number of domain points, determine the domain point of the pixel object.

[0074] The pixel object can be a pixel or a sub-pixel.

[0075] Specifically, the present invention can determine the position of the domain point of each pixel and the position of the domain point of each sub-pixel based on the preset domain radius and the number of domain points.

[0076] It should be noted that the domain radius can be set to a smaller value, generally less than 5 pixels; the larger the value of the number of domain points, the better the texture description effect, but the calculation burden will increase accordingly. Specifically, the domain radius and the number of domain points can be set by technicians according to actual conditions, and the present invention does not limit this. For example, the domain radius can be set to 3 pixels and the domain points can be set to 8.

[0077] To better illustrate the positional relationship between pixels or sub-pixels and related field points, this embodiment proposes the following Figure 3 The position relationship diagram is shown in the figure. Figure 3 In the figure, the small white circle is a pixel, and the eight small black circles are all the domain points of the pixel, that is, the number of domain points is 8, and the eight domain points are evenly distributed around the pixel.

[0078] S106, determining the grayscale value of each sub-pixel and the grayscale value of each field point;

[0079] Specifically, the present invention may use a bilinear interpolation calculation method to respectively calculate the grayscale value of each determined sub-pixel and each field point.

[0080] Optionally, in other texture feature extraction methods proposed in this embodiment, step S106 may include:

[0081] For any object in each sub-pixel and each field point: determine the target square containing the object, there is a pixel at each of the four corner points of the target square, determine the distance between the object and each boundary of the target square, and determine the grayscale value of the object based on the grayscale values ​​and distances of the four pixels on the determined target square.

[0082] Specifically, for any object in each sub-pixel and each field point, the present invention can first determine a target square that contains the object and is composed of four adjacent pixels distributed in a square corner position; then, the present invention can determine the length of the object from each side of the target square; then, the present invention can use the length of the object from each side of the target square and the grayscale values ​​of the four pixels on the target square to calculate the grayscale value of the object. For example Figure 4 As shown in the schematic diagram, for a sub-pixel P0, the present invention can first determine a target square including P0 and composed of four pixels P1, P2, P3 and P4 distributed in a square corner position and adjacent to each other. Then, the present invention can determine the length P0P of the sub-pixel P0 from the boundary P1P2. 0A That is, x1, determines the length P0P of the sub-pixel P0 from the boundary P3P4 0B That is, x2, determines the length P0P of the sub-pixel P0 from the boundary P1P3 0C That is, y2, determines the length P0P of the sub-pixel P0 from the boundary P2P4 0D That is, y1, and then, the present invention can use the grayscale values ​​of the four pixels, x1, x2, y1 and y2 to calculate the grayscale value of the sub-pixel P0. Optionally, taking the sub-pixel P0 as an example, the present invention can use the following formula (1) to calculate the grayscale value of the sub-pixel.

[0083]

[0084] S107, determining the LBP value of each pixel based on the gray value of each pixel and the gray value of the relevant field point;

[0085] Specifically, the present invention can determine the LBP value of a pixel according to the grayscale values ​​of the pixel and its respective field points after determining the grayscale values ​​of the pixel and its respective field points.

[0086] Optionally, in other texture feature extraction methods proposed in this embodiment, step S107 may include:

[0087] For any pixel: based on the grayscale value of the pixel and the grayscale values ​​of each field point of the pixel, determine the basic LBP value of the pixel, calculate the rotation-invariant LBP value of the pixel based on the basic LBP value, and determine the LBP value of the pixel using the rotation-invariant LBP value.

[0088] Specifically, the present invention can use the following formulas (2) and (3) to calculate the basic LBP value of a pixel.

[0089]

[0090]

[0091] Among them, g c is pixel, g i is the gray value of each field point of the pixel, s(x) is the sign function, LBP n,r This is the most basic form of LBP calculation formula, which can calculate the basic LBP value.

[0092] Specifically, the present invention can use the following formula (4) to calculate the rotation-invariant LBP value of the pixel.

[0093]

[0094] in, is the calculation formula of the rotation-invariant LBP value, which can be used to calculate the rotation-invariant LBP value. ROR(x,y) is the rotation-shift function, which means rotating x right by y positions.

[0095] S108, determining the LBP value of each sub-pixel based on the grayscale value of each sub-pixel and the related field point;

[0096] It should be noted that the present invention can calculate the LBP value of the sub-pixel according to the LBP value calculation method of the pixel.

[0097] Optionally, step S108 may include:

[0098] For any sub-pixel: based on the grayscale value of the sub-pixel and the grayscale values ​​of each field point of the sub-pixel, determine the basic LBP value of the sub-pixel, calculate the rotation-invariant LBP value of the sub-pixel based on the basic LBP value, and determine the LBP value of the sub-pixel using the rotation-invariant LBP value.

[0099] It is understandable that the present invention can calculate the basic LBP value and the rotation-invariant LBP value of the sub-pixel according to the above formulas (3) and (4). When the basic LBP value and the rotation-invariant LBP value of the sub-pixel are calculated using formulas (3) and (4), the LBP in formula (3) is n,r That is, it can be the basic LBP value of the sub-pixel, g cThat is, it can be a sub-pixel, g i That is, it can be the grayscale value of each field point of the sub-pixel; in formula (4) That is, it can be the rotation-invariant LBP value of the sub-pixel.

[0100] It should be noted that, after obtaining the LBP values ​​of each pixel and each sub-pixel, the present invention can obtain a sub-pixel LBP image based on the distribution of the LBP values ​​of each pixel and each sub-pixel in the target grayscale image. Among them, the sub-pixel LBP image is composed of pixel LBP values ​​and sub-pixel LBP values. The points on the sub-pixel LBP image are not evenly arranged, and it only saves the pixel LBP values ​​and sub-pixel LBP values ​​that are valuable for subsequent calculations.

[0101] S109, constructing an LBP co-occurrence matrix based on the LBP value of each pixel and the LBP value of each sub-pixel, where the LBP co-occurrence matrix is ​​a symmetric matrix;

[0102] Specifically, after obtaining the LBP value of each pixel and the LBP value of each sub-pixel, the present invention can construct an LBP co-occurrence matrix using the LBP value of each pixel and the LBP value of each sub-pixel.

[0103] Optionally, step S109 may include:

[0104] Based on the number of domain points and the calculation formula of LBP value, the number of LBP value categories is determined;

[0105] The square value of the number of LBP value categories is determined as the size of the target matrix; all elements in the target matrix are 0;

[0106] For any pixel: determine the LBP value i of the pixel, determine the LBP value j of a sub-pixel of the pixel, in the target matrix, set the element located in the i-th row and j-th column in the target matrix to 1, return to execute the step of determining the LBP value j of a sub-pixel of the pixel, until the elements corresponding to each sub-pixel of the pixel are set to 1.

[0107] The present invention can first determine the number of LBP value categories according to the preset number of domain points and the calculation formula of the LBP value. For example, when the number of domain points is 8 and the calculation formula of the LBP value includes the above formulas (3) and (4), the number of LBP value categories can be 36, that is, the LBP value has 36 different values.

[0108] The size of the target matrix is ​​the number of elements in the matrix. When the number of LBP value categories is 36, the size of the target matrix can be 36*36.

[0109] Specifically, the present invention can determine the combination of LBP values ​​of any pixel and its sub-pixels, and assign 1 to the corresponding elements in the target matrix to construct an LBP co-occurrence matrix. For example, for the first pixel, if the LBP value of the first pixel is i, and the LBP value of the first sub-pixel of the first pixel is j, the present invention can determine the element located at row i and column j in the target matrix, and set the element to 1; thereafter, the present invention can continue to use the combination of the LBP value of the first pixel and the LBP values ​​of the other sub-pixels of the first pixel to assign 1 to the elements at the corresponding positions in the target matrix.

[0110] Specifically, the present invention can traverse all pixels, obtain the combination of LBP values ​​of each pixel and each sub-pixel thereof, and set the corresponding elements in the target matrix. It should be noted that the target matrix after the traversal is completed is the LBP co-occurrence matrix. It is understandable that the LBP co-occurrence matrix can be a symmetric matrix.

[0111] S110, determining the symmetric part in the LBP co-occurrence matrix as the final texture feature extracted from the target texture image.

[0112] Among them, the final texture feature is the texture feature that needs to be extracted from the target texture image.

[0113] Specifically, after determining the LBP co-occurrence matrix, the present invention can determine the symmetric part of the LBP co-occurrence matrix, that is, a part of two element groups symmetric along the diagonal line in the LBP co-occurrence matrix, as the final texture feature.

[0114] It should be noted that the texture feature extraction methods in the prior art can include statistical, model, transformation and structural extraction methods. Among them, the statistical extraction method has an ideal effect and a small amount of calculation, and is widely used. Among the statistical extraction methods, more representative specific methods include local binary patterns (LBP), grayscale co-occurrence matrices and semi-variance maps, etc. These specific methods have achieved certain effects in solving practical problems, but their ability to grasp texture details and describe rotational textures is not strong. The present invention can extract texture features based on the texture feature extraction method of the sub-pixel LBP co-occurrence matrix, which combines sub-pixels with the LBP co-occurrence matrix, proposes the concept of sub-pixel local binary patterns, and uses the co-occurrence matrix to extract texture features in sub-pixel LBP images. The texture features extracted have a higher ability to grasp texture details, better robustness to texture rotation, and the extracted texture features are more accurate and effective.

[0115] It should also be noted that, compared with traditional local binary patterns and their variant algorithms, the present invention takes into account the spatial relationship of local binary patterns; and, taking into account the discreteness of the spatial position of pixels, the present invention calculates the grayscale value of a virtual sub-pixel through an interpolation algorithm, and compares it with the grayscale values ​​of the surrounding local binary pattern sampling points obtained by interpolation calculation, to obtain a sub-pixel local binary pattern and a sub-pixel LBP image that more accurately describes the texture, thereby obtaining a more accurate co-occurrence matrix and texture features.

[0116] The texture feature extraction method proposed in this embodiment can obtain a target texture image to be subjected to texture feature extraction; convert the target texture image into a corresponding target grayscale image; determine predefined feature extraction parameters, which include local binary pattern LBP parameters and co-occurrence matrix parameters; determine the subpixels of each pixel in the target grayscale image based on the co-occurrence matrix parameters; determine the domain points of each pixel and the domain points of each subpixel based on the LBP parameters; determine the grayscale value of each subpixel and the grayscale value of each domain point; determine the LBP value of each pixel based on the grayscale values ​​of each pixel and the related domain points; determine the LBP value of each subpixel based on the grayscale values ​​of each subpixel and the related domain points; construct an LBP co-occurrence matrix based on the LBP values ​​of each pixel and the LBP values ​​of each subpixel, and the LBP co-occurrence matrix is ​​a symmetric matrix; and determine the symmetric part in the LBP co-occurrence matrix as the final texture feature extracted from the target texture image. The present invention can extract texture features based on the texture feature extraction method of the sub-pixel LBP co-occurrence matrix. It combines the sub-pixel with the LBP co-occurrence matrix, and proposes the concept of sub-pixel local binary pattern. The co-occurrence matrix is ​​used to extract texture features in the sub-pixel LBP image, which can effectively improve the ability to grasp texture details, enhance the robustness of texture rotation, and improve the accuracy of the extracted texture features.

[0117] and Figure 1 The method shown corresponds to Figure 5 As shown, this embodiment provides a texture feature extraction device. The device may include: a first obtaining unit 101, a first converting unit 102, a first determining unit 103, a second determining unit 104, a third determining unit 105, a fourth determining unit 106, a fifth determining unit 107, a sixth determining unit 108, a first constructing unit 109 and a seventh determining unit 110, wherein:

[0118] A first obtaining unit 101 is used to obtain a target texture image to be subjected to texture feature extraction;

[0119] A first conversion unit 102, configured to convert a target texture image into a corresponding target grayscale image;

[0120] A first determining unit 103, configured to determine predefined feature extraction parameters, the feature extraction parameters including local binary pattern LBP parameters and co-occurrence matrix parameters;

[0121] A second determining unit 104 is used to determine the sub-pixel of each pixel in the target grayscale image based on the co-occurrence matrix parameters;

[0122] A third determining unit 105 is used to determine the neighborhood point of each pixel and the neighborhood point of each sub-pixel based on the LBP parameter;

[0123] A fourth determining unit 106, configured to determine the grayscale value of each sub-pixel and the grayscale value of each field point;

[0124] A fifth determining unit 107, configured to determine the LBP value of each pixel based on the grayscale value of each pixel and the related field point respectively;

[0125] A sixth determining unit 108, configured to determine the LBP value of each sub-pixel based on the grayscale value of each sub-pixel and the related field point respectively;

[0126] A first construction unit 109 is used to construct an LBP co-occurrence matrix based on the LBP value of each pixel and the LBP value of each sub-pixel, where the LBP co-occurrence matrix is ​​a symmetric matrix;

[0127] The seventh determining unit 110 is used to determine the symmetric part in the LBP co-occurrence matrix as the final texture feature extracted from the target texture image.

[0128] It should be noted that the specific processing of the first obtaining unit 101, the first converting unit 102, the first determining unit 103, the second determining unit 104, the third determining unit 105, the fourth determining unit 106, the fifth determining unit 107, the sixth determining unit 108, the first constructing unit 109 and the seventh determining unit 110 and the technical effects thereof can be referred to respectively. Figure 1 Steps S101, S102, S103, S104, S105, S106, S107, S108, S109 and S110 in the method shown are not repeated here.

[0129] Optionally, the co-occurrence matrix parameters include: a statistical distance and a statistical direction; the second determination unit 104 is used to determine, for any pixel: a sub-pixel of the pixel based on the statistical distance and the statistical direction.

[0130] Optionally, the LBP parameters include: a domain radius and a number of domain points; the third determination unit 105 is used to determine, for any pixel object in each pixel and each sub-pixel: based on the domain radius and the number of domain points, the domain point of the pixel object.

[0131] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0132] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A texture feature extraction method, characterized in that: include: Obtaining a target texture image to be subjected to texture feature extraction; Converting the target texture image into a corresponding target grayscale image; Determine predefined feature extraction parameters, the feature extraction parameters including local binary patterns LBP parameters and co-occurrence matrix parameters; Determining the sub-pixel of each pixel in the target grayscale image based on the co-occurrence matrix parameters; Based on the LBP Parameters, determining the domain point of each pixel and the domain point of each sub-pixel; Determining the grayscale value of each of the sub-pixels and the grayscale value of each of the field points; Based on the grayscale values ​​of each pixel and the related field points, the grayscale values ​​of each pixel are determined. LBP value; Determine the grayscale value of each sub-pixel based on the grayscale value of each sub-pixel and the related field point LBP value; Based on each of the pixels LBP value and each of the sub-pixels LBP Value, build LBP The co-occurrence matrix, LBP The co-occurrence matrix is ​​a symmetric matrix; The LBP The symmetric part in the co-occurrence matrix is ​​determined as the final texture feature extracted from the target texture image; Wherein, the LBP value and each of the sub-pixels LBP Value, build LBP Co-occurrence matrix, including: Based on the number of field points and LBP The value calculation formula determines LBP Number of value categories; Will LBP The square value of the number of value categories is determined as the size of the target matrix; each element in the target matrix is ​​0; For any pixel: determine the pixel LBP value i , determine a sub-pixel of the pixel LBP value j , in the target matrix, the target matrix at the i Row, No. j The element of the column is set to 1, and the sub-pixel of the pixel that performs the determination is returned. LBP value j until all elements corresponding to the sub-pixels of the pixel are set to 1.

2. The texture feature extraction method according to claim 1, characterized in that: The co-occurrence matrix parameters include: statistical distance and statistical direction; and determining the sub-pixel of each pixel in the target grayscale image based on the co-occurrence matrix parameters includes: For any pixel: based on the statistical distance and the statistical direction, determine the sub-pixel of the pixel.

3. The texture feature extraction method according to claim 1, characterized in that: Said LBP The parameters include: field radius and field point number; LBP Parameters, determining the domain point of each pixel and the domain point of each sub-pixel, including: For any pixel object in each of the pixels and each of the sub-pixels: based on the field radius and the number of field points, determine the field point of the pixel object.

4. The texture feature extraction method according to claim 1, characterized in that: The determining of the grayscale value of each of the sub-pixels and the grayscale value of each of the field points includes: For any object in each of the sub-pixels and each of the field points: determine a target square containing the object, there is a pixel at each of the four corner points of the target square, determine the distance between the object and each boundary of the target square, and determine the grayscale value of the object based on the grayscale values ​​of the four pixels on the target square and the distances.

5. The texture feature extraction method according to claim 1, characterized in that: The grayscale value of each pixel and the related field point is determined based on the grayscale value of each pixel and the related field point. LBP Values, including: For any of the pixels: based on the grayscale value of the pixel and the grayscale values ​​of each of the field points of the pixel, determine the basic LBP value, based on the basic LBP The value computes the rotational invariance of the pixel LBP value, the rotation remains unchanged LBP The value determines the pixel LBP value.

6. The texture feature extraction method according to claim 1, characterized in that: The grayscale value of each sub-pixel and the related field point is determined based on the grayscale value of each sub-pixel and the related field point. LBP Values, including: For any of the sub-pixels: based on the grayscale value of the sub-pixel and the grayscale values ​​of each of the field points of the sub-pixel, determine the basic LBP value, based on the basic LBP The sub-pixel rotation invariant is calculated LBP value, the rotation remains unchanged LBP The value determines the sub-pixel LBP value.

7. A texture feature extraction device, characterized in that: include: a first obtaining unit, a first converting unit, a first determining unit, a second determining unit, a third determining unit, a fourth determining unit, a fifth determining unit, a sixth determining unit, a first constructing unit, and a seventh determining unit, wherein: The first obtaining unit is used to obtain a target texture image to be subjected to texture feature extraction; The first conversion unit is used to convert the target texture image into a corresponding target grayscale image; The first determining unit is used to determine predefined feature extraction parameters, the feature extraction parameters include local binary pattern LBP parameters and co-occurrence matrix parameters; The second determining unit is used to determine the sub-pixel of each pixel in the target grayscale image based on the co-occurrence matrix parameters; The third determining unit is used to determine the LBP Parameters, determining the domain point of each pixel and the domain point of each sub-pixel; The fourth determining unit is used to determine the grayscale value of each of the sub-pixels and the grayscale value of each of the domain points; The fifth determining unit is used to determine the gray value of each pixel based on the gray value of each pixel and the related field point. LBP value; The sixth determining unit is used to determine the gray value of each sub-pixel based on the gray value of each sub-pixel and the related field point. LBP value; The first construction unit is used to LBP The value and each sub-pixel LBP Value, build LBP The co-occurrence matrix, LBP The co-occurrence matrix is ​​a symmetric matrix; The seventh determining unit is used to LBP The symmetric part in the co-occurrence matrix is ​​determined as the final texture feature extracted from the target texture image; Wherein, the pixel-based LBP The value and each sub-pixel LBP Value, build LBP Co-occurrence matrix, including: Based on the number of field points and LBP The value calculation formula determines LBP Number of value categories; Will LBP The square value of the number of value categories is determined as the size of the target matrix; each element in the target matrix is ​​0; For any pixel: determine the pixel LBP value i , determine a sub-pixel of the pixel LBP value j , in the target matrix, the target matrix at the i Row, No. j The element of the column is set to 1, and the sub-pixel of the pixel that performs the determination is returned. LBP value j until all elements corresponding to the sub-pixels of the pixel are set to 1.

8. The texture feature extraction device according to claim 7, characterized in that: The co-occurrence matrix parameters include: a statistical distance and a statistical direction; the second determination unit is used to determine, for any of the pixels: a sub-pixel of the pixel based on the statistical distance and the statistical direction.

9. The texture feature extraction device according to claim 7, characterized in that: Said LBP The parameters include: a domain radius and a number of domain points; the third determination unit is used to determine the domain point of the pixel object for any pixel object in each of the pixels and each of the sub-pixels based on the domain radius and the number of domain points.

Citation Information

Patent Citations

  • Multi-feature fusion gastroscope image processing method based on multi-kernel learning

    CN108710915A

  • Face recognition system and method

    CN110008811A