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

This commit is contained in:
Davis King 2011-05-30 10:51:20 -04:00
parent fe69a6e8c6
commit 2dd28ac0fe
2 changed files with 4 additions and 5 deletions

View File

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

View File

@ -78,8 +78,8 @@ namespace dlib
void hysteresis_threshold (
const in_image_type& in_img,
out_image_type& out_img,
unsigned long lower_thresh,
unsigned long upper_thresh
typename pixel_traits<typename in_image_type::type>::basic_pixel_type lower_thresh,
typename pixel_traits<typename in_image_type::type>::basic_pixel_type upper_thresh
);
/*!
requires