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
12e01302
Commit
12e01302
authored
May 27, 2011
by
Davis King
Browse files
Added missing requires clause to hysteresis_threshold()
parent
a07b2323
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
dlib/image_transforms/thresholding.h
dlib/image_transforms/thresholding.h
+2
-1
dlib/image_transforms/thresholding_abstract.h
dlib/image_transforms/thresholding_abstract.h
+1
-0
No files found.
dlib/image_transforms/thresholding.h
View file @
12e01302
...
@@ -182,11 +182,12 @@ namespace dlib
...
@@ -182,11 +182,12 @@ namespace dlib
COMPILE_TIME_ASSERT
(
pixel_traits
<
typename
out_image_type
::
type
>::
grayscale
);
COMPILE_TIME_ASSERT
(
pixel_traits
<
typename
out_image_type
::
type
>::
grayscale
);
DLIB_ASSERT
(
lower_thresh
<=
upper_thresh
,
DLIB_ASSERT
(
lower_thresh
<=
upper_thresh
&&
is_same_object
(
in_img
,
out_img
)
==
false
,
"
\t
void hysteresis_threshold(in_img, out_img, lower_thresh, upper_thresh)"
"
\t
void hysteresis_threshold(in_img, out_img, lower_thresh, upper_thresh)"
<<
"
\n\t
You can't use an upper_thresh that is less than your lower_thresh"
<<
"
\n\t
You can't use an upper_thresh that is less than your lower_thresh"
<<
"
\n\t
lower_thresh: "
<<
lower_thresh
<<
"
\n\t
lower_thresh: "
<<
lower_thresh
<<
"
\n\t
upper_thresh: "
<<
upper_thresh
<<
"
\n\t
upper_thresh: "
<<
upper_thresh
<<
"
\n\t
is_same_object(in_img,out_img): "
<<
is_same_object
(
in_img
,
out_img
)
);
);
// if there isn't any input image then don't do anything
// if there isn't any input image then don't do anything
...
...
dlib/image_transforms/thresholding_abstract.h
View file @
12e01302
...
@@ -89,6 +89,7 @@ namespace dlib
...
@@ -89,6 +89,7 @@ namespace dlib
- pixel_traits<typename in_image_type::type>::has_alpha == false
- pixel_traits<typename in_image_type::type>::has_alpha == false
- pixel_traits<typename out_image_type::type>::has_alpha == false
- pixel_traits<typename out_image_type::type>::has_alpha == false
- lower_thresh <= upper_thresh
- lower_thresh <= upper_thresh
- is_same_object(in_img, out_img) == false
ensures
ensures
- #out_img == the hysteresis thresholded version of in_img (in_img is converted to a
- #out_img == the hysteresis thresholded version of in_img (in_img is converted to a
grayscale intensity image if it is color). Pixels in in_img with grayscale
grayscale intensity image if it is color). Pixels in in_img with grayscale
...
...
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