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, ImageView
img = load("sample-images/cats-3061372_640.jpg");
img_area_range = 320:640
img_area = img[:, img_area_range]
img_area = imfilter(img_area, Kernel.gaussian(5))
img[:, img_area_range] = img_area
imshow(img)
The resulting output is as follows:

Julia's implementation of the Gaussian kernel takes a single value representing the area around the pixel and replaces the target pixel with the median value. The kernel size should be a positive integer, with 1 representing minimal smoothing.
In the following code, we will try to achieve an Instagram-like video effect when videos that don't fit into a box are increased in size and their borders are blurred. We will start by loading an image, creating top and bottom paddings, and, finally, blurring them:
using Images, ImageView
border_size = 50
gaussian_kernel_value = 10
img = load("sample-images/cats-3061372_640.jpg");
# add borders
img = padarray(img, Pad(:reflect, border_size, 0))
img = parent(img) # reset the indices after using padarray
# apply blurring to top border
img_area_top = 1:border_size
img[img_area_top, :] = imfilter(img[img_area_top, :], Kernel.gaussian(gaussian_kernel_value))
# apply blurring to bottom border
img_area_bottom = size(img, 1)-border_size:size(img, 1)
img[img_area_bottom, :] = imfilter(img[img_area_bottom, :], Kernel.gaussian(gaussian_kernel_value))
imshow(img)
The resulting image is as follows:

You can see that we used content nicely to enlarge the image and smoothen to get it to a size we want.