Skip to main content

Runs a multi-random-kernel convolution on an image.

Project description

This package provides the ability to run a random convolution on a given image.

Main functions:

  • rand_convolve:
    • Returns a randomly convoluted image given an image path as input.

    • Arguments:

      • image: The image path for the convolution.
      • ksize: The size of the 2 dimensional kernel. The shape of the kernel is: (size, size). (default: 3, must be an odd number.)
      • knum: The number of random kernels to generate and use. (default: 20)
        • int n>0: The number of kernels.
        • -1: Use a new kernel for each pixel.
      • ksign: The signs to be used for the kernels. (default: 0)
        • 0: All kernel values are positive.
        • 1: Kernel signs are randomly mixed between negative and positive.
        • 2: All kernel values are negative.
    • Returns:

      • A PIL.Image object of the convoluted image.

Import with:

from rand_convolve import rand_c

... and use with:

#To save the image as a file:
rand_c('image.png').save('new_image.png')

#To store the image in a variable for further use:
my_image = rand_c('image.png')

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

rand_convolve-1.0.6.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

rand_convolve-1.0.6-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file rand_convolve-1.0.6.tar.gz.

File metadata

  • Download URL: rand_convolve-1.0.6.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for rand_convolve-1.0.6.tar.gz
Algorithm Hash digest
SHA256 2e495cb736ecd5b753cae2ab487a185be03f1ba86d78ad8114bb1c8dc7c5a559
MD5 4ecf6c0b4c6315c1fc70158b31f7a4d3
BLAKE2b-256 52be2858dada3a11729a40906bf31e892bdd1c20a2f4beb33f1b69e606323cc5

See more details on using hashes here.

File details

Details for the file rand_convolve-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: rand_convolve-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for rand_convolve-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a191f4324227fff1d6fdce1abbbd726975a6b6306911078a25aa0b74db0e876e
MD5 83bece88e8e0108d354d786ddbcab2aa
BLAKE2b-256 1a04b8b18a3899a96546e05f1fff929fe568548b6d165306e39fe8d5b1d4080f

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