Noise plugin for the Document Image Mocker
This plugin will add an optional --noise
argument to the doc-mocker
CLI.
Adds salt and pepper noise to a random percent of the pixels within the specified range.
Accepts the limits of the range as optional parameters. Default 0:30
.
- Add pepper noise to a random number between 0% and 30% of the pixels
doc-mocker ... --noise pepper
- Add salt noise to a random number between 0% and 30% of the pixels
doc-mocker ... --noise salt
- Add pepper noise to a random number between 0% and 10% of the pixels
doc-mocker ... --noise pepper:10
- Add salt noise to a random number between 5% and 10% of the pixels
doc-mocker ... --noise salt:5:10
- Combine both noises
doc-mocker ... --noise pepper:5 salt:2
python -m pytest
View the full list of contributors. MIT licensed.