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
d2efb689
Commit
d2efb689
authored
Jun 20, 2018
by
Davis King
Browse files
Made hysteresis_threshold() return a uint8 image so it's consistent with
threshold_image().
parent
3aad318e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
tools/python/src/image.cpp
tools/python/src/image.cpp
+4
-4
No files found.
tools/python/src/image.cpp
View file @
d2efb689
...
@@ -580,23 +580,23 @@ std::vector<point> py_find_peaks2 (
...
@@ -580,23 +580,23 @@ std::vector<point> py_find_peaks2 (
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template
<
typename
T
>
template
<
typename
T
>
numpy_image
<
T
>
py_hysteresis_threshold
(
numpy_image
<
unsigned
char
>
py_hysteresis_threshold
(
const
numpy_image
<
T
>&
img
,
const
numpy_image
<
T
>&
img
,
T
lower_thresh
,
T
lower_thresh
,
T
upper_thresh
T
upper_thresh
)
)
{
{
numpy_image
<
T
>
out
;
numpy_image
<
unsigned
char
>
out
;
hysteresis_threshold
(
img
,
out
,
lower_thresh
,
upper_thresh
);
hysteresis_threshold
(
img
,
out
,
lower_thresh
,
upper_thresh
);
return
out
;
return
out
;
}
}
template
<
typename
T
>
template
<
typename
T
>
numpy_image
<
T
>
py_hysteresis_threshold2
(
numpy_image
<
unsigned
char
>
py_hysteresis_threshold2
(
const
numpy_image
<
T
>&
img
const
numpy_image
<
T
>&
img
)
)
{
{
numpy_image
<
T
>
out
;
numpy_image
<
unsigned
char
>
out
;
hysteresis_threshold
(
img
,
out
);
hysteresis_threshold
(
img
,
out
);
return
out
;
return
out
;
}
}
...
...
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