How to add Rician noise to an image?
Afficher commentaires plus anciens
Hi, I am simulating some MR images for my project. I am not sure about adding image to each real and imaginary channel. OR should it be the projection of image to each channel? Can anyone please verify or give a proper method? So far I did this,
N = 10; % changing N can control SNR
Ii = randn(256)*N + img; % imaginary channel
Ir = randn(256)*N + img; % real channel
noisyimage = sqrt(Ii.^2 + Ir.^2);
Réponses (3)
JayD
le 14 Déc 2015
0 votes
1 commentaire
Image Analyst
le 14 Déc 2015
Why are you calling them real and imaginary? There are no imaginary or complex variables there. All your variables are real. Simply calling it imaginarychannel does not make it imaginary, obviously.
Mehri Mehrnia
le 8 Avr 2023
Déplacé(e) : DGM
le 8 Avr 2023
0 votes
what you have done looks wrong for me. if you ignore imaginary part of image then noisy image is same as original one.
I don't have a reference to test against, but just looking around it seems right. I'm assuming that the goal is to literally treat it as additive noise as one would do with Gaussian noise. I'm not familiar with the application, so this is my assumption.
% parameters (assuming image data is unit-scale)
v = 0.1;
sg = 0.1;
% get an image
inpict = imread('cameraman.tif');
% generate the noise
sz = size(inpict);
noise = v/sqrt(2) + sg*randn([prod(sz) 2]); % bivariate normal RN
noise = sqrt(sum(noise.^2,2)); % magnitude
noise = reshape(noise,sz); % reshape to match the image
% add noise to image
outpict = im2double(inpict) + noise;
imshow(outpict)
EDIT: It does seem to check fine against randraw('rice',...), so I'm going to assume it's correct.
EDIT AGAIN: According to this, I'm wrong. The noise isn't additive. The signal is the distance vector V. So then we have this:
% parameters (assuming image data is unit-scale)
sg = 0.05;
% get an image
inpict = imread('cameraman.tif');
% generate the noise
sz = size(inpict);
noise = sg*randn([prod(sz) 2]); % bivariate zero-mean normal RN
noise(:,1) = noise(:,1) + im2double(inpict(:)); % signal is distance vector
noise = sqrt(sum(noise.^2,2)); % magnitude
% reshape to match the input
outpict = reshape(noise,sz);
imshow(outpict)
Catégories
En savoir plus sur Color Segmentation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

