Esempio n. 1
0
    def load_image(self):
        """ Read the file and perform any transforms to get a loaded image """
        try:
            image = initializers.load_tiff(self.filename)
            image = initializers.normalize(
                image, invert=self.invert, scale=self.exposure,
                dtype=self.float_precision
            )
        except IOError as e:
            log.error("Could not find image '%s'" % self.filename)
            raise e

        return image
Esempio n. 2
0
def load_background_image():
    return normalize(load_tiff(ilm_file))
Esempio n. 3
0
def totiff(state):
    q = initializers.normalize(state.model_image)
    return (q * 255).astype('uint8')