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)
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)
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")
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")