Warning: Use of undefined constant user_level - assumed 'user_level' (this will throw an Error in a future version of PHP) in /homepages/11/d274290037/htdocs/serabe/wp-content/plugins/ultimate-google-analytics/ultimate_ga.php on line 524
rinzelight 0.0.3, I wondered how hard addinga blur effect would be. So I started implementing it.
We are going to do two 1D blur. In first place, open a repl and start emacs (or vim). Use rinzelight.image for reading northern-lights.jpg
First, let’s start creating a
blur-kernel function with two parameters, width and sigma. Rinzelight lacks of a kernel-rank constant, so let’s add it. Open
src/rinzelight/constants and add the following line to the end:
Now, we are ready to write the
We get a horizontal kernel, which we will apply twice, one horizontally and one vertically. For getting a vertical kernel, we write one final function called
And now, we are ready to write the blur effect:
And this is the result of a
(blur (read-image "samples/northern-lights.jpg") 5 1.5 repeat-op rendering-quality):
And that's it!