diff --git a/slides-alpha.py b/slides-alpha.py index 8527e39..458c36b 100755 --- a/slides-alpha.py +++ b/slides-alpha.py @@ -69,11 +69,13 @@ def slide_process_single(in_file, out_file, opts): y[-opts.bottom_border:, :] = np.zeros([opts.bottom_border, y.shape[1]], dtype=np.float32) # Expand outward - ye = scipy.signal.convolve2d(y, np.ones([5,5]), mode='same', boundary='fill', fillvalue=0) + r = np.max(y.shape) // 384 + ye = scipy.signal.convolve2d(y, np.ones([r,r]), mode='same', boundary='fill', fillvalue=0) ye = ye.clip(0.0, 1.0) - # Blue it - ye = scipy.ndimage.gaussian_filter(ye, 1.5, mode='nearest') + # Blur it + r = np.max(y.shape) / 1280 + ye = scipy.ndimage.gaussian_filter(ye, r, mode='nearest') # Recombine y = (y + ye).clip(0.0, 1.0)