Пример #1
0
 def generateSliceMark(self):
     if self.GEN_SLICE_MARK:
         viet = self.loadImageCol()
         vietcp = viet.copy()
         vietslice = vietcp[:, 550:600]
         carver = SeamMarker(img=vietcp)
         slicp = vietslice.copy()
         imcp, mask = carver.mark_column(slicp)
         Image.fromarray(imcp).save(self.slicemarkPath)
Пример #2
0
 def test_seammarker_mark_column(self):
     compimpath = os.path.join(self.imagedir, 'slicemark.png')
     viet = self.loadImageCol()
     sliceImage = np.array(Image.open(compimpath), dtype=np.uint8)
     vietcp = viet.copy()
     vietslice = vietcp[:, 550:600]
     carver = SeamMarker(img=vietcp)
     slicp = vietslice.copy()
     imcp, mask = carver.mark_column(slicp)
     self.compareArrays(
         imcp, sliceImage,
         "Point carver mark column function emap not given, "
         "checking if function produces same marks on same slice")