how to add part of Face A to Part of face B, most importantly matching color tones

孤者浪人 提交于 2019-12-08 11:31:29

问题


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.

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.

Thanks


回答1:


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...



来源:https://stackoverflow.com/questions/28379168/how-to-add-part-of-face-a-to-part-of-face-b-most-importantly-matching-color-ton

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!