Exemple #1
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_coord,
                                        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")
Exemple #2
0
 def test_seammarker_markPointSeam_down(self):
     viet = self.loadImageCol()
     points = loadJfile(self.points_down_path)
     point = points["0"]
     point_coord = (point['y'], point['x'])
     marker = SeamMarker(viet)
     markedImage = marker.markPointSeam(img=viet.copy(),
                                        point=point_coord,
                                        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")