Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
licenseplates
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
licenseplates
Commits
292aefd4
Commit
292aefd4
authored
Dec 21, 2011
by
Richard Torenvliet
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:taddeus/licenseplates
parents
b063255e
6f5f0e40
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
23 deletions
+39
-23
docs/Makefile
docs/Makefile
+12
-0
docs/report.tex
docs/report.tex
+22
-22
src/LocalBinaryPatternizer.py
src/LocalBinaryPatternizer.py
+5
-1
src/generate_learning_set.py
src/generate_learning_set.py
+0
-0
No files found.
docs/Makefile
0 → 100644
View file @
292aefd4
RM
=
rm
-rf
all
:
plan.pdf report.pdf
plan.pdf
:
plan.tex
pdflatex
$^
report.pdf
:
report.tex
pdflatex
$^
clean
:
$(RM)
*
.pdf
*
.aux
*
.log
*
.out
*
.toc
docs/report.tex
View file @
292aefd4
...
...
@@ -16,7 +16,7 @@
\section*
{
Project members
}
Gijs van der Voort
\\
Richard Torenvliet
\\
R
a
ichard Torenvliet
\\
Jayke Meijer
\\
Tadde
\"
us Kroes
\\
Fabi
\"
en Tesselaar
...
...
src/LocalBinaryPatternizer.py
View file @
292aefd4
...
...
@@ -2,6 +2,7 @@ from Histogram import Histogram
from
math
import
ceil
class
LocalBinaryPatternizer
:
"""This class generates a Local Binary Pattern of a given image."""
def
__init__
(
self
,
image
,
cell_size
=
16
,
neighbours
=
3
):
self
.
cell_size
=
cell_size
...
...
@@ -23,6 +24,7 @@ class LocalBinaryPatternizer:
self
.
histograms
[
i
].
append
(
Histogram
(
self
.
bins
,
0
,
self
.
bins
))
def
pattern_3x3
(
self
,
y
,
x
,
value
):
"""Create the Local Binary Pattern in the (8,3)-neighbourhood."""
return
(
self
.
is_pixel_darker
(
y
-
1
,
x
-
1
,
value
)
<<
7
)
\
|
(
self
.
is_pixel_darker
(
y
-
1
,
x
,
value
)
<<
6
)
\
|
(
self
.
is_pixel_darker
(
y
-
1
,
x
+
1
,
value
)
<<
5
)
\
...
...
@@ -33,6 +35,7 @@ class LocalBinaryPatternizer:
|
(
self
.
is_pixel_darker
(
y
,
x
-
1
,
value
))
def
pattern_5x5_hybrid
(
self
,
y
,
x
,
value
):
"""Create the Local Binary Pattern in the (8,5)-neighbourhood."""
return
(
self
.
is_pixel_darker
(
y
-
2
,
x
-
2
,
value
)
<<
7
)
\
|
(
self
.
is_pixel_darker
(
y
-
2
,
x
,
value
)
<<
6
)
\
|
(
self
.
is_pixel_darker
(
y
-
2
,
x
+
2
,
value
)
<<
5
)
\
...
...
@@ -43,6 +46,7 @@ class LocalBinaryPatternizer:
|
(
self
.
is_pixel_darker
(
y
,
x
-
2
,
value
))
def
pattern_5x5
(
self
,
y
,
x
,
value
):
"""Create the Local Binary Pattern in the (12,5)-neighbourhood."""
return
(
self
.
is_pixel_darker
(
y
-
1
,
x
-
2
,
value
)
<<
11
)
\
|
(
self
.
is_pixel_darker
(
y
,
x
-
2
,
value
)
<<
10
)
\
|
(
self
.
is_pixel_darker
(
y
+
1
,
x
-
2
,
value
)
<<
9
)
\
...
...
src/
LearningSetGenerator
.py
→
src/
generate_learning_set
.py
100644 → 100755
View file @
292aefd4
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment