Commit 2dd28ac0 authored by Davis King's avatar Davis King

Changed hysteresis_threshold() so it properly handles signed pixel types.

parent fe69a6e8
...@@ -173,8 +173,8 @@ namespace dlib ...@@ -173,8 +173,8 @@ namespace dlib
void hysteresis_threshold ( void hysteresis_threshold (
const in_image_type& in_img, const in_image_type& in_img,
out_image_type& out_img, out_image_type& out_img,
unsigned long lower_thresh, typename pixel_traits<typename in_image_type::type>::basic_pixel_type lower_thresh,
unsigned long upper_thresh typename pixel_traits<typename in_image_type::type>::basic_pixel_type upper_thresh
) )
{ {
COMPILE_TIME_ASSERT( pixel_traits<typename in_image_type::type>::has_alpha == false ); COMPILE_TIME_ASSERT( pixel_traits<typename in_image_type::type>::has_alpha == false );
...@@ -198,7 +198,6 @@ namespace dlib ...@@ -198,7 +198,6 @@ namespace dlib
} }
out_img.set_size(in_img.nr(),in_img.nc()); out_img.set_size(in_img.nr(),in_img.nc());
assign_all_pixels(out_img,0);
const long size = 50; const long size = 50;
long rstack[size]; long rstack[size];
......
...@@ -78,8 +78,8 @@ namespace dlib ...@@ -78,8 +78,8 @@ namespace dlib
void hysteresis_threshold ( void hysteresis_threshold (
const in_image_type& in_img, const in_image_type& in_img,
out_image_type& out_img, out_image_type& out_img,
unsigned long lower_thresh, typename pixel_traits<typename in_image_type::type>::basic_pixel_type lower_thresh,
unsigned long upper_thresh typename pixel_traits<typename in_image_type::type>::basic_pixel_type upper_thresh
); );
/*! /*!
requires requires
......
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