示例#1
0
 def generateMarkedRowsImage(self):
     if self.GEN_MARK_ROWS:
         demot = self.loadImageRow()
         marker = SeamMarker(demot)
         points = loadJfile(self.points_left_path)
         markedImage = marker.markPointListSeam(img=demot, plist=points)
         Image.fromarray(markedImage).save(self.markRowsImagePath)
示例#2
0
 def generateMarkedColumnsImage(self):
     if self.GEN_MARK_COLS:
         viet = self.loadImageCol()
         marker = SeamMarker(viet)
         points = loadJfile(self.points_down_path)
         markedImage = marker.markPointListSeam(img=viet, plist=points)
         Image.fromarray(markedImage).save(self.markColumnsImagePath)
示例#3
0
 def test_seammarker_markPointListSeam_left(self):
     demot = self.loadImageRow()
     marker = SeamMarker(demot)
     points = loadJfile(self.points_left_path)
     markedImage = marker.markPointListSeam(img=demot, plist=points)
     # pdb.set_trace()
     compimg = os.path.join(self.imagedir, 'markedRowsImage.png')
     compimg = np.array(Image.open(compimg))
     self.compareArrays(markedImage, compimg,
                        "Marked image is not equivalent to expected image")
示例#4
0
 def test_seammarker_markPointListSeam_down(self):
     viet = self.loadImageCol()
     marker = SeamMarker(viet)
     points = loadJfile(self.points_down_path)
     markedImage = marker.markPointListSeam(img=viet, plist=points)
     # pdb.set_trace()
     compimg = os.path.join(self.imagedir, 'markedColumnsImage.png')
     compimg = np.array(Image.open(compimg))
     self.compareArrays(markedImage, compimg,
                        "Marked image is not equivalent to expected image")