**Name**

**fnoise** Put noise on a Fimage

**Command Synopsis**

**fnoise** [-g *std*] [-i *p*] [-n] *in* *out*

-gstd: additive Gaussian noise with standard deviation std

-ip: impulse noise (image range), applied to p percent of the pixels

-n : in order NOT to reinitialize the random seed

in: input Fimage

out: output Fimage

**Function Summary**

void fnoise (u , v , std , p , n_flag )

Fimage u , v ;

float *std , *p ;

char *n_flag ;

**Description**

This module corrupts a Fimage with additive Gaussian noise or with impulse noise.

If the `-g`

option is selected, then the
input image *u* is transformed into *v* = *u* + *n*, where
(*x*, *y*) *n*(*x*, *y*)
is a field of i.i.d; Gaussian random variables with standart deviation
*std*. This means that the law of each *n*(*x*, *y*) is given by the density
function

If the `-i`

option is selected, then the
input image *u* is transformed into

The random seed used (*drand48*) is reinitialized with the current time
unless the `-n`

option is set.

NB: Calling this C-subroutine with *out* = *in* is possible

**Version 1.0**

Last Modification date : Thu Jun 6 16:40:50 2002

**Author**

Lionel Moisan