How can I add gaussian noise to image that are of class double in the range [0, 255]?
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Mohammed Alammar
il 14 Dic 2019
Modificato: Sourav Bairagya
il 17 Dic 2019
Hi all,
I have this (I) image which are of class double in the range [0, 255] : {I.mat in the attachments}
I want to add noise using gaussian methods and I can specify a different set of parameters.
List of method to add noise (based on Matlab’s imnoise function):
o params(1) represents the mean of noise for idle pixels
o params(2) represents the variance of noise for idle pixels
o params(3) represents the mean of noise for busy pixels
o params(4) represents the variance of noise for busy pixels
Note: The mean and variance parameters for 'gaussian' in Matlab’s imnoise function are always specified as if the image were of class double in the range [0, 1] – however I has [0, 255].
could you please help me??
0 Commenti
Risposta accettata
Sourav Bairagya
il 17 Dic 2019
Modificato: Sourav Bairagya
il 17 Dic 2019
The 'imnoise' function expects input pixel values of data type 'double' and 'single' to be in the range [0, 1]. It also accepts the input of datatype 'uint8' in the range [0,255]. You can use the rescale function to adjust pixel values to the expected range. If any input pixel is of datatype 'double' or 'single' and lies outside [0,1], 'imnoise' function clips that to the expected range before adding noise.
You may convert your image to 'uint8' format and then can feed that to 'imnoise' function.
I = uint8(I);
For more information you can leverage this link:
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su 3-D Volumetric Image Processing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!