Threshold

PE
Posted By
phoney.email
Apr 6, 2004
Views
591
Replies
4
Status
Closed
Photoshop 6.0.1

Three quickies…

1. Is it possible to do threshold based on combined RGB rather than Luminance? (Luminance uses a weighted formula to change RGB ratios.)

2. Failing that, would it be possible to do threshold on individual RGB channels, i.e. on single colors? (I can copy channels, etc, but that’s clumsy.)

3. And last but not least:
How do I do a "bandpass threshold"?
What I mean by this is select a range of values instead of a single cut-off point. In other words, threshold selects everything from the cut-off point to 255. I’d like to be able to modify the "to" number and use values other than 255 e.g. 100-200.

I can kludge this with layers and layer masks, of course, but I thought there may be a simpler way…

Thanks!

Don.

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

BV
Bart van der Wolf
Apr 6, 2004
"Don" wrote in message
SNIP
1. Is it possible to do threshold based on combined RGB rather than Luminance? (Luminance uses a weighted formula to change RGB ratios.)

Blending two layers based on R=G=B can be done with the Layer Style Blending options. The two sliders at the bottom will allow to blend the active layer with a lower layer with a sharp or smooth transition. Of course you can do that more accurately by partially masking a layer, where the mask can be based on a e.g. (temporary) Desaturated layer and a Select|Color Range (select a Black or White pixel and increase fuzziness).

Bart
WS
Warren Sarle
Apr 6, 2004
"Don" wrote in message
Photoshop 6.0.1

I can answer for Photoshop 7 but don’t have 6.

1. Is it possible to do threshold based on combined RGB rather than Luminance? (Luminance uses a weighted formula to change RGB ratios.)

You can use the Channel Mixer to compute any linear combination of RGB values you want. Put a check in the monochrome box to make all three resulting channels the same.

2. Failing that, would it be possible to do threshold on individual RGB channels, i.e. on single colors? (I can copy channels, etc, but that’s clumsy.)

Choose any channel in the channels palette and use Image>Adjustments> Threshold

3. And last but not least:
How do I do a "bandpass threshold"?
What I mean by this is select a range of values instead of a single cut-off point. In other words, threshold selects everything from the cut-off point to 255. I’d like to be able to modify the "to" number and use values other than 255 e.g. 100-200.

I can kludge this with layers and layer masks, of course, but I thought there may be a simpler way…

The simplest way I can think of right off is to use curves with the pencil tool instead of the spline tool, although it may be a little tricky to get a threshold at precisely 100.
PE
phoney.email
Apr 7, 2004
On Tue, 06 Apr 2004 23:50:36 GMT, "Warren Sarle" wrote:

Photoshop 6.0.1

I can answer for Photoshop 7 but don’t have 6.

1. Is it possible to do threshold based on combined RGB rather than Luminance? (Luminance uses a weighted formula to change RGB ratios.)

You can use the Channel Mixer to compute any linear combination of RGB values you want. Put a check in the monochrome box to make all three resulting channels the same.

OK, that works here as well (version 6). I used 33% to get all 3 channels in equal amounts and the result is a grayscale image.

I ran a test by doing a threshold on the original image, and a threshold on this "balanced" grayscale image (created with above Channel Mixer method). Doing "Apply Image / Subtract" on those two thresholds does reveal a difference but is that difference the result of a balanced image (which is what I want) or integer arithmetic error due to using 33% rather than 33.333…%?

Sorry to be a pedant about this, but I just want to make sure I understand.

2. Failing that, would it be possible to do threshold on individual RGB channels, i.e. on single colors? (I can copy channels, etc, but that’s clumsy.)

Choose any channel in the channels palette and use Image>Adjustments> Threshold

Right in front of my nose all along, eh? ;o)

3. And last but not least:
How do I do a "bandpass threshold"?
What I mean by this is select a range of values instead of a single cut-off point. In other words, threshold selects everything from the cut-off point to 255. I’d like to be able to modify the "to" number and use values other than 255 e.g. 100-200.

I can kludge this with layers and layer masks, of course, but I thought there may be a simpler way…

The simplest way I can think of right off is to use curves with the pencil tool instead of the spline tool, although it may be a little tricky to get a threshold at precisely 100.

You’re right, it is difficult to get exact values. I guess I’ll just have to play with layer masks and get a "bandpass threshold" that way.

This seems to work… Using the above 100-200 example:
1. Do a threshold on the image with 100.
2. Select All & Copy
3. Click on History to remove threshold
4. Create Layer Mask and Paste the 100 threshold

This makes everything below 100 transparent.

5. Do another threshold with 200 (actually 201 to be pedantic…)
6. Flatten image.

Hey, presto, a "bandpass threshold" i.e. a bandpass mask of everything between 100 and 200. At least I think so… ;o)

What would be nice, though, is to have two sliders in threshold so changes can be observed in real time.

Don.
PE
phoney.email
Apr 7, 2004
On Tue, 6 Apr 2004 15:34:20 +0200, "Bart van der Wolf" wrote:

"Don" wrote in message
SNIP
1. Is it possible to do threshold based on combined RGB rather than Luminance? (Luminance uses a weighted formula to change RGB ratios.)

Blending two layers based on R=G=B can be done with the Layer Style Blending options. The two sliders at the bottom will allow to blend the active layer with a lower layer with a sharp or smooth transition. Of course you can do that more accurately by partially masking a layer, where the mask can be based on a e.g. (temporary) Desaturated layer and a Select|Color Range (select a Black or White pixel and increase fuzziness).

Sorry to be dense, Bart, but which two layers do I blend?

Are you referring to copying individual channels to a layer and then blending them?

Don.

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

Related Discussion Topics

Nice and short text about related topics in discussion sections