Image denoising using DnCNN toolboxdir error

조회 수: 12 (최근 30일)
Danijel Visnjic
Danijel Visnjic 2021년 2월 17일
답변: Jack Xiao 2021년 2월 21일
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