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
3c527ad5
Commit
3c527ad5
authored
May 21, 2019
by
吴升宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix skin_detector
parent
14ab11e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
README.md
README.md
+16
-0
skin_detector.py
skin_detector/skin_detector.py
+1
-2
No files found.
README.md
View file @
3c527ad5
...
@@ -35,3 +35,18 @@ cv2.waitKey(0)
...
@@ -35,3 +35,18 @@ cv2.waitKey(0)
## Based Upon
## Based Upon
[
Skin Segmentation Using Multiple Thresholds
](
http://www.ivl.disco.unimib.it/papers2003/EI06-EI109%20Skin-paper.pdf
)
[
Skin Segmentation Using Multiple Thresholds
](
http://www.ivl.disco.unimib.it/papers2003/EI06-EI109%20Skin-paper.pdf
)
## 使用
pip install git+ssh://git@git.wanmeizhensuo.com/wushengyu/skin_detector.git@master
```python
import cv2
import skin_detector
source_path = "xxxx.jpg"
target_path = "xxxx.jpg"
img = cv2.imread(source_path)
img = skin_detector(img)
cv2.imwrite(target_path)
```
\ No newline at end of file
skin_detector/skin_detector.py
View file @
3c527ad5
...
@@ -149,8 +149,7 @@ def process(img, thresh=0.5, debug=False):
...
@@ -149,8 +149,7 @@ def process(img, thresh=0.5, debug=False):
return
mask
return
mask
def
skin_to_white
(
img_path
):
def
skin_to_white
(
image
):
image
=
cv2
.
imread
(
img_path
)
mask
=
process
(
image
,
thresh
=
0.5
)
mask
=
process
(
image
,
thresh
=
0.5
)
for
i
in
range
(
0
,
mask
.
shape
[
0
]):
for
i
in
range
(
0
,
mask
.
shape
[
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