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
d74e6733
Commit
d74e6733
authored
Nov 11, 2011
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Chancged usage of domainIterator.
parent
35093d9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/LBP.py
src/LBP.py
+4
-4
No files found.
src/LBP.py
View file @
d74e6733
...
...
@@ -5,10 +5,10 @@ from matplotlib.pyplot import imshow, show, axis
CELL_SIZE
=
16
def
domainIterator
(
imag
e
):
def
domainIterator
(
shap
e
):
"""Iterate over the pixels of an image."""
for
y
in
xrange
(
image
.
shape
[
0
]):
for
x
in
xrange
(
image
.
shape
[
1
]):
for
y
in
xrange
(
shape
[
0
]):
for
x
in
xrange
(
shape
[
1
]):
yield
y
,
x
# Divide the examined window to cells (e.g. 16x16 pixels for each cell).
...
...
@@ -42,7 +42,7 @@ def compare(image):
def
cmp_pixels
(
y
,
x
,
p
):
return
in_image
(
y
,
x
,
image
)
and
image
[
y
,
x
]
>
p
for
y
,
x
in
domainIterator
(
features
):
for
y
,
x
in
domainIterator
(
features
.
shape
):
p
=
image
[
y
,
x
]
# Walk around the pixel in counter-clokwise order, shifting 1 but less
...
...
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