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
1f4813bb
Commit
1f4813bb
authored
Dec 05, 2011
by
Jayke Meijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed now obsolete function from GaussianFilter
parent
faf30fd9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
18 deletions
+0
-18
src/GaussianFilter.py
src/GaussianFilter.py
+0
-18
No files found.
src/GaussianFilter.py
View file @
1f4813bb
...
...
@@ -7,24 +7,6 @@ class GaussianFilter:
def
__init__
(
self
,
scale
):
self
.
scale
=
scale
def
gaussian
(
self
,
x
):
"""Return the value of a 1D Gaussian function for a given x."""
return
exp
(
-
(
x
**
2
/
(
2
*
self
.
scale
**
2
)))
\
/
(
sqrt
(
2
*
pi
)
*
self
.
scale
)
def
get_1d_gaussian_kernel
(
self
):
"""Sample a one-dimensional Gaussian function of scale s."""
radius
=
int
(
ceil
(
3
*
self
.
scale
))
size
=
2
*
radius
+
1
result
=
zeros
(
size
)
# Sample the Gaussian function
result
=
array
([
self
.
gaussian
(
x
-
radius
)
for
x
in
xrange
(
size
)])
# The sum of all kernel values is equal to one
result
/=
result
.
sum
()
return
result
def
get_filtered_copy
(
self
,
image
):
"""Apply a gaussian blur to an image, to suppress noise."""
image
=
gaussian_filter
(
image
.
data
,
self
.
scale
)
...
...
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