Colours

S
Posted By
Stuart
Jul 1, 2005
Views
432
Replies
14
Status
Closed
Is there a function in photoshop (or via a plugin) that will show the number of pixels for each colour. e.g. I would like to find the number of blue pixels in a particular image.

Stuart

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

MR
Mike Russell
Jul 1, 2005
"Stuart" wrote in message
Is there a function in photoshop (or via a plugin) that will show the number of pixels for each colour. e.g. I would like to find the number of blue pixels in a particular image.

Use Select>Color Range followed by the Histogram to count the pixels. In CS2 you need to select the expanded histogram. The number of pixels is in the lower left corner.


Mike Russell
www.curvemeister.com
S
Stuart
Jul 1, 2005
Mike Russell wrote:

"Stuart" wrote in message

Is there a function in photoshop (or via a plugin) that will show the number of pixels for each colour. e.g. I would like to find the number of blue pixels in a particular image.

Use Select>Color Range followed by the Histogram to count the pixels. In CS2 you need to select the expanded histogram. The number of pixels is in the lower left corner.

Is there a way of doing it without needing to select anything, is there something that can give the totals for the image of all the different colours.
LI
Lorem Ipsum
Jul 1, 2005
"Stuart" wrote in message

Is there a way of doing it without needing to select anything, is there something that can give the totals for the image of all the different colours.

Not that I know of, and I think I know why: there are typically thousands of colors!
T
Tacit
Jul 1, 2005
In article <Ckfxe.15779$>,
Stuart wrote:

Is there a function in photoshop (or via a plugin) that will show the number of pixels for each colour. e.g. I would like to find the number of blue pixels in a particular image.

Define "blue." Remember, every single different shade of blue and every single lightness value of every shade of blue counts as a different color to Photoshop!

It is not realistic to make a list of the number of pixels of every color. An 8-bit RGB image can have over 16,000,000 colors in it, and an image may easily contain tens of millions of pixels.


Art, photography, shareware, polyamory, literature, kink: all at http://www.xeromag.com/franklin.html
R
Roberto
Jul 2, 2005
Zoom in and start counting. It is called the human plug-in! Just kidding. That would be kind of hard. How would Photoshop now what to call each color? If it should a little swatch of each color and the number of pixels that list could get quite long and take sometime to generate. But, even then it wouldn’t be that helpful because there are at least hundreds of shades of blue, which one do you want?

I would however like to have a feature that told me how many different colors were in the image. I don’t care what they are but, something like 124,560 colors. Would be handy sometimes.

Robert
T
toby
Jul 2, 2005
Robert Barnett wrote:


I would however like to have a feature that told me how many different colors were in the image. I don’t care what they are but, something like 124,560 colors. Would be handy sometimes.

Here is a filter that does just that:
http://www.telegraphics.com.au/sw/#countcolours

Robert
S
Stuart
Jul 2, 2005
toby wrote:
Robert Barnett wrote:



I would however like to have a feature that told me how many different colors were in the image. I don’t care what they are but, something like 124,560 colors. Would be handy sometimes.

Here is a filter that does just that:
http://www.telegraphics.com.au/sw/#countcolours

Robert

Just what I wanted, thanks. Will try it when back in work on Monday.

To the other posters:

What I should have mentioned in my earlier posts is the image contains blue and yellow only.

Stuart
R
Roberto
Jul 3, 2005
Still it doesn’t matter, Photoshop doesn’t no blue from yellow from green from red. While you could create something that showed a small swatch of the color and then the number of pixels contained in that image that are that color. This would not work for images that half millions of colors. It could cause Photoshop to drop to crawl and who knows that it would do to memory. Generating such a list is just not practical. Adobe or anyone else for that matter can’t add a feature that has a disclaimer attached that says you can only use this on images with 16 colors. Using it on any more will cause crashes. They would have to do it so that it worked on all images and that just isn’t something that is practical.

Robert
R
Roberto
Jul 3, 2005
Interesting plug-in. All it does it tell you how many colors are in your image for all of the channels. For example I ran it on a digital camera image and it reported…

554128 Colours in 3 channels
Size 4886 x 2480 = 12117280 pixels

Interesting…

Robert
T
toby
Jul 3, 2005
Robert Barnett wrote:
Interesting plug-in. All it does it tell you how many colors are in your image for all of the channels. For example I ran it on a digital camera image and it reported…

554128 Colours in 3 channels
Size 4886 x 2480 = 12117280 pixels

It reports the number of distinct R,G,B triples. This is equivalent to the same feature in Paint Shop Pro. One possible application for this is to easily detect when a 24-bit image has been converted from a shallower format (such as 8,12,16-bit palette).

To address your earlier concerns, and possibly the needs of the original poster, it is fairly easy to define colour "ranges" (e.g. using Photoshop’s selection tools) and get statistics on them with Photoshop’s built-in tools such as Histogram (you could save the selection channel first). These ranges need not have hard limits.

Only the OP can say which approach is more useful for his purpose.

–Toby

Interesting…

Robert
M
Mike
Jul 4, 2005
In article <Ckfxe.15779$ says…
Is there a function in photoshop (or via a plugin) that will show the number of pixels for each colour. e.g. I would like to find the number of blue pixels in a particular image.

Stuart
This seems to work. Use the magic wand to select all the pixels you want to count then go to Image/Histogram. The number of selected pixels is displayed at the bottom left. Works on PS 7.0
O
Odysseus
Jul 5, 2005
In article <wPfxe.15413$>,
Stuart wrote:

Is there a function in photoshop (or via a plugin) that will show the number of pixels for each colour. e.g. I would like to find the number of blue pixels in a particular image.

Is there a way of doing it without needing to select anything, is there something that can give the totals for the image of all the different colours.

Well, you could open the blue channel’s histogram and look at the pixel-count for B values higher than a certain threshold of your choice — but that would include areas with R or G as well. OTOH if everything in the image is either bluish or yellowish, and the latter colours are all quite saturated (i.e. have little B in them), this method might be able to tell you what you want.


Odysseus
S
Stuart
Jul 5, 2005
toby wrote:
Robert Barnett wrote:

Interesting plug-in. All it does it tell you how many colors are in your image for all of the channels. For example I ran it on a digital camera image and it reported…

554128 Colours in 3 channels
Size 4886 x 2480 = 12117280 pixels

It reports the number of distinct R,G,B triples. This is equivalent to the same feature in Paint Shop Pro. One possible application for this is to easily detect when a 24-bit image has been converted from a shallower format (such as 8,12,16-bit palette).

To address your earlier concerns, and possibly the needs of the original poster, it is fairly easy to define colour "ranges" (e.g. using Photoshop’s selection tools) and get statistics on them with Photoshop’s built-in tools such as Histogram (you could save the selection channel first). These ranges need not have hard limits.
Only the OP can say which approach is more useful for his purpose.
–Toby

Interesting…

Robert
After looking at it, it doesn’t do what I thought it was going to do, will have to look at the other options.

Thanks for the suggestions.
T
toby
Jul 6, 2005
Stuart wrote:

After looking at it, it doesn’t do what I thought it was going to do, will have to look at the other options.

Thanks for the suggestions.

Feel free to expound more on your requirement. Maybe we can help solve it.

–T

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

Related Discussion Topics

Nice and short text about related topics in discussion sections