# LIFE!!!

...or at least a cool effect.

page 1
page 2
story time

### Raw Images

all images posted at 375x375 resolution

### Minimum Filter (B&W)

`scipy.ndimage.filters.minimum_filter(img, n)`
(processed as a single layer greyscale image)

n=5

n=10

n=25

n=50

### Minimum Filter (color)

`scipy.ndimage.filters.minimum_filter(img, n)`
(each image band processed separately)

n=5

n=10

n=25

n=50

### Maximum Filter (B&W)

`scipy.ndimage.filters.maximum_filter(img, n)`
(processed as a single layer greyscale image)

n=5

n=10

n=25

n=50

### Maximum Filter (color)

`scipy.ndimage.filters.maximum_filter(img, n)`
(each image band processed separately)

n=5

n=10

n=25

n=50

### Basic Min/Max Python Code

```#for array manipulation import numpy #easy import/export of images from skimage import io #to enact these effects import scipy.ndimage #load the base image #if image is color, img.shape = [w,h,3] img = io.imread('./image/path/imageName.png') #split image into color bands #yields an array of shape [w,h] #note the lack of a three at the end r = img[:,:,0] g = img[:,:,1] b = img[:,:,2] #do the effects #it's OK to use different effects on different layers #or run the same layer through multiple effects r = scipy.ndimage.filters.minimum_filter(r, n) g = scipy.ndimage.filters.maximum_filter(r, n) b = ??? #recomposes the r,g,b layers into a [w,h,3] stack iO = numpy.dstack((r,g,b)) #path for new image sN = './image/path/newImageName.png' #save the image io.imsave(sN, iO) ```

### Color Shift Push (max)

`scipy.ndimage.filters.maximum_filter(colorBand, 2)`

red shift push
maximum_filter(r, 2)
no other color band altered

green shift push
maximum_filter(g, 2)
no other color band altered

blue shift push
maximum_filter(b, 2)
no other color band altered

### Color Shift Push-Pull

If one band(s) is minimized while the other(s) are maximized an infill effect is possible.

For completeness, I could post every iteration, but it would get boring fast. Picture effects tend to be highly image dependent. Besides, this isn't very different from the above straight maximize (though different colors like yellow, purple, and light blue are easier to achieve this way).

### Color Shift Aura Effect

The minimum filter gives a pretty good cartoon effect all on its own. However, I'm not a big fan of the raw maximize. On the other hand, separating the bands doesn't do much (to my eye) for the minimize filter (and hence, I won't waste the bandwidth showing those samples at all), but I like the aura bleed that separating the maximize filters provides (and as shown below).

(green shift sample gif - 0,2)
(green by 0 then 2, no other color band altered)

Before and After
Industrial Pipes
Chlorophyll Remediation
and Biofilm Removal

(red shift sample gif - 2,3,4)

One Vampire!!!
That's all it takes!!!

(blue shift sample gif - 0,1,2,3)

life
Life
LIFE!!!

(well, the beginning signs, at least)
(more to come)

Back To
Vision Quest

Or now that we're done with that problem,
perhaps you'd like to rest your weary head and check out:

www.paufler.net/takosori
I'm the curator of his life work, you know.
OK. True enough. It's only because I'm his biggest fan.
Eh, perhaps only fan...

Or if you're a workaholic like me,
and are interested in more Python tricks?
Brett's Python Cheat Sheet

Brett@Paufler.net