如何将A面的一部分添加到B面的一部分,最重要的是匹配色调 [英] how to add part of Face A to Part of face B, most importantly matching color tones

查看:67
本文介绍了如何将A面的一部分添加到B面的一部分,最重要的是匹配色调的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经成功地检测到人脸,裁剪并粘贴到新图像中但是我一直在寻找一种将人脸A的色调与人脸B混合的方法。

i have been successful in detecting faces, cropping and pasting in new imageHow ever i am looking a way to mix color tone of face A to Face B.

因此,如果您看着脸b,则裁剪后的图像色调与脸部不匹配B脸色。
我怎么能做到最大匹配%。
拥有确切的解决方案会很好,但是链接或方法将不胜感激。我可以提供裁剪和粘贴的代码。

So, if you look and face b, cropped image color tone not matching to face B face color. how can i do this to max % matching. It would be good to have exact solution, however links or approach will be appreciated. I can provide code for cropping and pasting.

谢谢

推荐答案

由于它似乎对您有所帮助,请按照我的回答此处所述 https://stackoverflow.com/a淡化图像的边缘/ 24722397/3659846 可能是一件好事。

Since it seemed to be helpful for you, fading the edges of the images as described in my answer here https://stackoverflow.com/a/24722397/3659846 could be a good thing.

要为您的特定问题提供更多的答案,我会尝试计算平均颜色值,然后计算一些增量值,通过该值可以调整另一幅图像的每个像素,以获得相同的平均颜色值。这当然不是完美的,因为您可能想找到一种方法来将其限制为仅肤色,但这应该为您提供一个起点...

To provide a bit more of an answer to your specific question, I'd try calculating the average color value of one image and then calculate some delta values by which to adjust every pixel of the other image to get the same average color value. This will of course not be perfect, since you might want to find a way to limit it to skin-colors only, but it should give you a starting point...

这篇关于如何将A面的一部分添加到B面的一部分,最重要的是匹配色调的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆