Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
8e318190
Commit
8e318190
authored
Nov 23, 2013
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added float_spatially_filter_image_separable() to the public API.
parent
9d3e40a6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
spatial_filtering.h
dlib/image_transforms/spatial_filtering.h
+0
-0
spatial_filtering_abstract.h
dlib/image_transforms/spatial_filtering_abstract.h
+40
-0
No files found.
dlib/image_transforms/spatial_filtering.h
View file @
8e318190
This diff is collapsed.
Click to expand it.
dlib/image_transforms/spatial_filtering_abstract.h
View file @
8e318190
...
...
@@ -129,6 +129,46 @@ namespace dlib
you can use this form of the function it can give a decent speed boost.
!*/
// ----------------------------------------------------------------------------------------
template
<
typename
in_image_type
,
typename
out_image_type
,
typename
EXP1
,
typename
EXP2
>
rectangle
float_spatially_filter_image_separable
(
const
in_image_type
&
in_img
,
out_image_type
&
out_img
,
const
matrix_exp
<
EXP1
>&
row_filter
,
const
matrix_exp
<
EXP2
>&
col_filter
,
out_image_type
&
scratch
,
bool
add_to
=
false
);
/*!
requires
- in_image_type == is an implementation of array2d/array2d_kernel_abstract.h
- out_image_type == is an implementation of array2d/array2d_kernel_abstract.h
- in_img, out_img, row_filter, and col_filter must all contain float type elements.
- is_same_object(in_img, out_img) == false
- row_filter.size() != 0
- col_filter.size() != 0
- is_vector(row_filter) == true
- is_vector(col_filter) == true
ensures
- This function is identical to the above spatially_filter_image_separable()
function except that it can only be invoked on float images with float
filters. In fact, spatially_filter_image_separable() invokes
float_spatially_filter_image_separable() in those cases. So why is
float_spatially_filter_image_separable() in the public API? The reason is
because the separable filtering routines internally allocate an image each
time they are called. If you want to avoid this memory allocation then you
can call float_spatially_filter_image_separable() and provide the scratch
image as input. This allows you to reuse the same scratch image for many
calls to float_spatially_filter_image_separable() and thereby avoid having it
allocated and freed for each call.
!*/
// ----------------------------------------------------------------------------------------
template
<
...
...
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