Image denoising using DnCNN toolboxdir error

4 次查看(过去 30 天)
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);

回答(1 个)

Jack Xiao
Jack Xiao 2021-2-21
did you install the toolbox?

类别

Help CenterFile Exchange 中查找有关 Image Segmentation and Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by