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
c1140af0
Commit
c1140af0
authored
Dec 02, 2011
by
Richard Torenvliet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
worked on test
parent
781de467
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
images/test9.png
images/test9.png
+0
-0
src/combined_test.py
src/combined_test.py
+12
-2
No files found.
images/test9.png
0 → 100644
View file @
c1140af0
1.18 KB
src/combined_test.py
View file @
c1140af0
...
...
@@ -3,6 +3,7 @@ from LocalBinaryPatternizer import LocalBinaryPatternizer
from
LetterCropper
import
LetterCropper
from
matplotlib.pyplot
import
imshow
,
subplot
,
show
,
axis
from
NormalizedImage
import
NormalizedImage
from
GaussianFilter
import
GaussianFilter
# Comment added by Richard Torenvliet
# Steps in this test files are
...
...
@@ -14,11 +15,15 @@ from NormalizedImage import NormalizedImage
# Image is now an instance of class GrayscaleImage
# GrayscaleImage has functions like resize, crop etc.
image
=
GrayscaleImage
(
"../images/test.png"
)
image
=
GrayscaleImage
(
"../images/test9.png"
)
filter
=
GaussianFilter
(
1.4
)
image
=
filter
.
get_filtered_copy
(
image
)
# Crops image; param threshold is optional: LetterCropper(image, threshold=0.9)
# image: GrayscaleImage, threshold: float
cropper
=
LetterCropper
(
image
,
0.9
)
cropper
=
LetterCropper
(
image
,
0.7
)
cropped_letter
=
cropper
.
get_cropped_letter
()
# Show difference in shape
...
...
@@ -29,11 +34,16 @@ print cropped_letter.shape
norm
=
NormalizedImage
(
cropped_letter
)
resized
=
norm
.
get_normalized_letter
()
print
resized
.
show
()
show
()
# Difference is noticable
print
resized
.
shape
lbp
=
LocalBinaryPatternizer
(
resized
)
feature_vector
=
lbp
.
create_features_vector
()
print
feature_vector
feature_vector
/=
255
# Prepare for displaying -> 0 - 255 -> 0 - 1
subplot
(
141
)
...
...
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