Exemplo n.º 1
0
 def test_seammarker_matchMarkCoordPairLength_down_colSliceTrue(self):
     colSlice = True
     isUpTo = False
     pair = getCoordPair(self.coords_down_path, colSlice)
     coords = getCoordsDict(self.coords_down_path)
     point1 = pair[0]
     point2 = pair[1]
     marker = SeamMarker(img=np.zeros((2, 2), dtype=np.uint8))
     coord1 = coords[(point1['y'], point1['x'])]
     coord2 = coords[(point2['y'], point2['x'])]
     retval1, retval2 = marker.matchMarkCoordPairLength(
         coord1, coord2, colSlice, isUpTo)
     # pdb.set_trace()
     self.assertEqual(retval1[-1][0], retval2[-1][0])
Exemplo n.º 2
0
 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)