Separating branches from landscape background

In my landscape photos, no element in the image reveals processing flaws more than the place where hundreds of small tree branches meet the sky. I have found some interesting tutorials that use a high-contrast mask to separate hair from a colored background. Are there more advanced techniques? Maybe I don’t know where to look.

I would generally think that luminosity masks should get you pretty far, if it is dark branches and a light sky.

You can read @patdavid’s excellent post here: PIXLS.US - Luminosity Masking in darktable

Hmmm. I have used luminosity masks before, but applied to different problems (shadow detail for example). I hadn’t thought of them in this instance. The masks do have an innate ability to handle edges gracefully. Here is my theory on how that happens:
If you zoom in on a dark edge transitioning into a lighter area, it is not an immediate change. There is always a zone of one to five pixels where density and color merge. I would be curious to know the traits this zone has in the case of photos taken with high-quality lenses with good acutance?
wikipedia on acutance

Yes, the transition zone is why you need to blur the mask at the edge. :slight_smile:

Gaussian blur?

Yes, Gaussian or similar.

You might have some success using masks based on the Lab a or b channels. Maybe you could post a “typical” (preferably a RAW file) for us to give you practical examples?

@Carmelo_DrRaw here is one I have postponed because of such technical problems. KeithPurtell_0163.CR2 (12.5 MB)

Here is an example of what can be achieved by using the Lab b channel as a mask (the b channel mask needs a severe contrast boost to make the “blueish” regions nearly black and the “yellowish” ones nearly white):

original

edited

Done with PhotoFlow, .PFI file here.

3 Likes

That is really remarkable. Definitely an important technique, considering my interest in landscapes. Thank you for taking the time to demonstrate!

I just opened the raw file in the Canon’s free DPP 4 software and exported as JPG. (OK, I applied the digital lens correction too) Is it not better?

It is improved; I don’t know anything about that software, but I may take a look. It may have some presets. For now, this test image is just to find techniques to handle the sky and foreground separately.

How many auto settings are applied by DPP?

I assume many! The photo was shot in a Landscape Profile (set in a camera) and whatever that profile contained was applied.

Here is the. dr4 file (the `recipe’ file of DPP)
Purtell.txt (143.0 KB)

(As the forum does not allow uploading of .dr4 extension file, I have changed the extension to .txt. Just change that to .dr4 before using it in DPP4.0)

Please do not take this as an advertisement for DPP4 (over RT). I like RT far more than DPP (which I rarely use). I am just making a point that sometimes, using different programme may give you better result.

That software came with the camera (check the CD). The latest version is Digital Photo Professional 4.6.10 and can be downloaded from the Canon website by giving the Serial Number of your camera.

It is not a great software, but you can apply Digital lens correction of your lenses and use different profiles. RawTherapee is far more advanced programme. However, sometimes, it is worth to see what it does.