error using ricernd matlab function

8 vues (au cours des 30 derniers jours)
anas qazaz
anas qazaz le 11 Août 2016
hi, all
when i run the following code:
clear, close('all'), clc data = load('mri'); % MRI dataset (magnitude image) distributed with MATLAB im = double(data.D(:,:,1,16)); % (particular slice through the brain) s=5; % noise level (NB actual Rician stdev depends on signal, see ricestat) im_g = im + 5 * randn(size(im)); % Add Gaussian noise im_r = ricernd(im, s); % "Add" Rician noise (make Rician distributed) % Compute ranges min_o = round(min(im(:))); max_o = round(max(im(:))); min_g = round(min(im_g(:))); max_g = round(max(im_g(:))); min_r = round(min(im_r(:))); max_r = round(max(im_r(:))); % Show each image with the same color scaling limits clim = [min_g max(max_g, max_r)]; figure('Position', [30 500 800 300]); colormap(data.map); subplot(1,3,1); imagesc(im, clim); axis image; title('Original'); xlabel(['Range: (' num2str(min_o) ', ' num2str(max_o) ')']) subplot(1,3,2); imagesc(im_g, clim); axis image; title('Gaussian noise'); xlabel(['Range: (' num2str(min_g) ', ' num2str(max_g) ')']) subplot(1,3,3); imagesc(im_r, clim); axis image; title('Rician noise') xlabel(['Range: (' num2str(min_r) ', ' num2str(max_r) ')'])
i have the following error:
Undefined function 'ricernd' for input arguments of type 'double'. how i can add Rician noise to image?
thank in advance

Réponses (1)

Walter Roberson
Walter Roberson le 2 Sep 2019

Catégories

En savoir plus sur Image Processing and Computer Vision dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by