Blending Artifacts in Photo Stitching
I have solved this problem by adding certain padding to overlap area.

There are pixels belonging to image1, image2, background and overlap. A pixels in overlap are successively relabeled to either image1 or image2 depending on neighborhood.

This padding will make some space for the blurring so that sharp edges of the overlap have no change of appearing.

Another treat is photometric calibration, i.e. gain compensation and vignetting removal. This minimizes or even eliminates the differences in low frequency band.

Finally, the blurring have to avoid background pixels (usually black) from bleeding into the image. This can be done by alpha blending or using binary mask as described here.

It is also possible to reduce amount of blurring near edges and corners of the overlap. This, unfortunately, reduces performance of the blending algorithm and the results are somewhat uncontrolled (as the blurring is non-uniform).

Finally, a gradient domain blending improves the quality near edges as it does not rely on Gaussian blurs of fixed sizes.