Commit 3c527ad5 authored by 吴升宇's avatar 吴升宇

fix skin_detector

parent 14ab11e3
...@@ -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
...@@ -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]):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment