Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.bio.vein
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.bio.vein
Commits
3a3d8eb3
Commit
3a3d8eb3
authored
7 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
Improve comments
parent
b92fd827
No related branches found
No related tags found
1 merge request
!35
3DFV and multiple fixes
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/bio/vein/utils.py
+11
-7
11 additions, 7 deletions
bob/bio/vein/utils.py
with
11 additions
and
7 deletions
bob/bio/vein/utils.py
+
11
−
7
View file @
3a3d8eb3
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
import
numpy
import
numpy
import
scipy.signal
import
scipy.signal
import
bob.ip.base
import
bob.sp
import
bob.sp
import
bob.core
import
bob.core
...
@@ -11,22 +10,27 @@ import bob.core
...
@@ -11,22 +10,27 @@ import bob.core
def
imfilter
(
a
,
b
):
def
imfilter
(
a
,
b
):
"""
Applies a 2D filtering between images
"""
Applies a 2D filtering between images
This implementation was created to work similarly like the Matlab one.
This implementation was created to work similarly like the Matlab one when
``boundary = replicate``. It filters the image ``a`` with the filter ``b`` by
applying it over an extended version of ``a``, expanded of ``b.shape`` on the
right and bottom, by repeating the values on ``a``
'
s borders.
The filter is then applied to the image considering only the ``valid`` range
with :py:func:`scipy.signal.convolve2d`.
Parameters:
Parameters:
a (numpy.ndarray): A 2-dimensional :py:class:`numpy.ndarray` which
a (numpy.ndarray): A 2-dimensional :py:class:`numpy.ndarray` which
represents the image to be filtered. The dtype of the array is supposed
represents the image to be filtered. The dtype of the array is supposed
to be 64-floats. You can also pass an 8-bit unsigned integer array,
to be 64-
bit
floats. You can also pass an 8-bit unsigned integer array,
loaded from a file (for example). In this case it will be scaled as
loaded from a file (for example). In this case it will be scaled as
with
with
:py:func:`bob.core.convert` and the range reset to ``[0.0, 1.0]``.
:py:func:`bob.core.convert` and the range reset to ``[0.0, 1.0]``.
b (numpy.ndarray): A 64-bit float 2-dimensional :py:class:`numpy.ndarray`
b (numpy.ndarray): A 64-bit float 2-dimensional :py:class:`numpy.ndarray`
which represents the filter to be applied to the image. The input filter
which represents the filter to be applied to the image. The input filter
has to be rotated by 180 degrees as we use
has to be rotated by 180 degrees as we use
:py:func:`scipy.signal.convolve2d` to apply it. You can rotate your
:py:func:`scipy.signal.convolve2d` to apply it.
filter ``b`` with the help of :py:func:`bob.ip.base.rotate`.
"""
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment