Commit 68f95a19 authored by Davis King's avatar Davis King

Simplified sum_filter_assign() interface.

parent d8509d39
...@@ -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);
} }
......
...@@ -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)).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment