0% found this document useful (0 votes)
21 views61 pages

PAT02_LocalBinaryPatterns

The document discusses Local Binary Patterns (LBP) as a method for image processing, focusing on coding, mapping, and histogram techniques. It includes examples of texture images and applications in face recognition, detailing how LBP features are extracted from image partitions. The training set consists of multiple classes and images, with a structured approach to feature extraction resulting in a comprehensive feature vector for classification.

Uploaded by

alex
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views61 pages

PAT02_LocalBinaryPatterns

The document discusses Local Binary Patterns (LBP) as a method for image processing, focusing on coding, mapping, and histogram techniques. It includes examples of texture images and applications in face recognition, detailing how LBP features are extracted from image partitions. The training set consists of multiple classes and images, with a structured approach to feature extraction resulting in a comprehensive feature vector for classification.

Uploaded by

alex
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 61

Reconocimiento de Patrones

Local Binary Patterns


[ Capítulo 2 ]

Domingo Mery

Departmento de Ciencia de la Computación


Escuela de Ingeniería
Universidad Católica de Chile
Local Binary Patterns

1. Coding
2. Mapping
3. Histogram

IMAGE 1 2 3 FEATURE
Local Binary Patterns

1. Coding
2. Mapping
3. Histogram

IMAGE 1 2 3 FEATURE
4 6 9 6 4 6

9 6 4 9 9 9

9 6 2 2 9 2

10 10 10 10 10 10
4 6 9 6 4 6

9 6 4 9 9 9

9 6 2 2 9 2

10 10 10 10 10 10
4 6 9 6 4 6

9 6 4 9 9 9

9 6 2 2 9 2

10 10 10 10 10 10
4 6 9 6 4 6

9 6 4 9 9 9

9 6 2 2 9 2

10 10 10 10 10 10

4 6 9 <

9 6 4

9 6 2
4 6 9 6 4 6

9 6 4 9 9 9

9 6 2 2 9 2

10 10 10 10 10 10

4 6 9 0

9 6 4

9 6 2
0: <
1: ≥
4 6 9 6 4 6

9 6 4 9 9 9

9 6 2 2 9 2

10 10 10 10 10 10

4 6 9 0 ≥

9 6 4

9 6 2
0: <
1: ≥
4 6 9 6 4 6

9 6 4 9 9 9

9 6 2 2 9 2

10 10 10 10 10 10

4 6 9 0 1

9 6 4

9 6 2
0: <
1: ≥
4 6 9 6 4 6

9 6 4 9 9 9

9 6 2 2 9 2

10 10 10 10 10 10

4 6 9 0 1 1

9 6 4

9 6 2
0: <
1: ≥
4 6 9 6 4 6

9 6 4 9 9 9

9 6 2 2 9 2

10 10 10 10 10 10

4 6 9 0 1 1

9 6 4 0

9 6 2
0: <
1: ≥
4 6 9 6 4 6

9 6 4 9 9 9

9 6 2 2 9 2

10 10 10 10 10 10

4 6 9 0 1 1

9 6 4 0

9 6 2 0
0: <
1: ≥
4 6 9 6 4 6

9 6 4 9 9 9

9 6 2 2 9 2

10 10 10 10 10 10

4 6 9 0 1 1

9 6 4 0

9 6 2 1 0
0: <
1: ≥
4 6 9 6 4 6

9 6 4 9 9 9

9 6 2 2 9 2

10 10 10 10 10 10

4 6 9 0 1 1

9 6 4 0

9 6 2 1 1 0
0: <
1: ≥
4 6 9 6 4 6

9 6 4 9 9 9

9 6 2 2 9 2

10 10 10 10 10 10

4 6 9 0 1 1

9 6 4 1 0

9 6 2 1 1 0
0: <
1: ≥
4 6 9 6 4 6

9 6 4 9 9 9

9 6 2 2 9 2

10 10 10 10 10 10

4 6 9 0 1 1 1 2 4

9 6 4 1 0 x 128 + 8 = 2+4+32+64+128 = 230


9 6 2 1 1 0 64 32 16
0: <
1: ≥
4 6 9 6 4 6

9 6 4 9 9 9

9 6 2 2 9 2

10 10 10 10 10 10

4 6 9 0 1 1 1 2 4

9 6 4 1 0 x 128 + 8 = 2+4+32+64+128 = 230


9 6 2 1 1 0 64 32 16
0: <
1: ≥
4 6 9 6 4 6

9 6 4 9 9 9 230

9 6 2 2 9 2

10 10 10 10 10 10

4 6 9 0 1 1 1 2 4

9 6 4 1 0 x 128 + 8 = 2+4+32+64+128 = 230


9 6 2 1 1 0 64 32 16
0: <
1: ≥
4 6 9 6 4 6

9 6 4 9 9 9 230 ?

9 6 2 2 9 2

10 10 10 10 10 10

6 9 6 1 2 4

6 4 9 x 128 + 8

6 2 2 64 32 16
0: <
1: ≥
4 6 9 6 4 6

9 6 4 9 9 9 230 207

9 6 2 2 9 2

10 10 10 10 10 10

6 9 6 1 1 1 1 2 4

6 4 9 1 1 x 128 + 8 = 1+2+4+8+64+128 = 207


6 2 2 1 0 0 64 32 16
0: <
1: ≥
4 6 9 6 4 6

9 6 4 9 9 9 230 207 ?

9 6 2 2 9 2

10 10 10 10 10 10
4 6 9 6 4 6

9 6 4 9 9 9 230 207 25

9 6 2 2 9 2

10 10 10 10 10 10

9 6 4 1 0 0 1 2 4

4 9 9 0 1 x 128 + 8 = 1+8+16 = 25
2 2 9 0 0 1 64 32 16
0: <
1: ≥
4 6 9 6 4 6

9 6 4 9 9 9 230 207 25 168

9 6 2 2 9 2

10 10 10 10 10 10
4 6 9 6 4 6

9 6 4 9 9 9 230 207 25 168

9 6 2 2 9 2 243

10 10 10 10 10 10
4 6 9 6 4 6

9 6 4 9 9 9 230 207 25 168

9 6 2 2 9 2 243 255

10 10 10 10 10 10
4 6 9 6 4 6

9 6 4 9 9 9 230 207 25 168

9 6 2 2 9 2 243 255 255

10 10 10 10 10 10
4 6 9 6 4 6

9 6 4 9 9 9 230 207 25 168

9 6 2 2 9 2 243 255 255 119

10 10 10 10 10 10
Local Binary Patterns

1. Coding
2. Mapping
3. Histogram

IMAGE 1 2 3 FEATURE
6 9 6

6 4 9

6 2 2

2
1 4
1 1 1

1 1 128 8
1 0 0

64 16
32
6 9 6

6 4 9

6 2 2

1 1 1

1 1

1 0 0
Uniform patterns

U=0
U=2
Uniform patterns 2 + 56 = 58
patterns

U=0 0 1
2
patterns
{0,1}

U=2 2 3 4 5 6 7 8
9
8x7 = 56
patterns

:
{2, 3, … 57}

Non-uniform patterns 256 -58 = 198


patterns
{58}

U=4 58 U=6 58 U=8 58

: : :
4 6 9 6 4 6

9 6 4 9 9 9 230 207 25 168 58 46 58 58

9 6 2 2 9 2 243 255 255 119 23 1 1 58

10 10 10 10 10 10

CODED MAPPED
IMAGE IMAGE IMAGE
Local Binary Patterns

1. Coding
2. Mapping
3. Histogram
CODED MAPPED
IMAGE IMAGE
IMAGE 1 2 3 FEATURE

x : {0, 1, …, 255} y : {0, 1, …, 58}


Local Binary Patterns

1. Coding
2. Mapping
3. Histogram
CODED MAPPED
IMAGE IMAGE
IMAGE 1 2 3 FEATURE
# pixels

...
MAPPED
IMAGE
Histogram

0 1 2 3
58

The image is described as a vector


of 59 elements. Similar images have
similar LBP features!!!
Local Binary Patterns

Examples
Texture Images
Local Binary Patterns

Examples
Face Recognition
In the training set there are k classes.

For each class we have n training images.

In this example there are 40 classes with 9 images each.

Each image we use w x w partitions

In each partition we extract LBP feature

1 2 3 4 ...
5 6 7 8 1 2 16

9 10 11
12
13 14 15 16 A face is described using a feature of 16 x 59 = 944
elements
Subject 1
TRAINING
... Training Data:
1
...
: : :
Table with:

... 9x40 = 360 rows

Subject : 16 x 59 = 944 columns


20

...
...
2
: : :
0
...

Subject
:
40

...
...
: : :

...
4
Subject 1

...
...
: : :

...

Subject :
20

...
...
: : :

...

Subject
:
40

...
...
: : :

...
Subject 1
TESTING
...
... 1 2 3 4

: : : 5 6 7
8 Who is this subject?
... 9 10
12
11

13 14 15 16

Subject :
20

... ...
1 16
...
2

: : :

...

Subject
:
40

...
...
: : :

...
Subject 1
TESTING
...
... 1 2 3 4

: : : 5 6 7
8 Who is this subject?
... 9 10
12
11

13 14 15 16

Subject :
20

... ...
...
: : :

...

Subject
:
40

...
...
: : :

...
Subject 1
Δ TESTING
... 920
... 781 1 2 3 4

: : : 5 6 7
8 Who is this subject?
... 699 9 10
12
11

13 14 15 16

Subject :
20

... 73
... 65
: : :

... 99

Subject
:
40

... 82
... 128
: : :

... 91
Subject 1
Δ TESTING
... 920
... 781 1 2 3 4

: : : 5 6 7
8 Who is this subject?
... 699 9 10
12
11

13 14 15 16

Subject :
20

... 73
... 65 Minimum
: : :

... 99

Subject
:
40

... 82
Strategy 1:
... 128 The nearest
: : :

... 91 neighbor
Strategy 2:
k – nearest neighbors
(knn)
Subject 1
Δ TESTING
... 920
... 781 1 2 3 4

: : : 5 6 7
8 Who is this subject?
... 699 9 10
12
11

13 14 15 16

Subject :
20

... 732nd Minimum > Subject 20


... 651 Minimum
st
> Subject 20
: : :

... 99

Subject
:
40

... 823 Minimum


rd
> Subject 40

... 128
: : :
Strategy 2:
... 91 k-nearest neighbor
Strategy 3:
smallest sample-class
distance
Subject 1
TESTING
...
... 1 2 3 4

: : : 5 6 7
8 Who is this subject?
... 9 10
12
11

13 14 15 16

Subject :
20

... ...
...
: : :

... Minimal distance

Subject
:
40

...
...
: : :

...
Subject 1
Δ TESTING
... 120
... 1 2 3 4

: : : 5 6 7
8 Who is this subject?
... 9 10
12
11

13 14 15 16

Subject :
20

... 23 ...
...
: : :

... Minimal distance

Subject
:
40

... 12
...
: : :

...
Subject 1
Δ TESTING
... 120
+
... 140 1 2 3 4

: : : 5 6 7
8 Who is this subject?
... 9 10
12
11

13 14 15 16

Subject :
20

... 23 ...
+
... 12
: : :

... Minimal distance

Subject
:
40

... 12
+
... 98
: : :

...
Subject 1
Δ TESTING
... 120
+
... 140 1 2 3 4

: : : : 5
8
6 7
Who is this subject?
... 120 9 10
12
11

13 14 15 16

Subject :
20

... 23 ...
+
... 12
: : :
+
... Minimal distance
19

Subject
:
40

... 12
+
... 98
: : :
+
... 123
Subject 1
Δ TESTING
... 120
+
... 140 1 2 3 4

: : : : 5
8
6 7
Who is this subject?
... 120 9 10
12
11

13 14 15 16

Subject :
20

... 23 ...
+
... 12
: : :
+
... 19

Subject
: = 54 Minimal total distance
40

... 12
+
... 98
: : :
+
... 123

You might also like