예제 #1
0
파일: test.py 프로젝트: maheshgiri/livewire
    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")
예제 #2
0
    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")
예제 #3
0
파일: test.py 프로젝트: maheshgiri/livewire
    def test_this(self):
        from skimage import data
        image = data.coins()

        print compute_shortest_path(image, (20, 20), (25, 20))
예제 #4
0
    def test_this(self):
        from skimage import data
        image = data.coins()

        print compute_shortest_path(image, (20, 20), (25, 20))