Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anyone know how I can extract just the black from the image below?

share|improve this question

migrated from Jul 2 '10 at 14:02

This question came from our site for professional and enthusiast programmers.

Select > Color Range > Blacks ?

Of course, there isn't really any black in the image - just a continuous range of red values, green values and blue values. You want to extract all pixels where r < cutoff, g < cutoff, b < cuttoff.

Try this,

Copy the image,

make a new layer filled with a solid colour of your choosing. Using the button at the bottom of the layers palette 'add a layer mask'.

In the layers palette alt-click on the empty layer mask thumbnail. You should now see an empty canvas - you are editing the layer mask.

Paste your image into the layer mask. It should appear greyscale. Press Apple-i (apologies, assuming mac) to invert it.

Exit layer mask edit mode by alt-clicking on the thumbnail again.

You should now see your solid colour layer masked by your inverted image, which roughly corresponds to the darkest values.

Change the fill colour of the layer to whatever you like. Black if you want the shadows.

try applying a curves filter to the mask to tweak the results.

share|improve this answer
i applied the photocopier filter.. seem to do the trick cheers – Alessandro Jul 2 '10 at 13:52
"Photocopier" was a crude way to do "Edge Detection" but if it worked for your purposes, great. – msw Jul 2 '10 at 14:13

You must log in to answer this question.