Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference

ID 790148
Date 3/22/2024
Public
Document Table of Contents

Local Binary Pattern (LBP) Operator

The local binary pattern (LBP) operator transforms an image into an array, or to an image with integer labels. Integer labels describe small-scale view of the image. For grayscale images, these labels represent a texture descriptor of the image. Integer labels statistics are used for image analysis. Changes of the monotonic gray level do not affect the LBP operator.

Intel® IPP functions described in this section use LBP operators with mask size 3x3 and 5x5.

The LBPImageMode functions support four modes of LBP calculation set by the mode parameter. The LBPImage functions compute LBP similar to the LBPImageMode functions with the mode value equal to 1.

The LBP operator with 3x3 mask uses neighborhood consisting of eight pixels, as shown in the figures below.

mode=0:



mode=1:



mode=2:



mode=3:



The LBP operator with 5x5 mask uses neighborhood consisting of 16 pixels, as shown in the figures below.

mode=0:



mode=1:



mode=2:



mode=3:



In the above figures:

  • Numbers indicate the position of the corresponding bit in a resulting label
  • The A letter indicates the anchor point position.

The LBP operator does the following when processing an image:

  • Compares each pixel neighboring to the anchor with the anchor pixel in accordance with the neighboring pixel order. If the neighboring pixel value is more than, or equal to the anchor point value, the result is 1. If the neighboring pixel value is less than the anchor point value, the result is 0.
  • Puts the result of comparison to the corresponding bit of the resulting label, as shown in the figure below.