def test_seammarker_matchMarkCoordPairLength_left_colSliceFalse(self): colSlice = False isUpTo = True pair = getCoordPair(self.coords_left_path, colSlice) coords = getCoordsDict(self.coords_left_path) point1 = pair[0] point2 = pair[1] marker = SeamMarker(img=np.zeros((2, 2), dtype=np.uint8)) coord1 = coords[point1] coord2 = coords[point2] # pdb.set_trace() retval1, retval2 = marker.matchMarkCoordPairLength( coord1, coord2, colSlice, isUpTo) self.assertEqual(retval1[-1][1], retval2[-1][1])
def generateMatchCoordinateMatrix(self, colSlice: bool, isUpTo: bool): if self.GEN_MATCH_COORD_PAIRS: firstPath = self.match_coord_path.format(str(1)) secondPath = self.match_coord_path.format(str(2)) coords = getCoordsDict(self.coords_down_path) pair = getCoordPair(self.coords_down_path, colSlice) p1 = pair[0] p2 = pair[1] coord1 = coords[p1] coord2 = coords[p2] marker = SeamMarker(img=np.zeros((2, 2), dtype=np.uint8)) markCoord1, markCoord2 = marker.matchMarkCoordPairLength( coord1, coord2, colSlice, isUpTo) np.save(firstPath, markCoord1) np.save(secondPath, markCoord2)