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
39ed906c
Commit
39ed906c
authored
Oct 04, 2013
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made resize_image() overload a little more robust.
parent
c07f4e55
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
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
);
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
y_scale
=
(
in_img
.
nr
()
-
1
)
/
(
double
)
std
::
max
<
long
>
((
out_img
.
nr
()
-
1
),
1
);
double
y
=
-
y_scale
;
...
...
@@ -547,7 +548,7 @@ namespace dlib
const
long
bottom
=
std
::
min
(
top
+
1
,
in_img
.
nr
()
-
1
);
const
double
tb_frac
=
y
-
top
;
double
x
=
-
x_scale
;
if
(
!
pixel_traits
<
T
>::
rgb
)
if
(
!
pixel_traits
<
U
>::
rgb
)
{
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