Skip to main content

marblingpy

Python command-line application to generate a randomized mathematical marbling image.

logo.png

Usage

marblingpy [-h] [--init INIT] [--save FILE] -m M [-W W] [-H H] [--seed SEED] [--count C]
  -h, --help                     show this help message and exit
  --version                      show program\'s version number and exit
  --init INIT                    if given, the distortion will start based from the image (png) file
  --save FILE                    write generating image to FILE
  -m M, --method M               the tool function that applies to the image; I=ink-drop, T=tine-line.
  -W W, --width W                the width in integer of generating image file (gif)
  -H H, --height H               the height in integer of generating image file (gif)
  --seed SEED                    input of an unsigned integer 0 or 2^32-1 to the algorithm that generates pseudo-random numbers throughout the program. the same seed produces the same result.
  --interpolation INTERPOLATION  pixel filling interpolation type
  --count C                      the total number of times that tool functions shall be applied to render an image
  -v, --verbose                  show verbose message

Example

To operate "ink-drop" method 10 times.

$ marblingpy --save output.png --method I --width 256 --height 256 --count 10 --verbose
Current seed: 1602334135
drop circle (0/10) : (x, y, r) = (194, 224, 52)
drop circle (1/10) : (x, y, r) = (147, 165, 86)
drop circle (2/10) : (x, y, r) = (184, 9, 42)
drop circle (3/10) : (x, y, r) = (98, 245, 58)
drop circle (4/10) : (x, y, r) = (155, 26, 30)
drop circle (5/10) : (x, y, r) = (195, 95, 10)
drop circle (6/10) : (x, y, r) = (185, 37, 87)
drop circle (7/10) : (x, y, r) = (82, 215, 70)
drop circle (8/10) : (x, y, r) = (233, 123, 29)
drop circle (9/10) : (x, y, r) = (51, 186, 41)

To set initial image, and use "tine-line" method 3 times.

$ marblingpy --init output.png --save output.png --method T --width 256 --height 256 --count 3 --verbose
Current seed: 1602334273
tine line (0/3) : (x1, y1), (x2, y2), shift, sharpness = (202, 44), (62, 177), 54, 27
tine line (1/3) : (x1, y1), (x2, y2), shift, sharpness = (23, 245), (76, 234), 146, 28
tine line (2/3) : (x1, y1), (x2, y2), shift, sharpness = (25, 23), (12, 127), 66, 7

example.png

System environment

  • Python >=3.7
  • pip 20.2.3
  • opencv-python 4.4.0.44

Installation

from pypi

pip install marblingpy

from github

pip install git+https://github.com/taktpixel/marblingpy

for development

Clone this repository.

git clone git@github.com:taktpixel/marblingpy.git

For real time updating to pip command,

pip install -e .

To run python command.

python marblingpy/gen_marbling.py -h

Note

Authors

Licensing

marblingpy is dual-licensed; You may use this software under either LGPLv3 or our commercial (proprietary) license. See the LICENSE files for details.

References

  1. Lu, Shufang, Aubrey Jaffer, Xiaogang Jin, Hanli Zhao, and Xiaoyang Mao. "Mathematical marbling." IEEE computer graphics and applications 32, no. 6 (2011): 26-35.

Metadata

Release files for marblingpy 0.9.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for marblingpy 0.9.2
File Interpreter ABI Platform
marblingpy-0.9.2-py3-none-any.whl Python 3 none any Details

Release files / marblingpy-0.9.2-py3-none-any.whl

Download URL marblingpy-0.9.2-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1608bfaa934a89c50e9062ca8f3e0a9817ff327e53ea3a1a864234b9ecc55bd
BLAKE2b-256 checksum
How to use checksums
3d74afb0c8bf88d358bcbb326e407875f811f65e6505964cb5f436b443409ff8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.7

Release history Release notifications | RSS feed

This release

0.9.2 This release

1 release file

0.9.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page