Esempio n. 1
0
 def test_seammarker_getRowSliceOnPointIsUpToTrue(self):
     demot = self.loadImageRow()
     points = getPointListFromPointPath(self.points_left_path)
     point = points[0]
     slicer = PointSlicer(point, demot)
     rowslice = slicer.getRowSliceOnPoint(isUpTo=True, thresh=5)[0]
     compimg = os.path.join(self.imagedir, 'rowslice.png')
     compimg = np.array(Image.open(compimg))
     self.compareArrays(rowslice, compimg,
                        "rowslice is not the same for sliced image")
Esempio n. 2
0
 def generateRowSlice(self):
     if self.GEN_ROW_SLICE:
         demot = self.loadImageRow()
         points = getPointListFromPointPath(self.points_left_path)
         point = points[0]
         carver = SeamMarker(demot)
         slicer = PointSlicer(point, demot)
         rowslice = slicer.getRowSliceOnPoint(point,
                                              demot.copy(),
                                              isUpTo=True,
                                              thresh=5)[0]
         Image.fromarray(rowslice).save(self.rowslicePath)