Logo elodees  elodees

A caring AI for a better world













Only alphabetic characters accented or not as well as the space are accepted

Logo IA




Bilateral filter applied to an image





No account yet ?

Sign up to access all content




A bilateral filter is a nonlinear smoothing filter that preserves edges and reduces noise in images.

It replaces the intensity of each pixel with a weighted average of the intensity values of neighboring pixels.

This weight can be based on a Gaussian distribution.

The weights depend not only on the Euclidean distance of the pixels but also on the radiometric differences.

This preserves sharp edges.



Tested in Anaconda and Python 3.7

import cv2 
from matplotlib import pyplot as plt
 
# Read the image. 
img = cv2.imread('pexels-elias-de-carvalho-1375849.jpg') 
 
plt.imshow(cv2.cvtColor(img.astype('uint8'), cv2.COLOR_BGR2RGB))
plt.axis('off')
plt.title('Originale')
plt.show()
 
# Apply bilateral filter with d = 15,  
# sigmaColor = sigmaSpace = 75. 
bilateral = cv2.bilateralFilter(img, 20, 125, 125) 
 
# Save the output. 
# cv2.imwrite('frame_bilateral.jpg', bilateral) 
 
plt.imshow(cv2.cvtColor(bilateral.astype('uint8'), cv2.COLOR_BGR2RGB))
plt.axis('off')
plt.title('Bilateral')
plt.show()
 


Original image

Tensorflow playground

Filtered image - Bilateral

Tensorflow playground








Sorting of waste by image processing

Medical imaging by image processing

Characterization of a face

Recognition of objects by image processing

Image processing for autonomous vehicles

Image processing for industry

Image processing for agriculture













Welcome, my name is Eric Soupet and I am the administrator of the site elodees.com. elodees.com is a state of the art of Artificial Intelligence and aims to be collaborative, you can now offer content such as articles, events, tutorials, ... so don't hesitate !

Platform images credit : Pixabay - Pixabay License | Pexels - Pexels License