Exemplo n.º 1
0
 def test_seammarker_markPointSeam_down(self):
     viet = self.loadImageCol()
     points = loadJfile(self.points_down_path)
     point = points["0"]
     marker = SeamMarker(viet)
     markedImage = marker.markPointSeam(img=viet.copy(),
                                        point=point,
                                        direction=point['direction'],
                                        thresh=point['threshold'])
     # pdb.set_trace()
     compimg = os.path.join(self.imagedir, 'colMarkedImage.png')
     compimg = np.array(Image.open(compimg))
     self.compareArrays(markedImage, compimg,
                        "Marked image is not equivalent to expected image")
Exemplo n.º 2
0
 def test_seammarker_markPointSeam_left(self):
     demot = self.loadImageRow()
     points = loadJfile(self.points_left_path)
     point = points["2"]
     point_coord = (point['y'], point['x'])
     marker = SeamMarker(demot)
     markedImage = marker.markPointSeam(img=demot,
                                        point=point,
                                        direction=point['direction'],
                                        thresh=point['threshold'])
     # pdb.set_trace()
     compimg = os.path.join(self.imagedir, 'rowMarkedImage.png')
     compimg = np.array(Image.open(compimg))
     self.compareArrays(markedImage, compimg,
                        "Marked image is not equivalent to expected image")