title: How to implement the gradient gaussian blur?
body: <p>I want to implement the <em>gradient</em> gaussian blur effect. By <em>gradient</em>, I mean the same effect as Photoshop. Take the following image as an example:</p>
  <p><a href="https://i.stack.imgur.com/pIoQJ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pIoQJ.jpg" alt="Gradient Gaussian Blur image" /></a><br />
  <sub>(source: <a href="http://www.photokaboom.com/images/Photoshop_Elements/dof/blur_the_background_with_gradient/bleachers_blurred.jpg" rel="nofollow noreferrer">photokaboom.com</a>)</sub></p>
  <p>The blurriness of the image reduces as the y coordinate increases (take the top-left point as origin).</p>
  <p>I know how to use kernel and FFT to implement normal guassian blur, but I don't know how to change the degree on blurriness with the change of y coordinate. I've tried to split the image into different lines (in the direction of y-axis) and apply different kernel to these blocks, but the effect is quite annoying in the joint part of these lines.</p>
  <p>I've also tried the calculate the result pixel one by one, and fill the kernel on the run, the effect is quite good, but the algorithm is simply too slow!!</p>
  <p>So I wonder how to implement a fast gradient gaussian blur algorithm?</p>
  <p>Big thanks!</p>