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
faf30fd9
Commit
faf30fd9
authored
Dec 05, 2011
by
Jayke Meijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Checnged Gaussian to standard method of NDimage.
parent
18251667
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
9 deletions
+5
-9
docs/presentatie.tex
docs/presentatie.tex
+0
-1
src/GaussianFilter.py
src/GaussianFilter.py
+4
-7
src/GaussianFilterTest.py
src/GaussianFilterTest.py
+1
-1
No files found.
docs/presentatie.tex
View file @
faf30fd9
...
...
@@ -7,7 +7,6 @@
\title
{
Local Binary Patterns
}
\begin{document}
\section
{
Wat zijn Local Binary Patterns
}
\begin{frame}
...
...
src/GaussianFilter.py
View file @
faf30fd9
from
GrayscaleImage
import
GrayscaleImage
from
scipy.ndimage
import
convolve1d
from
scipy.ndimage
import
gaussian_filter
from
pylab
import
ceil
,
zeros
,
pi
,
exp
,
sqrt
,
array
class
GaussianFilter
:
...
...
@@ -27,14 +27,11 @@ class GaussianFilter:
def
get_filtered_copy
(
self
,
image
):
"""Apply a gaussian blur to an image, to suppress noise."""
kernel
=
self
.
get_1d_gaussian_kernel
()
image
=
convolve1d
(
image
.
data
,
kernel
,
axis
=
0
,
mode
=
'nearest'
)
return
GrayscaleImage
(
None
,
convolve1d
(
image
,
kernel
,
axis
=
1
,
mode
=
'nearest'
))
image
=
gaussian_filter
(
image
.
data
,
self
.
scale
)
return
GrayscaleImage
(
None
,
image
)
def
filter
(
self
,
image
):
kernel
=
self
.
get_1d_gaussian_kernel
()
image
.
data
=
convolve1d
(
image
.
data
,
kernel
,
axis
=
0
,
mode
=
'nearest'
)
image
.
data
=
convolve1d
(
image
.
data
,
kernel
,
axis
=
1
,
mode
=
'nearest'
)
image
.
data
=
gaussian_filter
(
image
.
data
,
self
.
scale
)
def
get_scale
(
self
):
return
self
.
scale
...
...
src/GaussianFilterTest.py
View file @
faf30fd9
from
FilterNoise
import
GaussianFilter
from
GaussianFilter
import
GaussianFilter
from
GrayscaleImage
import
GrayscaleImage
image
=
GrayscaleImage
(
'../images/plate.png'
)
...
...
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