Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

denoiseImage

Denoise image using deep neural network

Syntax

B = denoiseImage(A,net)

Description

example

B = denoiseImage(A,net) estimates denoised image B from noisy image A using a pretrained denoising deep neural network specified by net.

This function requires that you have Neural Network Toolbox™.

Examples

collapse all

Retrieve the pretrained denoising convolutional neural network, 'DnCNN'.

net = denoisingNetwork('DnCNN');

Load a grayscale image into the workspace, then create a noisy version of the image. Display the two images.

I = imread('cameraman.tif');
noisyI = imnoise(I,'gaussian',0,0.01);
figure
imshowpair(I,noisyI,'montage');
title('Original Image (left) and Noisy Image (right)')

Remove noise from the noisy image, and display the result.

denoisedI = denoiseImage(noisyI, net);
figure
imshow(denoisedI)
title('Denoised Image')

Input Arguments

collapse all

Noisy image, specified as a 2-D image or batch of 2-D images. A can be:

  • A 2-D grayscale image with size m-by-n.

  • A 2-D multichannel image with size m-by-n-by-c, where c is the number of image channels. c can have the value 3, such as for color images, but c can have other values as well. For example, if the image data has red, green, blue, and infrafred channels, c has the value 4.

  • A batch of equally-sized 2-D images. In this case, A has size m-by-n-by-c-by-b, where b is the batch size.

Data Types: single | double | uint8 | uint16

Denoising deep neural network, specified as a SeriesNetwork object. The network should be trained to handle images with the same channel format as A.

Output Arguments

collapse all

Denoised image, returned as a 2-D image or batch of 2-D images. B has the same size and data type as A.

Introduced in R2017b

Was this topic helpful?