A hamming-petersen graph-based image texture feature extraction method and system
By using a Hamming-Petersen diagram-based image texture feature extraction method and merging PLTP and HDPLBP feature vectors, the problem of insufficient discrimination ability of LBP in complex texture images is solved, achieving more effective texture feature extraction and improving the accuracy and stability of image texture analysis.
Patent Information
- Application Number
- CN202510319938.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2045-03-18
AI Technical Summary
Existing Local Binary Patterns (LBP) have weak discrimination capabilities when processing images with complex textures or high levels of noise, especially in terms of preserving the details of texture information and fusing spatial distribution information.
An image texture feature extraction method based on Hamming-Petersen diagram is adopted. By acquiring grayscale images, ternary features are extracted by traversing the Petersen diagram, the Hamming distance between the PLTP feature vector and its neighboring points is calculated, and the HDPLBP feature vector is generated. The histograms of PLTP and HDPLBP feature vectors are merged into a joint histogram to extract the PLTP_HDPLTP texture features of the image.
It improves the robustness and applicability of texture feature extraction, takes into account both local and spatial distribution information, achieves complete extraction of image texture features, and enhances the accuracy and stability of texture description.
Smart Images

Figure CN120298716B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of image processing, and particularly relates to a Hamming-Petersen graph-based image texture feature extraction method and system. BACKGROUND
[0002] Image texture is considered as the spatial arrangement of pixel intensity, color, structure and other information within a local region, which has wide applications in computer vision field, such as target recognition, image segmentation, image enhancement and medical imaging tasks. In order to effectively extract texture information, researchers have proposed various texture representation and analysis methods. Common methods include local feature extraction based on statistics, geometric description based on structure, parameterized representation based on model and transform domain method, each of which has its own advantages in different scenarios. As a classic statistical method, Local Binary Pattern (LBP) has been widely used in texture recognition tasks due to its simplicity and effectiveness. However, the limitations of LBP have become increasingly apparent, especially when dealing with complex textures or images with high noise interference, its discrimination ability is weak. In order to solve this problem, researchers have proposed some improved versions of LBP, such as improved local binary pattern (GLCM, LBP, HOG, etc.), which to some extent consider more fine-grained pixel relationships and texture changes, thereby enhancing the robustness and applicability of the features. However, existing methods still face certain challenges when dealing with complex and variable texture patterns, especially in terms of maintaining texture information details and fusing spatial distribution information. SUMMARY
[0003] The technical problem to be solved by the present application is to provide a Hamming-Petersen graph-based image texture feature extraction method and system for extracting image texture features including local information and spatial distribution information.
[0004] The technical solution adopted by the present application to solve the above technical problem is: a Hamming-Petersen graph-based image texture feature extraction method, comprising the following steps:
[0005] S1: obtaining a to-be-tested image and performing grayscale preprocessing to obtain a grayscale image;
[0006] S2: extracting ternary features by traversing the grayscale image through the Petersen graph; constructing a PLTP feature vector using a threshold function;
[0007] S3: calculating the Hamming distance between the PLTP feature vector of each pixel point of the grayscale image and the PLTP feature vector of its adjacent point, and generating an HDPLBP feature vector based on the Hamming distance;
[0008] S4: merge the statistical histogram of the descriptors of the PLTP feature vector and the statistical histogram of the descriptors of the HDPLBP feature vector into a joint histogram as the PLTP HDPLTP texture feature of the image to be tested.
[0009] According to the above scheme, in the step S2, the specific steps are:
[0010] S21: by scanning the gray scale image through the Pettersen graph, directional analysis of the relationship between the pixels of the image, describing the local fluctuation trend of the relationship, and extracting ternary features;
[0011] S22: calculating the gray scale difference structure of the ternary features, judging the ternary features by using the threshold function, and constructing the PLTP feature vector.
[0012] Further, in the step S21, the specific steps are:
[0013] According to the structure of the Pettersen graph, the pixel points of the entire gray scale image are traversed by using a 5x5 window;
[0014] According to the vertex relationship of the Pettersen graph, the center pixel of the window to the edge pixel direction constitutes 6 paths of ternary structure, and the pixel set in the path is defined as: {[gray scale value of center pixel, gray scale value of inner ring pixel, gray scale value of inner ring pixel]}, that is, the gray scale difference structure of each pixel point is obtained.
[0015] Further, in the step S22, the specific steps are:
[0016] The conversion width is controlled by the first threshold, and the binary threshold function is used to distinguish the value of the gray scale difference;
[0017] The fluctuation trend of the local gray scale difference pair is described by using the threshold function, and the ternary elements are obtained by using addition to construct the microstructure of the ternary pattern;
[0018] The ternary elements of the 6 paths are combined to form the PLTP feature vector of each pixel point.
[0019] Further, in the step S3, the specific steps are:
[0020] S31: calculating the Hamming distance between the PLTP feature vector of each pixel of the gray scale image and the PLTP feature vector of its adjacent pixel;
[0021] S32: calculating the mean value of the Hamming distance obtained in step S31;
[0022] S33: subtracting the corresponding mean value from the Hamming distance and performing ternarization processing by using the threshold function to obtain the HDPLBP feature vector based on the Hamming distance.
[0023] Further, in the step S31, the PLTP feature vector of each pixel of the gray image and the PLTP feature vector of its adjacent pixel are XORed bit by bit according to the number of bits of the ternary number, and then summed to obtain the Hamming distance between the PLTP feature vectors of the two pixels.
[0024] Further, in the step S33, the specific steps are as follows:
[0025] The difference between the Hamming distance and the mean value is divided by the second threshold value;
[0026] The difference values obtained above are combined according to a specific direction to form the HDPLBP feature vector based on the Hamming distance.
[0027] Further, in the step S4, the specific steps are as follows:
[0028] The PLTP feature vector and the HDPLTP feature vector of each pixel point are correspondingly converted into the PLTP feature descriptor and the HDPLTP feature descriptor;
[0029] The histogram of the PLTP feature descriptor and the histogram of the HDPLTP feature descriptor are calculated respectively;
[0030] The two histograms calculated above are combined by using a series connection method to form a joint PLTP_HDPLTP descriptor histogram as the PLTP_HDPLTP texture feature of the image to be tested.
[0031] An image texture feature extraction system based on Hamming-Peterson graph,
[0032] An image acquisition and preprocessing submodule is configured to acquire an image to be tested and perform grayscale preprocessing to obtain a gray image;
[0033] A PLTP submodule is configured to extract ternary features by traversing the gray image through a Peterson graph and construct a PLTP feature vector by using a threshold function;
[0034] An HDPLTP submodule is configured to calculate the Hamming distance between the PLTP feature vector of each pixel point of the gray image and the PLTP feature vector of its adjacent point, and generate an HDPLBP feature vector based on the Hamming distance;
[0035] A PLTP_HDPLTP submodule is configured to combine the statistical histogram of the descriptor of the PLTP feature vector and the statistical histogram of the descriptor of the HDPLBP feature vector into a joint histogram as the PLTP_HDPLTP texture feature of the image to be tested.
[0036] A computer memory has a computer program stored therein, which can be executed by a computer processor, and the computer program executes a Hamming-Petersen graph-based image texture feature extraction method.
[0037] The present application has the following advantages:
[0038] 1. A Hamming-Petersen graph-based image texture feature extraction method and system, which analyzes the relationship between pixels of an image through a Petersen graph, uses a threshold function and a local fluctuation trend of a structure pattern to describe the relationship, and constructs a local ternary pattern PLTP feature vector of the Petersen graph; calculates the Hamming distance of a center point and its adjacent points of the PLTP code to extract the spatial structure of the PLTP code, thereby generating an HDPLBP feature vector based on the Hamming distance; and combines the statistical histograms of the PLTP and HDPLBP descriptors into a PLTP_HDPLTP texture feature histogram, which is more effective than traditional texture descriptors for image texture analysis, takes into account local information and spatial distribution information, and realizes the function of completely extracting image texture features.
[0039] 2. The present application is based on the Petersen graph model in graph theory, considers the spatial shape information of the texture, and improves the robustness, discriminability and applicability of the texture feature extraction operator.
[0040] 3. The present application considers the Hamming distance relationship of the PLTP feature, so that the HDPLTP becomes a secondary feature, and improves the accuracy of image texture description.
[0041] 2. The present application combines the ternary PLTP feature and the HDPLTP feature, and merges their statistical histograms into a joint histogram, so that the texture feature quantity can more intuitively and effectively represent the image texture condition, and ensures that the texture description ability is more robust and stable.
[0042] Of course, any product implementing the present application does not necessarily need to achieve all the advantages described above at the same time. BRIEF DESCRIPTION OF DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without any creative effort.
[0044] Figure 1 is a flowchart of an embodiment of the present application.
[0045] Figure 2 is a structure diagram of a Petersen graph of an embodiment of the present application.
[0046] Figure 3 is a ternary feature structure diagram of the vertex relationship of the Petersen graph of the embodiment of the present application.
[0047] Figure 4 is a texture picture of different kinds of objects of the embodiment of the present application.
[0048] In the figure: (a) and (b) are brown bread images; (c) and (d) are biscuit images.
[0049] Figure 5 is a PLTP and HDPLTP feature histogram of different kinds of objects of the embodiment of the present application.
[0050] Figure 6 is a local ternary pattern (HDPLTP) graph of the Petersen graph based on the Hamming distance of the embodiment of the present application.
[0051] Figure 7 is an average value diagram of the Hamming distance from the center PLTP code to the 8-neighbor PLTP code of the embodiment of the present application. DETAILED DESCRIPTION
[0052] In order to make the objects, technical solutions and advantages of the present application clearer, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0053] Embodiment 1
[0054] Referring to Figure 1 The specific steps of the image texture feature extraction method based on the Hamming-Petersen graph are as follows:
[0055] S1: Obtain the image to be tested and perform gray-scale preprocessing to obtain a gray-scale image;
[0056] S2: Extract ternary features by traversing the gray-scale image through the Petersen graph; and construct a PLTP feature vector by using a threshold function;
[0057] S3: Calculate the Hamming distance between the PLTP feature vector of each pixel point of the gray-scale image and the PLTP feature vector of the adjacent point thereof, and generate a HDPLBP feature vector based on the Hamming distance;
[0058] S4: Merge the statistical histogram of the descriptor of the PLTP feature vector and the statistical histogram of the descriptor of the HDPLBP feature vector into a joint histogram, as the PLTP_HDPLTP texture feature of the image to be tested.
[0059] Further, in the step S2, the specific steps are as follows:
[0060] S21: scanning the gray image by the Peterson graph, analyzing the relationship between the pixels of the image, describing the local fluctuation trend of the relationship, and extracting a ternary feature;
[0061] S22: calculating a gray difference structure of the ternary feature, judging the ternary feature by using a threshold function, and constructing a PLTP feature vector.
[0062] Further, in the step S21, the specific steps are:
[0063] According to the structure of the Peterson graph, the pixels of the entire gray image are traversed by using a 5*5 window;
[0064] According to the vertex relationship of the Peterson graph, six paths of ternary structure are formed in the direction from the center pixel to the edge pixel of the window, and the pixel set in the path is defined as: {[gray value of the center pixel, gray value of the inner ring pixel, gray value of the inner ring pixel]}, that is, the gray difference structure of each pixel point is obtained.
[0065] In the step S22, the specific steps are:
[0066] The conversion width is controlled by the first threshold, and a binary threshold function is used to distinguish the value of the gray difference;
[0067] The fluctuation trend of the local gray difference pair is described by using a threshold function, and a three-value element of the ternary pattern is obtained by using addition to construct a microstructure.
[0068] The three-value elements of the six paths are combined to form the PLTP feature vector of each pixel point.
[0069] In the step S3, the specific steps are:
[0070] S31: calculating the Hamming distance between the PLTP feature vector of each pixel of the gray image and the PLTP feature vector of its adjacent pixel;
[0071] S32: calculating the mean value of the Hamming distance obtained in step S31;
[0072] S33: subtracting the corresponding mean value from the Hamming distance, and performing ternary processing by using a threshold function to obtain an HDPLBP feature vector based on the Hamming distance.
[0073] Further, in the step S31, the PLTP feature vector of each pixel of the gray image and the PLTP feature vector of its adjacent pixel are XORed bit by bit according to the number of bits of the ternary number, and then summed to obtain the Hamming distance between the PLTP feature vectors of the two pixels.
[0074] In the step S33, the specific steps are:
[0075] The difference between the Hamming distance and the mean value is divided by a second threshold value;
[0076] The difference values obtained by the above calculation are combined in a specific direction to form a HDPLBP feature vector based on the Hamming distance.
[0077] In the step S4, the specific steps are as follows:
[0078] The PLTP feature vector and the HDPLTP feature vector of each pixel point are correspondingly converted into a PLTP feature descriptor and a HDPLTP feature descriptor.
[0079] The histogram of the PLTP feature descriptor and the histogram of the HDPLTP feature descriptor are calculated respectively.
[0080] The two histograms obtained by the above calculation are combined by using a concatenation method to form a joint PLTP_HDPLTP descriptor histogram as the PLTP_HDPLTP texture feature of the image to be tested.
[0081] The embodiment analyzes the relationship between the pixels of the image by the Petri graph, uses a threshold function and a local fluctuation trend of the structural pattern to describe the relationship, and constructs a local ternary pattern PLTP feature vector of the Petri graph. The Hamming distance between the center point of the PLTP code and its adjacent points is calculated to extract the spatial structure of the PLTP code, so as to generate a HDPLTP texture feature based on the Hamming distance. The statistical histograms of the PLTP and the HDPLBP descriptor are combined into a PLTP_HDPLTP texture feature histogram. The image texture analysis is more effective than the traditional texture descriptor, and the local information and the spatial distribution information are taken into account, so that the function of completely extracting the image texture feature is realized.
[0082] Embodiment 2
[0083] The steps of the embodiment are the same as those of the embodiment 1, and the difference is that each step is applied to a specific example. The specific steps include the following steps:
[0084] S1: performing a gray-scale preprocessing on the image to be tested;
[0085] S2: traversing the gray-scale image to be tested, extracting a ternary feature by a Petri graph structure, calculating a gray-scale difference structure of the ternary feature, judging the ternary feature by a threshold function, and obtaining a local ternary pattern PLTP feature vector of the Petri graph; the specific steps are as follows:
[0086] Let x and y be the coordinates of the gray-scale image According to the structure of the Petri graph, the pixel points of the entire gray-scale image are traversed by using a 5*5 window, such as Figure 2As shown, the center pixel in the window to the edge element direction constitutes a ternary structure, so each window has a total of 6 paths of ternary structure, such as Figure 3 The top point relationship of the Peterson graph is calculated to extract the ternary feature, and the pixel set in the path is defined as: Wherein is the gray value of the center pixel, is the gray value of the inner ring pixel, is the gray value of the inner ring pixel. The pixel combination corresponding to each path is constructed by the center vertex to the edge vertex direction six groups of ternary mode:
[0087]
[0088] Thus each pixel point There are 6 groups of gray difference structures:
[0089]
[0090] The gray difference is divided into two levels, and a binary threshold function is used to process the gray difference value:
[0091]
[0092] Wherein the threshold T controls the conversion width, and the value is 125.
[0093] For comparison between ternary pixels, the threshold function is used to describe the fluctuation trend of local gray difference pair, and the ternary mode microstructure is constructed by addition, that is:
[0094] Let be the unit step function, and the threshold T controls the conversion width, which is described by mathematical expression, that is:
[0095]
[0096]
[0097] The PLTP texture feature of each pixel point is composed of the ternary element combination of 6 paths to form the local ternary mode feature vector of the Peterson graph :
[0098]
[0099] S3: Through the image PLTP vector described above, the Hamming distance between the PLTP vector of each pixel and its adjacent PLTP vector and the average value thereof are calculated, the calculated Hamming distance is subtracted from the average value, and a threshold function is used for ternary processing to obtain the HDPLBP feature vector based on the Hamming distance; The specific steps are:
[0100] S31: Calculate the Hamming distance between the center pixel PLTP feature vector and its neighboring pixel PLTP feature vectors , to extract the spatial structure of PLTP code, such as Figure 6 , and further obtain the local ternary pattern of Petersen graph based on Hamming distance (HDPLTP) as shown in
[0101]
[0102] wherein is the number of bits of the ternary number of the PLTP vector, represents the PLTP vector of the center pixel, is the PLTP vector of the i-th neighborhood, and represents XOR.
[0103] S32: As shown in Figure 7 , calculate the average value m of the Hamming distance from the center PLTP code to the 8 neighboring PLTP codes:
[0104]
[0105] S33: The difference between these Hamming distances and the average value is divided into three levels using a threshold , with a value of 1:
[0106]
[0107] Generally, in order to ensure the rotation invariance of the texture, similar to the rotating LBP, the circular neighborhood can be continuously rotated to obtain a series of texture values, and the minimum value is taken as the final texture value of the neighborhood. For multi-scale, the size of the radius and the number of sampling points in the neighborhood can be used to achieve it. In order to compare the patterns, before extracting the texture features, registration correction needs to be done, so the rotation and scaling problems can not be considered, and the s values of the 8 neighborhoods are combined together in a specific direction to form the HDPLBP feature vector based on Hamming distance :
[0108]
[0109] S4: Merge the statistical histogram of the descriptor of the PLTP vector and the statistical histogram of the descriptor of the HDPLBP vector into a joint histogram as the PLTP_HDPLTP texture feature of the image to be tested; the specific steps are:
[0110] Convert the PLTP feature vector and the HDPLTP feature vector of each pixel point into the PLTP feature descriptor and the HDPLTP feature descriptor correspondingly:
[0111] ,
[0112] ,
[0113] The histogram of the PLTP feature descriptor and the histogram of the HDPLTP feature descriptor are calculated respectively, and the two are combined together using a concatenation method to form a joint PLTP HDPLTP descriptor histogram:
[0114] .
[0115] In order to better show the distinguishing ability of the PLTP HDPLTP texture feature of the embodiment, the texture pictures in Figure 4 are used as an example, in which the a and b images are brown bread images, and the c and d images are biscuit images. First, the color images are converted into gray images respectively. Then the PLTP and HDPLTP features are extracted from the four texture images, and the histogram statistics are performed, as shown in Figure 5 It can be clearly seen that the PLTP and HDPLTP feature histograms from the same kind of articles are very similar, and in contrast, the PLTP and HDPLTP feature histograms from different kinds of articles are obviously different, especially in the range of 150 to 200. Therefore, from the visual point of view, the PLTP HDPLTP of the embodiment has satisfactory distinguishing ability.
[0116] It should be understood that the size of the serial number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the application.
[0117] Embodiment 3
[0118] The embodiment is used to realize the principle of the above-mentioned method embodiment to construct an image texture feature extraction system based on a Hamming-Petersen graph, which comprises an image acquisition and preprocessing submodule, a PLTP submodule, an HDPLTP submodule, and a PLTP HDPLTP submodule;
[0119] The image acquisition and preprocessing submodule is used to acquire the image to be tested, and to perform gray scale preprocessing to obtain a gray scale image;
[0120] The PLTP submodule is used to extract ternary features by traversing the gray scale image through a Petersen graph; and a threshold function is used to construct a PLTP feature vector;
[0121] an HDPLTP submodule, configured to calculate the PLTP feature vector of each pixel point of the gray image and the Hamming distance between the PLTP feature vectors of adjacent points of the pixel point, and generate an HDPLBP feature vector based on the Hamming distance;
[0122] a PLTP_HDPLTP submodule, configured to merge the statistical histogram of the descriptors of the PLTP feature vector and the statistical histogram of the descriptors of the HDPLBP feature vector into a joint histogram as a PLTP_HDPLTP texture feature of the image to be tested.
[0123] Each submodule is mainly used to implement each step of the method embodiment, and will not be described here.
[0124] It should be noted that, according to the needs of implementation, each step / component described in the present application can be split into more steps / components, or two or more steps / components or part of the operations of the steps / components can be combined into a new step / component, to achieve the purpose of the present application.
[0125] The embodiment also includes a processor, a communication interface, a memory and a communication bus; wherein the processor, the communication interface and the memory complete the communication among each other through the communication bus; the memory stores a computer program; when the program is executed by the processor, the processor executes the steps of a method for extracting image texture features based on Hamming-Petersen graph.
[0126] The embodiment also provides a computer readable storage medium, which stores executable instructions, and the instructions make the processor implement a method for extracting image texture features based on Hamming-Petersen graph when executed by the processor.
[0127] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the present application can adopt a completely hardware embodiment, a completely software embodiment or an embodiment combining software and hardware aspects.
[0128] Moreover, the present application can adopt the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
[0129] The present application is described with reference to the flowcharts of the method and the computer program product according to the embodiment 1 of the present application and the block diagrams of the apparatus (system) of the embodiment 3. It should be understood that each flow or block in the flowcharts or block diagrams, and the combination of the flows or blocks in the flowcharts or block diagrams can be realized by computer program instructions.
[0130] These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart block or blocks Figure 1 of the flowchart block or blocks Figure 1 of the flowchart block or blocks
[0131] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks Figure 1 of the flowchart block or blocks Figure 1 of the flowchart block or blocks
[0132] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks Figure 1 of the flowchart block or blocks Figure 1 of the flowchart block or blocks
[0133] The above embodiments are only used to illustrate the design ideas and features of the present application, and the purpose is to make the skilled in the art understand the present application and to carry it out, the protection scope of the present application is not limited to the above examples. Therefore, any equivalent variation or modification made according to the principles disclosed herein is within the scope of the present application.
Claims
1. A method for image texture feature extraction based on Hamming-Petersen graph, characterized in that: The method comprises the following steps: S1: obtaining a to-be-tested image and performing gray-scale preprocessing to obtain a gray-scale image; S2: extracting ternary features by traversing the gray-scale image through a Petri net; and constructing a PLTP feature vector by using a threshold function; The specific steps are: S21: traversing the gray-scale image by using a 5*5 window according to the structure of the Petri net; According to the vertex relationship of the Petri net, six paths of ternary structure are formed in the direction from the center pixel to the edge pixels of the window, and the pixel set in the path is defined as: {[gray-scale value of the center pixel, gray-scale value of the inner ring pixel, gray-scale value of the inner ring pixel]}, that is, the gray-scale difference structure of each pixel point is obtained; S22: calculating the gray-scale difference structure of the ternary features, judging the ternary features by using a threshold function, and constructing a PLTP feature vector; The specific steps are: The conversion width is controlled by the first threshold, and a binary threshold function is used to distinguish the value of the gray-scale difference; The threshold function is used to describe the fluctuation trend of the local gray-scale difference pair, and the addition is used to construct the microstructure of the ternary mode to obtain a ternary element; The PLTP feature vector of each pixel point is composed of the ternary elements of the six paths; S3: calculating the Hamming distance between the PLTP feature vector of each pixel point of the gray-scale image and the PLTP feature vector of the adjacent point, and generating an HDPLTP feature vector based on the Hamming distance; S4: merging the statistical histogram of the descriptor of the PLTP feature vector and the statistical histogram of the descriptor of the HDPLTP feature vector into a joint histogram as the PLTP_HDPLTP texture feature of the to-be-tested image. In the step S3, the specific steps are:
2. The method according to claim 1, wherein the method is characterized in that: S31: calculating the Hamming distance between the PLTP feature vector of each pixel of the gray-scale image and the PLTP feature vector of the adjacent pixel; S32: calculating the mean value of the Hamming distance obtained in step S31; S33: subtracting the corresponding mean value from the Hamming distance and performing ternary processing by using a threshold function to obtain an HDPLTP feature vector based on the Hamming distance. In the step S31, the PLTP feature vectors of each pixel of the gray-scale image and the adjacent pixel are XORed bit by bit according to the number of bits of the ternary number, and then summed to obtain the Hamming distance between the PLTP feature vectors of the two pixels.
3. The method according to claim 2, wherein the Hamming-Petersen graph based image texture feature extraction method is characterized by: In the step S33, the specific steps are:
4. The method according to claim 3, wherein the Hamming-Petersen graph based image texture feature extraction method is characterized by: The difference between the Hamming distance and the mean value is divided by a second threshold; The difference values obtained by the above calculation are combined according to a specific direction to form an HDPLTP feature vector based on the Hamming distance. In the step S4, the specific steps are:
5. The method according to claim 4, wherein the Hamming-Petersen graph based image texture feature extraction method is characterized by: The PLTP feature vector and the HDPLTP feature vector of each pixel point are converted into a PLTP feature descriptor and an HDPLTP feature descriptor, respectively; The histogram of the PLTP feature descriptor and the histogram of the HDPLTP feature descriptor are calculated, respectively; The two histograms calculated above are combined together using a concatenation method to form a joint PLTP_HDPLTP descriptor histogram as the PLTP_HDPLTP texture feature of the image to be tested.
6. A Hamming-Petersen graph based image texture feature extraction system, characterized in that: An image acquisition and preprocessing submodule is configured to acquire an image to be tested and perform grayscale preprocessing to obtain a grayscale image. A PLTP submodule is configured to extract ternary features by traversing the grayscale image through a Petersen graph and construct a PLTP feature vector using a threshold function. Specifically, The grayscale image is scanned through a Petersen graph, the relationship between the pixels of the image is analyzed in a directional manner, the local fluctuation trend of the relationship is described, and ternary features are extracted. Specifically, According to the structure of the Petersen graph, a 5*5 window is used to traverse the pixels of the entire grayscale image. According to the vertex relationship of the Petersen graph, six paths of ternary structure are formed in the direction from the center pixel to the edge pixels of the window, and the pixel set in the paths is defined as: {[gray value of center pixel, gray value of inner ring pixel, gray value of inner ring pixel]}, i.e., the gray difference structure of each pixel point is obtained. The gray difference structure of the ternary features is calculated, the ternary features are judged using a threshold function, and a PLTP feature vector is constructed. Specifically, The conversion width is controlled through a first threshold, and a binary threshold function is used to distinguish the value of the gray difference. The fluctuation trend of the local gray difference pair is described using a threshold function, and a three-value element is obtained by using addition to construct the microstructure of the ternary pattern. The three-value elements of the six paths are combined to form the PLTP feature vector of each pixel point. An HDPLTP submodule is configured to calculate the Hamming distance between the PLTP feature vector of each pixel point of the grayscale image and the PLTP feature vector of its adjacent points, and generate an HDPLTP feature vector based on the Hamming distance. A PLTP_HDPLTP submodule is configured to merge the statistical histogram of the descriptors of the PLTP feature vector and the statistical histogram of the descriptors of the HDPLTP feature vector into a joint histogram as the PLTP_HDPLTP texture feature of the image to be tested.
7. A computer memory, characterized by: It stores a computer program executable by a computer processor, which executes a Hamming-Petersen graph based image texture feature extraction method as claimed in any one of claims 1 to 5.
Citation Information
Patent Citations
Image texture feature extraction method based on nested triangular structure
CN107067426A
Vehicular information system and method
US20120036016A1