Wednesday 27 August 2008

Contrast based Photoshop masks

To find a contrasted shape of the object you want to select let's start by choosing a color space:

Color spaces

RGB

  • Red channel: Objects that are very red appear light, objects very cyan (red's opposite) appear dark.
  • Green channel: Green appears light and magenta appears dark.
  • Blue channel: Blue appears light and yellow appears dark.

Lab color

  • Lightness: Contains all the tonal (light-dark) information in the picture.
  • The a channel: Spectrum from green (negative) to magenta (positive).
  • The b channel: Spectrum from blue (negative) to yellow (positive).
Neutral tones (shades of white and gray) will occupy the midline of the a and b channel.

CMYK

Often used for printing, as it mimics the inks used on many printers: cyan, magenta, yellow, and black. It is a small color space, and generally not a good space to use for image editing. It can, however, be a good source of grayscale versions of your photo. Converting between RGB and Lab color has no loss of quality, but CMYK can throw away color information, so it may be useful to open a second copy of your image.

Technique

  1. Choose the channel in which your subject is the most prominent (Image>Mode), make a duplicate of it and then play with curves and levels to increase its contrast to get a B&W shape.
  2. Copy this modified channel, go back to RGB if you have changed color space, create a new channel, and paste it in.
  3. To make sure that the selection will match the original, paste it on top of the image as a new layer, lower the opacity to around 50% and erase the areas that don't match your object.
  4. Copying this channel to the clipboard, create two new curves adjustment layers, Alt-click on the layer mask to open up the layer mask and paste into it the mask from your clipboard.Paste it into both adjustment layers, and invert it on one of them. That way you have a mask of your object, and of everything else.
  5. To smooth the transition between adjustments, run a 0.7 pixels Gaussian Blur on each of the masks.
You can now modify the curves of the masks separately, or use them to create a selection.

via: How to selectively change parts of your image in photoshop

No comments: