-
Notifications
You must be signed in to change notification settings - Fork 14
Home
宅教授 edited this page Jun 25, 2019
·
12 revisions
Welcome to the unet wiki!
- 分割——获取头发的所在区域。
- 染发——保持亮度,转换颜色。
原图:im
![](https://raw.githubusercontent.com/zhaipro/unet/master/screenshots/14.jpg)
目标:mask
![](https://raw.githubusercontent.com/zhaipro/unet/master/screenshots/mask.jpg)
分割美发:im * (mask / 255)
![](https://user-images.githubusercontent.com/8620842/59971125-c42f7680-95a8-11e9-82ab-d3c1d32825ed.jpg)
分割非美发:im * (1 - mask / 255)
![](https://user-images.githubusercontent.com/8620842/59971134-e6c18f80-95a8-11e9-9b47-46ac283c80e5.jpg)
染发:f(im * (mask / 255), mask)
![](https://user-images.githubusercontent.com/8620842/59971189-f8576700-95a9-11e9-8e94-b807c12c4d4c.jpg)
拼装:im * (1 - mask / 255) + f(im * (mask / 255), mask)
![](https://raw.githubusercontent.com/zhaipro/unet/master/screenshots/h.14.jpg)
- 获取亮度。等等,啥叫亮度?巴拉巴拉,啊,我知道了,
x = max(r, g, b)
。 - 提升亮度。等等,亮度有限,不能超越255呀!巴拉巴拉,
x = 1 - (1 - x) ^ alpha
未完待续…