How to Use the Smart Patch Tool in Krita

Share
In this tutorial, we'll learn how to use the smart patch tool in Krita (version 5.2.9) to remove unwanted people and objects from photos, retouching blemishes from skin, cracks from walls, airplanes from the sky, or any other tangible thing that is in the middle of the way sticking out like a sore thumb from your perfect photo. The smart patch tool is a very powerful tool that lets you fix your photos with one single click, which is honestly pretty amazing and definitely not the sort of tool I expected Krita to have.
An image showing how to erase unwanted people in Krita, with a person in a beach photo disappearing after a pink mask was painted over them using a brush.
An example of how to remove a person from beach photos using Krita's smart patch tool. Photo: Town of Hilton Head Island via Flickr.

To use the smart patch tool, follow the following steps:

1: open the photo you want to fix in Krita.

2: select the smart patch tool in the toolbox. Its icon appears to be an X cross made out of two bandages. It's found close to the bucket fill, gradient and eyedropper tools.

The tools in Krita's toolbox, labelled: vector tools: select shapes, text, edit shapes, calligraphy; raster tools: brush, line, rectangle, ellipse, polygon, freehand path, bezier, multibrush, dynamic brush, polyline; move & resize tools: transform, move, crop; sample & fill tools: gradient, eyedropper, colorize mask, smart patch, bucket fill, enclose and fill; utility tools: assistant, measure, reference image; selection tools: rectangular, elliptical, polygonal, lasso, magic wand, similar color, Bézier curve, magnetic curve; view tools: zoom, pan.
The tools in Krita's toolbox, labelled and categorized.

3: click and drag to "paint" over the unwanted object in the photo.

Observation: depending on the resolution of your photo and the size of the area you created this can take a long time to finish processing (in terms of minutes long).

4: there is no fourth step because the smart patch tool already fixed your photo. All you have to do left is saving the result.

Tips, Tricks, and Workflows

Now that we already know how to fix photos, some important tips and tricks to be aware about and to use this amazing tool to its full potential.

Using Smaller Sizes

In general, the smart patch tool takes a really long time to smartly patch anything, so you'll probably want to make its radius smaller before painting over the image.

You can change the size of its "brush" by changing the size in the toolbar like in the normal brush tool.

Fixing "Ghost" Patches

If you are trying to patch something particularly large or something that is in proximity of something else, there is a good chance the smart patch tool will patch things wrong.

Normally, what the smart patch tool does is try to figure out the texture it should fill the painted area with that matches the surrounding pixels. The problem is that if there is an object next to the painted area, the tool will think that object is part of the "texture" of the surrounding pixels and will try to copy it or part of it to fill the painted area with it. This creates a "ghost" copy of the other object in the area of the object you are trying to get rid of.

A workaround in this case is to split the large object into smaller parts. Instead of trying to patch a long or tall object all at once, try to patch just the top part first, and if it works, continue until you have patched everything. This workflow is more fluid since it takes less time for the smart patch tool to patch a smaller area and you can tell sooner whether it's working properly or not.

Preventing Spill Over

The smart patch can affect areas of the image beyond the painted area. If you want to prevent this from happening one quick way is to select the area that you don't want the smart patch tool to affect, invert the selection (Select -> Invert Selection on the menubar), and then use the smart patch. Since in this case the protected area isn't selected, it won't be affected by the smart patch operation.

Multi-Step Patching

In some cases, the smart patch tool gets some of its patching right, but not all of it. You don't need to start from scratch in this case.

Simply select the area that it got right, copy it, undo the smart patch, paste what you selected, erase the parts it got wrong, and then merge the pasted layer with your photo.

Now that you have a "half-patched" image, patch the unpatched parts, and repeat until it's all patched.

Blurriness

The smart patch tool is very good at getting some textures right, but in some cases it makes the texture very blurry. This can be particularly noticeable when patching blemishes on skin.

There is a way to decrease the blurriness. In the Tool Options docker, change Patch Radius to 2px and Accuracy to its maximum.

With these settings you can probably fix most skin blemishes using only the smart patch tool. The smart patch tool isn't omnipotent, however, and if you use too much its flatness will obviously substitute the skin's natural texture. In these cases, you will need to use a different too like a clone brush to re-apply the skin texture over flattened areas.

Tip: conversely, if an area is blurry and you're getting "edges," you should increase the Patch Radius instead.

A photo a girl with freckles, before and after the skin was retouched and all the freckles removed. In the end result, the skin texture is still not uniform, and some areas of the face look "smooth" or "flat," in particular the eyebrows and spots under the hair.
Skin retouching done in Krita using the smart patch tool. Observe that although the smart patch tool can easily remove small dots on the skin, it isn't very good at removing larger areas, nor can it make the texture of the skin consistent. Photo: Ike louie Natividad. License: Pexels.

Note: I tried retouching a photo using the smart patch tool to see how well it works in practice. It works great for removing small dots on the skin, but it can't help with larger areas. Although you can easily retouch with it without changing the face's structure, it can't patch the skin texture across large areas, and even the small areas it does patch end up looking a bit "flattened" and "smoothed out." It's faster and more precise than using the clone tool since all you need to do is draw over and it automatically patches the area, but it's certainly not instantaneous specially if you're trying to remove a hundred freckles from a person's face one by one for some reason. Additionally, it can't do much if the area you want to fix is under hair, be it hair of the head or hair of the eyebrows. For very small dots next to details (e.g. folds on eyes), setting the brush size to 1 or 2 pixels and not painting over the area entirely but simply crossing it appears to work. I assume in most cases this tool can be more than enough, but in some scenarios you will still need to use other tools to counter its limitations.

A photo of a woman before and after her face skin was smoothed by a non-destructive skin smoothing effect created in Krita.
An example of a skin smoothing technique applied to a photo of a woman in Krita, which can help with the smart patch tool's shortcomings. See [How to Make Skin Smooth using Gaussian High Pass in Krita]. Photo: Ike louie Natividad. License: Pexels.

Short Strokes

When work with many small details, it's possible to use the smart patch tool like an actual brush and simply paint over tiny areas quickly and in succession. The only works if the area is smart enough that you computer can process that smart patch before you start the next stroke.

Video

Written by Noel Santos.

About the Author

I'm a self-taught Brazilian programmer graduated in IT from a FATEC. In a world of increasingly complex and essential computers, I decided to use my technical expertise in hardware, desktop applications, and web technologies to create an informative resource to make PC's easier to understand.

View Comments