/py-cooperhewitt-roboteyes-shannon

Functions for calculating and deriving properties for an image using Shannon entropy.

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

py-cooperhewitt-roboteyes-shannon

Functions for calculating and deriving properties for an image using Shannon entropy.

Usage

import sys
import Image
    import pprint

import cooperhewitt.roboteyes.shannon as shannon

path = sys.argv[1]
im = Image.open(path)

entropy = shannon.entropy(im)
print pprint.pformat(entropy)

tiles = shannon.focalpoint(im)
print pprint.pformat(tiles)

See also