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
fa865c21
Commit
fa865c21
authored
Aug 03, 2016
by
sutr90
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests for Lab pixels.
parent
933ab009
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
0 deletions
+68
-0
pixel.cpp
dlib/test/pixel.cpp
+68
-0
No files found.
dlib/test/pixel.cpp
View file @
fa865c21
...
@@ -253,6 +253,74 @@ namespace
...
@@ -253,6 +253,74 @@ namespace
DLIB_TEST
(
p_rgb
.
green
==
119
);
DLIB_TEST
(
p_rgb
.
green
==
119
);
DLIB_TEST
(
p_rgb
.
blue
==
119
);
DLIB_TEST
(
p_rgb
.
blue
==
119
);
//Lab limit values test
//red, green, blue, yellow, black, white
p_lab
.
l
=
0
;
p_lab
.
a
=
0
;
p_lab
.
b
=
0
;
assign_pixel
(
p_rgb
,
p_lab
);
DLIB_TEST
(
p_rgb
.
red
==
0
);
DLIB_TEST
(
p_rgb
.
green
==
64
);
DLIB_TEST
(
p_rgb
.
blue
==
194
);
p_lab
.
l
=
255
;
p_lab
.
a
=
0
;
p_lab
.
b
=
0
;
assign_pixel
(
p_rgb
,
p_lab
);
DLIB_TEST
(
p_rgb
.
red
==
0
);
DLIB_TEST
(
p_rgb
.
green
==
255
);
DLIB_TEST
(
p_rgb
.
blue
==
255
);
p_lab
.
l
=
0
;
p_lab
.
a
=
255
;
p_lab
.
b
=
0
;
assign_pixel
(
p_rgb
,
p_lab
);
DLIB_TEST
(
p_rgb
.
red
==
0
);
DLIB_TEST
(
p_rgb
.
green
==
0
);
DLIB_TEST
(
p_rgb
.
blue
==
195
);
p_lab
.
l
=
0
;
p_lab
.
a
=
0
;
p_lab
.
b
=
255
;
assign_pixel
(
p_rgb
,
p_lab
);
DLIB_TEST
(
p_rgb
.
red
==
0
);
DLIB_TEST
(
p_rgb
.
green
==
45
);
DLIB_TEST
(
p_rgb
.
blue
==
0
);
p_lab
.
l
=
255
;
p_lab
.
a
=
255
;
p_lab
.
b
=
0
;
assign_pixel
(
p_rgb
,
p_lab
);
DLIB_TEST
(
p_rgb
.
red
==
255
);
DLIB_TEST
(
p_rgb
.
green
==
139
);
DLIB_TEST
(
p_rgb
.
blue
==
255
);
p_lab
.
l
=
0
;
p_lab
.
a
=
255
;
p_lab
.
b
=
255
;
assign_pixel
(
p_rgb
,
p_lab
);
DLIB_TEST
(
p_rgb
.
red
==
132
);
DLIB_TEST
(
p_rgb
.
green
==
0
);
DLIB_TEST
(
p_rgb
.
blue
==
0
);
p_lab
.
l
=
255
;
p_lab
.
a
=
0
;
p_lab
.
b
=
255
;
assign_pixel
(
p_rgb
,
p_lab
);
DLIB_TEST
(
p_rgb
.
red
==
0
);
DLIB_TEST
(
p_rgb
.
green
==
255
);
DLIB_TEST
(
p_rgb
.
blue
==
0
);
p_lab
.
l
=
255
;
p_lab
.
a
=
255
;
p_lab
.
b
=
255
;
assign_pixel
(
p_rgb
,
p_lab
);
DLIB_TEST
(
p_rgb
.
red
==
255
);
DLIB_TEST
(
p_rgb
.
green
==
70
);
DLIB_TEST
(
p_rgb
.
blue
==
0
);
assign_pixel
(
p_rgba
,
100
);
assign_pixel
(
p_rgba
,
100
);
assign_pixel
(
p_gray
,
10
);
assign_pixel
(
p_gray
,
10
);
assign_pixel
(
p_schar
,
10
);
assign_pixel
(
p_schar
,
10
);
...
...
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