![]() |
| |||||||
| Photo Retouching "Improving" photos, post-production, correction, etc. |
| | Thread Tools |
|
#1
| |||
| |||
| how to separate colour and luminance from RGB Hello friends I want help (detailled tutorial) for separating colour and luminance from RGB. Thanks in advance. Regards Mukund |
|
#2
| ||||
| ||||
| Re: how to separate colour and luminance from RGB The easiest way would be to simply use the "Luminosity" and "Color" blending modes, so your adjustments will just affect the components you told it to. If you want to extract the luminosity, one easy way would be to add a new layer in "Color" mode and fill it with 50% gray. If you want to extract the color, add a new layer in "Luminosity" mode and fill it with 50% gray. Other methods using Apply Image or the Channel Mixer would work as well, but are probably overkill. |
|
#3
| ||||
| ||||
| Re: how to separate colour and luminance from RGB Hi Mukund ADDED EDIT: Jonas beat me to it while I was typing Kind of depends on your definition of luminance and colour. Photoshop is not consistent in how it is used throughout their software offerings including not totally consistent within Photoshop itself. Here is a link to a overall reference document that covers many math details of what Adobe does from a math standpoint in much of their software. Blends start on page 320 and near page 326 is where they get into the details of their Luminosity, Color, Hue,Sat blend modes which reveals their definitions through the equations. Note that their definition of Saturation does not match how the numbers for saturation is used in their Color Pickers: http://wwwimages.adobe.com/www.adobe...32000_2008.pdf That may be more than what you want. So it may help for you to be more specific on what you are trying to achieve to get more specific answers. Here are some basic techniques to extract Luminance and Hue 1) To extract Luminance. - Lower layer is image - Next higher layer is a neutral tone layer (white, black, or any shade of gray). Set the Blend mode of this neutral tone layer to "Color". The resulting image is the Luminance where all RGB values are equal where the Luminance is defined by L= .3R + .59G + .11 B 2) To extract Hue - Lower Layer is solid 50% gray - Next Layer up is your image. Set the Blend mode of your image layer to Color. The resulting image will be an image where the Luminosity is 50% for all pixels yet all the pixels will have the exact Hue of you original Image. The blend will try and keep the Saturation yet will give precedence to the Luminosity first. Note: There are other techniques depending on what you want to do. I think I will stop there because what you need is really dependent on what you want to do. Provide more details on what you are trying to do and forum members could provide more specific answers. Hope this gives you a start. |
|
#4
| |||
| |||
| Re: how to separate colour and luminance from RGB Thanks Jonas and John. Its kind of you to give reply in detail. Actually what I want is this http://img135.imageshack.us/i/curveslayer.jpg/ Could you pl. share detail tutorila how to do this? Thanks again. Regards, Mukund Last edited by ISO; 06-09-2011 at 01:37 AM. |
|
#5
| ||||
| ||||
| Re: how to separate colour and luminance from RGB Quote:
Here are more detailed steps: 1. Make a copy of the original image layer, set it to "Color" blend mode. 2. Create a layer with 50% gray below it. 3. Merge the two layers. You now have a layer with the color information. -- 4. Make a copy of the original image layer, set it to "Luminosity" blend mode. 5. Create a layer with (any shade of) gray below it. 6. Merge the two layers. You now have a layer with the luminosity. If you have the Color layer on top, set the blending of it to "Color". If you have the Luminosity layer on top, set the blending mode of it to "Luminosity" (The layer with the original image can safely be hidden/removed). If you do this regularly, you should record the steps as an action. Note: Usually there is no need to create a separate layers for Lum. and Color. It's usually easier and more efficient to do simply add Lum./Color blending mode to whatever corrections you do to the image (as layers). |
|
#6
| |||
| |||
| Re: how to separate colour and luminance from RGB Quote:
|
|
#7
| ||||
| ||||
| Re: how to separate colour and luminance from RGB Quote:
From what I can tell we are looking at an image where at the bottom we have the RGB channels converted to separate layers (screen blend mode). Above that we have the same image separated as Luminosity+Color instead (overriding the below layers). Edit: Attached is a much better example showing what we are doing. |
|
#8
| |||
| |||
| Re: how to separate colour and luminance from RGB Thanks again friends. Attached image is what lobster droplet from free gamma is doing. It splits rgb image in to separate colour component and luminocity. This divide gives very powerful editing options like dodge and burn and selective colour adjustments. Pl. Share detailed steps how to do this. |
|
#9
| |||
| |||
| Re: how to separate colour and luminance from RGB so cool anyone have an action lmao yes i am that lazy >.>..... |
|
#10
| ||||
| ||||
| Re: how to separate colour and luminance from RGB If you convert the image to Lab, it's done for you. And you can make a smart object from an RGB image, then convert the SO to Lab without affecting the RGBness of the original image. Or am I missing the point? |
|
#11
| |||
| |||
| Re: how to separate colour and luminance from RGB Edit- friends because of your valuable information im successful in achieving what i want. Its working. Thanks again. |
|
#12
| ||||
| ||||
| Re: how to separate colour and luminance from RGB I already did back in this post: http://www.retouchpro.com/forums/pho...tml#post292588 |
|
#13
| ||||
| ||||
| Quote:
In the conversion you will loose all layers, and you have much more limited tools in LAB. You can get just as good results using Luminosity and Color blending modes. You could stamp a copy of the image, convert it to a smart object, open the smart object, work directly on one of the channels instead of working in layers, save and then jump back out of the smart object to see the result with the rest of the layers... I find this cumbersome compared to simply doing the adjustment on a new layer and change the blending mode. I strongly believe that there is never a need to go through all this to work on color and luminosity separately. You gain nothing (at worst you loose flexibility and add extra noise). It is quick and simple in RGB. ---- I have attached an action for you that does the Color/Luminosity separation as layers. I included some frequency separation actions and sharpening actions as well just to make the set more useful... :=) The actions should run well even on layered documents and foreign language versions of Photoshop (report back if they don't). |
|
#14
| ||||
| ||||
| Re: how to separate colour and luminance from RGB Hi Mukund Jonas, Chain, and I are all saying the same thing and it is exactly what they are also doing in Lobster droplet. Here is a specific layers stack showing how this is achieved with to make it more explicit using the same colors in your example: Screen shot 2011-06-09 at 12.14.45 PM.png Lets look at top three layers first - Original File - On top of that is neutral tone layer (black, white, any shade of gray) with Blend set to Color - Resulting image is the luminosity which is stamped to the top layer to make it visible in the stack. Lets Look at the bottom three layers - Original File - On top of that is a 50% gray layer with Blend set to Luminosity - The resulting image are the colors of the image at Luminosity 50%. That is stamped to the next layer so you can see it in the Layer Stack and I named it "Color" Now to separate out the 3 color channels (there are many ways to do this) - Above the "Color" layer I put a Curves Adj Layer - Turn down the Green and Blue Curves to Zero (flat at bottom). This yields the Red Channel. I stamped it to make it visible in Layer Stack - To get Green channel repeat with Curves Adj turning off Red and Blue channel. Then stamp it - To get Blue channel repeat with Curves Adj turning off Red and Blue channel. Then stamp it That is all there is to it (and no I did not make an action) EDIT - Lots of other inputs since I started typing - wow |
|
#15
| |||
| |||
| Re: how to separate colour and luminance from RGB Quote:
|
|
#16
| ||||
| ||||
| Re: how to separate colour and luminance from RGB @chain - I think you will find that there is essentially no loss in converting to Lab. But what you find convenient in your workflow is whatever you find convenient. Have to admit that I rarely use Lab any more, because when I have to separate luminosity and color (especially in restoration work), it's with luminosity and color layers. |
|
#17
| ||||
| ||||
| Re: how to separate colour and luminance from RGB Quote:
What kind of losses can you expect and how much will be observable in a real world image? Do you have any examples (or links) that illustrate the issues? |
|
#18
| ||||
| ||||
| Re: how to separate colour and luminance from RGB Hi Tony I have seen issues in 8 bit going back and forth to Lab and why I suggest staying in 16 bit for that operation. It can be demonstrated very easily. Here is a 256px x 256px image with all 256 gray levels represented one per pixel column (100% view): Screen shot 2011-06-09 at 1.37.30 PM.png If you have in Edit > Color Settings the dither turned off, if you take this to Lab and back and do the difference, and just amplify the differences (i.e. anything other than a perfect match is pegged to 255) here is the image you see: Screen shot 2011-06-09 at 1.37.49 PM.png If you do the same experiment and and have the Color Setting mode so the dither is "on", then here is why you get: Screen shot 2011-06-09 at 1.38.11 PM.png The differences are only 1 bit differences however it does make a difference. With dither turned off, in slowly changing colors such as skies, the changes can jump two bits instead of 1 bit and this causes increased noticeable banding (let me know if you want me to post an image) With dither turned on, you don't notice the banding yet you end up with noticeable 1 bit mottling (again I can post an image if desired). So I agree with chain, conversion between some color spaces will create artifacts in your image that can be noticeable. |
|
#19
| ||||
| ||||
| Re: how to separate colour and luminance from RGB Quote:
Only time I've really needed to turn channels into layers was when I was making some 2-strip Technicolor actions. I will keep it in mind next time. Last edited by Chain; 06-09-2011 at 01:51 PM. Reason: Minor clarification. |
|
#20
| ||||
| ||||
| Re: how to separate colour and luminance from RGB Hi Chain Another easy way to get the Channels into Layers is with the Channel Mixer Adjustment Layer. You just leave the channels you don't want with all mixer values set to zero. Works like a charm. |
|
#21
| ||||
| ||||
| Re: how to separate colour and luminance from RGB Hi John, Thanks for the examples and your explanation. From my own limited experiments I have not experienced any banding converting from RGB to LAB and back again to RGB. Therefore I am having difficulty accepting that this is a real problem. I have seen banding issues when I foolishly decided to edit 8 bit jpegs in ProPhoto . I am not surprised though that your examples of a computer generated gradient exhibits problems - although I am at a loss to explain it technically, I accept that this can happen and therefore such images should only be made in the final output space RGB or CMYK. So I have to say that so far as I have not experienced issues converting to LAB and back and the fact that Dan Margulis experiments seem to back this up, I am yet to be convinced that there is a real problem that would seriously degrade many images. Of course I reserve the right to change my mind in the future should my new experiences prove these thoughts flawed |
|
#22
| ||||
| ||||
| Re: how to separate colour and luminance from RGB Hi Tony Your approach/thinking is not flawed. Independent of technical specs, actual experience is much more powerful. The effect I am talking about is not large and usually only comes up when you have very low noise images (noise in the image masks the effect). What I did to provide a more real life example is to show a sunset with a very low noise background where the color shifts from yellow sun to darker oranges as you move out. This is an RGB image. Sunset at 800px.jpg What I did was duplicate this layer; made duplicate Layer a Smart Object; went into the Smart Object and changed it to Lab mode; Saved Smart Object; Clicked back to original Layer Stack; Smart Object goes back to RGB mode in original stack; Mask to reveal only right hand side of Smart Object so left hand side is original RGB image. Here is the image at 200%. The banding is subtle yet is there - higher for going to Lab and back: Screen shot 2011-06-09 at 6.41.13 PM.png Depending on monitor this can be hard to see so increasing the contrast and brightness the comparison becomes more clear with smoother step gradient on the left original image and not as even for going to Lab and Back on the right. Screen shot 2011-06-09 at 6.41.52 PM.png Now if the image already had some noise or you add some noise/dither afterwards, this does not become noticeable. What is interesting you mentioned editing an 8 bit sRGB image in ProPhoto. Turns out, taking this 8 bit sRGB image to Lab and back has a very similar effect. All of the colors in most images only occupy a very small fraction of the A and B Lab channels (the A and B channel are both represented by 8 bit values). Therefore the color component/channels that were spread out over a larger number of RGB bits are compressed down into a smaller number of A and B channel bits (check you typical image and see what range of A and B are actually used - it is relatively small compare to the entire Lab range). When you go from Lab back to sRGB that compression comes back as a very small amount of color posterization/banding. So even though it is subtle, so are the differences in many things we do in our the workflow. All added up, each of those subtle differences can make a difference. So I just use the general rule of thumb to stay in 16 bit until the very end to avoid such issues. Hope that brings the discussion back from the technical (I have a tendency to do that Image leveraged from stock exchange - modified for use in this example http://www.sxc.hu/photo/1347672 |
|
#23
| |||
| |||
| Re: how to separate colour and luminance from RGB Hi John Thanks for sharing your way of doing it. Now next thing is I'm going to test this setup for the examples given in the lobster documentation. If the results are identical then we are successful. If there is deviation I will report back. Regards, Mukund |
|
#24
| ||||
| ||||
| Re: how to separate colour and luminance from RGB John, many thanks for going to the trouble of finding an example of the effect. For me I think your early statement "Independent of technical specs, actual experience is much more powerful" really nailed it! Thinking back to where I have used LAB there are generally two scenarios a. working with my own digital files from camera or scanner - always in 16 bit and b. forcing colour apart in poor images for restoration. So rarely do I work in 8 bit unless I have to. Your images clearly indicate the potential problem and one that I experienced when I decided to edit 8 bit in ProPhoto albeit with blue sky. So it does look like 8 bit RGB to LAB moves and 8 bit editing in 16 bit work space are open to this type of effect and therefore should generally be avoided. As you say the problem may be small but further work can/will compound the effect |
|
#25
| |||
| |||
| Re: how to separate colour and luminance from RGB I feel like I'm jumping into the color & luminance separation topic a little too late. I understand how to do the separation but my question is... why? Why would you do this and how would you use it? Please enlighten? Thanks... David |
|
#26
| ||||
| ||||
| Re: how to separate colour and luminance from RGB Using the Color/Luminosity blend modes, or separating the image like discussed, you can: * Edit the Luminosity ("brightness") without affecting the color (hue+saturation). * Edit the Color without changing the Luminosity. This can be useful on many occasions when retouching an image. One example is if you want to change the color of an object without making it brighter or darker, or if you wanted to even out skin color without affecting the Luminosity/brightness of the skin. There are many other applications as well (only limited by the imagination of the retoucher I guess). Ps: I recommend learning how to use the blending modes first before you consider if separating the image (or even converting to Lab) would provide you with a more useful workflow. |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Home Use for CMYK Separations | Jeff F | Hidden Power Support | 7 | 06-03-2003 10:45 AM |
| aerial photo | flight1 | Image Help | 9 | 04-06-2003 01:40 PM |