# Path: facerec_py/facerec/normalization.py
# def minmax(X, low, high, minX=None, maxX=None, dtype=np.float):
#     X = np.asarray(X)
#     if minX is None:
#         minX = np.min(X)
#     if maxX is None:
#         maxX = np.max(X)
#     # normalize to [0...1].    
#     X -= float(minX)
#     X /= float((maxX - minX))
#     # scale to [low...high].
#     X = X * (high - low)
#     X = X + low
#     return np.asarray(X, dtype=dtype)


from facerec_py.facerec.normalization import minmax
    from PIL import Image
import os as os
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
    import Image
import math as math

# try to import the PIL Image module
try:
except ImportError:


def create_font(fontname='Tahoma', fontsize=10):
    return { 'fontname': fontname, 'fontsize':fontsize }


def plot_gray(X,  sz=None, filename=None):
    if not sz is None:
        X = X.reshape(sz)

# Path: facerec_py/facerec/normalization.py
# def minmax(X, low, high, minX=None, maxX=None, dtype=np.float):
#     X = np.asarray(X)
#     if minX is None:
#         minX = np.min(X)
#     if maxX is None:
#         maxX = np.max(X)
#     # normalize to [0...1].    
#     X -= float(minX)
#     X /= float((maxX - minX))
#     # scale to [low...high].
#     X = X * (high - low)
#     X = X + low
#     return np.asarray(X, dtype=dtype)


# Path: facerec_py/facerec/visual.py
from facerec_py.facerec.normalization import minmax
    from PIL import Image
import os as os
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
    import Image
import math as math


# try to import the PIL Image module
try:
except ImportError:


def create_font(fontname='Tahoma', fontsize=10):
    return { 'fontname': fontname, 'fontsize':fontsize }


def plot_gray(X,  sz=None, filename=None):
    if not sz is None:
        X = X.reshape(sz)

    X = minmax(I, 0, 255)