Vision Quest
Min-Max Filters
Aura Detectors and Life Infusers

LIFE!
LIFE!
I HAVE CREATED

LIFE!!!

store mannequin with wig and sunglasses - ghostlyAura effect
...or at least a cool effect.

page 1
page 2
story time

Raw Images

forest of balboa tree trunks - raw image tropical cemetery with stone cross gravestone marker - raw image store mannequin with wig and sunglasses - raw image pink water pipes - raw image TOP_SECRET_CLASSIFIED - raw image Timmy the Terrific Tortoise - raw image
all images posted at 375x375 resolution

Minimum Filter (B&W)

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

forest of balboa tree trunks - minimum filter 5 tropical cemetery with stone cross gravestone marker - minimum filter 5 store mannequin with wig and sunglasses - minimum filter 5 pink water pipes - minimum filter 5 TOP_SECRET_CLASSIFIED - minimum filter 5 Timmy the Terrific Tortoise - minimum filter 5
n=5

forest of balboa tree trunks - minimum filter 10 tropical cemetery with stone cross gravestone marker - minimum filter 10 store mannequin with wig and sunglasses - minimum filter 10 pink water pipes - minimum filter 10 TOP_SECRET_CLASSIFIED - minimum filter 10 Timmy the Terrific Tortoise - minimum filter 10
n=10

forest of balboa tree trunks - minimum filter 25 tropical cemetery with stone cross gravestone marker - minimum filter 25 store mannequin with wig and sunglasses - minimum filter 25 pink water pipes - minimum filter 25 TOP_SECRET_CLASSIFIED - minimum filter 25 Timmy the Terrific Tortoise - minimum filter 25
n=25

forest of balboa tree trunks - minimum filter 50 tropical cemetery with stone cross gravestone marker - minimum filter 50 store mannequin with wig and sunglasses - minimum filter 50 pink water pipes - minimum filter 50 TOP_SECRET_CLASSIFIED - minimum filter 50 Timmy the Terrific Tortoise - minimum filter 50
n=50

Minimum Filter (color)

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

forest of balboa tree trunks - minimum filter 5 tropical cemetery with stone cross gravestone marker - minimum filter 5 store mannequin with wig and sunglasses - minimum filter 5 pink water pipes - minimum filter 5 TOP_SECRET_CLASSIFIED - minimum filter 5 Timmy the Terrific Tortoise - minimum filter 5
n=5

forest of balboa tree trunks - minimum filter 10 tropical cemetery with stone cross gravestone marker - minimum filter 10 store mannequin with wig and sunglasses - minimum filter 10 pink water pipes - minimum filter 10 TOP_SECRET_CLASSIFIED - minimum filter 10 Timmy the Terrific Tortoise - minimum filter 10
n=10

forest of balboa tree trunks - minimum filter 25 tropical cemetery with stone cross gravestone marker - minimum filter 25 store mannequin with wig and sunglasses - minimum filter 25 pink water pipes - minimum filter 25 TOP_SECRET_CLASSIFIED - minimum filter 25 Timmy the Terrific Tortoise - minimum filter 25
n=25

forest of balboa tree trunks - minimum filter 50 tropical cemetery with stone cross gravestone marker - minimum filter 50 store mannequin with wig and sunglasses - minimum filter 50 pink water pipes - minimum filter 50 TOP_SECRET_CLASSIFIED - minimum filter 50 Timmy the Terrific Tortoise - minimum filter 50
n=50

Maximum Filter (B&W)

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

forest of balboa tree trunks - maximum filter 5 tropical cemetery with stone cross gravestone marker - maximum filter 5 store mannequin with wig and sunglasses - maximum filter 5 pink water pipes - maximum filter 5 TOP_SECRET_CLASSIFIED - maximum filter 5 Timmy the Terrific Tortoise - maximum filter 5
n=5

forest of balboa tree trunks - maximum filter 10 tropical cemetery with stone cross gravestone marker - maximum filter 10 store mannequin with wig and sunglasses - maximum filter 10 pink water pipes - maximum filter 10 TOP_SECRET_CLASSIFIED - maximum filter 10 Timmy the Terrific Tortoise - maximum filter 10
n=10

forest of balboa tree trunks - maximum filter 25 tropical cemetery with stone cross gravestone marker - maximum filter 25 store mannequin with wig and sunglasses - maximum filter 25 pink water pipes - maximum filter 25 TOP_SECRET_CLASSIFIED - maximum filter 25 Timmy the Terrific Tortoise - maximum filter 25
n=25

forest of balboa tree trunks - maximum filter 50 tropical cemetery with stone cross gravestone marker - maximum filter 50 store mannequin with wig and sunglasses - maximum filter 50 pink water pipes - maximum filter 50 TOP_SECRET_CLASSIFIED - maximum filter 50 Timmy the Terrific Tortoise - maximum filter 50
n=50

Maximum Filter (color)

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

forest of balboa tree trunks - maximum filter 5 tropical cemetery with stone cross gravestone marker - maximumfilter 5 store mannequin with wig and sunglasses - maximum filter 5 pink water pipes - maximum filter 5 TOP_SECRET_CLASSIFIED - maximum filter 5 Timmy the Terrific Tortoise - maximum filter 5
n=5

forest of balboa tree trunks - maximum filter 10 tropical cemetery with stone cross gravestone marker - maximum filter 10 store mannequin with wig and sunglasses - maximum filter 10 pink water pipes - maximum filter 10 TOP_SECRET_CLASSIFIED - maximum filter 10 Timmy the Terrific Tortoise - maximum filter 10
n=10

forest of balboa tree trunks - maximum filter 25 tropical cemetery with stone cross gravestone marker - maximum filter 25 store mannequin with wig and sunglasses - maximum filter 25 pink water pipes - maximum filter 25 TOP_SECRET_CLASSIFIED - maximum filter 25 Timmy the Terrific Tortoise - maximum filter 25
n=25

forest of balboa tree trunks - maximum filter 50 tropical cemetery with stone cross gravestone marker - maximum filter 50 store mannequin with wig and sunglasses - maximum filter 50 pink water pipes - maximum filter 50 TOP_SECRET_CLASSIFIED - maximum filter 50 Timmy the Terrific Tortoise - maximum filter 50
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)

forest of balboa tree trunks - red shift push tropical cemetery with stone cross gravestone marker - red shift push store mannequin with wig and sunglasses - red shift push pink water pipes - red shift push TOP_SECRET_CLASSIFIED - red shift push Timmy the Terrific Tortoise - red shift push
red shift push
maximum_filter(r, 2)
no other color band altered

forest of balboa tree trunks - green shift push tropical cemetery with stone cross gravestone marker - green shift push store mannequin with wig and sunglasses - green shift push pink water pipes - green shift push TOP_SECRET_CLASSIFIED - green shift push Timmy the Terrific Tortoise - green shift push
green shift push
maximum_filter(g, 2)
no other color band altered

forest of balboa tree trunks - blue shift push tropical cemetery with stone cross gravestone marker - blue shift push store mannequin with wig and sunglasses - blue shift push pink water pipes - blue shift push TOP_SECRET_CLASSIFIED - blue shift push Timmy the Terrific Tortoise - blue shift push
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.

forest of balboa tree trunks - color shift push-pull tropical cemetery with stone cross gravestone marker - color shift push-pull store mannequin with wig and sunglasses - color shift push-pull pink water pipes - color shift push-pull TOP_SECRET_CLASSIFIED - color shift push-pull Timmy the Terrific Tortoise - color shift push-pull
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).

Before and After Biofilm Remediation Technique - Industrial Pipes - Green Shift Aura Effect
(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

Vampire Infected Graveyard (or so my instruments indicate) - Red Shift Aura Effect
(red shift sample gif - 2,3,4)

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

Manequin begining to show some signs of life - Blue Shift Aura Effect
(blue shift sample gif - 0,1,2,3)

life
Life
LIFE!!!

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



this article continues here



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

Terms of Service © Copyright 2014 Brett Paufler