Pillow Articles

Found 5 articles

Applying Gaussian Blur to an image using the Pillow library

Prasad Naik
Prasad Naik
Updated on 25-Mar-2026 1K+ Views

In this tutorial, we will learn how to apply a Gaussian blur effect to images using Python's Pillow library. The ImageFilter.GaussianBlur() function creates a smooth blur effect by applying a Gaussian filter with a specified radius parameter. What is Gaussian Blur? Gaussian blur is a widely-used image processing technique that reduces image noise and detail by applying a mathematical function called a Gaussian kernel. The radius parameter controls the blur intensity — higher values create more blur. Algorithm Step 1: Import Image and ImageFilter from Pillow Step 2: Open the target image file Step 3: ...

Read More

Applying MaxFilter on an image using Pillow library

Prasad Naik
Prasad Naik
Updated on 25-Mar-2026 580 Views

In this program, we will apply a maximum filter on an image using the Pillow library. In maximum filtering, the value of each pixel in a selected window of the image is replaced by the maximum pixel value of that window. This creates a dilation effect that brightens the image and expands bright regions. What is MaxFilter? The MaxFilter is a morphological operation that replaces each pixel with the maximum value found in its neighborhood window. It's commonly used for noise removal and feature enhancement in image processing. Syntax ImageFilter.MaxFilter(size) Parameters: size ...

Read More

Loading and displaying an image using the Pillow library

Prasad Naik
Prasad Naik
Updated on 25-Mar-2026 279 Views

In this program, we will read or load an image using the Pillow library. The Pillow library provides the Image.open() method that takes the file path or filename as a string parameter. To display the image, we use the show() function which opens the image in the default image viewer. Installing Pillow First, install the Pillow library if you haven't already ? pip install Pillow Basic Image Loading and Display Here's how to load and display an image using Pillow ? from PIL import Image import io import base64 # ...

Read More

Calculating the mean of all pixels for each band in an image using the Pillow library

Prasad Naik
Prasad Naik
Updated on 25-Mar-2026 2K+ Views

In this tutorial, we will calculate the mean pixel values for each color channel in an image using Python's Pillow library. RGB images have three channels (Red, Green, Blue), so we'll get a list of three mean values representing the average intensity of each color channel. Original Image Algorithm Step 1: Import the Image and ImageStat libraries from PIL Step 2: Open the target image file Step 3: Create an ImageStat.Stat object from the image Step 4: Use the mean property to get average pixel values for each channel Example Here's ...

Read More

Importance of Decision Making

Amrinder Singh
Amrinder Singh
Updated on 19-Jul-2023 409 Views

Machine Learning is a fast growing field with the potential to transform how humans interact with technology. Using Machine Learning, Machines can learn from data and improve their performance over time, becoming more precise and efficient. However, for ML models to be successful, high-quality decisions must be made throughout the development and deployment processes. Decisions taken during ML development can have a major impact on the accuracy and efficiency of the system. For example, choosing the best ML algorithms and methodologies for a given task might have a considerable impact on system performance. Using the incorrect method or technique ...

Read More
Showing 1–5 of 5 articles
« Prev 1 Next »
Advertisements