CN112434712A - Local binary pattern texture image feature extraction method and system based on scale and angle self-adaptive selection - Google Patents

Local binary pattern texture image feature extraction method and system based on scale and angle self-adaptive selection Download PDF

Info

Publication number
CN112434712A
CN112434712A CN202011364531.0A CN202011364531A CN112434712A CN 112434712 A CN112434712 A CN 112434712A CN 202011364531 A CN202011364531 A CN 202011364531A CN 112434712 A CN112434712 A CN 112434712A
Authority
CN
China
Prior art keywords
central pixel
directions
texture image
gradient
central
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011364531.0A
Other languages
Chinese (zh)
Other versions
CN112434712B (en
Inventor
潘志斌
胡仕琦
任新成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Jiaotong University
Yanan University
Original Assignee
Xian Jiaotong University
Yanan University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian Jiaotong University, Yanan University filed Critical Xian Jiaotong University
Priority to CN202011364531.0A priority Critical patent/CN112434712B/en
Publication of CN112434712A publication Critical patent/CN112434712A/en
Application granted granted Critical
Publication of CN112434712B publication Critical patent/CN112434712B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/40Analysis of texture
    • G06T7/41Analysis of texture based on statistical description of texture
    • G06T7/44Analysis of texture based on statistical description of texture using image operators, e.g. filters, edge density metrics or local histograms

Abstract

The invention discloses a local binary pattern texture image feature extraction method and system based on scale and angle self-adaptive selection, wherein the method comprises the following steps: acquiring a texture image of a feature to be extracted, and solving by using a Kirsch gradient operator to obtain gradient values of 8 directions of each central pixel; taking the gradient value with the maximum absolute value as a gradient value for measuring the change speed of the local area where each central pixel is positioned; equally dividing and classifying the absolute values of the gradient values of all the central pixels in 8 directions to obtain a classification result; obtaining final neighborhood pixels of each central pixel in 8 directions; and generating a combined feature histogram according to the sign information of the difference vector of each central pixel in the whole texture image, the amplitude information of the difference vector and the central pixel information. The method can enhance the robustness of the local binary pattern algorithm to rotation, illumination and scale change; the classification accuracy can be improved.

Description

Local binary pattern texture image feature extraction method and system based on scale and angle self-adaptive selection
Technical Field
The invention belongs to the technical field of texture image feature extraction processing, and particularly relates to a local binary pattern texture image feature extraction method and system based on scale and angle self-adaptive selection.
Background
The texture is composed of a plurality of periodically repeated, mutually close and interwoven structures, and has three characteristics as the inherent properties of the surface of an object: the local sequences are periodically changed, are orderly arranged and are uniformly distributed in a local range. Unlike the color and edge features of an object, local texture features describe the distribution features of pixels and their surrounding neighborhood space, while global features are regular repeating components of local texture features. Human beings can extract distinguishable features with identifiability, such as color, edge and texture features of an object, through a visual system of the human beings, so that the aim of rapid classification and identification is fulfilled; however, for a computer system to effectively classify an object or an image, the support of a correlation algorithm is necessary.
Texture classification, as an important issue in the field of computer vision and pattern recognition, has received increasing attention to the study of its associated algorithms. The existing texture image feature extraction algorithm mainly classifies texture images belonging to different categories through similarity measurement, or classifies texture images of an unknown category. At present, the texture feature extraction algorithm is widely applied to important fields such as satellite detection, geological exploration, industrial detection and medical assistance, and has an irreplaceable effect. With the continuous and deep research on the texture characteristics, the application field of the texture characteristics is wider and wider, and the application value is higher and higher.
Local Binary Pattern (LBP) was proposed by Ojala et al in 2002, and has been paid more and more attention in the fields of computer vision and Pattern recognition since the characteristic of low computational complexity and high feature extraction capability was proposed. Researchers also try to improve the Local binary Pattern from different directions, and in order to solve the problem that the Local binary Pattern is sensitive to noise due to rough quantization, Tan et al propose a Local Ternary Pattern (LTP) to expand the quantization level from the Local binary Pattern to three levels. Liao et al propose a training learning-based local binary pattern improvement algorithm DLBP (dominant LBP) for the problem that the unified pattern always occupies the vast majority and is not always satisfied. Aiming at the problem of single description information of the local binary pattern, Guo et al propose a classical improved algorithm for completing a local binary pattern CLBP (complete LBP). Although the improved algorithms improve the robustness to environmental changes when the local binary pattern extracts the texture features, better classification accuracy is obtained. However, the existing LBP algorithm and many of its improved algorithms still have limitations, including: (1) the multi-scale features cannot be obtained due to the limitation of the fixed radius neighborhood; (2) the method is sensitive to illumination and rotation change, and the final classification performance of the algorithm is seriously influenced.
In summary, a new method and system for extracting local binary pattern texture image features based on adaptive selection of scale and angle are needed.
Disclosure of Invention
The invention aims to provide a local binary pattern texture image feature extraction method and system based on scale and angle self-adaptive selection, so as to solve one or more technical problems. The method can enhance the robustness of the local binary pattern algorithm to rotation, illumination and scale change; the classification accuracy can be improved.
In order to achieve the purpose, the invention adopts the following technical scheme:
the invention discloses a local binary pattern texture image feature extraction method based on scale and angle self-adaptive selection, which comprises the following steps of:
step 1, acquiring a texture image of a feature to be extracted, and sequentially selecting each pixel from the texture image of the feature to be extracted as a central pixel; obtaining gradient values of 8 directions of each central pixel by using a Kirsch gradient operator;
step 2, taking absolute values of gradient values of each central pixel in 8 directions; performing internal sequencing based on the absolute values of the gradient values of 8 directions of each central pixel, and taking the gradient value with the largest absolute value as the gradient value for measuring the change speed of the local area where each central pixel is located;
sorting the absolute values of the gradient values of all the central pixels in 8 directions in the whole texture image to obtain a sorting result; equally dividing and classifying the absolute values of the gradient values of all the 8 directions of the central pixels based on the sequencing result to obtain a classification result;
step 3, based on the classification result obtained in the step 2, the size of the polar diameter and the size of the polar angle of the neighborhood pixels are selected in a self-adaptive mode; extracting neighborhood pixels of 8 directions of each central pixel according to the size of the polar diameter; fusing two neighborhood pixels which are separated by polar angle angles in 8 directions of each central pixel according to the polar angle, and obtaining the final neighborhood pixels in 8 directions of each central pixel;
step 4, extracting the sign information and the amplitude information of the difference vector between each central pixel and the final neighborhood pixels in 8 directions based on the final neighborhood pixels obtained in the step 3; extracting central pixel information of each central pixel of the whole texture image; and generating a combined feature histogram according to the symbol information of the difference vector of each central pixel and 8 adjacent pixels thereof, the amplitude information of the difference vector and the central pixel information in the whole texture image, and finishing the feature extraction of the local binary pattern texture image.
The further improvement of the present invention is that, in step 1, the specific step of obtaining gradient values of 8 directions of the central pixel by using Kirsch gradient operator includes:
performing two-dimensional convolution on the central pixel value 3 × 3 neighborhood pixels and 8 Kirsch gradient operator templates in the direction 3 × 3 to obtain gradient values of the central pixel in 8 directions;
wherein, the expression of the gradient value is,
Gx,y=[gx,y,0,gx,y,1,gx,y,2,gx,y3,gx,y,4,gx,y,5,gx,y6,gx,y,7],
in the formula, x and y are coordinate values of the central pixel.
The invention has the further improvement that the step 2 specifically comprises the following steps:
taking the absolute value of the gradient values of 8 directions of each central pixel, wherein the expression is Gx,y=|Gx,y|;
Ordering the gradient values for measuring the change condition of the local area where the central pixel is located, wherein the expression is sort (a)x,y),x∈h,y∈w;αx,y=max(gx,y,0,gx,y,1,gx,y,2,gx,y3,gx,y,4,gx,y,5,gx,y6,gx,y,7);
In the formula, w and h represent the length and width of the texture image respectively, and x and y represent the abscissa value and the ordinate value of the current central pixel in the texture image respectively;
dividing the coordinates of the central pixels into two types, defining the area where the central pixels in the first half of the sequence are positioned as a local change gentle area, and marking the position of the central pixels of the part as (x)min,ymin) (ii) a The area where the central pixel in the second half of the sequence is located is defined as a local area with severe change, and the position of the central pixel in the part is marked as (x)max,ymax);
Sorting the gradient values of 8 same directions of all central pixels in the whole texture image from small to large, wherein the expression is,
sort(gx,y,0,gx,y,1,gx,y,2,gx,y3,gx,y,4,gx,y,5,gx,y6,gx,y,7),x∈h,y∈w,
dividing the absolute value of gradient values of 8 directions of the whole texture image into three equal parts according to the sorting result, wherein the absolute value of the gradient value is positioned in the first third and is GLittleClass, the absolute value of the gradient values lying in the middle third being GMiddleClass, the absolute value of the gradient value lying in the last third of GLargeClass;
or, equally dividing the absolute values of the 8 direction gradient values of the whole texture image into two parts, namely GLittleAnd GLargeTwo types are provided.
The invention has the further improvement that the step 3 specifically comprises the following steps:
according to the category of the gradient values of each central pixel in 8 directions, the size of the polar diameter of the neighborhood pixel is selected in a self-adaptive mode, and the expression is Rx,y=[rx,y,0,rx,y,1,rx,y,2,rx,y,3,rx,y,4,rx,y,5,rx,y,6,rx,y,7],
In the formula, rx,y,i∈[1,2,3,4,5]I is the ith direction of the central pixel, i ∈ [0, 1, 2, 3, 4, 5, 6, 7, 8];
Will be according to Rx,y=[rx,y,0,rx,y,1,rx,y,2,rx,y,3,rx,y,4,rx,y,5,rx,y,6,rx,y,7]The obtained 8 neighborhood pixel values are recorded as
Figure BDA0002805038310000041
Adaptively selecting the size of the polar angle according to the category of the gradient values of each central pixel in 8 directions, wherein the expression is,
Φx,y=[θx,y,0,θx,y,1,θx,y,2,θx,y,3,θx,y,4,θx,y,5,θx,y,6,θx,y,7],
in the formula, thetax,y,i∈[0°,45°,90°];
According to the classification result of the step three, when gx,y,i∈GLittleClass i time, rx,y,iA larger value is required, and when a certain direction of the central pixel is in a smooth region with a smaller gradient, a larger sampling scale radius is adopted, so that the obtained neighborhood pixels can extract favorable characteristic information; but when the center pixel is in a region where the change in gray value is severe in a certain direction, i.e., gx,y,i∈GLargeClass III should be such thatWith a smaller sampling radius, neighborhood pixels (r) are acquiredx,y,iTake a smaller value) may not capture the change in the neighborhood because the sampling radius is too large; same as when gx,y,i∈GLittleClass time, thetax,y,iShould be chosen to be large when gx,y,i∈GLargeClass time, thetax,y,iA smaller value should be chosen.
According to polar angle thetax,y,iFusing two adjacent neighborhood pixels; according to the current neighborhood pixel
Figure BDA0002805038310000042
Rotate counterclockwise by thetax,y,iObtaining corresponding neighborhood pixels
Figure BDA00028050383100000510
Wherein j ═ i + (θ)x,y,i45) 8 percent, the rest operation is carried out; the final neighborhood pixels are represented as
Figure BDA0002805038310000051
Finally, eight neighborhood pixels are selected as
Figure BDA0002805038310000052
The invention has the further improvement that the step 4 specifically comprises the following steps:
extracting a central pixel w according to neighborhood pixels of 8 directions of each central pixel of the obtained whole texture imagex,y,cSign information SAALBP of difference vector between 8 direction final neighborhood pixelsx,yS, the expression is,
Figure BDA0002805038310000053
extracting central pixel w of whole texture imagex,y,cAmplitude information SAALBP of difference vector between 8 direction final neighborhood pixelsx,yM, the expression is,
Figure BDA0002805038310000054
in the formula (I), the compound is shown in the specification,
Figure BDA0002805038310000055
representing each central pixel wx,y,cAnd its final neighborhood pixels of 8 directions
Figure BDA0002805038310000056
Magnitude vector of the difference between, mumFor all m in the whole texture imagex,y,iThe average value of (a) of (b),
Figure BDA0002805038310000057
extracting each central pixel w of the whole texture imagex,y,cOf the central pixel information SAALBPx,yThe expression of-C is as follows,
SAALBPx,y-C=s(wx,y,cc);
in the formula, mucFor all central pixels w in the whole texture imagex,y,cIs measured.
The invention is further improved in that step 4 further comprises:
supplementing the extraction mode of the sign information of the difference vector and the amplitude information of the difference vector, and expressing as,
Figure BDA0002805038310000058
in the formula, the U value is a metric algorithm for the change speed of the binary string and is defined as the conversion times of 0/1 or 1/0 between two adjacent bit values in the binary mode;
Figure BDA0002805038310000059
when U (SAALBP _ S)x,y) When the value is less than or equal to 2, the sign of the difference value vector with the central pixel at the x and y positions is positionedInformation
Figure BDA0002805038310000061
The mode is classified as a uniform mode, otherwise, the mode is a non-uniform mode;
Figure BDA0002805038310000062
when U (SAALBP _ M)x,y) When the difference vector is less than or equal to 2, the amplitude information of the difference vector with the central pixel at the x and y positions is obtained
Figure BDA0002805038310000063
The mode is classified as a uniform mode, otherwise, the mode is a non-uniform mode.
The invention relates to a local binary pattern texture image feature extraction system based on scale and angle self-adaptive selection, which comprises the following steps of:
the gradient value acquisition module is used for sequentially selecting each pixel from the texture image of the feature to be extracted as a central pixel; the gradient value of 8 directions of each central pixel is obtained by using a Kirsch gradient operator;
the classification result acquisition module is used for taking absolute values of the gradient values of 8 directions of each central pixel; performing internal sequencing based on the absolute values of the gradient values of 8 directions of each central pixel, and taking the gradient value with the largest absolute value as the gradient value for measuring the change speed of the local area where each central pixel is located; the method comprises the steps of sorting the absolute values of gradient values of all 8 directions of central pixels in the whole texture image to obtain a sorting result; equally dividing and classifying the absolute values of the gradient values of all the central pixels in 8 directions based on the sequencing result to obtain a classification result;
the neighborhood pixel acquisition module is used for adaptively selecting the polar diameter size and the polar angle size of the neighborhood pixels according to the classification result; extracting neighborhood pixels of 8 directions of each central pixel according to the size of the polar diameter; fusing two neighborhood pixels of 8 directions of each central pixel, which are separated by polar angle angles, according to the polar angle size to obtain final neighborhood pixels in each 8 directions;
the feature histogram acquisition module is used for extracting and acquiring symbol information and amplitude information of a difference vector between each central pixel and the final neighborhood pixels in 8 directions according to the acquired final neighborhood pixels; extracting central pixel information of each central pixel of the whole texture image; and generating a combined feature histogram according to the sign information of the difference vector of each central pixel in the whole texture image, the amplitude information of the difference vector and the central pixel information, and finishing the feature extraction of the local binary pattern texture image.
The further improvement of the invention is that in the gradient value obtaining module, the specific step of obtaining the gradient values of 8 directions of the central pixel by using the Kirsch gradient operator comprises the following steps:
performing two-dimensional convolution on the central pixel value 3 × 3 neighborhood pixels and 8 Kirsch gradient operator templates in the direction 3 × 3 to obtain gradient values of the central pixel in 8 directions;
wherein, the expression of the gradient value is,
Gx,y=[gx,y,0,gx,y,1,gx,y,2,gx,y3,gx,y,4,gx,y,5,gx,y6,gx,y,7],
in the formula, x and y are coordinate values of the central pixel.
The invention is further improved in that, in the classification result acquisition module,
taking the absolute value of the gradient values of 8 directions of each central pixel, wherein the expression is Gx,y=|Gx,y|;
Ordering the gradient values for measuring the change condition of the local area where the central pixel is located, wherein the expression is sort (a)x,y),x∈h,y∈w;ax,y=max(gx,y,0,gx,y,1,gx,y,2,gx,y3,gx,y,4,gx,y,5,gx,y6,gx,y,7);
In the formula, w and h represent the length and width of the texture image, respectively.
The coordinates of the central pixel are divided into two types, and the central pixels positioned in the first half are sortedThe area where the pixel is located is defined as a local change gentle area, and the position of the central pixel of the part is marked as (x)min,ymin) (ii) a The area where the central pixel in the second half of the sequence is located is defined as a local area with severe change, and the position of the central pixel in the part is marked as (x)max,ymax);
The gradient values of all the central pixels in 8 directions in the whole texture image are sorted from small to large, the expression is,
sort(gx,y,0,gx,y,1,gx,y,2,gx,y3,gx,y,4,gx,y,5,gx,y6,gx,y,7),x∈h,y∈w,
dividing the absolute value of gradient values of 8 directions of the whole texture image into three equal parts according to the sorting result, wherein the absolute value of the gradient value is positioned in the first third and is GLittleClass, the absolute value of the gradient values lying in the middle third being GMiddleClass, the absolute value of the gradient value lying in the last third of GLargeClass;
or, halving the gradient values of the whole texture image in 8 directions, which are respectively GLittleAnd GLargeTwo types are provided.
A further improvement of the invention is that, in the neighborhood pixel fetch module,
according to the category of the gradient values of 8 directions of each central pixel, the size of the polar diameter of the adjacent pixel is washed according to the word, and the expression is Rx,y=[rx,y,0,rx,y,1,rx,y,2,rx,y,3,rx,y,4,rx,y,5,rx,y,6,rx,y,7],
In the formula, rx,y,i∈[1,2,3,4,5]I is the ith direction of the central pixel, i ∈ [0, 1, 2, 3, 4, 5, 6, 7, 8];
Will be according to Rx,y=[rx,y,0,rx,y,1,rx,y,2,rx,y,3,rx,y,4,rx,y,5,rx,y,6,rx,y,7]The obtained 8 neighborhood pixel values are recorded as
Figure BDA0002805038310000081
Adaptively selecting the size of the polar angle according to the category of the gradient values of each central pixel in 8 directions, wherein the expression is,
Φx,y=[θx,y,0,θx,y,1,θx,y,2,θx,y,3,θx,y,4,θx,y,5,θx,y,6,θx,y,7],
in the formula, thetax,y,i∈[0°,45°,90°];
According to the classification result of the step three, when gx,y,i∈GLittleClass i time, rx,y,iA larger value is required, and when a certain direction of the central pixel is in a smooth region with a smaller gradient, a larger sampling scale radius is adopted, so that the obtained neighborhood pixels can extract favorable characteristic information; but when the center pixel is in a region where the change in gray value is severe in a certain direction, i.e., gx,y,i∈GLargeClass time, a smaller sampling radius should be used to obtain the neighborhood pixels (r)x,y,iTake a smaller value) may not capture the change in the neighborhood because the sampling radius is too large; same as when gx,y,i∈GLittleClass time, thetax,y,iShould be chosen to be large when gx,y,i∈GLargeClass time, thetax,y,iA smaller value should be chosen.
According to polar angle thetax,y,iFusing two adjacent neighborhood pixels; according to the current neighborhood pixel
Figure BDA0002805038310000082
i∈[1,2,3,4,5,6,7,8]Rotate counterclockwise by thetax,y,iObtaining corresponding neighborhood pixels
Figure BDA0002805038310000083
Wherein j ═ i + (θ)x,y,i45)% 8, is takenPerforming redundant operation; the final neighborhood pixels are represented as
Figure BDA0002805038310000084
Finally, eight rotated neighborhood pixels are selected as
Figure BDA0002805038310000085
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a local binary pattern texture image feature extraction method based on scale and angle self-adaptive selection, aiming at the problems that the prior local binary pattern has single sampling radius and angle and can not extract multi-scale fusion features and the prior local binary pattern is not robust to illumination and rotation change. Texture classification is an important direction in image analysis, and is widely applied to the fields of computer vision, pattern recognition and the like. The key of the texture classification is to extract texture features with strong robustness and strong distinguishing capability, and the original local binary pattern is expanded in the scale and angle directions. Compared with the original local binary pattern, the texture feature with identification capability can be extracted, and higher accuracy of texture classification can be obtained when a texture image classification task is processed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art are briefly introduced below; it is obvious that the drawings in the following description are some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
FIG. 1 is a schematic flow chart of a scale and angle adaptive selection-based local binary pattern texture image feature extraction method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of prior art local binary pattern generation in a comparative example of the present invention;
FIG. 3 is a schematic diagram of a Kirsch gradient operator template in an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating the generation of a scale and angle adaptive selection-based local binary pattern according to the present invention in an embodiment of the present invention;
FIG. 5 is an example image of a texture image standard test set Outex that may be publicly obtained in an embodiment of the present invention;
fig. 6 is an example image of a publicly available texture image standard test set UIUC in an embodiment of the present invention.
Detailed Description
In order to make the purpose, technical effect and technical solution of the embodiments of the present invention clearer, the following clearly and completely describes the technical solution of the embodiments of the present invention with reference to the drawings in the embodiments of the present invention; it is to be understood that the described embodiments are only some of the embodiments of the present invention. Other embodiments, which can be derived by one of ordinary skill in the art from the disclosed embodiments without inventive faculty, are intended to be within the scope of the invention.
Referring to fig. 1, a local binary pattern texture image feature extraction method based on scale and angle adaptive selection according to an embodiment of the present invention specifically includes the following steps:
selecting a texture image needing to extract texture features;
sequentially selecting each pixel from a texture image with features to be extracted as a central pixel, and solving gradient values of the central pixel in 8 directions by using a Kirsch gradient operator;
using the current appointed central pixel value 3 × 3 neighborhood pixels, and performing two-dimensional convolution with 8 Kirsch gradient operator templates with 3 × 3 directions to obtain gradient values of the central pixel in 8 directions, wherein the expression of the gradient values is as follows,
Gx,y=[gx,y,0,gx,y,1,gx,y,2,gx,y3,gx,y,4,gx,y,5,gx,y6,gx,y,7],
wherein x and y are coordinate values of the currently specified central pixel;
then, the absolute value G of the gradient values of 8 directions of each central pixel is sequentially takenx,y=|Gx,y|;
Continuing to appoint the next pixel as the current pixel value and processing according to the steps until gradient values of all pixels in 8 directions in the texture image are extracted;
performing internal sorting on the gradient values of the 8 directions of the central pixel, and taking the gradient value with the maximum gradient value as the gradient value for measuring the change speed of the local area, namely ax,y=max(gx,y,0,gx,y,1,gx,y,2,gx,y3,gx,y,4,gx,y,5,gx,y6,gx,y,7);
Sort from small to large the gradient value for measuring the change condition of the local area where the central pixel is located (a)x,y) X belongs to h, y belongs to w, the coordinates of the central pixels are divided into two types, the area where the central pixels positioned in the first half of the sequence are positioned is defined as a local change gentle area, and the position of the part of central pixels is marked as (x)min,ymin). Defining the area where the central pixel in the second half of the sequence is located as the local intense change area, and marking the position of the central pixel in the part as (x)max,ymax);
The gradient values of all the central pixels in 8 directions in the whole texture image are sorted from small to large, the expression is,
sort(gx,y,0,gx,y,1,gx,y,2,gx,y3,gx,y,4,gx,y,5,gx,y6,gx,y,7),x∈h,y∈w,
wherein w and h represent the length and width of the texture image respectively;
dividing the absolute value of gradient values of the whole texture image in 8 directions into three equal parts according to the sorting result, wherein the absolute value of the gradient value is positioned in the first third and is GLittleClass, the absolute value of the gradient values lying in the middle third being GMiddleClass, the absolute value of the gradient value lying in the last third of GLargeAnd (4) class. Or equally dividing the absolute values of the gradient values of 8 directions of the whole texture image into two parts, namely GLittleAnd G andLargetwo types, preparing for the follow-up self-adaptive selection of the scale (polar diameter) and the angle (polar angle);
according to the category of the gradient values in 8 directions, the sampling radius (the size of the polar diameter) R of the neighborhood pixels is selected in a self-adaptive modex,y=[rx,y,0,rx,y,1,rx,y,2,rx,y,3,rx,y,4,rx,y,5,rx,y,6,rx,y,7]And x and y are coordinate values of the central pixel. r isx,y,i∈[1,2,3,4,5]I is the ith direction i e [0, 1, 2, 3, 4, 5, 6, 7, 8 ] of the current specified center pixel];
When g isx,y,i∈GLittleClass i time, rx,y,iA larger value is required, and when a certain direction of the central pixel is in a smooth region with a smaller gradient, a larger sampling scale radius is adopted, so that the obtained neighborhood pixels can extract favorable characteristic information; but when the center pixel is in a region where the change in gray value is severe in a certain direction, i.e., gx,y,i∈GLargeClass time, a smaller sampling radius should be used to obtain the neighborhood pixels (r)x,y,iTake a smaller value) may not capture the change in the neighborhood because the sampling radius is too large;
will be according to Rx,y=[rx,y,0,rx,y,1,rx,y,2,rx,y,3,rx,y,4,rx,y,5,rx,y,6,rx,y,7]The obtained eight neighborhood pixel values are recorded as
Figure BDA0002805038310000111
And (4) adaptively selecting the sampling angle (the size of the polar angle) according to the classification result of the gradient values in 8 directions. Phix,y=[θx,y,0,θx,y,1,θx,y,2,θx,y,3,θx,y,4,θx,y,5,θx,y,6,θx,y,7]Wherein x and y are coordinate values of the central pixel. Thetax,y,i∈[0°,45°,90°]I is the ith direction of the center pixel, i ∈ [0, 1, 2, 3, 4, 5, 6, 7, 8];
The same principle as the previous step, when gx,y,i∈GLittleClass time, thetax,y,iShould be chosen to be large when gx,y,i∈GLargeClass time, thetax,y,iA smaller value should be selected;
according to the sampling angle (polar angle) thetax,y,iFusing two adjacent neighborhood pixels and according to the current neighborhood pixel
Figure BDA0002805038310000112
i∈[1,2,3,4,5,6,7,8]Rotate counterclockwise by thetax,y,iObtaining corresponding neighborhood pixels
Figure BDA0002805038310000113
Wherein j ═ i + (θ)x,y,i45)% 8,% being the remainder operation. The new neighborhood pixel value may be expressed as
Figure BDA0002805038310000114
Finally, eight neighborhood pixels are selected as
Figure BDA0002805038310000115
After neighborhood pixels in 8 directions of each central pixel of the whole texture image are obtained, a designated central pixel w is extractedx,y,cSign information of the difference vector between its 8 directional final neighborhood pixels, SAALBPx,y_S;
Figure BDA0002805038310000121
Wherein the content of the first and second substances,
Figure BDA0002805038310000122
then, the central pixel w of the whole texture image is extracted in sequencex,y,cAmplitude information of the difference vector between the final neighborhood pixels in its 8 directions, SAALBPx,y-M;
Figure BDA0002805038310000123
Wherein the content of the first and second substances,
Figure BDA0002805038310000124
representing each central pixel wx,y,cAnd its final neighborhood pixels of 8 directions
Figure BDA0002805038310000125
Magnitude vector of the difference between, mumFor all m in the whole texture imagex,y,iThe average value of (a) of (b),
Figure BDA0002805038310000126
next, the center pixel wx,y,cCarrying texture features, and sequentially extracting each central pixel w of the whole texture imagex,y,cOf the central pixel information, SAALBPx,y-C;
SAALBPx,y-C=s(wx,y,cc);
Wherein, mucFor each central pixel w in the whole texture imagex,y,cThe mean value of (a);
in order to reduce the feature dimension to the maximum extent and enhance the robustness of the algorithm to the rotation, a classical 'rotation invariant unified mode, riu 2', is adopted to supplement the sign information of the difference vector and the amplitude information of the difference vector;
Figure BDA0002805038310000127
the value of U is a metric algorithm for the change speed of the binary string, and is defined as 0/1 or I/0 conversion times between two adjacent bit values in the binary mode.
Figure BDA0002805038310000128
When U (SAALBP _ S)x,y) When the pixel value is less than or equal to 2, the sign information of the difference value vector with the central pixel at the x and y positions is obtained
Figure BDA0002805038310000129
The mode is classified as a uniform mode, otherwise, the mode is a non-uniform mode;
Figure BDA00028050383100001210
when U (SAALBP _ M)x,y) When the difference vector is less than or equal to 2, the amplitude information of the difference vector with the central pixel at the x and y positions is obtained
Figure BDA0002805038310000131
The mode is classified as a uniform mode, otherwise, the mode is a non-uniform mode;
based on the central pixel of all positions of the whole texture image
Figure BDA0002805038310000132
And SAALBP _ C generates a joint feature histogram.
In summary, the technical solution provided by the present invention is based on the polar coordinate, and only the defect that the original local binary pattern algorithm can select the neighborhood pixels with the fixed neighborhood radius and the single angle θ equal to 0 °. The original Local Binary Pattern (LBP) is expanded from the angles of scale (polar diameter) and angle (polar angle), and richer texture characteristic structures can be obtained by using the technical scheme, so that the robustness of the original local binary pattern to rotation, illumination and scale transformation is enhanced.
The specific embodiment and the comparative verification of the invention comprise the following steps:
the original Local Binary Pattern (LBP) in the prior art reflects the spatial structure information of the Local texture by using the sign information of the difference vector of the neighborhood pixels and the center pixel. The token information forms a binary pattern and generates a corresponding decimal value to mark the center pixel w of the positionx,y,cCorresponding texture pattern. As shown in fig. 2, in order to extract a local feature, for a texture image of which a texture feature is to be extracted, a center pixel w of a position is specifiedx,y,cLBP compares it to p neighborhood pixels:
Figure BDA0002805038310000133
the method aims at the problems that when a Local Binary Pattern (LBP) is used for extracting texture features, sampling radius and angle are single, multi-scale fusion features cannot be extracted, and illumination and rotation change are not robust in the prior art. Sequentially selecting each pixel from a texture image with features to be extracted as a central pixel, and solving gradient values of the central pixel in 8 directions by using a Kirsch gradient operator; using the current appointed central pixel value 3 × 3 neighborhood pixels to carry out two-dimensional convolution with 8 Kirsch gradient operator templates in 3 × 3 directions to obtain gradient values G of the central pixel in 8 directionsx,y=[gx,y,0,gx,y,1,gx,y,2,gx,y3,gx,y,4,gx,y,5,gx,y6,gx,y,7]And x and y are coordinate values of the central pixel in the texture image. Then, the absolute value G of the gradient values of 8 directions of each central pixel is sequentially takenx,y=|Gx,yAs shown in fig. 3.
Continuing to appoint the next pixel as the current pixel value and processing according to the steps until gradient values of all pixels in 8 directions in the texture image are extracted;
performing internal sorting on the gradient values of the 8 directions of the central pixel, and taking the gradient value with the maximum gradient value as the gradient value for measuring the change speed of the region, namely ax,y=max(gx,y,0,gx,y,1,gx,y,2,gx,y3,gx,y,4,gx,y,5,gx,y6,gx,y,7) (ii) a Sort from small to large the gradient value for measuring the change condition of the local area where the central pixel is located (a)x,y) X belongs to h, y belongs to w, the coordinates of the central pixels are divided into two types, the area where the central pixels positioned in the first half of the sequence are positioned is defined as a local change gentle area, and the position of the part of central pixels is marked as (x)min,ymin). Defining the area where the central pixel in the second half of the sequence is located as the local intense change area, and marking the position of the central pixel in the part as (x)max,ymax) (ii) a Sorting the gradient values of all central pixels in 8 directions in the whole texture image from small to large for sort (g)x,y,0,gx,y,1,gx,y,2,gx,y3,gx,y,4,gx,y,5,gx,y6,gx,y,7) X belongs to h, y belongs to w, wherein w and h respectively represent the length and the width of the texture image; dividing the absolute value of gradient values of 8 directions of the whole texture image into three equal parts according to the sorting result, wherein the absolute value of the gradient value is positioned in the first third and is GLittleClass, the absolute value of the gradient values lying in the middle third being GMiddleClass, the absolute value of the gradient value lying in the last third of GLargeAnd (4) class. Or equally dividing the absolute values of the gradient values of 8 directions of the whole texture image into two parts, namely GLittleAnd G andLargetwo types, preparing for the follow-up self-adaptive selection of the scale (polar diameter) and the angle (polar angle); according to the category to which the gradient values of 8 directions belong, as shown in (b) of fig. 4, the sampling radius (size of the polar diameter), R, of the neighborhood pixel is adaptively selectedx,y=[rx,y,0,rx,y,1,rx,y,2,rx,y,3,rx,y,4,rx,y,5,rx,y,6,rx,y,7]And x and y are coordinate values of the central pixel. r isx,y,i∈[1,2,3,4,5]I is the ith direction i e [0, 1, 2, 3, 4, 5, 6, 7, 8 ] of the current specified center pixel](ii) a When g isx,y,i∈GLittleTime class,rx,y,iA larger value is required, and when a certain direction of the central pixel is in a smooth region with a smaller gradient, a larger sampling scale radius is adopted, so that the obtained neighborhood pixels can extract favorable characteristic information; but when the center pixel is in a region where the change in gray value is severe in a certain direction, i.e., gx,y,i∈GLargeClass time, a smaller sampling radius should be used to obtain the neighborhood pixels (r)x,y,iTake a smaller value) may not capture the change in the neighborhood because the sampling radius is too large;
will be according to Rx,y=[rx,y,0,rx,y,1,rx,y,2,rx,y,3,rx,y,4,rx,y,5,rx,y,6,rx,y,7]The obtained eight neighborhood pixel values are recorded as
Figure BDA0002805038310000141
And (4) adaptively selecting the sampling angle (the size of the polar angle) according to the classification result of the gradient values in 8 directions. Phix,y=[θx,y,0,θx,y,1,θx,y,2,θx,y,3,θx,y,4,θx,y,5,θx,y,6,θx,y,7]Wherein x and y are coordinate values of the central pixel. Thetax,y,i∈[0°,45°,90°]I is the ith direction of the center pixel, i ∈ [0, 1, 2, 3, 4, 5, 6, 7, 8](ii) a The same principle as the previous step, when gx,y,i∈GLittleClass time, thetax,y,iShould be chosen to be large when gx,y,i∈GLargeClass time, thetax,y,iA smaller value should be selected; according to the sampling angle thetax,y,iAs shown in fig. 4 (c), two neighboring neighborhood pixels are fused and the current neighborhood pixel is selected
Figure BDA0002805038310000151
i∈[1,2,3,4,5,6,7,8]Rotate counterclockwise by thetax,y,iObtaining corresponding neighborhood pixels
Figure BDA0002805038310000152
Wherein j ═ i + (θ)x,y,i45)% 8,% being the remainder operation. The new neighborhood pixel value may be expressed as
Figure BDA0002805038310000153
Finally, eight neighborhood pixels are selected as
Figure BDA0002805038310000154
After neighborhood pixels in 8 directions of all central pixels of the whole texture image are obtained, designated central pixels w are extractedx,y,cSign information of the difference vector between its 8 directional final neighborhood pixels, SAALBPx,y_S;
Figure BDA0002805038310000155
Wherein the content of the first and second substances,
Figure BDA0002805038310000156
next, we extract the central pixel w of the whole texture image in turnx,y,cAmplitude information of the difference vector between the final neighborhood pixels in its 8 directions, SAALBPx,y_M;
Figure BDA0002805038310000157
Wherein the content of the first and second substances,
Figure BDA0002805038310000158
final neighborhood pixels representing 8 directions of the specified position
Figure BDA0002805038310000159
And its central pixel wx,y,cMagnitude vector of the difference between, mumFor all m in the whole texture imagex,y,iThe average value of (a) of (b),
Figure BDA00028050383100001510
next, the center pixel wx,y,cCarrying texture features, and sequentially extracting central pixel w of the whole texture imagex,y,cOf the central pixel information, SAALBPx,y-C;SAALBPx,y-C=s(wx,y,cc);
Wherein mucFor all central pixels w in the whole texture imagex,y,cThe mean value of (a);
in order to reduce the feature dimension to the maximum extent and enhance the robustness of the algorithm to the rotation, a classical 'rotation invariant unified mode, riu 2', is adopted to supplement the sign information of the difference vector and the amplitude information of the difference vector;
Figure BDA00028050383100001511
the value of U is a metric algorithm for the change speed of the binary string, and is defined as 0/1 or I/0 conversion times between two adjacent bit values in the binary mode.
Figure BDA0002805038310000161
When U (SAALBP _ S)x,y) When the pixel value is less than or equal to 2, the sign information of the difference value vector with the central pixel at the x and y positions is obtained
Figure BDA0002805038310000162
The mode is classified as a uniform mode, otherwise, the mode is a non-uniform mode;
Figure BDA0002805038310000163
when U (SAALBP _ M)x,y) When the difference vector is less than or equal to 2, the amplitude information of the difference vector with the central pixel at the x and y positions is obtained
Figure BDA0002805038310000164
The mode is classified as a uniform mode, otherwise, the mode is a non-uniform mode;
based on the central pixel of all positions of the whole texture image
Figure BDA0002805038310000165
And SAALBP _ C, and grouping different pixels into different mode groups according to the joint feature histogram, the pixels of the same mode group can be considered to have the same local texture feature.
Referring to fig. 5 and 6, the present invention utilizes the publicly available Outex database to evaluate the robustness of SAALBP of the present invention to illumination variations and rotation variations by comparing with the original Local Binary Pattern (LBP) and the Complete Local Binary Pattern (CLBP), as shown in table 1. Using the publicly available UIUC database, the robustness of the present invention to scale changes and view angle changes was evaluated by comparison with the original Local Binary Pattern (LBP) and the Complete Local Binary Pattern (CLBP), as shown in table 2. The invention selects three most common reference texture databases in the Outex database: outex _ TC10, Outex _ TC12_000, and Outex _ TC12_001 were tested. The images were acquired under 3 illumination conditions of "inca", "t 184" and "horizon" in sequence, and had 9 rotation angles of 0 °, 5 °, 10 °, 15 °, 30 °, 45 °, 60 °, 75 ° and 90 °, with 20 images for each rotation angle under the same illumination condition. In the invention, under the condition of inca illumination, a texture image with a rotation angle of 0 degree is taken as a training set, and all the other images are taken as a test set. The UIUC texture database contains 25 types of texture images, each type having 40 images, which are obtained in the real environment, and the images have variations in rotation, angle of view, scale, and the like. The classifier used in the present invention is a nearest neighbor classification.
TABLE 1 OUTEX database, the present invention compares the original local binary pattern data with the complete local binary pattern data
Figure BDA0002805038310000171
Table 2.UIUC database, the invention compares the original local binary pattern data with the complete local binary pattern data
Figure BDA0002805038310000172
It can be seen from tables 1 and 2 that SAALBP significantly improves the performance of the original local binary pattern LBP. The method is mainly characterized in that only the pixels with fixed neighborhood radius and single angle theta equal to 0 DEG can be selected by aiming at the original local binary pattern algorithm. The invention expands the original Local Binary Pattern (LBP) from the direction of the scale (polar diameter) and the angle (polar angle), and can obtain richer texture characteristic structures by using the technical scheme, thereby enhancing the robustness of the changes of the rotation, the illumination, the scale and the visual angle.
The embodiment of the invention provides a local binary pattern texture image feature extraction system based on scale and angle self-adaptive selection, which comprises the following steps:
the gradient value acquisition module is used for acquiring a texture image of the feature to be extracted and sequentially selecting each pixel from the texture image of the feature to be extracted as a central pixel; the gradient value of 8 directions of each central pixel is obtained by using a Kirsch gradient operator;
the classification result acquisition module is used for taking absolute values of the gradient values of 8 directions of each central pixel; performing internal sequencing based on the absolute values of the gradient values of 8 directions of each central pixel, and taking the gradient value with the largest absolute value as the gradient value for measuring the change speed of the local area where each central pixel is located; the method comprises the steps of sorting the absolute values of gradient values of all 8 directions of central pixels in the whole texture image to obtain a sorting result; equally dividing and classifying the absolute values of the gradient values of all the central pixels in 8 directions based on the sequencing result to obtain a classification result;
the neighborhood pixel acquisition module is used for adaptively selecting the polar diameter size and the polar angle size of the neighborhood pixels according to the classification result; extracting neighborhood pixels of 8 directions of each central pixel according to the size of the polar diameter; fusing two adjacent neighborhood pixels in 8 directions of each central pixel according to the polar angle to obtain a final neighborhood pixel in 8 directions of each central pixel;
the feature histogram acquisition module is used for extracting and acquiring symbol information and amplitude information of a difference vector between each central pixel and the final neighborhood pixels in 8 directions according to the acquired final neighborhood pixels; extracting central pixel information of each central pixel of the whole texture image; and generating a combined feature histogram according to the sign information of the difference vector of each central pixel in the whole texture image, the amplitude information of the difference vector and the central pixel information, and finishing the feature extraction of the local binary pattern texture image.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may 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 flow or flows and/or block diagram block or blocks.
These computer program instructions may 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 instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may 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 flow or flows and/or block diagram block or blocks.
Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art can make modifications and equivalents to the embodiments of the present invention without departing from the spirit and scope of the present invention, which is set forth in the claims of the present application.

Claims (10)

1. A local binary pattern texture image feature extraction method based on scale and angle self-adaptive selection is characterized by comprising the following steps:
step 1, acquiring a texture image of a feature to be extracted, and sequentially selecting each pixel from the texture image of the feature to be extracted as a central pixel; obtaining gradient values of 8 directions of each central pixel by using a Kirsch gradient operator;
step 2, taking absolute values of gradient values of each central pixel in 8 directions; performing internal sequencing based on the absolute values of the gradient values of 8 directions of each central pixel, and taking the gradient value with the largest absolute value as the gradient value for measuring the change speed of the local area where each central pixel is located;
sorting the absolute values of the gradient values of all the central pixels in 8 directions in the whole texture image to obtain a sorting result; equally dividing and classifying the absolute values of the gradient values of all the 8 directions of the central pixels based on the sequencing result to obtain a classification result;
step 3, based on the classification result obtained in the step 2, the size of the polar diameter and the size of the polar angle of the neighborhood pixels are selected in a self-adaptive mode; extracting neighborhood pixels of 8 directions of each central pixel according to the size of the polar diameter; fusing two neighborhood pixels of 8 directions of each central pixel, which are separated by polar angle angles, according to the polar angle size to obtain final neighborhood pixels in each 8 directions;
step 4, extracting the sign information and the amplitude information of the difference vector between each central pixel and the final neighborhood pixels in 8 directions based on the final neighborhood pixels obtained in the step 3; extracting central pixel information of each central pixel of the whole texture image; and generating a combined feature histogram according to the symbol information of the difference vector of each central pixel and 8 adjacent pixels thereof, the amplitude information of the difference vector and the central pixel information in the whole texture image, and finishing the feature extraction of the local binary pattern texture image.
2. The method for extracting the local binary pattern texture image features based on the adaptive selection of the scale and the angle as claimed in claim 1, wherein in the step 1, the specific step of obtaining the gradient values of 8 directions of the central pixel by using the Kirsch gradient operator comprises:
performing two-dimensional convolution on the central pixel value 3 × 3 neighborhood pixels and 8 Kirsch gradient operator templates in the direction 3 × 3 to obtain gradient values of the central pixel in 8 directions;
wherein, the expression of the gradient value is,
Gx,y=[gx,y,0,gx,y,1,gx,y,2,gx,y3,gx,y,4,gx,y,5,gx,y6,gx,y,7],
in the formula, x and y are coordinate values of the central pixel.
3. The method for extracting the local binary pattern texture image features based on the adaptive selection of the scale and the angle according to claim 2, wherein the step 2 specifically comprises the following steps:
taking the absolute value of the gradient values of 8 directions of each central pixel, wherein the expression is Gx,y=|Gx,y|;
Ordering the gradient values for measuring the change condition of the local area where the central pixel is located, wherein the expression is sort (a)x,y),x∈h,y∈w;ax,y=max(gx,y,0,gx,y,1,gx,y,2,gx,y3,gx,y,4,gx,y,5,gx,y6,gx,y,7);
Wherein w and h represent the length and width of the texture image, respectively;
dividing the coordinates of the central pixels into two types, defining the area where the central pixels in the first half of the sequence are positioned as a local change gentle area, and marking the position of the central pixels of the part as (x)min,ymin) (ii) a The area where the central pixel in the second half of the sequence is located is defined as a local area with severe change, and the position of the central pixel in the part is marked as (x)max,ymax);
The gradient values of all the central pixels in 8 directions in the whole texture image are sorted from small to large, the expression is,
sort(gx,y,0,gx,y,1,gx,y,2,gx,y3,gx,y,4,gx,y,5,gx,y6,gx,y,7),x∈h,y∈w,
dividing the absolute value of gradient values of 8 directions of the whole texture image into three equal parts according to the sorting result, wherein the absolute value of the gradient value is positioned in the first third and is GLittleClass, the absolute value of the gradient values lying in the middle third being GMiddleClass, the absolute value of the gradient value lying in the last third of GLargeClass;
or, equally dividing the absolute values of the 8 direction gradient values of the whole texture image into two parts, namely GLittleAnd GLargeTwo types are provided.
4. The method for extracting the local binary pattern texture image features based on the adaptive selection of the scale and the angle according to claim 3, wherein the step 3 specifically comprises the following steps:
according to each central pixelThe gradient values in 8 directions belong to categories, the size of the polar diameter of a neighborhood pixel is selected in a self-adaptive mode, and the expression is Rx,y=[rx,y,0,rx,y,1,rx,y,2,rx,y,3,rx,y,4,rx,y,5,rx,y,6,rx,y,7],
In the formula, rx,y,i∈[1,2,3,4,5]I is the ith direction of the central pixel, i ∈ [0, 1, 2, 3, 4, 5, 6, 7, 8];
Will be according to Rx,y=[rx,y,0,rx,y,1,rx,y,2,rx,y,3,rx,y,4,rx,y,5,rx,y,6,rx,y,7]The obtained 8 neighborhood pixel values are recorded as
Figure FDA0002805038300000031
Adaptively selecting the size of the polar angle according to the category of the gradient values of each central pixel in 8 directions, wherein the expression is,
Φx,y=[θx,y,0,θx,y,1,θx,y,2,θx,y,3,θx,y,4,θx,y,5,θx,y,6,θx,y,7],
in the formula, thetax,y,i∈[0°,45°,90°];
According to polar angle thetax,y,iFusing two adjacent neighborhood pixels; according to the current neighborhood pixel
Figure FDA0002805038300000032
Rotate counterclockwise by thetax,y,iObtaining corresponding neighborhood pixels
Figure FDA0002805038300000033
Wherein j ═ i + (θ)x,y,i45) 8 percent, the rest operation is carried out; the final neighborhood pixels are represented as
Figure FDA0002805038300000034
Finally, eight neighborhood pixels are selected as
Figure FDA0002805038300000035
5. The method for extracting the local binary pattern texture image features based on the adaptive selection of the scale and the angle according to claim 4, wherein the step 4 specifically comprises the following steps:
extracting a central pixel w according to neighborhood pixels of 8 directions of each central pixel of the obtained whole texture imagex,y,cSign information SAALBP of difference vector between 8 direction final neighborhood pixelsx,yS, the expression is,
Figure FDA0002805038300000036
extracting central pixel w of whole texture imagex,y,cAmplitude information SAALBP of difference vector between 8 direction final neighborhood pixelsx,yM, the expression is,
Figure FDA0002805038300000037
in the formula (I), the compound is shown in the specification,
Figure FDA0002805038300000038
representing each central pixel wx,y,cAnd its final neighborhood pixels of 8 directions
Figure FDA0002805038300000039
Magnitude vector of the difference between, mumFor all m in the whole texture imagex,y,iThe average value of (a) of (b),
Figure FDA00028050383000000310
extracting each central pixel w of the whole texture imagex,y,cOf the central pixel information SAALBPx,yThe expression of _ C is as follows,
SAALBPx,y_C=s(wx,y,cc);
in the formula, mucFor all central pixels w in the whole texture imagex,y,cIs measured.
6. The method for extracting features of a local binary pattern texture image based on adaptive selection of scale and angle as claimed in claim 5, wherein the step 4 further comprises:
supplementing the extraction mode of the sign information of the difference vector and the amplitude information of the difference vector, and expressing as,
Figure FDA0002805038300000041
in the formula, the U value is a metric algorithm for the change speed of the binary string and is defined as the conversion times of 0/1 or 1/0 between two adjacent bit values in the binary mode;
Figure FDA0002805038300000042
when U (SAALBP _ S)x,y) When the pixel value is less than or equal to 2, the sign information of the difference value vector with the central pixel at the x and y positions is obtained
Figure FDA0002805038300000043
The mode is classified as a uniform mode, otherwise, the mode is a non-uniform mode;
Figure FDA0002805038300000044
when U (SAALBP _ M)x,y) When the difference vector is less than or equal to 2, the amplitude information of the difference vector with the central pixel at the x and y positions is obtained
Figure FDA0002805038300000045
The mode is classified as a uniform mode, otherwise, the mode is a non-uniform mode.
7. A local binary pattern texture image feature extraction system based on scale and angle self-adaptive selection is characterized by comprising the following steps:
the gradient value acquisition module is used for acquiring a texture image of the feature to be extracted and sequentially selecting each pixel from the texture image of the feature to be extracted as a central pixel; the gradient value of 8 directions of each central pixel is obtained by using a Kirsch gradient operator;
the classification result acquisition module is used for taking absolute values of the gradient values of 8 directions of each central pixel; performing internal sequencing based on the absolute values of the gradient values of 8 directions of each central pixel, and taking the gradient value with the largest absolute value as the gradient value for measuring the change speed of the local area where each central pixel is located; the method comprises the steps of sorting the absolute values of gradient values of all 8 directions of central pixels in the whole texture image to obtain a sorting result; equally dividing and classifying the absolute values of the gradient values of all the central pixels in 8 directions based on the sequencing result to obtain a classification result;
the neighborhood pixel acquisition module is used for adaptively selecting the polar diameter size and the polar angle size of the neighborhood pixels according to the classification result; extracting neighborhood pixels of 8 directions of each central pixel according to the size of the polar diameter; fusing two neighborhood pixels of 8 directions of each central pixel, which are separated by polar angle angles, according to the polar angle size to obtain final neighborhood pixels in each 8 directions;
the feature histogram acquisition module is used for extracting and acquiring symbol information and amplitude information of a difference vector between each central pixel and the final neighborhood pixels in 8 directions according to the acquired final neighborhood pixels; extracting central pixel information of each central pixel of the whole texture image; and generating a combined feature histogram according to the symbol information of the difference vector of each central pixel and 8 adjacent pixels thereof, the amplitude information of the difference vector and the central pixel information in the whole texture image, and finishing the feature extraction of the local binary pattern texture image.
8. The system for extracting feature of texture image with local binary pattern based on adaptive selection of scale and angle as claimed in claim 7, wherein the step of obtaining the gradient values of 8 directions of the central pixel by using Kirsch gradient operator in the gradient value obtaining module comprises:
performing two-dimensional convolution on the central pixel value 3 × 3 neighborhood pixels and 8 Kirsch gradient operator templates in the direction 3 × 3 to obtain gradient values of the central pixel in 8 directions;
wherein, the expression of the gradient value is,
Gx,y=[gx,y,0,gx,y,1,gx,y,2,gx,y3,gx,y,4,gx,y,5,gx,y6,gx,y,7],
in the formula, x and y are coordinate values of the central pixel.
9. The scale and angle adaptive selection-based local binary pattern texture image feature extraction system as claimed in claim 8, wherein, in the classification result obtaining module,
taking the absolute value of the gradient values of 8 directions of each central pixel, wherein the expression is Gx,y=|Gx,y|;
Ordering the gradient values for measuring the change condition of the local area where the central pixel is located, wherein the expression is sort (a)x,y),x∈h,y∈w;ax,y=max(gx,y,0,gx,y,1,gx,y,2,gx,y3,gx,y,4,gx,y,5,gx,y6,gx,y,7);
Wherein w and h represent the length and width of the texture image, respectively;
dividing the coordinates of the central pixels into two types, defining the area where the central pixels in the first half of the sequence are positioned as a local change gentle area, and marking the position of the central pixels of the part as (x)min,ymin) (ii) a The area where the central pixel in the second half of the sequence is located is defined as a local area with severe change, and the position of the central pixel in the part is marked as (x)max,ymax);
The gradient values of all the central pixels in 8 directions in the whole texture image are sorted from small to large, the expression is,
sort(gx,y,0,gx,y,1,gx,y,2,gx,y3,gx,y,4,gx,y,5,gx,y6,gx,y,7),x∈h,y∈w,
dividing the absolute value of gradient values of the whole texture image in 8 directions into three equal parts according to the sorting result, wherein the absolute value of the gradient value is positioned in the first third and is GLittleClass, the absolute value of the gradient values lying in the middle third being GMiddleClass, the absolute value of the gradient value lying in the last third of GLargeClass;
or, halving the gradient values of the whole texture image in 8 directions, which are respectively GLittleAnd GLargeTwo types are provided.
10. The scale and angle adaptive selection-based local binary pattern texture image feature extraction system as claimed in claim 9, wherein, in the neighborhood pixel obtaining module,
according to the category of the gradient values of each central pixel in 8 directions, the size of the polar diameter of the neighborhood pixel is selected in a self-adaptive mode, and the expression is Rx,y=[rx,y,0,rx,y,1,rx,y,2,rx,y,3,rx,y,4,rx,y,5,rx,y,6,rx,y,7],
In the formula, rx,y,i∈[1,2,3,4,5]I is the ith direction of the central pixel, i ∈ [0, 1, 2, 3, 4, 5, 6, 7, 8];
Will be according to Rx,y=[rx,y,0,rx,y,1,rx,y,2,rx,y,3,rx,y,4,rx,y,5,rx,y,6,rx,y,7]The obtained 8 neighborhood pixel values are recorded as
Figure FDA0002805038300000061
Adaptively selecting the size of the polar angle according to the category of the gradient values of each central pixel in 8 directions, wherein the expression is,
Φx,y=[θx,y,0,θx,y,1,θx,y,2,θx,y,3,θx,y,4,θx,y,5,θx,y,6,θx,y,7],
in the formula, thetax,y,i∈[0°,45°,90°];
According to polar angle thetax,y,iFusing two adjacent neighborhood pixels; according to the current neighborhood pixel
Figure FDA0002805038300000062
Rotate counterclockwise by thetax,y,iObtaining corresponding neighborhood pixels
Figure FDA0002805038300000063
Wherein j ═ i + (θ)x,y,i45) 8 percent, the rest operation is carried out; the final neighborhood pixels are represented as
Figure FDA0002805038300000071
Finally, eight neighborhood pixels are selected as
Figure FDA0002805038300000072
CN202011364531.0A 2020-11-27 2020-11-27 Local binary pattern texture image feature extraction method and system based on scale and angle self-adaptive selection Active CN112434712B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011364531.0A CN112434712B (en) 2020-11-27 2020-11-27 Local binary pattern texture image feature extraction method and system based on scale and angle self-adaptive selection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011364531.0A CN112434712B (en) 2020-11-27 2020-11-27 Local binary pattern texture image feature extraction method and system based on scale and angle self-adaptive selection

Publications (2)

Publication Number Publication Date
CN112434712A true CN112434712A (en) 2021-03-02
CN112434712B CN112434712B (en) 2022-12-09

Family

ID=74698042

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011364531.0A Active CN112434712B (en) 2020-11-27 2020-11-27 Local binary pattern texture image feature extraction method and system based on scale and angle self-adaptive selection

Country Status (1)

Country Link
CN (1) CN112434712B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117475000A (en) * 2023-12-28 2024-01-30 江苏恒力化纤股份有限公司 Fabric selvedge positioning method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105022989A (en) * 2015-06-29 2015-11-04 中国人民解放军国防科学技术大学 Robust extended local binary pattern texture feature extraction method
CN111612099A (en) * 2020-06-03 2020-09-01 江苏科技大学 Texture image classification method and system based on local sorting difference refinement mode

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105022989A (en) * 2015-06-29 2015-11-04 中国人民解放军国防科学技术大学 Robust extended local binary pattern texture feature extraction method
CN111612099A (en) * 2020-06-03 2020-09-01 江苏科技大学 Texture image classification method and system based on local sorting difference refinement mode

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
冀中等: "基于抗噪声局部二值模式的纹理图像分类", 《计算机研究与发展》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117475000A (en) * 2023-12-28 2024-01-30 江苏恒力化纤股份有限公司 Fabric selvedge positioning method
CN117475000B (en) * 2023-12-28 2024-03-19 江苏恒力化纤股份有限公司 Fabric selvedge positioning method

Also Published As

Publication number Publication date
CN112434712B (en) 2022-12-09

Similar Documents

Publication Publication Date Title
CN106355577B (en) Rapid image matching method and system based on significant condition and global coherency
CN108010045A (en) Visual pattern characteristic point error hiding method of purification based on ORB
CN105740899B (en) A kind of detection of machine vision image characteristic point and match compound optimization method
Patel et al. A survey on feature extraction techniques for shape based object recognition
Alsmadi et al. Fish classification based on robust features extraction from color signature using back-propagation classifier
Wang et al. Fan shape model for object detection
Uchiyama et al. Toward augmenting everything: Detecting and tracking geometrical features on planar objects
Irawan et al. A survey: Effect of the number of GLCM features on classification accuracy of lasem batik images using K-nearest neighbor
CN108550165A (en) A kind of image matching method based on local invariant feature
CN111753119A (en) Image searching method and device, electronic equipment and storage medium
CN104123554A (en) SIFT image characteristic extraction method based on MMTD
Ding et al. Recognition of hand-gestures using improved local binary pattern
Waheed et al. Exploiting Human Pose and Scene Information for Interaction Detection
Tena et al. Content-based image retrieval for fabric images: A survey
CN112434712B (en) Local binary pattern texture image feature extraction method and system based on scale and angle self-adaptive selection
CN111339974B (en) Method for identifying modern ceramics and ancient ceramics
Lin et al. Instance search based on weakly supervised feature learning
CN105913068B (en) It is a kind of for describing the multi-dimensional direction gradient representation method of characteristics of image
Dai et al. An Improved ORB Feature Extraction Algorithm Based on Enhanced Image and Truncated Adaptive Threshold
Nasreddine et al. Shape-based fish recognition via shape space
Li et al. An efficient robust eye localization by learning the convolution distribution using eye template
CN110751189B (en) Ellipse detection method based on perception contrast and feature selection
Lakshmi et al. Plant leaf image detection method using a midpoint circle algorithm for shape-based feature extraction
Rao et al. Texture classification based on local features using dual neighborhood approach
Alaya Cheikh et al. Ordinal-measure based shape correspondence

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant