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
bf86a3b2
"docs/vscode:/vscode.git/clone" did not exist on "be1147c08acde34d7a13b73f8d33e55c3f719de4"
Commit
bf86a3b2
authored
Mar 17, 2012
by
Davis King
Browse files
Made the code more robust so it works with pyramid_disable.
parent
4374c9cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
dlib/image_transforms/interpolation.h
dlib/image_transforms/interpolation.h
+7
-2
No files found.
dlib/image_transforms/interpolation.h
View file @
bf86a3b2
...
...
@@ -629,10 +629,15 @@ namespace dlib
rectangle
rect
=
get_rect
(
in_img
);
rectangle
uprect
=
pyr
.
rect_up
(
rect
,
levels
);
if
(
uprect
.
is_empty
())
{
out_img
.
clear
();
return
;
}
out_img
.
set_size
(
uprect
.
bottom
()
+
1
,
uprect
.
right
()
+
1
);
const
double
x_scale
=
(
rect
.
width
()
-
1
)
/
(
double
)(
uprect
.
width
()
-
1
);
const
double
y_scale
=
(
rect
.
height
()
-
1
)
/
(
double
)(
uprect
.
height
()
-
1
);
const
double
x_scale
=
(
rect
.
width
()
-
1
)
/
(
double
)
std
::
max
<
long
>
(
1
,
(
uprect
.
width
()
-
1
)
)
;
const
double
y_scale
=
(
rect
.
height
()
-
1
)
/
(
double
)
std
::
max
<
long
>
(
1
,
(
uprect
.
height
()
-
1
)
)
;
transform_image
(
in_img
,
out_img
,
interp
,
dlib
::
impl
::
helper_pyramid_up
(
x_scale
,
y_scale
,
uprect
.
tl_corner
()));
...
...
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