face_merge_master icon indicating copy to clipboard operation
face_merge_master copied to clipboard

黑色色块问题

Open leemengxing opened this issue 5 years ago • 5 comments

在经过morph_img处理之后,出现黑色色块,但我看你给的图片并没有出现这种情况。按代码注释最后添加颜色矫正并不能解决这个问题,有什么建议吗?谢谢

leemengxing avatar Oct 21 '19 11:10 leemengxing

可以在morph之前和之后分别进行一次correct_color。

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: leemengxing <[email protected]> 发送时间: 2019年10月21日 19:37 收件人: tonyiweb/face_merge_master <[email protected]> 抄送: Subscribed <[email protected]> 主题: 回复:[tonyiweb/face_merge_master] 黑色色块问题 (#5)

在经过morph_img处理之后,出现黑色色块,但我看你给的图片并没有出现这种情况。按代码注释最后添加颜色矫正并不能解决这个问题,有什么建议吗?谢谢

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

tonyiweb avatar Oct 23 '19 11:10 tonyiweb

感谢回复,我试一试效果,后续有问题再跟您交流

leemengxing avatar Oct 23 '19 12:10 leemengxing

并未发生变化,您可以把自己运行调通的代码,没有黑色色块的代码发给我一份吗?十分感谢

leemengxing avatar Oct 23 '19 12:10 leemengxing

你好,请问有解决黑色色块的问题吗?谢谢

jo-dean avatar Jul 05 '21 07:07 jo-dean

I've solved this problem which is caused by slightly incorrect realization of triangulation. Go to this URL and replace the function <measure_triangle> with

def measure_triangle(image, points):
    delaunay = spatial.Delaunay(points)
    triangle = delaunay.simplices
    return triangle

Before that, you must state import scipy.spatial as spatial at the beginning of the code. After using this implementation, the black block will disappear but there are still some failed samples.

WudiJoey avatar Sep 08 '22 08:09 WudiJoey