arivis Scientific Image Analysis
Akhil Purohit Oct 13, 2023 1:26:23 PM 8 min read

Denoising images using kuwahara filter

Noise is an unfortunate result of data acquisition and it comes in many forms and from many sources. For scientific images (e.g. microscope, MRI, and EBSD),Gaussian noise arises from electronic components including detectors and sensors. In addition, salt & pepper noise may also show up from analog to digital conversion errors. Therefore, image denoising is one of the primary preprocessing operations that a researcher performs before proceeding with extracting information out of these images.

Over the years many techniques have been proposed to denoise images that work on spatial and frequency domains. Each technique brings its own advantages and disadvantages. Therefore, the user needs to understand these techniques to leverage their strengths effectively.

Kuwahara is a spatial filtering technique that performs non-linear image smoothing which results in adaptive noise reduction of the input image. In other words, Kuwahara is a noise reduction technique and is recommended for applications where edge preservation is important.

How Kuwahara filter works

The Kuwahara kernel is a square with odd numbered dimensions and overlapping regions. Figure 1 depicts a 5x5 Kuwahara kernel. The3x3 pixels at the top / bottom on the left and right represent 4 separate regions, respectively, with overlapping regions between them. The center pixel represents all 4 regions. Kuwahara is a non-linear filter as the operator picks the region with minimal variance to represent the entire window.

5e4e7ea398756e898e3d5019_1Figure 1. 5x5Kuwahara Filter Kernel

For example, in Figure 2 if the central pixel is located on the right side (1) of the line (edge) it will take the mean value of the pixels on the right-hand side. Similarly, it takes the mean value of the left-hand side if the central pixel is located on the left of the line (2).  If the central pixel is located on the line,it takes the mean value of the region with least variance (less textured). Kuwahara ensures edge preservation by considering the homogeneity of the region.

5e4e7f4d27fd31302a802ee7_2Figure 2. Kuwahara kernels around an edge

Application areas

Kuwahara filter is extensively used for applications that require edge preservation. In fact, EBSD community has been using Kuwahara since the inception of the technique to denoise Kikuchi patterns.


5e4e7fe58a4b18bd9f7976a8_4Figure 3. Noisyand Kuwahara filtered (k=5) EBSD Kikuchi patterns

The filter is also effective at denoising light and electron microscopy images acquired from materials or life sciences samples.


5e4e842de559809271d2ca70_6Figure 4. Noisyand Kuwahara filtered (k=5) light microscopy images from a life sciences sample (Osteosarcoma)

Limitations of Kuwahara filter

While Kuwahara is very effective at low kernel sizes, larger kernel sizes (typically > 7) result in cartoonish (blocky)output images. This blocky structure is especially evident in textured regions.The ‘blockiness’ arises from the fact that the Kuwahara kernel is divided into 4 primary square shaped regions around the top / bottom left and right corners.This problem has been addressed by some researchers by dividing the kernel into non-square shaped regions and also by replacing local averages with weighted local averages. But, many other alternatives exist for denoising that may work better for larger kernel sizes. Non-local means, total variation, bilateral, and block-matching 3D filtering (BM3D) are a few better alternatives for image denoising.  


Akhil Purohit

External Communications