RetouchPRO

Go Back   RetouchPRO > Technique > Photo Retouching
Register Blogs FAQ Site Nav Search Today's Posts Mark Forums Read


Photo Retouching "Improving" photos, post-production, correction, etc.

how can i separate colors from light ?

Reply
 
Thread Tools
  #1  
Old 08-07-2011, 01:44 AM
mantra's Avatar
mantra mantra is offline
Senior Member
 
Join Date: Apr 2010
Location: Rome
Posts: 285
Question how can i separate colors from light ?

Hi

how can i separate colors from light ?

in short i want a mask that contains only the colors

i did this , but not sure it's right

channel palette->ctrl + click on rgb -> save selection (lights)

select->inverse ->save (shadow+midtones)

ctrl click on lights+ctrl+shift click on (shadow+midtones) -> save (all light)

copy/duplicate (all light) and ->image->adjustament->invert ---> does this mask contains only the colors without the lights?


thanks
cheers
Reply With Quote top
  #2  
Old 08-07-2011, 06:57 AM
MacBurg's Avatar
MacBurg MacBurg is offline
Senior Member
 
Join Date: Jun 2007
Location: Waihi Beach, New Zealand
Posts: 207
Re: how can i separate colors from light ?

What you are doing above is based on luminosity values and has nothing to do with colour, well separating the colour info anyway, as you are disregarding the colour information in the first step.

There are various ways to view and work with just the colour info in an image though. You could convert the image to Lab mode and work on colour via the a & b channels which contain only the colour info in the image. You could create a saturation mask which shows you the colour info and strength within the image, here's an action that sets you up with a new channel that you can use as a mask -

http://www.mediafire.com/?udubkw7hb1w26sa

Check out the colour map in that action set too, it shows you the colour info in an image if you change the blending mode of the resulting layer back to "Normal". Also have a read of this thread over at MM -

http://www.modelmayhem.com/po.php?thread_id=774012
Reply With Quote top
  #3  
Old 08-07-2011, 11:28 AM
mantra's Avatar
mantra mantra is offline
Senior Member
 
Join Date: Apr 2010
Location: Rome
Posts: 285
Re: how can i separate colors from light ?

Quote:
Originally Posted by MacBurg View Post
What you are doing above is based on luminosity values and has nothing to do with colour, well separating the colour info anyway, as you are disregarding the colour information in the first step.

There are various ways to view and work with just the colour info in an image though. You could convert the image to Lab mode and work on colour via the a & b channels which contain only the colour info in the image. You could create a saturation mask which shows you the colour info and strength within the image, here's an action that sets you up with a new channel that you can use as a mask -

http://www.mediafire.com/?udubkw7hb1w26sa

Check out the colour map in that action set too, it shows you the colour info in an image if you change the blending mode of the resulting layer back to "Normal". Also have a read of this thread over at MM -

http://www.modelmayhem.com/po.php?thread_id=774012
well but but invert a mask of all lights ,should give me the colors....

the action ,yes it create a mask , but doesn't contains all the colors
Reply With Quote top
  #4  
Old 08-07-2011, 01:32 PM
John Wheeler's Avatar
John Wheeler John Wheeler is offline
Senior Member
 
Join Date: May 2011
Location: Colorado
Posts: 583
Re: how can i separate colors from light ?

Buona sera!
Hi Mantra
The mask you create with your approach will hide the areas with both high and low luminosity/tone while revealing the mid-range tones more. This may or may not be what you want. Both high tone and low tone areas of an image often don't have much color (low saturation in high tones and low luminosity in low tones). Yet your approach would not hide mid-tone grays (which have no color). So if you are trying to also hide mid-tone grays, you mask approach would not work in that situation if I followed your step by steps correctly.

If you want a mask that emphasizes/reveals colored areas and minimizes areas that have very low color including mid-tone areas (i.e. R~G~B), then I agree with MacBurg that using a Saturation Mask will provide a better result.

This type of Saturation Mask is defined by: Max(R,G,B) - Min(R,G,B)
That is the saturation definition used by Blend mode of Saturation which is different than the definition of Saturation used in the Color Picker.

Of course this just creates the mask and the mask needs to be used in a Layer Mask or an Adjustment Layer Mask to limit adjustments to just the high color areas.

MacBurg's action does the trick and I also have a 2 Layer shortcut to achieve the same thing if there is interest.
Reply With Quote top
  #5  
Old 08-07-2011, 01:52 PM
assortedpixels assortedpixels is offline
Junior Member
 
Join Date: Nov 2009
Posts: 2
Re: how can i separate colors from light ?

I learned this method to replicate channels in PS Elements, but it may also help with what you're after.

The idea is to create 3 new layers one each of Red, Blue, Green. You can then use normal masks / selections techniques to modify only one color as desired.

To separate the colors.
1. Copy the background layer and leave it active
2. Create a new Fill layer (solid color), choose the first color you prefer (red at 255 for example)
3. Set the new fill layer to multiply
4. Ctrl Alt Shift E to create a new layer (name this red)
5. Deselect the Eye icon on your new Red layer.
6. Change the color of the fill layer to blue, then repeat step 4.
7. Repeat step 6 but now for green.

You now have 3 separated color layers, you can delete the fill layer at this point.

To recombine the layers:
Set the bottom layer blending mode to Normal, and the other 2 layers blending mode to Screen.
Reply With Quote top
  #6  
Old 08-08-2011, 12:17 AM
mantra's Avatar
mantra mantra is offline
Senior Member
 
Join Date: Apr 2010
Location: Rome
Posts: 285
Re: how can i separate colors from light ?

Quote:
Originally Posted by John Wheeler View Post
Buona sera!
Hi Mantra
The mask you create with your approach will hide the areas with both high and low luminosity/tone while revealing the mid-range tones more. This may or may not be what you want. Both high tone and low tone areas of an image often don't have much color (low saturation in high tones and low luminosity in low tones). Yet your approach would not hide mid-tone grays (which have no color). So if you are trying to also hide mid-tone grays, you mask approach would not work in that situation if I followed your step by steps correctly.
thanks John for the exhaustive answer , but i can't understand one thing
maybe i'm stubborn but really can not understand
Quote:
The mask you create with your approach will hide the areas with both high and low luminosity/tone while revealing the mid-range tones more
why?
i'm running photoshop now and check what i did
1) channel palette->ctrl + click on rgb -> save selection (lights)
i can see in the histogram the lights selected

2)select->inverse ->save (shadow+midtones)
now i can see in the histogram shadow and midtones

3) ctrl click on lights+ctrl+shift click on (shadow+midtones) -> save (all light)

adding lights + shadows and mitones =all lights ,i can see in the histogram

is right ? i mean now should i have selected all the luminocity of the photo

can not understand
Quote:
while revealing the mid-range tones more
?

thanks
Reply With Quote top
  #7  
Old 08-08-2011, 01:09 AM
MacBurg's Avatar
MacBurg MacBurg is offline
Senior Member
 
Join Date: Jun 2007
Location: Waihi Beach, New Zealand
Posts: 207
Re: how can i separate colors from light ?

Again you need to understand better what you are doing in that first step, which is the same for the further steps in your process. Its quite hard to get your head around, and even harder to explain, but the RGB channel is a mix of luminosity and colour values throughout the individual R,G & B channels. You are used to seeing a channel display its information in a shade of grey, lighter shades equaling more information, darker less.

So when you click on the RGB and convert it into a channel you are disregarding colour information right there, instead it is showing luminosity values that don't represent colour anymore.

A dark saturated green object in the image will now show less information in your RGB channel than a light green object with similar saturation.

Am I making sense? I'm not sure myself as its a hard one to explain, for me anyway, John said it right above where he mentions and you quoted -

"The mask you create with your approach will hide the areas with both high and low luminosity/tone while revealing the mid-range tones more"

Open an image and compare for example your RGB channel saved as "Lights" with the images RGB channel, use hotkeys ctrl+~ & ctrl+4 to toggle between them. Compare individual colours and you will see that a saturated blue might be a light shade of grey in your RGB channel but a similarly saturated red might be a dark grey.
Reply With Quote top
  #8  
Old 08-08-2011, 04:40 AM
Der_W's Avatar
Der_W Der_W is offline
Senior Member
 
Join Date: Jul 2009
Location: Germany
Posts: 558
Re: how can i separate colors from light ?

Actually what you're doing is not a selection of the luminosity, but you're selecting the mid tones of your image.
You're selecting the lights first, then the shadows, what's not selected 100% is the mid tones. Invert this again and you're left with the mid tones.

This is because in RGB luminosity and color is not as easily separated as in say LAB where there is an extra Lightness channel.
In RGB we have to use a specific formula to extract the luminosity which is about 30% Red, 59% Green and 11% Blue (which is what happens when you just [Ctrl]-click the RGB channel - minus Gamma conversion depending on the working space grayscale profile, but we may leave that aside for now).
Now to select only the colors of your image, you'll need to subtract the luminosity from your image (e.g. instead of 100% in the Red channel you'll have about 70% Red, -59% Green and -11% Blue).
Because this returns in RGB values < 0, you might want to add an offset of 128.

This is what you need to do, an easy way for this would be to create a new layer, fill it with 50% gray and blend it in "Luminosity" mode. This will give you just the colors of your image. You can copy the content of this layer into a layer mask if you want to, e.g. using Apply Image.
If you blend the layer in "Color" mode on the other hand, this will give you all the luminosity information without the color.

This approach is btw. pretty similar to a recent thread in which the Photoshop plugin Lobster was discussed, which also separates Luminosity and Color information in RGB.
Reply With Quote top
  #9  
Old 08-08-2011, 08:45 AM
Dropt Dropt is offline
Junior Member
 
Join Date: Jul 2011
Posts: 25
Re: how can i separate colors from light ?

Der_W,

I'm quite interested in where is that formula coming from, can you develop please ?

Also, I don't get why a 50% grey in luminosity is giving the colors as a result. The grey is standing for a 128 offset right ?

Edit : I think I get it; If you blend all your luminosity to a medium grey value, only remains the colors, and same goes for the colors. If all the colors are grey, only lights and shadow remains.

Last edited by Dropt; 08-08-2011 at 09:03 AM.
Reply With Quote top
  #10  
Old 08-08-2011, 11:10 AM
John Wheeler's Avatar
John Wheeler John Wheeler is offline
Senior Member
 
Join Date: May 2011
Location: Colorado
Posts: 583
Re: how can i separate colors from light ?

Hi Mantra

Sorry we are having trouble in the communication. Partly this is probably language, partly terminology, and partly possibly some misunderstanding on the additive color theory standpoint.

I see you have two issues.

1) An understanding of what you get when you do a Ctrl Click on the Thumbnail of the RGB composite in the Channels Panel

2) A way to solve you initial problem which is how to isolate items of "color"

------------------

For issue number one sometimes an example will describe this better than any text that I can write.

Below is a layer stack and the image it created:
- I used the Spectrum gradient in the Angle Gradient mode to create the lowest.
- I added a Hue/Sat Adj Layer on top with the Saturation set to -100. The mask I used with this Adj Layer was simple a radial gradient going from black to white.
- The resulting image are colors in the middle going to fully desaturated or no color in the perimeter. Here is that image (click thumbnail):

Screen shot 2011-08-08 at 9.18.08 AM.png

In this next image all I did was Ctrl Click the RGB Thumbnail in the Channels Pallette (Cmd Click for Macs). Note that the Marching Ants cover an area that is not just Highlights yet also a lot of areas with color:

Screen shot 2011-08-08 at 9.07.50 AM.png

Below is the mask image itself:

Screen shot 2011-08-08 at 9.24.32 AM.png

In this next image I used the color sampler tool with two samples inside the selection and two that are outside the selection. I set the samplers to read in terms of Grayscale or "K" (High K is dark and low K is light).

The defined boundary of the marching ants is exactly where K is 50%. All values inside the selection are brighter with K values less than 50% and the areas outside the boundary are darker with K values greater than 50%:

Screen shot 2011-08-08 at 9.28.56 AM.png

To demonstrate further, I created a simple grayscale image which is just a radial black to white and then did the Ctrl Click on the RGB thumbnail in channels again also with sampler tool points:

Screen shot 2011-08-08 at 9.46.00 AM.png

Note that the selection is around the lighter areas (K values low). The inverse of that however does not define the location of colors. It only defines the areas that are darker or K values that are greater than 50%.

The selection approach that you documented is based on brightness/luminosity/grayscale value so will not group colors together, it will rather separate out colors (include or exclude) base on the brightness. I don't think that is what you want.

For the final image I ran the action created provided by MacBurg on the color image I created and took that channel mask and loaded it as a selection. Note that the selection is a perfect circle selecting what I believe you want which is just the colors (click link since I can only post 5 thumbnails):

http://i774.photobucket.com/albums/y...at100027AM.png

Let us know if that helps.
Reply With Quote top
Reply

  RetouchPRO > Technique > Photo Retouching


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
can any1 tell me what this light setup mawake3 Photography 2 07-05-2011 10:46 AM
how to achieve the same colors and contrast? przemekb Photo Retouching 27 11-26-2010 05:17 PM
Light distortion? Any help for fix in Photoshop tturner Photo Restoration 2 11-25-2010 11:38 PM
How to create light on face? qpixo Photo Retouching 10 10-12-2010 07:06 AM
RGB separation on 2 separate areas tatrader Hidden Power Support 1 03-09-2005 12:32 PM


All times are GMT -6. The time now is 04:32 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2016 Doug Nelson. All Rights Reserved