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
55b8e5b2
"...text-generation-inference.git" did not exist on "3f14cd1420fd30287d34320fd68b2779794b3010"
Commit
55b8e5b2
authored
Dec 10, 2016
by
Davis King
Browse files
Added an overload of flip_image_left_right() that operates inplace.
parent
b66cf7b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
0 deletions
+38
-0
dlib/image_transforms/interpolation.h
dlib/image_transforms/interpolation.h
+15
-0
dlib/image_transforms/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
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
<
...
...
dlib/image_transforms/interpolation_abstract.h
View file @
55b8e5b2
...
...
@@ -440,6 +440,29 @@ namespace dlib
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
<
...
...
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