O'Reilly logo

Visual Media Processing Using MATLAB Beginner's Guide by George Siogkas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – trying to remove different types of noise

Let's go back to our holiday in Rome picture. We will add different types of noise to it and then filter the noisy result with our blurring kernels:

  1. Once again, we will start with loading our image:
    >> img = imread('holiday_image2.bmp');
  2. Now let's add four kinds of noise to it (we'll use the default settings):
    >> gauss = imnoise(img,'gaussian');
    >> poiss = imnoise(img,'poisson');
    >> speck = imnoise(img,'speckle');
    >> snp = imnoise(img,'salt & pepper');
  3. First, we will write a small function that takes the original image, the distorted image, and the type of noise as input; performs filtering with our three filters and displays the results. We'll name our function DenoiseAndPlot.m:
    function DenoiseAndPlot(original,distorted,type) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required