def test_compute_shortest_path(self): from_ = (0, 0) to_ = (1, 1) path_standalone = compute_shortest_path(self.test_image, from_, to_) algorithm = LiveWireSegmentation(self.test_image) path_class = algorithm.compute_shortest_path(from_, to_, length_penalty=0.0) self.assertListEqual(path_standalone, path_class, "Optimal path is not as expected")
def test_this(self): from skimage import data image = data.coins() print compute_shortest_path(image, (20, 20), (25, 20))