Commit 62a564bf authored by Davis King's avatar Davis King

Slightly simplified the interfaces of jet() and heatmap().

parent 6375eae2
......@@ -125,6 +125,18 @@ namespace dlib
return matrix_op<op>(op(img,max_val,min_val));
}
template <
typename image_type
>
const matrix_op<op_heatmap<image_type> >
heatmap (
const image_type& img
)
{
typedef op_heatmap<image_type> op;
return matrix_op<op>(op(img,max(mat(img)),0));
}
// ----------------------------------------------------------------------------------------
template <typename T>
......@@ -209,6 +221,18 @@ namespace dlib
return matrix_op<op>(op(img,max_val,min_val));
}
template <
typename image_type
>
const matrix_op<op_jet<image_type> >
jet (
const image_type& img
)
{
typedef op_jet<image_type> op;
return matrix_op<op>(op(img,max(mat(img)),0));
}
// ----------------------------------------------------------------------------------------
}
......
......@@ -10,6 +10,7 @@
namespace dlib
{
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template <
......@@ -31,6 +32,7 @@ namespace dlib
- The returned matrix will have the same dimensions as img.
!*/
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template <
......@@ -54,6 +56,23 @@ namespace dlib
- The returned matrix will have the same dimensions as img.
!*/
// ----------------------------------------------------------------------------------------
template <
typename image_type
>
const matrix_exp heatmap (
const image_type& img
);
/*!
requires
- image_type is an implementation of array2d/array2d_kernel_abstract.h
- pixel_traits<image_type::type> must be defined
ensures
- returns heatmap(img, max(mat(img)), 0)
!*/
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template <
......@@ -77,6 +96,23 @@ namespace dlib
- The returned matrix will have the same dimensions as img.
!*/
// ----------------------------------------------------------------------------------------
template <
typename image_type
>
const matrix_exp jet (
const image_type& img
);
/*!
requires
- image_type is an implementation of array2d/array2d_kernel_abstract.h
- pixel_traits<image_type::type> must be defined
ensures
- returns jet(img, max(mat(img)), 0)
!*/
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
}
......
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