Blurring images

In image enhancement, a Gaussian blur is a widely used approach to reduce image details and achieve a blurring effect. It is a non-linear operation that varies across target pixels and areas.

In order to apply a Gaussian blur in Julia, we will be using the Gaussian kernel and imfilter function from the ImageFiltering.jl package. In the following code, we will blur the second half of the image and preview the difference:

using Images, ImageViewimg = load("sample-images/cats-3061372_640.jpg");img_area_range = 320:640img_area = img[:, img_area_range]img_area = imfilter(img_area, Kernel.gaussian(5))img[:, img_area_range] = img_areaimshow(img)

The resulting output is as follows:

Julia's implementation of the Gaussian kernel takes ...

Get Hands-On Computer Vision with Julia now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.