Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
skin_detector
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
人工智能
skin_detector
Commits
dae63825
Commit
dae63825
authored
Jan 18, 2017
by
WillBrennan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added outline of unit tests
parent
eb7c58fe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
__init__.py
skin_detector/__init__.py
+4
-3
test_unit.py
tests/skin_detector/test_unit.py
+11
-5
No files found.
skin_detector/__init__.py
View file @
dae63825
...
...
@@ -2,7 +2,9 @@
# -*- coding: utf-8 -*-
__author__
=
'willbrennan'
from
skin_detector
import
process
from
skin_detector
import
*
from
scripts
import
display
__all__
=
[
"process"
,
"display"
]
\ No newline at end of file
__all__
=
[
"process"
,
"display"
,
"get_hsv_mask"
,
"get_rgb_mask"
,
"get_ycrcb_mask"
,
"grab_cut_mask"
,
"grab_cut_mask"
,
"closing"
]
tests/skin_detector/test_unit.py
View file @
dae63825
import
cv2
import
numpy
import
skin_detector
def
test_get_hsv_mask
():
img
=
cv2
.
imread
(
"../test_image.png"
)
assert
True
mask
=
skin_detector
.
get_hsv_mask
(
img
)
assert
img
.
shape
[:
2
]
==
mask
.
shape
def
test_get_rgb_mask
():
img
=
cv2
.
imread
(
"../test_image.png"
)
assert
True
mask
=
skin_detector
.
get_rgb_mask
(
img
)
assert
img
.
shape
[:
2
]
==
mask
.
shape
def
test_get_ycrcb_mask
():
img
=
cv2
.
imread
(
"../test_image.png"
)
assert
True
mask
=
skin_detector
.
get_ycrcb_mask
(
img
)
assert
img
.
shape
[:
2
]
==
mask
.
shape
def
test_grab_cut_mask
():
img
=
cv2
.
imread
(
"../test_image.png"
)
assert
True
def
test_closing
():
img
=
cv2
.
imread
(
"../test_image.png"
)
assert
True
def
test_process
():
img
=
cv2
.
imread
(
"../test_image.png"
)
assert
True
\ No newline at end of file
assert
True
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