def load_sample_images():
 try:
  try:
   from scipy.misc import imread
  except ImportError:
   from scipy.misc.pilutil import imread
 except ImportError:
  raise ImportError('The Python Imaging Library (PIL) is required to load data from jpeg files')
 module_path = join(dirname(__file__), 'images')
 with open(join(module_path, 'README.txt')) as f:
  descr = f.read()
 filenames = [join(module_path, filename) for filename in os.listdir(module_path) if filename.endswith('.jpg')]
 images = [imread(filename) for filename in filenames]
 return Bunch(images=images, filenames=filenames, DESCR=descr)

def load_sample_images ( ) : try : try : from scipy . misc import imread except ImportError : from scipy . misc . pilutil import imread except ImportError : raise ImportError ( 'The Python Imaging Library (PIL) is required to load data from jpeg files' ) module_path = join ( dirname ( __file__ ) , 'images' ) with open ( join ( module_path , 'README.txt' ) ) as f : descr = f . read ( ) filenames = [ join ( module_path , filename ) for filename in os . listdir ( module_path ) if filename . endswith ( '.jpg' ) ] images = [ imread ( filename ) for filename in filenames ] return Bunch ( images = images , filenames = filenames , DESCR = descr )
load sample images for image manipulation .