Results 1 to 22 of 22

Thread: LAB ans Mask and sharpening.

  1. #1
    BPN Viewer
    Join Date
    Nov 2008
    Location
    sacramento california
    Posts
    500
    Threads
    57
    Thank You Posts

    Default LAB ans Mask and sharpening.

    I have a question of LAB and Mask.

    The suggestions by Roger about using LAB to sharpen sounds very useful.

    My question:

    Does it work to make a mask that selects the bird and then convert the layer w the mask to LAB. Then do sharpening on the bird only in the luminence channel , then convert back to RGB? I have been able to do this, I think. This seems to be a way do selective sharpening and only in the luminence channel

    what is the degree of data lost when converting back and forth between RGB and LAB

    Thankyou

    Ray

  2. #2
    Banned
    Join Date
    Feb 2008
    Location
    Colorado
    Posts
    3,949
    Threads
    254
    Thank You Posts

    Default

    Ray,

    First I would suggest only doing that with 16-bit data. In the experiments I have done, the loss is about 1-part in 5,000. This compares to the highest signal-to-noise ratio produced by any DSLR (per pixel) is less than 300. So the lab conversion decreases signal-to-noise ratio by about 0.2%, so S/N would drop from 300 to 299.5. This would not be visible on any image. You wouldn't want to do this 50 times, at which point it might be visible.

    Yes, you can make a mask, convert to LAB and run a filter, then convert back.

    Roger

  3. #3
    BPN Viewer Charles Glatzer's Avatar
    Join Date
    Jan 2008
    Location
    NC
    Posts
    1,690
    Threads
    363
    Thank You Posts

    Default

    Roger,

    Can you see any apparent visual difference of relevance when changing the blending layer mode to Luminosity rather tha converting to/from RGB to LAB?


    Chas

  4. #4
    Banned
    Join Date
    Feb 2008
    Location
    Colorado
    Posts
    3,949
    Threads
    254
    Thank You Posts

    Default

    Quote Originally Posted by Charles Glatzer View Post
    Roger,
    Can you see any apparent visual difference of relevance when changing the blending layer mode to Luminosity rather tha converting to/from RGB to LAB?
    Chas
    Chas,
    I've only doing a couple of comparisons so far, and it seems pretty equivalent.

    Roger

  5. #5
    Forum Participant
    Join Date
    Jan 2008
    Location
    Canada
    Posts
    6,588
    Threads
    643
    Thank You Posts

    Default

    That's exactly what I do Ray.

    In his book on Photoshop LAB color, Dan Margulis shows the results of an experiment where he converts back and forth between LAB and RGB many times. Even after doing this the effect is small, so going back and forth once, as Roger suggests, will not have a noticeable effect.

    LAB guru Margulis suggests that using Luminosity blending mode in RGB and working on the Luminance channel of LAB are not equivalent, and better results are obtained in LAB. If I remember, colour shifts when sharpening are still possible when using Luminosity blending in RGB. LAB is so easy to work with that I don't really see any reason not to.
    Last edited by John Chardine; 10-21-2010 at 08:30 AM.

  6. #6
    BPN Viewer
    Join Date
    Nov 2008
    Location
    sacramento california
    Posts
    500
    Threads
    57
    Thank You Posts

    Default

    Thanks everyone especially to Roger, even if I don't neccesarily undestand it all yet.

    Ray

  7. #7
    BPN Viewer Charles Glatzer's Avatar
    Join Date
    Jan 2008
    Location
    NC
    Posts
    1,690
    Threads
    363
    Thank You Posts

    Default

    Quote Originally Posted by Roger Clark View Post
    Chas,
    I've only doing a couple of comparisons so far, and it seems pretty equivalent.

    Roger
    Roger,

    Thanks.

    FYI- I cannot see a real world difference that would make me want to convert to LAB anymore for sharpening, rather than simply changing the blending mode to Luminosity.

    John,

    Perhaps, slight color fringing may occur when doing multiple passes of sharpening. Again, I have not seen any deleterious effects using Luminosity blending Mode.

    Best,

    Chas
    Last edited by Charles Glatzer; 10-21-2010 at 09:56 PM. Reason: p

  8. #8
    BPN Viewer
    Join Date
    Jan 2010
    Location
    Barnstaple,South West England
    Posts
    155
    Threads
    28
    Thank You Posts

    Default

    I have recently been trying an edge mask which is sharpened by duplicating the top layer and changing the blending layer mode to Luminosity - seems to work quite well and gives you a selective option to boot.

  9. #9
    BPN Viewer Charles Glatzer's Avatar
    Join Date
    Jan 2008
    Location
    NC
    Posts
    1,690
    Threads
    363
    Thank You Posts

    Default

    Quote Originally Posted by Roy Churchill View Post
    I have recently been trying an edge mask which is sharpened by duplicating the top layer and changing the blending layer mode to Luminosity - seems to work quite well and gives you a selective option to boot.
    Roy,

    Additionally, you can dupe the sharpening layer w/ edge mask and change the blending mode to lighten and darken for each of the two layers, thus allowing you to sharpen light and dark pixels independantly. Start with layer opacity set to 65% when you first apply sharpening and you can also tweak the sharpening up and down if necessary.

    Drag and Invert (Alt/Shift) the edge mask into another dupe background layer (CMD J) and you now have a surface mask and layer for doing noise reduction.

    I typically put these 3 layers into a New Layer Group changing the blend mode to Luminosity and for better organization.


    Best,

    Chas
    Last edited by Charles Glatzer; 10-22-2010 at 06:50 AM.

  10. #10
    BPN Viewer
    Join Date
    Jan 2010
    Location
    Barnstaple,South West England
    Posts
    155
    Threads
    28
    Thank You Posts

    Default

    Quote Originally Posted by Charles Glatzer View Post
    Roy,

    Additionally, you can dupe the sharpening layer w/ edge mask and change the blending mode to lighten and darken for each of the two layers, thus allowing you to sharpen light and dark pixels independantly. Start with layer opacity set to 65% when you first apply sharpening and you can also tweak the sharpening up and down if necessary.

    Drag and Invert (Alt/Shift) the edge mask into another dupe background layer (CMD J) and you now have a surface mask and layer for doing noise reduction.

    I typically put these 3 layers into a New Layer Group changing the blend mode to Luminosity and for better organization.


    Best,

    Chas
    Thanks for that Chas, it looks interesting. To clarify that I am understanding the process correctly do I sharpen the edge mask via lighten and darken blend's instead of of sharpening with Luminosity or in addition to a Luminosity blend?

  11. #11
    BPN Viewer
    Join Date
    Nov 2008
    Location
    sacramento california
    Posts
    500
    Threads
    57
    Thank You Posts

    Default

    Quote Originally Posted by Charles Glatzer View Post
    Roger,

    Thanks.

    FYI- I cannot see a real world difference that would make me want to convert to LAB anymore for sharpening, rather than simply changing the blending mode to Luminosity.



    Chas

    I do not understand what you mean by "simply changing the blending mode to Luminosity" . How is that done

    thanks Ray

  12. #12
    Banned
    Join Date
    Feb 2008
    Location
    Colorado
    Posts
    3,949
    Threads
    254
    Thank You Posts

    Default

    Ray,

    In photoshop, duplicate the layer, then click on the new layer in the layers palette to make it active. Next click on the normal field and go down to luminosity (probably at the bottom of the list). Now changes you do to that layer are luminosity only, whether curves, unsharp mask, etc. It is pretty slick.

    Roger

  13. #13
    BPN Viewer Charles Glatzer's Avatar
    Join Date
    Jan 2008
    Location
    NC
    Posts
    1,690
    Threads
    363
    Thank You Posts

    Default

    Quote Originally Posted by Roy Churchill View Post
    Thanks for that Chas, it looks interesting. To clarify that I am understanding the process correctly do I sharpen the edge mask via lighten and darken blend's instead of of sharpening with Luminosity or in addition to a Luminosity blend?
    You sharpen the layer not the edge maskk via lighten and darken blend's, but when creating the New Layer Group make the Mode Luminosity, the individual sharpen layers remain darken and lighten..

  14. #14
    Lifetime Member Michael Gerald-Yamasaki's Avatar
    Join Date
    Jan 2010
    Location
    Santa Cruz, CA USA
    Posts
    2,035
    Threads
    311
    Thank You Posts

    Default

    Quote Originally Posted by John Chardine View Post
    LAB guru Margulis suggests that using Luminosity blending mode in RGB and working on the Luminance channel of LAB are not equivalent, and better results are obtained in LAB. If I remember, colour shifts when sharpening are still possible when using Luminosity blending in RGB. LAB is so easy to work with that I don't really see any reason not to.
    L in LAB and Luminosity in RGB are definitely not the same (one can compare the channel histogram for each for the same image to see the difference). For RGB mode, in order to make luminance adjustments a transpose to a luminance-based color model must be made (probably HSV or HSL) so loss of color fidelity would depend on the algorithms used for the transpose, but there would be some loss nonetheless (and not so different from transposing the image to LAB).

    John, I've been working with LAB for color almost exclusively since I read your posts on it. I worked for more than a decade with HSV for my synthetic images and was quite pleased to find a color model that has some of useful features of HSV. I stayed away from LAB in the past because I didn't understand its rather complex transposition from RGB, though LAB is based on a perceptually uniform model which is (IMO) much easier to make color adjustments with than RGB.

    (By the way, curves adjustments in Luminosity blend mode with a color sampler is a good way to see the shifts in hue that are made when adjusting luminosity.)

    Cheers,

    -Michael-
    Last edited by Michael Gerald-Yamasaki; 10-22-2010 at 11:02 PM. Reason: added note

  15. #15
    BPN Viewer Charles Glatzer's Avatar
    Join Date
    Jan 2008
    Location
    NC
    Posts
    1,690
    Threads
    363
    Thank You Posts

    Default

    Quote Originally Posted by Michael Gerald-Yamasaki View Post
    L in LAB and Luminosity in RGB are definitely not the same (one can compare the channel histogram for each for the same image to see the difference). For RGB mode, in order to make luminance adjustments a transpose to a luminance-based color model must be made (probably HSV or HSL) so loss of color fidelity would depend on the algorithms used for the transpose, but there would be some loss nonetheless (and not so different from transposing the image to LAB).

    John, I've been working with LAB for color almost exclusively since I read your posts on it. I worked for more than a decade with HSV for my synthetic images and was quite pleased to find a color model that has some of useful features of HSV. I stayed away from LAB in the past because I didn't understand its rather complex transposition from RGB, though LAB is based on a perceptually uniform model which is (IMO) much easier to make color adjustments with than RGB.

    (By the way, curves adjustments in Luminosity blend mode with a color sampler is a good way to see the shifts in hue that are made when adjusting luminosity.)

    Cheers,

    -Michael-
    Michael,

    Thanks for the input. I read Dan's book when it first came out years ago. There may very well be a slight difference in using the two methods, as i have not tested as mentioned above. Is there a perceptual visable difference in outcome when viewing an image at 100%?

    Chas

  16. #16
    Banned
    Join Date
    Feb 2008
    Location
    Colorado
    Posts
    3,949
    Threads
    254
    Thank You Posts

    Default

    Quote Originally Posted by Ray Rozema View Post
    Thanks everyone especially to Roger, even if I don't neccesarily undestand it all yet.

    Ray
    Ray
    Just keep asking questions. There are many knowledgeable people here.

    Roger

  17. #17
    Lifetime Member Michael Gerald-Yamasaki's Avatar
    Join Date
    Jan 2010
    Location
    Santa Cruz, CA USA
    Posts
    2,035
    Threads
    311
    Thank You Posts

    Default

    Quote Originally Posted by Charles Glatzer View Post
    Thanks for the input. I read Dan's book when it first came out years ago. There may very well be a slight difference in using the two methods, as i have not tested as mentioned above. Is there a perceptual visable difference in outcome when viewing an image at 100%?
    Charles, perceptual differences between LAB & RGB-Luminance adjustments depends on what colors the adjustment effects. I'll try to explain briefly what I mean and the advantages of LAB vs RGB-luminance regarding perceptual difference.

    LAB organizes the three-dimensional color space along a major axis (L) which is at its base (a = 0, b = 0) the gray scale. "lightness" can be adjusted in this color space without impact on hue, but some impact on saturation.

    RGB is a Cartesian coordinate space with r, g, b axes. The gray scale is a diagonal through the cube-shaped color space (r = g = b). Adjustment in the rgb color space along a diagonal parallel to the gray scale diagonal (a "luminance" adjustment of sorts) would result in an impact on hue and saturation. The tricky part is: the further away from the grayscale diagonal the adjusted colors are (think highly saturated colors) the greater the impact on perceivable hue differences will be (this is because in the rgb color space values of the same luminance do not reside on a plane, while in the LAB color space, as well as HSV and HSL, they do).

    I don't know what under the covers PS does when adjusting luminance in RGB color mode. It looks to me like they adjust along a line parallel to the grayscale diagonal as above, from my pixel peeping this type of adjustment (this would also be computationally efficient). My guess would be that for sharpening, visually noticeable color shifts would be infrequent if not rare. Where it would be more likely to show up would be in high frequency hue changes and/or high contrast in highly saturated images... such as very saturated, very contrasty, detailed feathers.

    One workflow in RGB mode I use is converting images to a monochrome (grayscale) image for contrast (curves) and sharpening and using luminance blending mode to reintroduce hue and saturation. Color shifts and particularly saturation shifts are very noticeable (to me ;) ) and require additional adjustment if the shifts are undesirable.

    I find that LAB mode adjustments are natural to my experience with numerical adjustment of HSV - hue, saturation and value (V is the grayscale) for synthetic images (scientific visualization) that I worked on/researched for many years. I think most people would find making color adjustments in LAB mode curves (for instance) with some practice to be much more intuitive than analogous color adjustments in RGB mode curves (er, with any amount of practice :D ).

    Hope I didn't make a mash of the, uh, brief description :) .

    Cheers,

    -Michael-
    Last edited by Michael Gerald-Yamasaki; 10-23-2010 at 02:13 PM. Reason: typo

  18. #18
    BPN Viewer Charles Glatzer's Avatar
    Join Date
    Jan 2008
    Location
    NC
    Posts
    1,690
    Threads
    363
    Thank You Posts

    Default

    Quote Originally Posted by Michael Gerald-Yamasaki View Post
    Charles, perceptual differences between LAB & RGB-Luminance adjustments depends on what colors the adjustment effects. I'll try to explain briefly what I mean and the advantages of LAB vs RGB-luminance regarding perceptual difference.

    LAB organizes the three-dimensional color space along a major axis (L) which is at its base (a = 0, b = 0) the gray scale. "lightness" can be adjusted in this color space without impact on hue, but some impact on saturation.

    RGB is a Cartesian coordinate space with r, g, b axes. The gray scale is a diagonal through the cube-shaped color space (r = g = b). Adjustment in the rgb color space along a diagonal parallel to the gray scale diagonal (a "luminance" adjustment of sorts) would result in an impact on hue and saturation. The tricky part is: the further away from the grayscale diagonal the adjusted colors are (think highly saturated colors) the greater the impact on perceivable hue differences will be (this is because in the rgb color space values of the same luminance do not reside on a plane, while in the LAB color space, as well as HSV and HSL, they do).

    I don't know what under the covers PS does when adjusting luminance in RGB color mode. It looks to me like they adjust along a line parallel to the grayscale diagonal as above, from my pixel peeping this type of adjustment (this would also be computationally efficient). My guess would be that for sharpening, visually noticeable color shifts would be infrequent if not rare. Where it would be more likely to show up would be in high frequency hue changes and/or high contrast in highly saturated images... such as very saturated, very contrasty, detailed feathers.

    One workflow in RGB mode I use is converting images to a monochrome (grayscale) image for contrast (curves) and sharpening and using luminance blending mode to reintroduce hue and saturation. Color shifts and particularly saturation shifts are very noticeable (to me ;) ) and require additional adjustment if the shifts are undesirable.

    I find that LAB mode adjustments are natural to my experience with numerical adjustment of HSV - hue, saturation and value (V is the grayscale) for synthetic images (scientific visualization) that I worked on/researched for many years. I think most people would find making color adjustments in LAB mode curves (for instance) with some practice to be much more intuitive than analogous color adjustments in RGB mode curves (er, with any amount of practice :D ).

    Hope I didn't make a mash of the, uh, brief description :) .

    Cheers,

    -Michael-
    Michael,

    Thanks for the reply, I got it ;) I used to convert to LAB after reading Dan's book, but I would say that perhaps 3% or less of the images I take in-field for wildlife photography would fit the very saturated, very contrasty, detailed feathers category you mention above and warrant the LAB conversion, as opposed to simply changing the blending mode. I always change the blending mode to Luminosity when doing curves/levels adjustments, but I will give the following a try. "One workflow in RGB mode I use is converting images to a monochrome (grayscale) image for contrast (curves) and sharpening and using luminance blending mode to reintroduce hue and saturation. "

    Thanks Again and Warm Regards,

    Chas
    Last edited by Charles Glatzer; 10-23-2010 at 03:25 PM.

  19. #19
    BPN Viewer
    Join Date
    Nov 2008
    Location
    sacramento california
    Posts
    500
    Threads
    57
    Thank You Posts

    Default edge Mask

    Quote Originally Posted by Charles Glatzer View Post
    Roy,

    Additionally, you can dupe the sharpening layer w/ edge mask and change the blending mode to lighten and darken for each of the two layers, thus allowing you to sharpen light and dark pixels independantly. Start with layer opacity set to 65% when you first apply sharpening and you can also tweak the sharpening up and down if necessary.

    Drag and Invert (Alt/Shift) the edge mask into another dupe background layer (CMD J) and you now have a surface mask and layer for doing noise reduction.

    I typically put these 3 layers into a New Layer Group changing the blend mode to Luminosity and for better organization.


    Best,

    Chas
    would you mind explaining how you do an edge mask. I found a process online but it was a very long process.?
    could you elaborate a little on the above instructions? i don't quite understand
    finally is this better than converting to LAB and sharpening the luminosity channel?

    thanks very much for your help and instruction

    Ray

  20. #20
    BPN Viewer Charles Glatzer's Avatar
    Join Date
    Jan 2008
    Location
    NC
    Posts
    1,690
    Threads
    363
    Thank You Posts

    Default

    If you have been following this thread you will find this of interest http://www.thelightsright.com/LabForColorCorrection

    Best to read the entire thread...

    Best,

    Chas
    Last edited by Charles Glatzer; 10-24-2010 at 09:32 PM.

  21. #21
    Lifetime Member Michael Gerald-Yamasaki's Avatar
    Join Date
    Jan 2010
    Location
    Santa Cruz, CA USA
    Posts
    2,035
    Threads
    311
    Thank You Posts

    Default

    Quote Originally Posted by Charles Glatzer View Post
    If you have been following this thread you will find this of interest http://www.thelightsright.com/LabForColorCorrection

    Best to read the entire thread...
    Hmm, in the continuum of lies, damned lies & statistics... this article & associated thread relies heavily on the latter. IMO, it protests too much about LAB and backs it up with confusion. Enlightening is not the first thing that comes to mind when reading this article. Just MO.

    Cheers,

    -Michael-

  22. #22
    Lifetime Member Michael Gerald-Yamasaki's Avatar
    Join Date
    Jan 2010
    Location
    Santa Cruz, CA USA
    Posts
    2,035
    Threads
    311
    Thank You Posts

    Default

    Folks, reading my last post again, I realized it is content-free and opinion only. Sorry. I'll try to do better.

    The article in question rehashes a dispute between two experts over LAB that was carried out over web forums and such. I thought the argument contained hidden agendas and a large dose of misinformation that still rattles around the web as fact. An example of this is the conversion experiment which claims a reduction of unique colors from 16M to 2M from an sRGB TIFF to LAB. On the face of it that's terrible, but the impact and loss of colors is not due to LAB, but rather the relative colorimetric rendering intent that was used (it's what that rendering intent was designed to do when faced with colors that don't map from one system to another).

    This type of argument abounds in the article. Why I'm not so impressed with the actual information content. ymmv.

    Cheers,

    -Michael-

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Web Analytics