changingminds.org

How we change what others think, feel, believe and do

| Menu | Quick | Books | Share | Search | Settings |

Dave's Hue Selection

 

Disciplines > Photography > Affinity Photo > Resources > Dave's Hue Selection

Smart'n'Simple Hue Selection | Smart Hue Selection | Full Hue Selection | Erase Monochrome

 

Download

Click here to download the latest 'Dave's Hue Selection' macro set.

To insert this into your library, simply click on the 3-line 'hamburger' on the top right of the library panel, click on 'Import Macros...' and point it at the downloaded file. Then click on the layer for which you want a model and click once on the appropriate macro in the 'Dave's Hue Selection' library group category.

Discussion

The macros in this category all provide means of selecting pixels, based on hue. This is calculated using a commonly-used HSL-based algorithm.

Overall, they work by first duplicating the visible image and then adding a Procedural Texture control to these, which allows slider and numeric controls to be added.

To use the macros after running them, it is a good idea to first turn off underlying layers so you can see the selection being made. Then add further controls to the selection layer or convert it to such as a selection or mask for continued usage. Just using the selection layer as is allows for dynamic, non-destructive adjustments, but does pay the price of an additional pixel layer.

Hue is calculated as a value between 0 and 1, representing 0 to 360 degrees around the colour wheel, starting with Red at Zero and returning to Red at 360 degrees, with Green at 120 and Blue at 240 degrees.

The Procedural Texture code for these are fairly complex and hence is not discussed here.

Smart'n'Simple Hue Selection

Description

This is based on the Smart Hue Selection macro but offers fewer controls as is intended for less demanding use or where the further controls are not used. Being simpler, it also uses less code and so may run faster, especially on slower computers.

Controls

The controls offer ways to set which pixels are selected, including those which are fully selected and those which are partially selected. Partial selection give a way to feather the edges of the selection such that the selected area is less visible to the human eye.

  • Middle: The central value of the selected area.

    • Note: This value ranges from 0 to 1, which represents 0 to 360 degrees around the colour wheel, where 0 and 360 are red, 120 is green and 240 is blue.

  • Width: The width of area which is fully selected (opaque).

  • Feathering: The width of the area outside the fully selected ('Width') area, in which pixels are increasingly transparent.

  • Mono Protect: Selects near-monochrome (and increasingly non-so) to exclude from the selection.

    • Note: Full monochrome happens where R, G and B are all of equal value. Moving the slider right allows for increasing max-min range within R, G and B differences.

  • MP Feathering: Feathering from the maximum Mono Protect value back to full Monochrome.

Discussion

This is still a 'smart' macro in the intuitive nature of the controls it offers. It may well be sufficient for many usages.

A simple way to use it is to first turn off the bottom (original) layer(s), turn Width and Feathering down low, then scan the Middle up and down to see what this shows. Then position the Middle control in the middle of the hue zone you want to select. Then expand the Width to select the full desired area and Feathering to soften it overall.

Then turn on the underlying layers and add further adjustments to the selection layer.

Smart Hue Selection

Description

This is based on the Full Hue Selection macro, but instead of manual control of the a, b, c and d points, these values are calculated from a more intuitive set of controls as below.

Controls

  • Middle: The central value of the selected area.

    • Note: This value ranges from 0 to 1, which represents 0 to 360 degrees around the colour wheel, where 0 and 360 are red, 120 is green and 240 is blue.

  • Width: The width of area which is fully selected (opaque).

  • Feathering: The width of the area outside the fully selected ('Width') area, in which pixels are increasingly transparent.

  • Feathering calculation: Feather: 0=Lin; 1=Exp; 2=Cos

    • 0=Lin: Linear feathering, steadily fading from edge

    • 1=Exp: Exponential sigmoid feathering, s-shaped fade

    • 2=Cos: Cosine sigmoid feathering, different s-shaped fade

  • Hue Invert: 0=No; 1=Yes

    • 0: Normal

    • 1: Invert (select everything that is not selected in Normal condition)

  • Mono Protect: Selects near-monochrome (and increasingly non-so) to exclude from the selection.

    • Note: Full monochrome happens where R, G and B are all of equal value. Moving the slider right allows for increasing max-min range within R, G and B differences.

  • MP Feathering: Feathering from the maximum Mono Protect value back to full Monochrome.

  • MP Feathering calculation: MP Fea: 0=Lin; 1=Exp; 2=Cos

    • 0=Lin: Linear feathering, steadily fading from edge

    • 1=Exp: Exponential sigmoid feathering, s-shaped fade

    • 2=Cos: Cosine sigmoid feathering, different s-shaped fade

  • MP Mono calculation: Cal: 0=All; 1=Gy; 2=Wt; 3=Bk

    • 0=All: Selects most pixels based on simple 'max-min' algorithm.

    • 1=Gy (default): Selects more greys, based on HSL hue algorithm, avoiding selection of whites/tints and blacks/shades.

    • 1=Wt: Selects greys and whites/tints, based on '(max-min)/max' algorithm.

    • 2=Bk: Selects greys and blacks/shades, based on '(max-min)/(1-min)' algorithm.

  • MP Invert: 0=No; 1=Yes

    • 0: Normal selection

    • 1: Invert (select everything that is not selected in Normal condition)

Discussion

In addition to notes from the Smart'n'Simple Hue Selection...

The simplest way of using the controls is to try them out. Make a basic selection then try varying the switches to different values.

Note that switch values are clamped to their range, so for example a value of -1 will be taken as 0 and a value of 3 will be taken as 2 (if this is the maximum).

Full Hue Selection

Description

Similar to Smart Hue Selection, but with Middle, Width and Feather replaced with four points, sometimes simply described as a, b, c and d.

Controls

  • Lower Zero (a): Below this hue value, nothing is selected.

  • Lower Full (b): Between Lower Zero and Lower Full, selection fades from none to full selection.

  • Upper Full (c): Pixels are fully selected for hue values between Lower Full and Upper Full.

  • Upper Zero (d): Pixels are increasingly more transparent between Lower Full and Upper Zero. Above Upper Zero, no pixels are selected.

    • Note: a, b, c and d values range from 0 to 1, which represents 0 to 360 degrees around the colour wheel, where 0 and 360 are red, 120 is green and 240 is blue.

    • Being a circular model (as per the colour wheel), values wrap, so a high value above 360 effectively just goes on around the wheel to a lower value again.

  • Feathering calculation: Feather: 0=Lin; 1=Exp; 2=Cos

    • 0=Lin: Linear feathering, steadily fading from edge

    • 1=Exp: Exponential sigmoid feathering, s-shaped fade

    • 2=Cos: Cosine sigmoid feathering, different s-shaped fade

  • Hue Invert: 0=No; 1=Yes

    • 0: Normal

    • 1: Invert (select everything that is not selected in Normal condition)

  • Mono Protect: Selects near-monochrome (and increasingly non-so) to exclude from the selection.

    • Note: Full monochrome happens where R, G and B are all of equal value. Moving the slider right allows for increasing max-min range within R, G and B differences.

  • MP Feathering: Feathering from the maximum Mono Protect value back to full Monochrome.

  • MP Feathering calculation: Fea: 0=Lin; 1=Exp; 2=Cos

    • 0=Lin: Linear feathering, steadily fading from edge

    • 1=Exp: Exponential sigmoid feathering, s-shaped fade

    • 2=Cos: Cosine sigmoid feathering, different s-shaped fade

  • MP Mono calculation: Cal: 0=All; 1=Gy; 2=Wt; 3=Bk

    • 0=All: Selects most pixels based on simple 'max-min' algorithm.

    • 1=Gy (default): Selects more greys, based on HSL hue algorithm, avoiding selection of whites/tints and blacks/shades.

    • 1=Wt: Selects greys and whites/tints, based on '(max-min)/max' algorithm.

    • 2=Bk: Selects greys and blacks/shades, based on '(max-min)/(1-min)' algorithm.

  • MP Invert: 0=No; 1=Yes

    • 0: Normal selection

    • 1: Invert (select everything that is not selected in Normal condition)

Discussion

This control lets you set different fade gradients for the lower and upper parts of the selection. The price of this is that it is more work to set up (which is why the Smart Hue Selection macro was written).

In making a selection, keep the a, b, c and d points in sequential order. In other words, keep a lower than b, which is lower than c and this lower than d.

The switch controls are the same as those in Smart Hue Selection.

Erase Monochrome

Description

This provides a means of selecting everything but the monochrome (where R, G and B are the same), and stretching out to near monochrome where more and more of a max-min gap is allowed between R, G and B.

Controls

  • Coarse Mono Erase: Selects pixels which are less saturated. As the control increases, selection reaches into more colourful pixels. The 'Coarse' name indicates that 90% of near monochrome is selected this way.

  • Fine Mono Erase: Selects the last 10% of near monochrome to erase.

  • Feathering: The width of the area outside the fully selected ('Width') area, in which pixels are increasingly transparent.

  • Feathering calculation: Feather: 0=Lin; 1=Exp; 2=Cos

    • 0=Lin: Linear feathering, steadily fading from edge

    • 1=Exp: Exponential sigmoid feathering, s-shaped fade

    • 2=Cos: Cosine sigmoid feathering, different s-shaped fade

  • Mono calculation: Cal: 0=All; 1=Gy; 2=Wt; 3=Bk

    • 0=All: Selects most pixels based on simple 'max-min' algorithm.

    • 1=Gy (default): Selects more greys, based on HSL hue algorithm, avoiding selection of whites/tints and blacks/shades.

    • 1=Wt: Selects greys and whites/tints, based on '(max-min)/max' algorithm.

    • 2=Bk: Selects greys and blacks/shades, based on '(max-min)/(1-min)' algorithm.

  • Hue Invert: 0=No; 1=Yes

    • 0: Normal selection

    • 1: Invert (select everything that is not selected in Normal condition)

Discussion

This allows you to separate colour from non-colour, in a different way to the other macros in this group.

A way to use it is to first disable the lower layers, then make your selection, then apply controls to the lower layers. Another alternative is to apply HSL to both layers, but changing values differently.

Note that if the difference between the two layers becomes visible, you may need to reduce the effect or adjust feathering.

Inverting, by the way, give a simple way of erasing colour, as opposed to monochrome.

See also

If you are having problems downloading the macros, click here to download as zip file.

The Version 1 downloads are still available here or as zip file.

Dave's Saturation Selection

Dave's Luminosity Selection

Dave's Zone System

 

Site Menu

| Home | Top | Quick Links | Settings |

Main sections: | Disciplines | Techniques | Principles | Explanations | Theories |

Other sections: | Blog! | Quotes | Guest articles | Analysis | Books | Help |

More pages: | Contact | Caveat | About | Students | Webmasters | Awards | Guestbook | Feedback | Sitemap | Changes |

Settings: | Computer layout | Mobile layout | Small font | Medium font | Large font | Translate |

 

You can buy books here

More Kindle books:

And the big
paperback book


Look inside

 

Please help and share:

 

Quick links

Disciplines

* Argument
* Brand management
* Change Management
* Coaching
* Communication
* Counseling
* Game Design
* Human Resources
* Job-finding
* Leadership
* Marketing
* Politics
* Propaganda
* Rhetoric
* Negotiation
* Psychoanalysis
* Sales
* Sociology
* Storytelling
* Teaching
* Warfare
* Workplace design

Techniques

* Assertiveness
* Body language
* Change techniques
* Closing techniques
* Conversation
* Confidence tricks
* Conversion
* Creative techniques
* General techniques
* Happiness
* Hypnotism
* Interrogation
* Language
* Listening
* Negotiation tactics
* Objection handling
* Propaganda
* Problem-solving
* Public speaking
* Questioning
* Using repetition
* Resisting persuasion
* Self-development
* Sequential requests
* Storytelling
* Stress Management
* Tipping
* Using humor
* Willpower

Principles

* Principles

Explanations

* Behaviors
* Beliefs
* Brain stuff
* Conditioning
* Coping Mechanisms
* Critical Theory
* Culture
* Decisions
* Emotions
* Evolution
* Gender
* Games
* Groups
* Habit
* Identity
* Learning
* Meaning
* Memory
* Motivation
* Models
* Needs
* Personality
* Power
* Preferences
* Research
* Relationships
* SIFT Model
* Social Research
* Stress
* Trust
* Values

Theories

* Alphabetic list
* Theory types

And

About
Guest Articles
Blog!
Books
Changes
Contact
Guestbook
Quotes
Students
Webmasters

 

| Home | Top | Menu | Quick Links |

© Changing Works 2002-
Massive Content — Maximum Speed

Site Menu

| Home | Top | Quick Links | Settings |

Main sections: | Disciplines | Techniques | Principles | Explanations | Theories |

Other sections: | Blog! | Quotes | Guest articles | Analysis | Books | Help |

More pages: | Contact | Caveat | About | Students | Webmasters | Awards | Guestbook | Feedback | Sitemap | Changes |

Settings: | Computer layout | Mobile layout | Small font | Medium font | Large font | Translate |

 

 

Please help and share:

 

Quick links

Disciplines

* Argument
* Brand management
* Change Management
* Coaching
* Communication
* Counseling
* Game Design
* Human Resources
* Job-finding
* Leadership
* Marketing
* Politics
* Propaganda
* Rhetoric
* Negotiation
* Psychoanalysis
* Sales
* Sociology
* Storytelling
* Teaching
* Warfare
* Workplace design

Techniques

* Assertiveness
* Body language
* Change techniques
* Closing techniques
* Conversation
* Confidence tricks
* Conversion
* Creative techniques
* General techniques
* Happiness
* Hypnotism
* Interrogation
* Language
* Listening
* Negotiation tactics
* Objection handling
* Propaganda
* Problem-solving
* Public speaking
* Questioning
* Using repetition
* Resisting persuasion
* Self-development
* Sequential requests
* Storytelling
* Stress Management
* Tipping
* Using humor
* Willpower

Principles

+ Principles

Explanations

* Behaviors
* Beliefs
* Brain stuff
* Conditioning
* Coping Mechanisms
* Critical Theory
* Culture
* Decisions
* Emotions
* Evolution
* Gender
* Games
* Groups
* Habit
* Identity
* Learning
* Meaning
* Memory
* Motivation
* Models
* Needs
* Personality
* Power
* Preferences
* Research
* Relationships
* SIFT Model
* Social Research
* Stress
* Trust
* Values

Theories

* Alphabetic list
* Theory types

And

About
Guest Articles
Blog!
Books
Changes
Contact
Guestbook
Quotes
Students
Webmasters

 

| Home | Top | Menu | Quick Links |

© Changing Works 2002-
Massive Content — Maximum Speed