Commit b3178059 authored by Davis King's avatar Davis King

Added overload of hysteresis_threshold() that uses partition_pixels()

to select thresholds.
parent e340f1cb
......@@ -691,6 +691,22 @@ namespace dlib
}
}
template <
typename in_image_type,
typename out_image_type
>
void hysteresis_threshold (
const in_image_type& in_img,
out_image_type& out_img
)
{
using basic_pixel_type = typename pixel_traits<typename image_traits<in_image_type>::pixel_type>::basic_pixel_type;
basic_pixel_type t1, t2;
partition_pixels(in_img, t1, t2);
hysteresis_threshold(in_img, out_img, t1, t2);
}
// ----------------------------------------------------------------------------------------
}
......
......@@ -167,6 +167,29 @@ namespace dlib
- #out_img.nr() == in_img.nr()
!*/
template <
typename in_image_type,
typename out_image_type
>
void hysteresis_threshold (
const in_image_type& in_img,
out_image_type& out_img
);
/*!
requires
- in_image_type == an image object that implements the interface defined in
dlib/image_processing/generic_image.h
- out_image_type == an image object that implements the interface defined in
dlib/image_processing/generic_image.h
- pixel_traits<typename image_traits<out_image_type>::pixel_type>::grayscale == true
- pixel_traits<typename image_traits<in_image_type>::pixel_type>::has_alpha == false
- pixel_traits<typename image_traits<out_image_type>::pixel_type>::has_alpha == false
- is_same_object(in_img, out_img) == false
ensures
- performs: hysteresis_threshold(in_img, out_img, t1, t2) where the thresholds
are first obtained by calling partition_pixels(in_img, t1, t2).
!*/
// ----------------------------------------------------------------------------------------
}
......
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