Skip to content

maylonpedroso/doc-mocker-noise-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Noise plugin for the Document Image Mocker

This plugin will add an optional --noise argument to the doc-mocker CLI.

Salt and Pepper Noise

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.

  1. Add pepper noise to a random number between 0% and 30% of the pixels
    doc-mocker ... --noise pepper     
  2. Add salt noise to a random number between 0% and 30% of the pixels
    doc-mocker ... --noise salt 
  3. Add pepper noise to a random number between 0% and 10% of the pixels
    doc-mocker ... --noise pepper:10  
  4. Add salt noise to a random number between 5% and 10% of the pixels
    doc-mocker ... --noise salt:5:10  
  5. Combine both noises
    doc-mocker ... --noise pepper:5 salt:2  

Run tests

python -m pytest

Credits

View the full list of contributors. MIT licensed.

About

Plugin to add noise to Document Mocker resulting images

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages