def test_anti_instagram(self): ai = AntiInstagram() #### TEST SINGLE TRANSFORM #### error_threshold = 500 # load test images failure = False imagesetf = [ "inputimage0.jpg", "inputimage1.jpg", ] gtimagesetf = [ "groundtruthimage0.jpg", "groundtruthimage1.jpg", ] package_root = get_rospkg_root('anti_instagram') def add_dir(x): return os.path.join(package_root, 'scripts', x) imagesetf = map(add_dir, imagesetf) gtimagesetf = map(add_dir, gtimagesetf) imageset = map(load_image, imagesetf) gtimageset = map(load_image, gtimagesetf) errors = self.correctImages(ai, imageset, gtimageset, error_threshold) logger.info("Test Image Errors: %s" % errors) self.assertLess(max(errors), error_threshold)
def get_test_image(): package_root = get_rospkg_root('anti_instagram') return os.path.join(package_root, 'tests', 'frame.jpg')