Computer Vision: texture features

Source: Internet
Author: User
Summary

The Local Binary Pattern (Local Binary Pattern) is an operator used to describe the local texture features of an image. It has obvious advantages such as rotation immutability and gray scale immutability. It is first created by T. Ojala, M. pietik? Inen, and D. Harwood proposed in 1994 for texture feature extraction. In addition, the extracted features are the local texture features of the image.
From the perspective of texture analysis, the texture features of a certain pixel in an image usually refer to the relationship between this point and the surrounding pixel, that is, the relationship between this point and its neighborhood Interior Point. From which point of view the feature is extracted from this relationship, different types of features are formed. With features, you can classify Based on textures. This component constructs a relationship between a pixel point and its surrounding pixels.


HSV basic

The original lboperator is defined as 3In the window of 3, the gray value of the adjacent eight pixels is compared with the threshold value of the center pixel of the window. If the surrounding pixel value is greater than the center pixel value, the position of the pixel is marked as 1; otherwise, it is 0. In this way, 33. 8 vertices in the field can generate 8-bit unsigned numbers, that is, obtain the window's HSV value, and use this value to reflect the texture information of the region.

After the original HSV was proposed, the researchers continuously proposed various improvements and optimizations for it, so as to obtain the HSV operators with P sampling points in the circular area with a radius of R; the uniform mode, the constant rotation mode, and the equivalent mode.
It is obvious that the previously extracted KNN operator can get a "encoding" for each pixel. Then, after extracting the original KNN operator for an image, the original image feature is still "one image ".
This feature is closely related to location information. Therefore, direct discriminant analysis cannot be performed using this feature. However,The researchers found that an image can be divided into several sub-regions, and the image feature is extracted for each pixel in each sub-region. Then, create a statistical histogram for the feature in each subarea. In this way, a statistical histogram can be used to describe each subarea. The entire image is composed of several statistical histograms. You can use the histogram to describe the image.

Improved version of the original

The basic idea of the scheme is to sum up the results after comparing the pixels of the image and the pixels around the image. Use this pixel as the center to compare the threshold values of adjacent pixels. If the brightness of the center pixel is greater than or equal to that of its adjacent pixels, mark it as 1; otherwise, mark it as 0. You can use binary numbers to represent each pixel, such as 11001111. Therefore, because there are eight adjacent pixels, you may eventually get 2 ^ 8 possible combinations, known as the Local Binary mode, and sometimes referred to as the lbcode.


Original

However, this mechanism has limited ability to describe features and does not have rotation immutability. It is easy to imagine that if the image is rotated, the value of the HSV will also change. Therefore, we have made the following improvements.

#

In order to reduce the encoding mode, the encoded results generated after the same encoding mode is rotated (Cyclic Displacement, bitwise rotation) are encoded into the same value, that is, the minimum value in these rotation results.


Rotate the unchanged

The following code modes are available:


Uniform lbalgorithm

The number is P.(P-1) + 2, P is the number of neighboring pixels. For 8 sampling points, the uniform format has 58 outputs.
A large number of experiments have proved that the distribution of 36 cases in a single image varies frequently, and the results are not very good. Therefore, we propose the uniform lb5.
First, we will introduce what is uniform, which refers to a very small amount of space conversion in a uniform ring structure. We define U (pattern) to record the number of space conversions, that is, the number of 0-1 changes.
If the value of 0-1 is less than or equal to the binary code twice, the system considers the binary code of 0-1 as an uniform guid. For example, the number of changes in the value of 112.1611,01 is twice. It is an uniform guid.
Why do we need to propose such an uniform lbps, because the researchers found that theyMost of the calculated values are among the 58 types, which can reach more than 90%. Therefore, they divide the values into 59 categories, 58 uniform pattern categories, and all other values into 59th categories.59 = (2 + 0 + 56) + 1, so that the histogram changes from the original 256 dimension to 59 dimension. Started* Dimensionality Reduction
And can reduce the impact of high-frequency noise.



Rotate the unchanged uniform HSV Algorithm

The number is p + 1. For the eight sampling points, the unirom-based rotation-unchanged Image Processing (BPS) has only nine outputs.
In this mode, for the uniform lbps, each row is rotated and encoded as a value.


The process of extracting the feature vectors from the image by rotating the unchanged uniform lbps
  1. First, the detection window is divided into 16 × 16 small areas (cells)
  2. For one pixel in each cell, compare the gray value of the adjacent eight pixels with it. If the surrounding pixel value is greater than the center pixel value, the position of the pixel is marked as 1, otherwise, it is 0. In this way, after comparing the eight points in the 3*3 neighborhood, we can generate 8-bit binary numbers, that is, we can get the HSV value of the central pixel of the window.
  3. Then calculate the histogram of each cell, that is, the occurrence frequency of each number (assumed to be the number of digits in decimal place in the place of the string). Then normalize the histogram.
  4. Finally, the statistical histogram of each cell is connected to a feature vector, that is, the feature vector of the whole image.

Reprinted, please indicate the author Jason Ding and its source
GitHub home (http://jasonding1354.github.io /)
Csdn blog (http://blog.csdn.net/jasonding1354)
Home (http://www.jianshu.com/users/2bd9b48f6ea8/latest_articles)

Computer Vision: texture features

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.