From 9069f30a6df3c8f3320de6c7881a664a6fa9fc44 Mon Sep 17 00:00:00 2001 From: Davis King Date: Sun, 17 Aug 2014 19:30:15 -0400 Subject: [PATCH] minor code cleanup --- dlib/image_transforms/segment_image.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/dlib/image_transforms/segment_image.h b/dlib/image_transforms/segment_image.h index 078463978..3b57e4801 100644 --- a/dlib/image_transforms/segment_image.h +++ b/dlib/image_transforms/segment_image.h @@ -125,22 +125,19 @@ namespace dlib // ------------------------------------------------------------------------------------ - namespace impl + template + struct uint8_or_uint16_pixels { - template - struct uint8_or_uint16_pixels - { - typedef typename image_view_type::pixel_type pixel_type; - const static bool value = is_same_type::value || - is_same_type::value; - }; - } + typedef typename image_view_type::pixel_type pixel_type; + const static bool value = is_same_type::value || + is_same_type::value; + }; // 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 // instead of quicksort. template - typename enable_if >::type + typename enable_if >::type get_pixel_edges ( const in_image_type& in_img, std::vector >& sorted_edges @@ -253,7 +250,7 @@ namespace dlib // This is the general purpose version of get_pixel_edges(). It handles all pixel types. template - typename disable_if >::type + typename disable_if >::type get_pixel_edges ( const in_image_type& in_img, std::vector >& sorted_edges