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
f35a90c8
Commit
f35a90c8
authored
Oct 02, 2013
by
Davis King
Browse files
Added missing assert
parent
b8de7f5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
dlib/image_transforms/interpolation.h
dlib/image_transforms/interpolation.h
+7
-0
No files found.
dlib/image_transforms/interpolation.h
View file @
f35a90c8
...
@@ -529,6 +529,13 @@ namespace dlib
...
@@ -529,6 +529,13 @@ namespace dlib
interpolate_bilinear
interpolate_bilinear
)
)
{
{
// make sure requires clause is not broken
DLIB_ASSERT
(
is_same_object
(
in_img
,
out_img
)
==
false
,
"
\t
void resize_image()"
<<
"
\n\t
Invalid inputs were given to this function."
<<
"
\n\t
is_same_object(in_img, out_img): "
<<
is_same_object
(
in_img
,
out_img
)
);
typedef
typename
image_type1
::
type
T
;
typedef
typename
image_type1
::
type
T
;
const
double
x_scale
=
(
img
.
nc
()
-
1
)
/
(
double
)
std
::
max
<
long
>
((
out
.
nc
()
-
1
),
1
);
const
double
x_scale
=
(
img
.
nc
()
-
1
)
/
(
double
)
std
::
max
<
long
>
((
out
.
nc
()
-
1
),
1
);
const
double
y_scale
=
(
img
.
nr
()
-
1
)
/
(
double
)
std
::
max
<
long
>
((
out
.
nr
()
-
1
),
1
);
const
double
y_scale
=
(
img
.
nr
()
-
1
)
/
(
double
)
std
::
max
<
long
>
((
out
.
nr
()
-
1
),
1
);
...
...
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