Masking subject in Darktable

Hello everyone. Please if this post doesn’t belong to this forum, feel free to tell me and move it to the appropriate one.
I’ve been trying to mask a subject with darktable, but I couldn’t get the accuracy I was looking for. (see picture one).
I’ll leave the original raw file so anybody can give it a try and hopefully enlighten me on how to do it, if its possible.
The screenshot is the mask generated by other propietary software.


_DSC7970.NEF (30.7 MB)

You are free to use the original raw file in order to show how you use the masking features of Darktable.

Play Raw
Thanks in advance.

1 Like

What have you tried? Did you read the appropriate user manual sections?

If you want people to give suggestions the best way is to tag this as a PlayRaw and include an appropriate license for your Raw file.

1 Like

Hi. I’ve tried using a drawn maks and then refine it using luminosity, colour, and different parametres, but I haven’t achieved the complete isolation of the subject from the background. Maybe I don’t have the skill to do it, that’s why I’m uploading the file.
How do I tag the file? Just on the post?

darktable has no AI module to mask the foreground. In the example image it is difficult to mask the subject exactly.
However, many changes can be done without masking the subject precisely. Here is an example where the background was darkened.



_DSC7970.NEF.xmp (17.6 KB)

2 Likes

Thanks. My intention is to crop the picture so she is the main focus of the picture. Close to the one I posted before.
Bit it’s nice to see how you managed to darken the whole background. I’m going to take a look at the xmp.
In fact, I could invert your mask and get almost what I’m looking for.

I’ve tagged the post as a Play Raw. Just add something like the following to your first post:

This file is licensed Creative Commons, By-Attribution, Share-Alike.

1 Like

_DSC7970.NEF.xmp (17.5 KB)

You can try a drawn mask with mask refinement/feathering; then, if needed, you could switch to drawn + parametric, and exclude regions based on colour.

Here is my edit deliberately avoiding using any user generated masks. I have brighten the shadows and warmed the shadows without the need of generating masks. Can I ask why you need a precise mask and what effects you would apply with the mask? Then I could try and create a suitable mask. The mask you supplied looks suitable for cutting her out of the scene and placing her in another, but there is a problem in the hair region that would be tricky to deal with.
_DSC7970.NEF.xmp (12.5 KB)

1 Like

This is a test shot, so I’m using it to practise my editing skills. The goal here is to isolate her so I can modify the tone and luminosity from the background and then highlight her by raising the exposure and the shadows without burning the light in her face. Then I would warm up the tone of the general picture.

Scene-referred editing in general avoids burning highlights (there is no clipping, unless you force it), but you can use tone equalizer to tone them down even more (it’s basically a cleverly masked exposure adjustment, based on current exposure levels).

2 Likes

Here is my version, playing with masks in the model and in the background.

I also add the .xmp file in case you want to check. I still notice a loss of export sharpness with DT that then went on to correct a bit with GIMP.


_DSC7970.NEF.xmp (88.8 KB)

2 Likes

My version…

_DSC7970.NEF.xmp (23,9 KB)

1 Like

_DSC7970_01.NEF.xmp (33.4 KB)

_DSC7970.NEF.xmp (35.2 KB)

1 Like

_DSC7970.NEF.xmp (14.7 KB)

This is without any masking.

My attempt but gimp removebackground

2 Likes

There are a number of previous discussions about this:

1 Like