windowed_image+=np.average(_np_src_image)*np_mask_rgb# / (1.-np.average(np_mask_rgb)) # rather than leave the masked area black, we get better results from fft by filling the average unmasked color
src_fft=_fft2(windowed_image)# get feature statistics from masked src img
src_dist=np.absolute(src_fft)
src_phase=src_fft/src_dist
noise_window=_get_gaussian_window(width,height,mode=1)# start with simple gaussian noise