Retouch module heal function is giving me a blur. Answered.

Any ideas as to why this is happening? Sometimes I get a good, clean result, and often… not

I am trying to remove this bottle

And this is what I get

It seems like the mask opacity is absolutely 100%.
If I move the mask slightly to touch that adjacent peach-colour it will spread as if I am using a blur tool

It looks like you are using heal instead of clone.

1 Like

As per topic title, I am using heal. Clone works as expected, with its usual disadvantages.

As per the manual, heal is a blend.

Do the clone first to a smaller area and then do the heal on top.

1 Like

Here is a more extreme example …

NB: note the green lines denoting that the image is cropped.

If I extend the selection to the outside I can get the desired result

But what if the area I want to work on is not on the edge or an island? Is it not possible?

=Crossposted=

Thank you for your replies. I understand that it is a blend, which allows it to look more natural, but, especially in my second example, it seems to just spreading out pixels in the selection area rather than blending the source area on top of them

To clone first and then heal. Thanks, yes, I have been using that as a workaround.

1 Like

This happens when using the heal tool and the spot being repaired is close to an edge detail. I have two solutions for this. The first is to use the clone tool to do an initial repair which may not be perfect. Then I use another instance with the heal tool and I get a better blend.

The second method is to select a source which has a similar detail next to it.

These descriptions probably don’t make sense so I will go away and prepare some sample images of what I mean.

METHOD ONE
image
Here I have reflections from glass window of bus which I want to remove in the sky.

image
Here I have used the healing tool in a typical fashion and I have extensive blurring.


Here I have selected a source similar to the the area to be repaired in terms of a similar edge detail. This has produced a better result with much less blurring. Further instances of the retouch module could improve the final look, but I just want to illustrate the concept here.

METHOD TWO
image
Here I have used the cloning tool. It has not produced blur, but the color is a poor match, but I will fix that problem by using another instance of the retouch module with the healing tool to produce a blended repair that matches the surrounding color.

I feel the issue here is that the healing tool to some extent is aware of the surroundings into which it is pasting new pixels and it tries to do this with blending. If there is some detail or shape dominating the area it gets confused. By using the clone tool to paste a plain blue sky the healing tool will be less confused when I use it to further improve the repair.

image
In the end I got a reasonable result. Yes with more effort I may have done better, but this was just for illustration of the concept.

1 Like

Thank you both very much for your responses and advice. I’m glad to know it isn’t just me, or an obvious setting that I hadn’t spotted. And that my work-around ideas are on the right track.

Working with the blue-velvet stage background you see in my examples, I had got as far as cloning and then using brush in heal mode to take away the clone edge. It might even work to use the same mask in the second instance. I’ll play with that.

As the background is a curtain, it hangs in folds, with their shadows, so I am mostly restricted to using source areas in a vertical line with the destination.

:pray:

I recommend trying to follow the angle of the curtain folds for the source and repair. So your approach sounds right to me.

1 Like

Yes indeed!

As a by the way, I’ve now noticed that the mask used in retouch can’t be duplicated into another instance or picked up from there or the mask manager. That’s a pity!

I am not sure why you would ever want to do this, because after the repair you have a different image in that masked area. BTW, I sometimes use multiple instances of the retouch module so a previously masked area can have a new mask drawn over part of its area to get rid of artefacts from the first instance of repair.

save myself the trouble of drawing again. It could be simply adjusted.

(Would it be nice if the retouch module had some sliders like eg feathering?)

Well, it’s not really a mask in the sense darktable normality uses that word.

Not sliders, but feather is possible using shift + scroll of mouse wheel. It also has wavelets decompose. It is really a very sophisicated module which I have not fully learnt yet. The user manual covers the module well.
https://darktable-org.github.io/dtdocs/en/module-reference/processing-modules/retouch/

1 Like

Yes, I’m aware of that. But I have not explored the wavelets functionality yet. I’m sure I will one day, but I’m mostly just removing things as per above examples. Maybe the day will come when I have to deal with more complex corrections.