The above may not be the best example but it summarizes the problems I have with inpainting. You could imagine why I am hesitant when it comes to incorporating inpainting into any of my commands. One bad parameter setting, or input image or mask, and craziness ensues.
1 Sometimes it spills over to other regions.
2 Usually it has a ripple effect (due to jagged, convex or brightness varying edges seeding these variations?).
I’m sure you know all the limitations of inpainting so won’t go into that
Specific to gmic script, the commands expect a mask where regions p \ge 1 will be inpainted. In general the better the mask, the better the inpaint. With the above you really want to get to a binary single channel mask narrowed right down to the small scratches. Will do an example shortly…