Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
62a564bf
Commit
62a564bf
authored
May 14, 2013
by
Davis King
Browse files
Slightly simplified the interfaces of jet() and heatmap().
parent
6375eae2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
0 deletions
+60
-0
dlib/image_transforms/colormaps.h
dlib/image_transforms/colormaps.h
+24
-0
dlib/image_transforms/colormaps_abstract.h
dlib/image_transforms/colormaps_abstract.h
+36
-0
No files found.
dlib/image_transforms/colormaps.h
View file @
62a564bf
...
@@ -125,6 +125,18 @@ namespace dlib
...
@@ -125,6 +125,18 @@ namespace dlib
return
matrix_op
<
op
>
(
op
(
img
,
max_val
,
min_val
));
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
>
template
<
typename
T
>
...
@@ -209,6 +221,18 @@ namespace dlib
...
@@ -209,6 +221,18 @@ namespace dlib
return
matrix_op
<
op
>
(
op
(
img
,
max_val
,
min_val
));
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
));
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
}
}
...
...
dlib/image_transforms/colormaps_abstract.h
View file @
62a564bf
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
namespace
dlib
namespace
dlib
{
{
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template
<
template
<
...
@@ -31,6 +32,7 @@ namespace dlib
...
@@ -31,6 +32,7 @@ namespace dlib
- The returned matrix will have the same dimensions as img.
- The returned matrix will have the same dimensions as img.
!*/
!*/
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
template
<
template
<
...
@@ -54,6 +56,23 @@ namespace dlib
...
@@ -54,6 +56,23 @@ namespace dlib
- The returned matrix will have the same dimensions as img.
- 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
<
template
<
...
@@ -77,6 +96,23 @@ namespace dlib
...
@@ -77,6 +96,23 @@ namespace dlib
- The returned matrix will have the same dimensions as img.
- 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)
!*/
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment