The objective is to replace a part of an image with another image. What I plan to do is to get the segment map of the original photo, and replace the selected part of the original with another image.
For example, This is a photo of the original photo's segment map:
And I want to replace that pink segment mask with another guy model (different person):
How should I do so about it? I am thinking of selecting an ROI based on the pink colour (RGB Values of 192,128,128) and bitwise_and
the two images? But I'm not too sure on how to do that, or if that's the best approach.
I am aware that the pink mask and the sample guy are not the exact fit, but I just want to be able to fit the model in the pink segment first, and perhaps scale or transform it afterwards.
Any suggestions will be great! Thank you!