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.rand_convolve('image.png').save('new_image.png')

#To store the image in a variable for further use:
my_image = rand_c.rand_convolve('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.7.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.7-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rand_convolve-1.0.7.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.7.tar.gz
Algorithm Hash digest
SHA256 22792d4c86dd26e23aa3c90d775a063433b748679b1c9b85fcbe22cefe297967
MD5 a8f9429444c7f1bb6cad58febdc57a86
BLAKE2b-256 45730c5cd5f598299e72f05e81a5fab26f8cd8b66a97f8c95f8c80e17eada878

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rand_convolve-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 4.5 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 ed5736adc554cb93a0edd9223fcbd14378fb5ea58999b462c440e92c81524a75
MD5 2f38d393f50860dbf41eedf1f4b6b291
BLAKE2b-256 33fab718f87ac960ef83bef3c8440f45d6404e324f2c5e1d9de3d8d725edcb33

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