Changed stitching for 'smooth' version - weighting overlapping areas with weights proportional to the distance from the edge of the patch.