# Bilateral filtering using OpenCV

OpenCVPythonServer Side ProgrammingProgramming

In this program, we will perform bilateral filtering in an image. Bilateral filter is used for smoothening images and reducing noise, while preserving edges. We will use the bilateralFilter() function for this purpose. This function takes in diameter of each pixel, value of sigma in color space and value of sigma in coordinate space.

## Algorithm

Step 1: Import cv2.
Step 3: Call the bilateralfilter() function.
Step 4: Display the output.

## Example Code

import cv2

cv2.imshow('BilateralFilter', blur)