Open mumuyanyan opened 4 years ago
You need a mask to indicate which pixels are missing. This is not blind inpainting (much difficult problem).
What you could do is, if the corrupted pixels are of value 255(near that range 250-255) and no other pixel in the image is as white as the corrupted pixel. Now convert the image to grayscale, obviously your corrupted pixels will be bright in grayscale. Threshold your grayscale image based on your corrupted pixel values and get the mask. I've tested inpainting using the above logic and it has worked. For your Image it will work since there are no white pixels like your corrupted pixel.
should we use any other color for mask image if white is already in image? and which function should we use in the colab file provided in readme. as there are 3 fucntions based on if-else. and where to set the value of our mask color?
I only have the corrupted image, as follows: but I don't have the mask of the image. should I have to get the mask of the image? In other words, I must acquire the mask of the corrupted before using the inpainting algorithm.