Exemplo n.º 1
0
 def generateSliceRowMark(self):
     if self.GEN_SLICEROW_MARK:
         demot = self.loadImageRow()
         carver = SeamMarker(img=demot)
         clip = demot[150:250, :]
         clip, mask = carver.mark_row(clip)
         Image.fromarray(clip).save(self.sliceRowMarkPath)
Exemplo n.º 2
0
 def test_seammarkerk_mark_row(self):
     demot = self.loadImageRow()
     compimg = os.path.join(self.imagedir, 'slicerowmark.png')
     compimg = np.array(Image.open(compimg))
     carver = SeamMarker(img=demot)
     clip = demot[150:250, :]
     clip, mask = carver.mark_row(clip)
     # pdb.set_trace()
     self.compareArrays(
         clip, compimg, "Point carver mark row function emap not given, "
         "checking if function produces same marks on same slice")