def LRImage_example(path): print "6.1" image = Image.open(path) print "6.2" sr_image = SRImageFactory.create_sr_image(image) print "6.3" reconstructed_sr_image = sr_image.reconstruct(4, 'iccv09') print "6.4" reconstructed_sr_image.save( "/Users/Mohamad/AUT/B.Sc. Thesis/SR_FR Project/high-res.png", "png") print "6.5"
def letter_example(): image = Image.open("../test_data/letter.png") sr_image = SRImageFactory.create_sr_image(image) reconstructed_sr_image = sr_image.reconstruct(3, 'iccv09') reconstructed_sr_image.save("../test_data/letter_3x.png", "png")
def babyface_example(): image = Image.open("../test_data/babyface_4.png") sr_image = SRImageFactory.create_sr_image(image) reconstructed_sr_image = sr_image.reconstruct(4, 'iccv09') reconstructed_sr_image.save("../test_data/babyface_4x.png", "png")
def letter_example(opencv_im): image = opencv_im sr_image = SRImageFactory.create_sr_image(image) reconstructed_sr_image = sr_image.reconstruct(3, 'iccv09') reconstructed_sr_image.save("/tmp/tmpabcd.png", "png")
def letter_example(): image = Image.open("/tmp/save.jpg") sr_image = SRImageFactory.create_sr_image(image) reconstructed_sr_image = sr_image.reconstruct(3, 'iccv09') reconstructed_sr_image.save("/tmp/tmpabcd.png", "png")
def setUp(self): self.image = Image.open("test_data/babyface_4.png") self.sr_image = SRImageFactory.create_sr_image(self.image)
def test_create_sr_image_from(self): sr_image = SRImageFactory.create_sr_image_from("test_data/babyface_4.png") self.assertIsNotNone(sr_image.get_image())
def colorblind_example(): image = Image.open("../test_data/colorblind.png") sr_image = SRImageFactory.create_sr_image(image) reconstructed_sr_image = sr_image.reconstruct(2, 'iccv09') reconstructed_sr_image.save("../test_data/colorblind_2x.png", "png")
def freckles2_example(): image = Image.open("../test_data/freckles2.png") sr_image = SRImageFactory.create_sr_image(image) reconstructed_sr_image = sr_image.reconstruct(2, 'iccv09') reconstructed_sr_image.save("../test_data/freckles2_2x.png", "png")
def auditorium_example(): image = Image.open("../test_data/auditorium.png") sr_image = SRImageFactory.create_sr_image(image) reconstructed_sr_image = sr_image.reconstruct(2, 'iccv09') reconstructed_sr_image.save("../test_data/auditorium_2x.png", "png")
def butterfly_example(): image = Image.open("../test_data/butterfly.png") sr_image = SRImageFactory.create_sr_image(image) reconstructed_sr_image = sr_image.reconstruct(2, 'iccv09') reconstructed_sr_image.save("../test_data/butterfly_2x.png", "png")
def sculpture_example(): image = Image.open("../test_data/sculpture.png") sr_image = SRImageFactory.create_sr_image(image) reconstructed_sr_image = sr_image.reconstruct(2, 'iccv09') reconstructed_sr_image.save("../test_data/sculpture_2x.png", "png")
def test_create_sr_image_from(self): sr_image = SRImageFactory.create_sr_image_from( "test_data/babyface_4.png") self.assertIsNotNone(sr_image.get_data())
def test_create_sr_image(self): image = Image.open("test_data/babyface_4.png") sr_image = SRImageFactory.create_sr_image(image) self.assertIsNotNone(sr_image.get_data())
def test_create_sr_image(self): image = Image.open("test_data/babyface_4.png") sr_image = SRImageFactory.create_sr_image(image) self.assertIsNotNone(sr_image.get_image())