def load_fixation_image(fname, size): """Load a fixation map, crop it, return as numpy array with max 1 and min 0. """ im = _io.imread(fname) im = _img_as_float(im) im = _pu.image.cutout_patch(im, size) im = _exposure.rescale_intensity(im, out_range=(0, 1)) return(im)
def load_im(fname): """ Load an image from a file, converting range 0--1 and a float. Returns: A numpy array containing the loaded image. """ im = _io.imread(fname) im = _img_as_float(im) im = _exposure.rescale_intensity(im, out_range=(0, 1)) return(im)