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
71ab04f7
Commit
71ab04f7
authored
Jul 26, 2016
by
sutr90
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added missing conversion between HSI and CIELab.
parent
385bcb76
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
pixel.h
dlib/pixel.h
+26
-0
No files found.
dlib/pixel.h
View file @
71ab04f7
...
...
@@ -1241,6 +1241,18 @@ namespace dlib
assign_pixel_helpers
::
assign
(
dest
,
temp
);
}
template
<
typename
P1
,
typename
P2
>
typename
enable_if_c
<
pixel_traits
<
P1
>::
hsi
&&
pixel_traits
<
P2
>::
lab
>::
type
assign
(
P1
&
dest
,
const
P2
&
src
)
{
rgb_pixel
temp
;
// convert lab value to our temp rgb pixel
assign_pixel_helpers
::
assign
(
temp
,
src
);
// now we can just go assign the new rgb value to the
// hsi pixel
assign_pixel_helpers
::
assign
(
dest
,
temp
);
}
// -----------------------------
// dest is an lab pixel
template
<
typename
P1
>
...
...
@@ -1293,6 +1305,20 @@ namespace dlib
// hsi pixel
assign_pixel_helpers
::
assign
(
dest
,
temp
);
}
template
<
typename
P1
,
typename
P2
>
typename
enable_if_c
<
pixel_traits
<
P1
>::
lab
&&
pixel_traits
<
P2
>::
hsi
>::
type
assign
(
P1
&
dest
,
const
P2
&
src
)
{
rgb_pixel
temp
;
// convert hsi value to our temp rgb pixel
assign_pixel_helpers
::
assign
(
temp
,
src
);
// now we can just go assign the new rgb value to the
// lab pixel
assign_pixel_helpers
::
assign
(
dest
,
temp
);
}
}
// -----------------------------
...
...
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