DIPlib Documentation - ©1995-2015 Quantitative Imaging Group, Delft University of Technology.

# BinaryNoise

Generates an image disturbed by binary noise

## SYNOPSIS

`#include "dip_noise.h"`

dip_Error dip_BinaryNoise ( in, out, p10, p01, random )

## DATA TYPES

binary

## FUNCTION

Generate an image disturbed by binary noise. See `BinaryRandomVariable` for more information on the random number generator.

## ARGUMENTS

Data type | Name | Description
`dip_Image` | `in` | Input
`dip_Image` | `out` | Output
`dip_float` | `p10` | Probability of a one to zero transition
`dip_float` | `p01` | Probability of a zero to one transition
`dip_Random *` | `random` | Pointer to a random value structure

## EXAMPLE

Get a binary noise disturbed image as follows:

       dip_Image in, out;
       dip_float p10, p01;
       dip_Random random;

       p10 = 0.1;
       p01 = 0.2;
       DIPXJ( dip_RandomSeed( &random, 0 ));
       DIPXJ( dip_BinaryNoise( in, out, p10, p01, &random ));

## SEE ALSO

`BinaryRandomVariable`, `RandomVariable`, `RandomSeed`, `RandomSeedVector`, `UniformNoise`, `GaussianNoise`, `PoissonNoise`