PANDORE Version 6 | GREYC-IMAGE |
paddnoise adds artificial noise to the input image im_in. Several distribution laws exist either additive or multiplicative and can be chosen from the parameter law. The output image im_out is built as follows:
where im_noise is a noise image built from the specified distribution law.
Let u1 and u2 be two random variables uniformly distributed on the space [0..1]. The noise value for pixel p is computed as follows:
z0=sqrt(-2.0*log(u1))*cos(2.0*M_PI*u2); im_noise[p] = std_dev*z0 + mean;
z0=-1.0*log(u1); im_noise[p]= std_dev*z0 + mean;
z0=(u1-0.5)*sqrt(12.0); im_noise[p] = std_dev*z0 + mean;
z0=(u1+u2-1.0)*sqrt(6.0); im_noise[p] = std_dev*z0 + mean;
Returns SUCCESS or FAILURE in case of bad parameter values.
Adds gaussian noise with mean 0 and standard deviation 1.5 to tangram.pan image and then computes the PSNR for the meanfilter smoothing operator:
paddnoise 1 0 1.5 tangram.pan a.pan pmeanfilter 2 a.pan i1.pan ppsnr 255 tangram.pan i1.pan pstatus
Génération de bruit aléatoire sur une image.
Author: Régis Clouard