Commit 9069f30a authored by Davis King's avatar Davis King

minor code cleanup

parent 0b5cb827
...@@ -125,8 +125,6 @@ namespace dlib ...@@ -125,8 +125,6 @@ namespace dlib
// ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------
namespace impl
{
template <typename image_view_type> template <typename image_view_type>
struct uint8_or_uint16_pixels struct uint8_or_uint16_pixels
{ {
...@@ -134,13 +132,12 @@ namespace dlib ...@@ -134,13 +132,12 @@ namespace dlib
const static bool value = is_same_type<pixel_type,uint8>::value || const static bool value = is_same_type<pixel_type,uint8>::value ||
is_same_type<pixel_type,uint16>::value; is_same_type<pixel_type,uint16>::value;
}; };
}
// This is an overload of get_pixel_edges() that is optimized to segment images // This is an overload of get_pixel_edges() that is optimized to segment images
// with 8bit or 16bit pixels very quickly. We do this by using a radix sort // with 8bit or 16bit pixels very quickly. We do this by using a radix sort
// instead of quicksort. // instead of quicksort.
template <typename in_image_type, typename T> template <typename in_image_type, typename T>
typename enable_if<impl::uint8_or_uint16_pixels<in_image_type> >::type typename enable_if<uint8_or_uint16_pixels<in_image_type> >::type
get_pixel_edges ( get_pixel_edges (
const in_image_type& in_img, const in_image_type& in_img,
std::vector<segment_image_edge_data_T<T> >& sorted_edges std::vector<segment_image_edge_data_T<T> >& sorted_edges
...@@ -253,7 +250,7 @@ namespace dlib ...@@ -253,7 +250,7 @@ namespace dlib
// This is the general purpose version of get_pixel_edges(). It handles all pixel types. // This is the general purpose version of get_pixel_edges(). It handles all pixel types.
template <typename in_image_type, typename T> template <typename in_image_type, typename T>
typename disable_if<impl::uint8_or_uint16_pixels<in_image_type> >::type typename disable_if<uint8_or_uint16_pixels<in_image_type> >::type
get_pixel_edges ( get_pixel_edges (
const in_image_type& in_img, const in_image_type& in_img,
std::vector<segment_image_edge_data_T<T> >& sorted_edges std::vector<segment_image_edge_data_T<T> >& sorted_edges
......
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