Skip to main content

A small library and a cli tool for applying noise to images.

Project description

Noize

Noize is a tool and a library to apply different kind of noise methods to images. Various noises with parameters can be applied for both grayscale and RGB images.

Here is an example, from left to right, original, salt and pepper, gaussian, periodic versions of an image.

Noize requiers Python 3.8 or newer versions, however some or all methods can be used older Python 3 versions.

Some supported methods:

  • Periodic Noise
  • Salt and Pepper Noise
  • Noises with Probability Density Functions

Installation

Install Noize from PyPI:

$ pip install noize

Cli Usage

Here is an example to apply salt and pepper noise, use noize --help for more:

$ noize salt-and-pepper lenna.png -p 0.01 --seed 25 -o output.png

Lib Usage

import numpy as np
from PIL import Image
from noize import noise

# load image
im = Image.open("doc/lenna.png")

# apply noise (input should be np.ndarray)
out = noise.salt_and_pepper(np.array(im), 0.1, 25)

# save result
out_im = Image.fromarray(out)
out_im.save("output.png")

Checkout the noise module documentation for more.

License

MIT License

Copyright (c) 2021 mcemilg

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

noize-0.0.1.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

noize-0.0.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file noize-0.0.1.tar.gz.

File metadata

  • Download URL: noize-0.0.1.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.6.1 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.3

File hashes

Hashes for noize-0.0.1.tar.gz
Algorithm Hash digest
SHA256 96f812cf44233ef33e288118c94e85c66118d4c95feaf2bdf96a511032f6121f
MD5 1628198552b4867ff507ea3bcfb42f05
BLAKE2b-256 f93d85080902327382fb85062a1112b47c94cc5504d9ace3926c2c539eba9d97

See more details on using hashes here.

File details

Details for the file noize-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: noize-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.6.1 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.3

File hashes

Hashes for noize-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 67cee3f440a23f74236e646e8bb0f629d661461c0e916a943c3d53556c41d766
MD5 d54324aab04c4a7fbb01a8530027a5cb
BLAKE2b-256 04e5dc7c2f09e3f27327f9e2143b9ad46bbfcb0715273afd2fd50c7c427a694c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page