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
f2cc77aa
"git@developer.sourcefind.cn:OpenDAS/fastmoe.git" did not exist on "a807e2a3bc62267c158d10a81a264ace5129c865"
Commit
f2cc77aa
authored
Dec 01, 2013
by
Davis King
Browse files
Added convenience overloads of pyramid_up() that work in place.
parent
13058b1b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
0 deletions
+68
-0
dlib/image_transforms/interpolation.h
dlib/image_transforms/interpolation.h
+30
-0
dlib/image_transforms/interpolation_abstract.h
dlib/image_transforms/interpolation_abstract.h
+38
-0
No files found.
dlib/image_transforms/interpolation.h
View file @
f2cc77aa
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
#include "../pixel.h"
#include "../pixel.h"
#include "../matrix.h"
#include "../matrix.h"
#include "assign_image.h"
#include "assign_image.h"
#include "image_pyramid.h"
#include "../simd.h"
#include "../simd.h"
namespace
dlib
namespace
dlib
...
@@ -1251,6 +1252,35 @@ namespace dlib
...
@@ -1251,6 +1252,35 @@ namespace dlib
pyramid_up
(
in_img
,
out_img
,
pyr
,
interpolate_bilinear
());
pyramid_up
(
in_img
,
out_img
,
pyr
,
interpolate_bilinear
());
}
}
// ----------------------------------------------------------------------------------------
template
<
typename
image_type
,
typename
pyramid_type
>
void
pyramid_up
(
image_type
&
img
,
const
pyramid_type
&
pyr
)
{
image_type
temp
;
pyramid_up
(
img
,
temp
,
pyr
);
temp
.
swap
(
img
);
}
// ----------------------------------------------------------------------------------------
template
<
typename
image_type
>
void
pyramid_up
(
image_type
&
img
)
{
pyramid_down
<
2
>
pyr
;
pyramid_up
(
img
,
pyr
);
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
}
}
...
...
dlib/image_transforms/interpolation_abstract.h
View file @
f2cc77aa
...
@@ -745,6 +745,44 @@ namespace dlib
...
@@ -745,6 +745,44 @@ namespace dlib
- performs: pyramid_up(in_img, out_img, pyr, interpolate_bilinear());
- performs: pyramid_up(in_img, out_img, pyr, interpolate_bilinear());
!*/
!*/
// ----------------------------------------------------------------------------------------
template
<
typename
image_type
,
typename
pyramid_type
>
void
pyramid_up
(
image_type
&
img
,
const
pyramid_type
&
pyr
);
/*!
requires
- image_type == is an implementation of array2d/array2d_kernel_abstract.h
- pyramid_type == a type compatible with the image pyramid objects defined
in dlib/image_transforms/image_pyramid_abstract.h
ensures
- Performs an in-place version of pyramid_up() on the given image. In
particular, this function is equivalent to:
pyramid_up(img, temp, pyr);
temp.swap(img);
!*/
// ----------------------------------------------------------------------------------------
template
<
typename
image_type
>
void
pyramid_up
(
image_type
&
img
);
/*!
requires
- image_type == is an implementation of array2d/array2d_kernel_abstract.h
ensures
- performs: pyramid_up(img, pyramid_down<2>());
(i.e. it upsamples the given image and doubles it in size.)
!*/
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
}
}
...
...
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