Azzera filtri
Azzera filtri

Image denoising using DnCNN toolboxdir error

4 visualizzazioni (ultimi 30 giorni)
Danijel Visnjic
Danijel Visnjic il 17 Feb 2021
Risposto: Jack Xiao il 21 Feb 2021
I need to denoise image with DNN filter. This is the code I found online for denising color image, but in fifth line (net = denoisingNetwork('DnCNN');) it shows errors wich I pasted down, after code. So, what should I do to remove them? I'm using this code to denoise image with DnCNN:
original_Image = imread('image.jpg');
original_Image = im2double(original_Image);
noisy_Image = imnoise(original_Image, 'gaussian',0,0.03);
[nRed, nGreen, nBlue] = imsplit(original_Image);
net = denoisingNetwork('DnCNN');
denoised_nRed = denoiseImage(nRed, net);
denoised_nGreen = denoiseImage(nGreen, net);
denoised_nBlue = denoiseImage(nBlue, net);
denoised_Image = cat(3, denoised_nRed, denoised_nGreen, denoised_nBlue);
montage({original_Image, noisy_Image, denoised_Image})
title('Original, noisy and denoised Images')
Error using toolboxdir (line 54) Could not locate the base directory for nnet.
Error in images.internal.requiresNeuralNetworkToolbox (line 7) if ~isfolder(toolboxdir('nnet'))
Error in denoisingNetwork (line 45) images.internal.requiresNeuralNetworkToolbox(mfilename);

Risposte (1)

Jack Xiao
Jack Xiao il 21 Feb 2021
did you install the toolbox?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by