# blend modes explanation? unfog/unmist?

## Recommended Posts

I do have to unfog/unmist a picture C,  somehow, to get more of its content. (1) and (2) which follow are circumscriptions of it, or attempts at it.

(1) Where are the blend modes explained? e.g. as formulas like this one (Ego Eram Reputo, Mai 12, 2021, topic/118210-question-about-blend-modes, comment=583366 )

Quote

Color Burn increases the contrast in proportion to the color of the lower layer.

I followed the advice in the help documentation to search the forum for "blend modes", but the search returned "126 pages", where I'm lost.

(2) Actually I would need I think, a convex mixing of two layers, to simulate fog/mist,

which is C = a*A + (1-a)*B, where: a in the range 0..1, A the picture, B a fog simulation, C the "fogged" picture.

and its inverse to unfog/unmist,

which I would try as A=1/a*C + (1-1/a)*B,  where: 1/a is obviously greater than 1.

Thanks.

Edited by Peter1
##### Share on other sites

1 hour ago, Peter1 said:

I do have to unfog/unmist a picture C,  somehow, to get more of its content.

This is desperately difficult to do because the fog is masking the contents. A reverse-blend isn't going to remove the fog.

2 hours ago, Peter1 said:

(1) Where are the blend modes explained?

I covered standard blend modes in my book - that's where the quoted formula was originally published.

If you show us the picture (remember: it's a family friendly forum) some clever person might be able to suggest techniques to improve the image.

##### Share on other sites

2 hours ago, Peter1 said:

Actually I would need I think, a convex mixing of two layers, to simulate fog/mist,

which is C = a*A + (1-a)*B, where: a in the range 0..1, A the picture, B a fog simulation, C the "fogged" picture.

and its inverse to unfog/unmist,

which I would try as A=1/a*C + (1-1/a)*B,  where: 1/a is obviously greater than 1.

The first is the normal, default blending mode for layers. There's no blending mode that does the second. You could get a scaled version of A with the Subtract blending mode: a*A = C - (1-a)*B. You could then adjust the contrast and brightness. Of course, blending with fog will reduce the precision of the image that can be recovered, as the limiting case of a=0 demonstrates.

(You might want to correct the typo in the title.)

##### Share on other sites

• toe_head2001 changed the title to blend modes explanation? unfog/unmist?

What you're looking for is called 'Dehaze'. There are some dehaze filters in gmic.

G'MIC Filter Developer

I am away from this forum for undetermined amount of time: If you really need anything related to my PDN plugin or my G'MIC filter within G'MIC plugin, then you can contact me via Paint.NET discord, and mention me.

##### Share on other sites

5 hours ago, Peter1 said:

(1) Where are the blend modes explained? e.g. as formulas like this one (Ego Eram Reputo, Mai 12, 2021, topic/118210-question-about-blend-modes, comment=583366 )

There is a great answer here.

##### Share on other sites

• Peter1 changed the title to blend modes explanation? unfog/unmist?
On 5/5/2022 at 2:26 AM, Ego Eram Reputo said:

If you show us the picture (remember: it's a family friendly forum) some clever person might be able to suggest techniques to improve the image.

I believe I found a good solution. The original is the blue image, taken in the year 1982. The second is a intermediary one I don't recall how I did it, but serving as base for seven variants, the third is the mix of these variants and is good enough, providing depth and color. The artifacts in the sky are from the Sharpen operations.

Actually I tried many variants in paint.net using Levels, Auto-Level, Curves+ and Sharpen, and mixed seven promising versions with equal weights 1/7 (opacities 1/7 1/6 1/5 1/4 1/3 1/2 1).

I'm curious what an experienced user will result.

Edited by Peter1
english language, precision
##### Share on other sites

My attempt:

G'MIC (Auto-Balance + DCP Dehaze)

G

Edited by Reptillian

G'MIC Filter Developer

I am away from this forum for undetermined amount of time: If you really need anything related to my PDN plugin or my G'MIC filter within G'MIC plugin, then you can contact me via Paint.NET discord, and mention me.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×