Hide part of image using camera segmentation textures

How I can hide part of image like this effect which hide hair segmentation

Check out this tutorial from Dan Moller. He explains how to do background painting to fill in missing pieces of a face texture. You can use this same technique to fill in anything that is missing.