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
55b8e5b2
Commit
55b8e5b2
authored
Dec 10, 2016
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added an overload of flip_image_left_right() that operates inplace.
parent
b66cf7b2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
0 deletions
+38
-0
interpolation.h
dlib/image_transforms/interpolation.h
+15
-0
interpolation_abstract.h
dlib/image_transforms/interpolation_abstract.h
+23
-0
No files found.
dlib/image_transforms/interpolation.h
View file @
55b8e5b2
...
@@ -1035,6 +1035,21 @@ namespace dlib
...
@@ -1035,6 +1035,21 @@ namespace dlib
return
find_affine_transform
(
from
,
to
);
return
find_affine_transform
(
from
,
to
);
}
}
// ----------------------------------------------------------------------------------------
template
<
typename
image_type
>
point_transform_affine
flip_image_left_right
(
image_type
&
img
)
{
image_type
temp
;
auto
tform
=
flip_image_left_right
(
img
,
temp
);
swap
(
temp
,
img
);
return
tform
;
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template
<
template
<
...
...
dlib/image_transforms/interpolation_abstract.h
View file @
55b8e5b2
...
@@ -440,6 +440,29 @@ namespace dlib
...
@@ -440,6 +440,29 @@ namespace dlib
corresponding location in #out_img.
corresponding location in #out_img.
!*/
!*/
// ----------------------------------------------------------------------------------------
template
<
typename
image_type
>
point_transform_affine
flip_image_left_right
(
image_type
&
img
);
/*!
requires
- image_type == an image object that implements the interface defined in
dlib/image_processing/generic_image.h
ensures
- This function is identical to the above version of flip_image_left_right()
except that it operates in-place.
- #img.nr() == img.nr()
- #img.nc() == img.nc()
- #img == a copy of img which has been flipped from left to right.
(i.e. it is flipped as if viewed though a mirror)
- returns a transformation object that maps points in img into their
corresponding location in #img.
!*/
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template
<
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