(self, a, aa, b, bb, patch_size)
Initialize Patchmatch Object.
        This method also randomizes the nnf , which will eventually
        be optimized.
Initialize Patchmatch Object.
        This method also randomizes the nnf , which will eventually
        be optimized.
Initialize Patchmatch Object . This method also randomizes the nnf which will eventually be optimized .
def __init__(self, a, aa, b, bb, patch_size):
        """
        Initialize Patchmatch Object.
        This method also randomizes the nnf , which will eventually
        be optimized.
        """
        assert a.shape == b.shape == aa.shape == bb.shape, "Dimensions were unequal for patch-matching input"
        self.A = a
        self.B = b
        self.AA = aa
        self.BB = bb
        self.patch_size = patch_size
        self.nnf = np.zeros(shape=(2, self.A.shape[0], self.A.shape[1])).astype(np.int)  # the nearest neighbour field
        self.nnd = np.zeros(shape=(self.A.shape[0], self.A.shape[1]))  # the distance map for the nnf
        self.initialise_nnf()
def __init__ ( self , a , aa , b , bb , patch_size ) : assert a . shape == b . shape == aa . shape == bb . shape , "Dimensions were unequal for patch-matching input" self . A = a self . B = b self . AA = aa self . BB = bb self . patch_size = patch_size self . nnf = np . zeros ( shape = ( 2 , self . A . shape [ 0 ] , self . A . shape [ 1 ] ) ) . astype ( np . int ) # the nearest neighbour field self . nnd = np . zeros ( shape = ( self . A . shape [ 0 ] , self . A . shape [ 1 ] ) ) # the distance map for the nnf self . initialise_nnf ( )