This project aims to blend a portion of one image onto another image by using gradients. By solving for the values of the blend source using least squares optimization, the source can be blended onto the target as seamlessly as possible.
My code solves for the optimal value for blending by:
The implementation blended images well, making the mask border virtually invisible. Two results that I liked are:
An example that does not work well is the following:
The color looks wildly off due to the island picture being taken in daylight conditions, and the seascape being taken in sunset conditions. The color temperature of the illumination in the blend source and target are different, resulting in the color in this case. Mitigations could include pre-processing the blend source through editing or style transferring.