필터 지우기
필터 지우기

error using ricernd matlab function

조회 수: 4 (최근 30일)
anas qazaz
anas qazaz 2016년 8월 11일
답변: Walter Roberson 2019년 9월 2일
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

답변 (1개)

Walter Roberson
Walter Roberson 2019년 9월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by