Commit 12e01302 authored by Davis King's avatar Davis King

Added missing requires clause to hysteresis_threshold()

parent a07b2323
......@@ -182,11 +182,12 @@ namespace dlib
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,
"\tvoid hysteresis_threshold(in_img, out_img, lower_thresh, upper_thresh)"
<< "\n\tYou can't use an upper_thresh that is less than your lower_thresh"
<< "\n\tlower_thresh: " << lower_thresh
<< "\n\tupper_thresh: " << upper_thresh
<< "\n\tis_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
......
......@@ -89,6 +89,7 @@ namespace dlib
- pixel_traits<typename in_image_type::type>::has_alpha == false
- pixel_traits<typename out_image_type::type>::has_alpha == false
- lower_thresh <= upper_thresh
- is_same_object(in_img, out_img) == false
ensures
- #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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment