# Channel equations

## Recommended Posts

In a discussion of creating a saturation mask, @dmstraker and @smadell referred to an equation involving channels:

Saturation=(max(SR,SG,SB)-min(SR,SG,SB))/max(SR,SG,SB)

The only way I can see to access these Source Channels is in  Apply Image. However Apply Image deals with two images, a Source and a Destination. This calculation deals with just one. The information on Field Equations in Filter > Distort > Equations  makes no mention of channels.

How would I create a greyscale saturation layer from an RGB layer, which I can then convert to a mask?

John

Windows 10, Affinity Photo 1.8,5 Designer 1.8.5 and Publisher 1.8.5 (mainly Photo), now ex-Adobe CC

CPU: AMD A6-3670. RAM: 16 GB DDR3 @ 666MHz, Graphics: 2047MB NVIDIA GeForce GT 630

##### Share on other sites
55 minutes ago, John Rostron said:

In a discussion of creating a saturation mask, @dmstraker and @smadell referred to an equation involving channels ...

Do you have a link to that discussion?

Affinity Photo 1.8.4, Affinity Designer 1.8.4, Affinity Publisher 1.8.4;  2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 40GB RAM; macOS 10.15.6
Affinity Photo

##### Share on other sites

Hey, John and R C-R...

First of all, the link to that series of posts is:  https://forum.affinity.serif.com/index.php?/topic/76900-saturation-masks-a-simple-method/

Second, Apply Image really only needs a single image (in fact, a single layer) since there is a button near the top of the dialog box that says "Use Current Layer as Source." Clicking that lets you apply the layer to itself. Here is a screen shot where I swapped the Red and Green channels in a photo (original on the left, swapped channels on the right).

The more important point might be that your last question is easier to answer than Dave Straker's math makes it out to be. I have posted a series of macros which will (i) create Saturation masks and Vibrance masks (inverted Saturation masks); (ii) create greyscale visualization layers for those masks; and (iii) allow you to apply the masks to a layer stack. You can access those macros here: https://forum.affinity.serif.com/index.php?/topic/87004-macro-updates-for-v17/

##### Share on other sites
59 minutes ago, R C-R said:

Do you have a link to that discussion?

Sorry it was not there originally. I cannot copy/paste the url when using Chrome on my tablet. Anyway, here is the link.

John

Windows 10, Affinity Photo 1.8,5 Designer 1.8.5 and Publisher 1.8.5 (mainly Photo), now ex-Adobe CC

CPU: AMD A6-3670. RAM: 16 GB DDR3 @ 666MHz, Graphics: 2047MB NVIDIA GeForce GT 630

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   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.

×

×

• #### Affinity

×
• Create New...