# Local Binary Patterns statement in texture classification problem

Hello, dear habralum!

In this article I would like to talk about a relatively new operator used in the problem of texture classification. This task is very close to the task of searching, recognizing and classifying images.

The LBP operator can be used to search for an object in an image (for example, a face), as well as to check this object for belonging to a certain class (verification, recognition of emotions, gender by face). Interested in mercy, I ask for cat.

The LBP operator was first proposed by T. Ojala in 1996. It is an effective operator that represents each pixel in the image as a binary number, depending on the intensities of neighboring pixels in the image.

This operator is computationally efficient, since it only works with integer arithmetic (this allows real-time performance in some tasks), and it is also invariant to brightness changes in the image caused by shooting under various lighting conditions.

What is LBP? The classic LBP, which applies to an image pixel, uses eight neighborhood pixels.

It takes the center pixel as a threshold and compares the brightness value in each pixel of the neighborhood with it. If this value is greater than the threshold (or equal value), then the pixel takes the value 1. If it is less than 0. The resulting eight-bit number characterizes the neighborhood of the pixel. The total number of variants of such numbers is 2 ^ 8 = 256. Thus, we assigned each of the image pixels one of 256 labels characterizing it. Further, it is not difficult to construct a histogram from these data and compare textures using LBP histograms.

However, I would like to use neighborhoods of arbitrary radius with an arbitrary number of significant pixels. In 2002, an eLBP (extended LBP) method was proposed that satisfies these conditions. Now the neighborhood is as follows:

Bilinear interpolation is used to find the brightness value at points of an arbitrary pixel neighborhood. That is, the point is assigned the weighted average of the neighboring pixels. Otherwise, the method works in the same way as classic LBP.

However, it can be seen that with an increase in the neighborhood, the number of digits in the numbers with which work is required to increase increases. That is, for a neighborhood of a radius of 2 out of 16 points, you need to work already with numbers consisting of 16 bits. And the number of histogram bins is getting huge. After some time, it was found out that the so-called uniform patterns carry most of the information

The LBP operator is used as an integral part of many classifiers. application - a drawing of histograms and compare them (I briefly touched on this method) is also used with the machine learning algorithms such as SVM and AdaBoost and if the audience interested in these methods -.. it will be a good motivation for writing a new article.

gromnoe thank you for your attention, I hope that my writing style was simple enough to understand.

- Literature:

Zhiguang Yang and Haizhou Ai - Demographic Classification with Local Binary Patterns

In this article I would like to talk about a relatively new operator used in the problem of texture classification. This task is very close to the task of searching, recognizing and classifying images.

The LBP operator can be used to search for an object in an image (for example, a face), as well as to check this object for belonging to a certain class (verification, recognition of emotions, gender by face). Interested in mercy, I ask for cat.

The LBP operator was first proposed by T. Ojala in 1996. It is an effective operator that represents each pixel in the image as a binary number, depending on the intensities of neighboring pixels in the image.

This operator is computationally efficient, since it only works with integer arithmetic (this allows real-time performance in some tasks), and it is also invariant to brightness changes in the image caused by shooting under various lighting conditions.

What is LBP? The classic LBP, which applies to an image pixel, uses eight neighborhood pixels.

It takes the center pixel as a threshold and compares the brightness value in each pixel of the neighborhood with it. If this value is greater than the threshold (or equal value), then the pixel takes the value 1. If it is less than 0. The resulting eight-bit number characterizes the neighborhood of the pixel. The total number of variants of such numbers is 2 ^ 8 = 256. Thus, we assigned each of the image pixels one of 256 labels characterizing it. Further, it is not difficult to construct a histogram from these data and compare textures using LBP histograms.

However, I would like to use neighborhoods of arbitrary radius with an arbitrary number of significant pixels. In 2002, an eLBP (extended LBP) method was proposed that satisfies these conditions. Now the neighborhood is as follows:

Bilinear interpolation is used to find the brightness value at points of an arbitrary pixel neighborhood. That is, the point is assigned the weighted average of the neighboring pixels. Otherwise, the method works in the same way as classic LBP.

However, it can be seen that with an increase in the neighborhood, the number of digits in the numbers with which work is required to increase increases. That is, for a neighborhood of a radius of 2 out of 16 points, you need to work already with numbers consisting of 16 bits. And the number of histogram bins is getting huge. After some time, it was found out that the so-called uniform patterns carry most of the information

*(unfortunately, I could not translate this into Russian, so as not to cut the ear)*. The bottom line is that these patterns contain no more than a certain number of transitions from 0 to 1 in a record and vice versa. That is, the numbers 00011000 or 00000000 will be uniform patterns, and 00100100 will not, if the specified number of transitions is two (000 transition 11 transition 000 - uniform (2 transitions), 00 transition 1 transition 00 transition 1 transition 00 - no (4 transitions).The LBP operator is used as an integral part of many classifiers. application - a drawing of histograms and compare them (I briefly touched on this method) is also used with the machine learning algorithms such as SVM and AdaBoost and if the audience interested in these methods -.. it will be a good motivation for writing a new article.

gromnoe thank you for your attention, I hope that my writing style was simple enough to understand.

- Literature:

Zhiguang Yang and Haizhou Ai - Demographic Classification with Local Binary Patterns