Add blocking layer(s) to an existing image. Use –left <pixel value> and/or –right <pixel value> to paint each side. The –size <pixels> controls the width of the blocking layer. By default, the blocking layer is painted up the entire image. However, you can control the y-values of where the layer starts and stops with –lyi, –lyf, –ryi, and –ryf. Please note that the image origin is in the upper left corner. You may use negative indexing. However, make sure the equivalent (positive) final pixel index is larger than the equivalent (positive) initial pixel index, or nothing with be painted.
usage: block.py [-h] [--size pixels] [--left color] [--right color] [--lyi int] [--lyf int] [--ryi int] [--ryf int] [--show] ifile.png [ofile.png]
ifile | input |
ofile | output |
--size=16 | size of blocking layer(s) |
--left | pixel value (0, 1 == 255) of left side |
--right | pixel value (0, 1 == 255) of right side |
--lyi | y-index to start painting at on left side |
--lyf | y-index to stop painting at on left side |
--ryi | y-index to start painting at on right side |
--ryf | y-index to stop painting at on right side |
--show=False | instead of saving, show result in a matplotlib window |
Module author: Adam Gagorik <adam.gagorik@gmail.com>
Paint blocking layer(s) over image on left and right side.
Parameters: |
|
---|---|
Returns: | modified image data |
Return type: |
make triangle stripes (horizontal triangles)
usage: tristripe.py [-h] [output] [dim.x] [dim.y] [period]
ofile | output file |
width | dim.x |
height | dim.y |
period | number of triangles along the image |
Module author: Geoff Hutchison <geoffh@pitt.edu>
make triangle waves (for fractal roughening)
usage: triangle.py [-h] output dim.x dim.y spacing amplitude period
ofile | output file |
width | dim.x |
height | dim.y |
spacing | spacing between waves, in pixels |
amplitude | amplitude of the waves, in pixels |
period | number of waves along the image |
Module author: Geoff Hutchison <geoffh@pitt.edu>
make sine curves (for fractal roughening)
usage: curves.py [-h] [dim.x] [dim.y] [spacing] [amplitude] [period] [output]
width | dim.x |
height | dim.y |
spacing | spacing between waves, in pixels |
amplitude | amplitude of the waves, in pixels |
period | number of waves along the image |
ofile | output file |
Module author: Geoff Hutchison <geoffh@pitt.edu>
make simple lines (for fractal growing)
usage: lines.py [-h] [dim.x] [dim.y] [spacing] [thickness] [output]
width | dim.x |
height | dim.y |
spacing | spacing between waves, in pixels |
thickness | thickness of the bands, in pixels |
ofile | output file |
Module author: Geoff Hutchison <geoffh@pitt.edu>
Generate isotropic two-phase 2D systems using Gaussian noise
usage: iso.py [-h] [--seed int] [dim.x] [dim.y] [sigma] [output]
width | dim.x |
height | dim.y |
radius | radius of Gaussian blur |
ofile | output file |
--seed | random number seed |
Module author: Geoff Hutchison <geoffh@pitt.edu>
Generate a 2D isotropic two-phase system using Gaussian random noise. Before thresholding, the random noise is convoluted using a Gaussian blur kernel of sigma “radius”. The resulting data will have a 50:50 mixture as a binary array (0, 1)
Parameters: | |
---|---|
Returns: | morphology data |
Return type: |
diffusion limited aggregation fractal images
usage: dla.py [-h] [spacing]
sticky | gooeyness |
Module author: Geoff Hutchison <geoffh@pitt.edu>
convert from *.npy numpy binary files to PNG
usage: npyToPng.py [-h] input [output]
ifile | input file |
ofile | output file |
Module author: Geoff Hutchison <geoffh@pitt.edu>