0

I have a 3d matrix A=[mXnXl], which I want to inpaint, using a mask of mask=[mXn].

So each slice along the "l" is a 2D image (0-255 RGB range). I care about continuity along that axis as also along the 3rd dimenbtison.

I use the inpainting with the two following forms

im1=inpaint.inpaint_biharmonic(np.uint8(A), np.uint8(mask), multichannel=True)

for i in range(0,l):
    im2[:,:,i]=inpaint.inpaint_biharmonic(np.uint8(A[:,:,i]), np.uint8(mask), multichannel=False)

How is the 3rd dimension handled in the algorithm? Will they produce the same results?

1 Answers1

0

You can look at the source code of the function here:

https://github.com/scikit-image/scikit-image/blob/c221d982e493a1e39881feb5510bd26659a89a3f/skimage/restoration/inpaint.py#L76

As you can see in the for-loop in that function, the function is just doing the same thing as your for-loop, so the results should be identical.

Juan
  • 5,433
  • 21
  • 23