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
39ed906c
"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "b821f006d025b72654223b32e6bf0c49afed371d"
Commit
39ed906c
authored
Oct 03, 2013
by
Davis King
Browse files
Made resize_image() overload a little more robust.
parent
c07f4e55
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
dlib/image_transforms/interpolation.h
dlib/image_transforms/interpolation.h
+2
-1
No files found.
dlib/image_transforms/interpolation.h
View file @
39ed906c
...
@@ -537,6 +537,7 @@ namespace dlib
...
@@ -537,6 +537,7 @@ namespace dlib
);
);
typedef
typename
image_type1
::
type
T
;
typedef
typename
image_type1
::
type
T
;
typedef
typename
image_type2
::
type
U
;
const
double
x_scale
=
(
in_img
.
nc
()
-
1
)
/
(
double
)
std
::
max
<
long
>
((
out_img
.
nc
()
-
1
),
1
);
const
double
x_scale
=
(
in_img
.
nc
()
-
1
)
/
(
double
)
std
::
max
<
long
>
((
out_img
.
nc
()
-
1
),
1
);
const
double
y_scale
=
(
in_img
.
nr
()
-
1
)
/
(
double
)
std
::
max
<
long
>
((
out_img
.
nr
()
-
1
),
1
);
const
double
y_scale
=
(
in_img
.
nr
()
-
1
)
/
(
double
)
std
::
max
<
long
>
((
out_img
.
nr
()
-
1
),
1
);
double
y
=
-
y_scale
;
double
y
=
-
y_scale
;
...
@@ -547,7 +548,7 @@ namespace dlib
...
@@ -547,7 +548,7 @@ namespace dlib
const
long
bottom
=
std
::
min
(
top
+
1
,
in_img
.
nr
()
-
1
);
const
long
bottom
=
std
::
min
(
top
+
1
,
in_img
.
nr
()
-
1
);
const
double
tb_frac
=
y
-
top
;
const
double
tb_frac
=
y
-
top
;
double
x
=
-
x_scale
;
double
x
=
-
x_scale
;
if
(
!
pixel_traits
<
T
>::
rgb
)
if
(
!
pixel_traits
<
U
>::
rgb
)
{
{
for
(
long
c
=
0
;
c
<
out_img
.
nc
();
++
c
)
for
(
long
c
=
0
;
c
<
out_img
.
nc
();
++
c
)
{
{
...
...
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