def face(gray=False):
 import bz2
 import os
 with open(os.path.join(os.path.dirname(__file__), 'face.dat'), 'rb') as f:
  rawdata = f.read()
 data = bz2.decompress(rawdata)
 face = fromstring(data, dtype='uint8')
 face.shape = (768, 1024, 3)
 if (gray is True):
  face = (((0.21 * face[:, :, 0]) + (0.71 * face[:, :, 1])) + (0.07 * face[:, :, 2])).astype('uint8')
 return face

def face ( gray = False ) : import bz2 import os with open ( os . path . join ( os . path . dirname ( __file__ ) , 'face.dat' ) , 'rb' ) as f : rawdata = f . read ( ) data = bz2 . decompress ( rawdata ) face = fromstring ( data , dtype = 'uint8' ) face . shape = ( 768 , 1024 , 3 ) if ( gray is True ) : face = ( ( ( 0.21 * face [ : , : , 0 ] ) + ( 0.71 * face [ : , : , 1 ] ) ) + ( 0.07 * face [ : , : , 2 ] ) ) . astype ( 'uint8' ) return face
get a 1024 x 768 .