Feature extraction algorithm (1) - LBP texture feature extraction algorithm

When matching identification or classification pattern recognition classifier, the determination is based on image features. Represents the entire image content using the extracted features, the feature matching or classification of a target image.

Common feature extraction algorithm is divided into the following three categories:

  • Based on Color Features: The color histogram, color set, color moments, color coherence vector and the like;
  • Based on Texture: The texture feature Tamura, texture autoregressive model, Gabor transform, wavelet transform, the MPEG7 edge histogram;
  • Based on the shape characteristics: The Fourier shape descriptors, moment invariants, wavelet boundary descriptor and the like;

LBP feature extraction algorithm

LBP (Local Binary Patterns, local binary pattern) is extracted as the determination based on a local feature, an effective texture description operator, measurement and texture information extracted partial image, having a rotation invariance and gradation significantly fixity advantages, invariant to illumination . A texture feature extraction. Further, the extracted feature is local image texture features. There are a variety of improved, LBP BP neural network has been used in conjunction with face recognition and other fields.

Gray scale invariance: refers to whether the illumination change will be described impact. The above neighborhoods to 8, the illumination change is difficult to change the center pixel grayscale values ​​of 8 pixels surrounding the magnitude relation. Because the illumination changes of the nature of a regional, rather than a single-pixel properties change.

1, LBP characterization

The basic idea of LBP is defined in the neighborhood of 8 pixels (3x3 window), to the gradation value of the center pixel threshold value, the comparison value and its surrounding eight pixels surrounding the pixel value is less than if the central pixel of the gradation value, that pixel location is marked as 0, 1 or labeled. Such a 3x3 neighborhood of eight points can be generated by comparison of 8-bit binary numbers (typically converted to decimal, i.e. LBP code, 256 species), each of the pixels to obtain a binary composition, i.e., the center pixel of the window to obtain the value of LBP and use this value to reflect the texture information in the region.

 

2, LBP improved version:

(1) Round LBP operator

The biggest drawback is the basic LBP operator in that it only covers a fixed radius small area within the range, which obviously does not meet various sizes and frequencies texture desired. To accommodate different sizes of texture features, to meet the requirements of the gradation and the rotation invariance. The 3 × 3 neighborhood extended to any neighborhood, and replaced with a circular neighborhood square neighborhood, LBP operator allows improved in a circular neighborhood of radius R has any number of pixels. Radius such as to obtain sampling points containing P within a circular region R LBP operator.

(2) LBP rotation invariant pattern

As can be seen from the definition of LBP, LBP operator is the same gray, but not rotation invariant. Rotation of the image will give a different value of LBP.

Maenpaa LBP operator, who in turn has been expanded, made LBP operator has a rotation invariance , i.e., constantly rotating circular neighborhood LBP obtained initially defined value range, whichever is the minimum value of the neighborhood value LBP .

The following figure shows the rotation invariant LBP obtaining process schematic drawing numbers under operator indicates that the operator LBP values ​​corresponding to eight kinds of patterns shown in FIG LBP, the process through rotation invariant, the final LBP 15 is obtained having a rotation invariance. That is, in FIG. 8 kinds of modes corresponding to the LBP LBP rotationally invariant pattern is 00001111.

(3) LBP equivalent model

LBP operator can generate a different binary pattern, comprising the radius of sample points P within a circular region R will have the LBP operator P 2 modes. Obviously, with the increase in the Neighborhood sampling points, the type of binary pattern is a sharp increase. For example: 5 × 5 20 sampling points in the neighborhood, there are two 20 is = 1,048,576 binary mode.

So many binary pattern both for the extraction of texture or texture for the identification, classification and access information are unfavorable. At the same time, too much of the kind of model for expressing the texture is detrimental. For example, when the LBP operator for texture classification or recognition, often used model LBP histogram to express the image information, and the more kind of pattern data that is too large and too sparse histogram. Accordingly, it is necessary to reduce the dimension of the original pattern LBP, such information can be representative of the best image with a reduced amount of data.

To solve the problem of excessive binary mode, improve statistical, Ojala proposed to use a kind of "equivalence mode" (Uniform Pattern) mode to reduce the dimension to count sub-species of LBP. Ojala and so that, in the actual image, the vast majority of LBP pattern comprising at most twice or from 1 to 0 transition from 0 to 1. Thus, Ojala the "equivalent mode" is defined as: When a repeating binary number corresponding to the LBP from 0 to 1 or from 1 to 0 up to jump twice, the corresponding binary LBP is called an isochronous class monovalent mode, a mode in addition to the property of equivalent mode eleven classes, referred to as mixed mode type. The method of calculating hopping: such as 10010111, firstly the first two 10, from 1-> 0 becomes a jump; second and third 00, no jump; third and fourth 01, a 0-> 1 transition a fourth, five 10, a transition from 1-> 0; fifty six 01, a transition from the 0-> 1; sixty seven 11, no transition; seventh eight 11, no jump; the eighth and the first 11, did not jump; it is a total jump four times.

With this improvement, the type of binary pattern greatly reduced, without losing any information, the type of the original pattern is reduced to 2 ^ p p * (p-1) +2 species. For eight samples 3 × 3 neighborhood, the binary pattern 256 was reduced from the original 58 kinds of species, which makes the dimension of the feature vector less, and can reduce the influence of high frequency noise caused.

1,0 times jump, only two, namely 000 .. or 1111 ....

2,1 times hopping, two possibilities, 0-> 1 or 1-> 0:

  (1) begins with 0: 0 ... 01,0 .... 011, a total of p-1 species;

  (2) at the beginning of 1: 1 ... 10,1 ... 100,1..1000, and the like, a kind of p-1 species;

  Overall, there is a transition 2 (p-1) species.

2, two hopping, 0-> 1-> 0 and 1-> 0-> 1

  0-> 1-> 0: the first transition at the second position, the 3, ........ p-1 position, corresponding to the second transition has Species p-2, p- .... one kind of three kinds of transition position, the total of (p-1) (p-2) / 2 modes;

  1-> 0-> 1: also the corresponding (p-1) (p-2) / 2 species;

  Integrated with a (p-1) (p-2) modes

In summary, a total of 2 + 2 (p-1) + (p-1) (p-2) = p (p-1) +2 patterns possible.

Equivalent mode represents a key pattern edges, spots, and the like corner points of the image, the equivalent model accounts for the vast majority of the overall pattern, the characteristic is greatly reduced dimensions. With these equivalence classes and mixed modes histogram to better extract the essential characteristics of the image.

3, LBP feature detection principle for

Apparent, the extracted LBP operator at each pixel LBP can get a "code", then, for an image (gray value is recorded for each pixel) is extracted its original LBP operator after that, the original LBP feature still gets "a picture" (LBP recorded a value of each pixel).

Application of LBP, as texture classification, facial analysis, feature extraction result LBP or an image the same size, generally do not map the LBP as a feature vector for classification, instead of using the histogram profiles of the LBP as a feature vector for classification.

 Because we can see from the above analysis, this "feature" with location information are closely related. Two pictures directly to extract this "feature", and discriminant analysis, then, because "the position is not aligned" and have a huge error. Later, researchers found that a picture can be divided into a number of sub-areas, for each pixel in each sub-region are extracted LBP feature, then establish statistical histogram LBP features in each sub-region. Thus, each sub-region, a histogram can be used to describe; on the entire picture composed of a plurality of histogram;

例如:一幅100*100像素大小的图片,划分为10*10=100个子区域(可以通过多种方式来划分区域),每个子区域的大小为10*10像素;在每个子区域内的每个像素点,提取其LBP特征,然后,建立统计直方图;这样,这幅图片就有10*10个子区域,也就有了10*10个统计直方图,利用这10*10个统计直方图,就可以描述这幅图片了。之后,我们利用各种相似性度量函数,就可以判断两幅图像之间的相似性了。

3、对LBP特征向量进行提取的步骤

(1)首先将检测窗口划分为16×16的小区域(cell);

(2)对于每个cell中的一个像素,将相邻的8个像素的灰度值与其进行比较,若周围像素值大于中心像素值,则该像素点的位置被标记为1,否则为0。这样,3*3邻域内的8个点经比较可产生8位二进制数,即得到该窗口中心像素点的LBP值;

(3)然后计算每个cell的直方图,即每个数字(假定是十进制数LBP值)出现的频率;然后对该直方图进行归一化处理。

(4)最后将得到的每个cell的统计直方图进行连接成为一个特征向量,也就是整幅图的LBP纹理特征向量;

然后便可利用SVM或者其他机器学习算法进行分类了。

 

Guess you like

Origin www.cnblogs.com/pacino12134/p/11360847.html