Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
68f95a19
Commit
68f95a19
authored
Feb 15, 2014
by
Davis King
Browse files
Simplified sum_filter_assign() interface.
parent
d8509d39
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
dlib/image_transforms/spatial_filtering.h
dlib/image_transforms/spatial_filtering.h
+1
-0
dlib/image_transforms/spatial_filtering_abstract.h
dlib/image_transforms/spatial_filtering_abstract.h
+2
-2
No files found.
dlib/image_transforms/spatial_filtering.h
View file @
68f95a19
...
@@ -1355,6 +1355,7 @@ namespace dlib
...
@@ -1355,6 +1355,7 @@ namespace dlib
const
rectangle
&
rect
const
rectangle
&
rect
)
)
{
{
out
.
set_size
(
img
.
nr
(),
img
.
nc
());
impl
::
sum_filter
<
false
>
(
img
,
out
,
rect
);
impl
::
sum_filter
<
false
>
(
img
,
out
,
rect
);
}
}
...
...
dlib/image_transforms/spatial_filtering_abstract.h
View file @
68f95a19
...
@@ -413,14 +413,14 @@ namespace dlib
...
@@ -413,14 +413,14 @@ namespace dlib
);
);
/*!
/*!
requires
requires
- out.nr() == img.nr()
- out.nc() == img.nc()
- image_type1 == an implementation of array2d/array2d_kernel_abstract.h
- image_type1 == an implementation of array2d/array2d_kernel_abstract.h
and it must contain a scalar type
and it must contain a scalar type
- image_type2 == an implementation of array2d/array2d_kernel_abstract.h
- image_type2 == an implementation of array2d/array2d_kernel_abstract.h
and it must contain a scalar type
and it must contain a scalar type
- is_same_object(img,out) == false
- is_same_object(img,out) == false
ensures
ensures
- #out.nr() == img.nr()
- #out.nc() == img.nc()
- for all valid r and c:
- for all valid r and c:
- let SUM(r,c) == sum of pixels from img which are inside the rectangle
- let SUM(r,c) == sum of pixels from img which are inside the rectangle
translate_rect(rect, point(c,r)).
translate_rect(rect, point(c,r)).
...
...
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