You are on page 1of 10

LBP – LOCAL

BINARY PATTERN
ANISHA M. LAL
Local Binary Pattern (LBP)

• Local Binary Pattern (LBP) is a simple yet very


efficient texture operator which labels the pixels of an
image by thresholding the neighborhood of each pixel
and considers the result as a binary number.
• Due to its discriminative power and computational
simplicity, LBP texture operator has become a popular
approach in various applications.
Concept
• Divide the examined window to cells (e.g. 16x16
pixels for each cell).
• For each pixel in a cell, compare the pixel to each
of its 8 neighbors (on its left-top, left-middle, left-
bottom, right-top, etc.). Follow the pixels along a
circle, i.e. clockwise or counter-clockwise.
Concept
• Where the center pixel's value is greater than the
neighbor, write "1". Otherwise, write "0". This gives
an 8-digit binary number (which is usually converted
to decimal for convenience).
• Compute the histogram, over the cell, of the
frequency of each "number" occurring (i.e., each
combination of which pixels are smaller and which
are greater than the center).
Concept
• LBP Operations
Concept
• Illustration
Local Binary Pattern (LBP)
For each PIXEL of an image, a BINARY CODE is produced
 to make a new matrix with the new value (binary to
decimal value).
𝑃−1

𝐿𝐵𝑃𝑝,𝑟 𝑁𝑐 = 𝑔 𝑁𝑝 − 𝑁𝑐 2𝑝
𝑝=0
Computation of Local Binary Pattern
Binary code for > Nc
0 1 0
1 Nc 0
0 0 1
0 2 0
3 7 2 LBP
Component-wise 128 ? 0 ∑ 146
8 4 1 multiplication Sum
2 3 5 0 0 16
Representation
Neighborhood 1 2 4
of a gray-scale 128 8
image
64 32 16

Example of how the LBP operator works


top
Computation of LBP
(LSB)
0

1 1
Binary Pattern: 1 1 1 0 0 0
(MSB) (LSB)

1 x 27 1 x 26 1 x 25 1 x 24 0 x 23 0x 22 0x 21 1 x 20
= 128 = 64 = 32 = 16 =0 =0 =0 =1

LBP: 1 + 0 + 0 + 0 + 16 + 32 + 64 + 128 = 241

You might also like