def super_resolution(self, ratio): image = self.image examples_dataset = image.construct_dataset() super_resolutioned_image = image construct_level = int(math.log(ratio, self.alpha) + 0.5) for level in range(construct_level): super_resolutioned_image = self.super_resolution_dataset(super_resolutioned_image, self.alpha, examples_dataset) super_resolutioned_image = ImageUtilities.project_high2low(super_resolutioned_image, image, self.alpha, 3, level+1) new_examples_dataset = super_resolutioned_image.construct_dataset() examples_dataset.merge(new_examples_dataset) return super_resolutioned_image