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
32ebe06e
Commit
32ebe06e
authored
Aug 21, 2016
by
Davis King
Browse files
Made the coordinate mapping between pyramid layers slightly more accurate.
parent
095d3e0c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
dlib/image_transforms/image_pyramid.h
dlib/image_transforms/image_pyramid.h
+3
-3
No files found.
dlib/image_transforms/image_pyramid.h
View file @
32ebe06e
...
@@ -847,7 +847,7 @@ namespace dlib
...
@@ -847,7 +847,7 @@ namespace dlib
)
const
)
const
{
{
const
double
ratio
=
(
N
-
1.0
)
/
N
;
const
double
ratio
=
(
N
-
1.0
)
/
N
;
return
p
*
ratio
;
return
(
p
-
0.3
)
*
ratio
;
}
}
template
<
typename
T
>
template
<
typename
T
>
...
@@ -856,7 +856,7 @@ namespace dlib
...
@@ -856,7 +856,7 @@ namespace dlib
)
const
)
const
{
{
const
double
ratio
=
N
/
(
N
-
1.0
);
const
double
ratio
=
N
/
(
N
-
1.0
);
return
p
*
ratio
;
return
p
*
ratio
+
0.3
;
}
}
// -----------------------------
// -----------------------------
...
@@ -941,7 +941,7 @@ namespace dlib
...
@@ -941,7 +941,7 @@ namespace dlib
COMPILE_TIME_ASSERT
(
pixel_traits
<
out_pixel_type
>::
has_alpha
==
false
);
COMPILE_TIME_ASSERT
(
pixel_traits
<
out_pixel_type
>::
has_alpha
==
false
);
set_image_size
(
down
,
((
N
-
1
)
*
num_rows
(
original
))
/
N
,
((
N
-
1
)
*
num_columns
(
original
))
/
N
);
set_image_size
(
down
,
((
N
-
1
)
*
num_rows
(
original
))
/
N
+
0.5
,
((
N
-
1
)
*
num_columns
(
original
))
/
N
+
0.5
);
resize_image
(
original
,
down
);
resize_image
(
original
,
down
);
}
}
...
...
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