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
f2cc77aa
Commit
f2cc77aa
authored
Dec 01, 2013
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added convenience overloads of pyramid_up() that work in place.
parent
13058b1b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
0 deletions
+68
-0
interpolation.h
dlib/image_transforms/interpolation.h
+30
-0
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 @@
#include "../pixel.h"
#include "../matrix.h"
#include "assign_image.h"
#include "image_pyramid.h"
#include "../simd.h"
namespace
dlib
...
...
@@ -1251,6 +1252,35 @@ namespace dlib
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
- 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