Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
62a564bf
Commit
62a564bf
authored
May 15, 2013
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Slightly simplified the interfaces of jet() and heatmap().
parent
6375eae2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
0 deletions
+60
-0
colormaps.h
dlib/image_transforms/colormaps.h
+24
-0
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
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
));
}
// ----------------------------------------------------------------------------------------
}
...
...
dlib/image_transforms/colormaps_abstract.h
View file @
62a564bf
...
...
@@ -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)
!*/
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
}
...
...
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