{"id":4162,"date":"2018-11-04T14:20:26","date_gmt":"2018-11-04T14:20:26","guid":{"rendered":"http:\/\/dunchurchps.com\/dps-wp\/?page_id=4162"},"modified":"2018-11-05T09:54:11","modified_gmt":"2018-11-05T09:54:11","slug":"luminosity-masks","status":"publish","type":"page","link":"https:\/\/dunchurchps.com\/dps-wp\/luminosity-masks\/","title":{"rendered":"Luminosity Masks"},"content":{"rendered":"<p><strong>Illuminating Luminosity Masks\u00a0<\/strong>\u00a0<em>(Author: Eric Tatham)<\/em><\/p>\n<p>As an example, here\u2019s an image in which I want to lighten the foreground to bring out some shadow detail but do not want to blow out the highlights in the sun and sky. (See Fig 1)<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" width=\"1417\" height=\"708\" class=\"wp-image-4163\" src=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-21.png\" alt=\"\" title=\"\" srcset=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-21.png 1417w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-21-300x150.png 300w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-21-768x384.png 768w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-21-600x300.png 600w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-21-500x250.png 500w\" sizes=\"(max-width: 1417px) 100vw, 1417px\" \/><em>(Fig 1 &#8211; The original image)<\/em><\/p>\n<p>I could use the <strong>Burn Tool<\/strong> in Photoshop but I would have to be quite careful to only brush over the regions I want to affect.<\/p>\n<p>In this particular image there is quite straightforward separation between the darker foreground and the lighter background so I could simply select the foreground and create a mask to protect the background.<\/p>\n<p>Masking images according to lightness and darkness is known as <strong><em>luminance<\/em><\/strong> or <strong><em>luminosity masking<\/em><\/strong>.<\/p>\n<p>For our purposes we can think of luminance as being equivalent to brightness. If you convert any colour image to black and white the resulting greys represent luminance values; the lighter areas having a higher luminance values. (See Fig 2)<\/p>\n<p><img decoding=\"async\" width=\"1417\" height=\"707\" class=\"wp-image-4164\" src=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-22.png\" alt=\"\" title=\"\" srcset=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-22.png 1417w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-22-300x150.png 300w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-22-768x383.png 768w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-22-600x299.png 600w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-22-500x249.png 500w\" sizes=\"(max-width: 1417px) 100vw, 1417px\" \/><i>(Fig 2 &#8211; Original image converted to Black and\u00a0White to show luminance levels)<\/i><\/p>\n<p>The separation between light and dark areas of an image may not be as clear-cut as in our sample photograph and such a mask would be hard to produce by hand. Fortunately we can use Photoshop to help us create a much more accurate mask.<\/p>\n<p>Here\u2019s how.<\/p>\n<p>Use <strong>Cmd-J<\/strong> on a Mac (or <strong>Ctrl-J<\/strong> in Windows) to create a copy of your image.<\/p>\n<p><img decoding=\"async\" width=\"352\" height=\"674\" class=\"wp-image-4165\" src=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-23.png\" alt=\"\" title=\"\" srcset=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-23.png 352w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-23-157x300.png 157w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-23-313x600.png 313w\" sizes=\"(max-width: 352px) 100vw, 352px\" \/><\/p>\n<p><em>(Fig 3 &#8211; Copy layer)<\/em><\/p>\n<p>Switch from the <strong>Layers<\/strong> <strong>Panel<\/strong> to the <strong>Channels<\/strong>.<\/p>\n<p>Hold the cursor over the <strong>RGB <\/strong>Channel and left-click whilst holding down the <strong>Cmd<\/strong> key on a Mac (<strong>Ctrl<\/strong> key in Windows).<\/p>\n<p>Marching ants should appear on your image showing the regions selected. This region will include all pixels that have a luminance value of greater than 50%. (See Fig 4)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1809\" height=\"1158\" class=\"wp-image-4166\" src=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-24.png\" alt=\"\" title=\"\" srcset=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-24.png 1809w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-24-300x192.png 300w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-24-768x492.png 768w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-24-600x384.png 600w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-24-469x300.png 469w\" sizes=\"(max-width: 1809px) 100vw, 1809px\" \/><em> (Fig 4 &#8211; Highlight selection)<\/em><\/p>\n<p>Go back to the <strong>Layers<\/strong>\u00a0panel and select your image layer. Right-click on the<strong> Create New Fill or Adjustment Layer <\/strong>icon and select <strong>Curves<\/strong> from the drop-down list. (See Figs 5 and 6)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"364\" height=\"310\" class=\"wp-image-4167\" src=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-25.png\" alt=\"\" title=\"\" srcset=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-25.png 364w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-25-300x255.png 300w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-25-352x300.png 352w\" sizes=\"(max-width: 364px) 100vw, 364px\" \/><\/p>\n<p><em>(Fig 5 &#8211; Create new adjustment layer)<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"532\" height=\"829\" class=\"wp-image-4168\" src=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-26.png\" alt=\"\" title=\"\" srcset=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-26.png 532w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-26-193x300.png 193w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-26-385x600.png 385w\" sizes=\"(max-width: 532px) 100vw, 532px\" \/><\/p>\n<p><em>(Fig 6 &#8211; Create new Curves adjustment layer)<\/em><\/p>\n<p>This will create a <strong>Curves Adjustment Layer<\/strong> with a mask that protects the pixels that have a luminance level darker than 50%. (See Fig 7)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"312\" height=\"416\" class=\"wp-image-4169\" src=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-27.png\" alt=\"\" title=\"\" srcset=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-27.png 312w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-27-225x300.png 225w\" sizes=\"(max-width: 312px) 100vw, 312px\" \/><\/p>\n<p><em>(Fig 7 &#8211; Luminosity mask for highlights)<\/em><\/p>\n<p>The mask effectively divides the image into two regions. One containing all pixels with less than 50% luminance and the other with 50% luminance or more.<\/p>\n<p>Remember the Black areas of the mask protect the underlying image layers and White areas are transparent.<\/p>\n<p>You can view the mask by selecting it in the <strong>Layers<\/strong> panel then clicking whilst holding down the <strong>Alt<\/strong> key on a Mac (or the <strong>Option<\/strong>\u00a0key with Windows). (See Fig 8)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1417\" height=\"710\" class=\"wp-image-4170\" src=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-28.png\" alt=\"\" title=\"\" srcset=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-28.png 1417w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-28-300x150.png 300w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-28-768x385.png 768w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-28-600x301.png 600w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-28-500x251.png 500w\" sizes=\"(max-width: 1417px) 100vw, 1417px\" \/><\/p>\n<p><em>(Fig 8 &#8211; Luminosity mask for highlights)<\/em><\/p>\n<p>Once again, click with <strong>Alt<\/strong> or <strong>Option<\/strong> held down to change back to the main image.<\/p>\n<p>Now if we manipulate our adjustment\u00a0<strong>Curve<\/strong> only the lighter areas of the image are affected. (See Fig 9)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1816\" height=\"1157\" class=\"wp-image-4171\" src=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-29.png\" alt=\"\" title=\"\" srcset=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-29.png 1816w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-29-300x191.png 300w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-29-768x489.png 768w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-29-600x382.png 600w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-29-471x300.png 471w\" sizes=\"(max-width: 1816px) 100vw, 1816px\" \/><\/p>\n<p><em>(Fig 9 &#8211; Curve adjustment for highlights)<\/em><\/p>\n<p>For this particular image it was actually the darker areas that we wanted to adjust so to do this we need to <strong>Invert<\/strong> the mask.<\/p>\n<p>We can quickly invert by selecting the mask in the <strong>Layers<\/strong> panel then pressing <strong>Cmd-i<\/strong> on a Mac (or <strong>Ctrl-i<\/strong> with Windows).<\/p>\n<p>The mask now protects the lightest parts of the image and allows us to adjust the <strong>Curve<\/strong> for the dark areas. (See Figs 10, 11 and 12)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"385\" height=\"609\" class=\"wp-image-4172\" src=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-30.png\" alt=\"\" title=\"\" srcset=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-30.png 385w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-30-190x300.png 190w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-30-379x600.png 379w\" sizes=\"(max-width: 385px) 100vw, 385px\" \/><\/p>\n<p><em>(Fig 10 &#8211; Luminosity mask for shadows)<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1418\" height=\"712\" class=\"wp-image-4173\" src=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-31.png\" alt=\"\" title=\"\" srcset=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-31.png 1418w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-31-300x151.png 300w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-31-768x386.png 768w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-31-600x301.png 600w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-31-500x251.png 500w\" sizes=\"(max-width: 1418px) 100vw, 1418px\" \/><\/p>\n<p><em>(Fig 11 &#8211; Luminosity mask for shadows)<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1810\" height=\"1156\" class=\"wp-image-4174\" src=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-32.png\" alt=\"\" title=\"\" srcset=\"https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-32.png 1810w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-32-300x192.png 300w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-32-768x491.png 768w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-32-600x383.png 600w, https:\/\/dunchurchps.com\/dps-wp\/wp-content\/uploads\/2018\/11\/word-image-32-470x300.png 470w\" sizes=\"(max-width: 1810px) 100vw, 1810px\" \/><\/p>\n<p><em>(Fig 12 &#8211; Curve adjustment affecting only the shadows)<\/em><\/p>\n<p>It is possible to take the highlight and shadow masks we have produced and from them create additional masks that further sub-divide the highlight regions and the shadows. In this way we can create a whole stack of <strong>luminosity masks<\/strong> that will allow us to selectively adjust more refined ranges of luminance.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Illuminating Luminosity Masks\u00a0\u00a0(Author: Eric Tatham) As an example, here\u2019s an image in which I want to lighten the foreground to bring out some shadow detail but do not want to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_eb_attr":"","footnotes":""},"class_list":["post-4162","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/dunchurchps.com\/dps-wp\/wp-json\/wp\/v2\/pages\/4162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dunchurchps.com\/dps-wp\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/dunchurchps.com\/dps-wp\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/dunchurchps.com\/dps-wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dunchurchps.com\/dps-wp\/wp-json\/wp\/v2\/comments?post=4162"}],"version-history":[{"count":5,"href":"https:\/\/dunchurchps.com\/dps-wp\/wp-json\/wp\/v2\/pages\/4162\/revisions"}],"predecessor-version":[{"id":4182,"href":"https:\/\/dunchurchps.com\/dps-wp\/wp-json\/wp\/v2\/pages\/4162\/revisions\/4182"}],"wp:attachment":[{"href":"https:\/\/dunchurchps.com\/dps-wp\/wp-json\/wp\/v2\/media?parent=4162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}