Counting pixels

Adam Cross

Suspended / Banned
Messages
19
Name
Adam
Edit My Images
No
Hi,

I'm looking to count the total number of pixels in a particular part of an image. I have selected and cut the subject from the image and pasted onto white background.

So, does anyone know of a way to count the number of (non-transparent?) pixels using Corel Paint Shop Pro X2 (the only software I have) from an image?

Many thanks.
 
For an approximation you could use a histogram approach. Find the number/percentage of white from the histogram. Then using the size of the white background get the number of white pixels. Subtract from total area to give the pixels in the image. But why would you need this LOL
 
Hi,

I'm looking to count the total number of pixels in a particular part of an image. I have selected and cut the subject from the image and pasted onto white background.

So, does anyone know of a way to count the number of (non-transparent?) pixels using Corel Paint Shop Pro X2 (the only software I have) from an image?

Many thanks.

Surely the way to do this is to ascertain the size of your cropped image before you paste it onto the white bg. Usually the pixel size of the image appears on the bottom right status bar while the image is open. Failing that you could use the image info off the drop-dowm image info menu to find the image size in pixels.

Alternatively, crop the part of the image off the white background being very accurate to crop it exactly. Paste it as a new image to see the info you need in the Info menu. Once you have the info you need , paste it back into the white bg as a new layer - position it carefully (just drag with the mouse) Flatten all layers and you're done.
 
Last edited:
For an approximation you could use a histogram approach. Find the number/percentage of white from the histogram. Then using the size of the white background get the number of white pixels. Subtract from total area to give the pixels in the image. But why would you need this LOL

Thanks for the advice, however I don't know how to interpret the histogram! I presume I count the number of pixels at values of 255...but which channel do I use: R, G, B, hue, saturation, lightness or greyscale? The image is a mixture of colours. Also, where do I count the pixels from within the histogram screen?

Possibly:
% in Range: 100 ("X")? Is "X" the number of pixels?


I'm trying to calibrate a model I've made estimating the number of pixels of the same subject at different focal lengths and distances.

Thanks.
 
Yes I assumed it wasn't a regular figure or you wouldn't be asking.. also you said you'd cut the subject from the image so it could have white pixels like the background. That's why I think an approximation is about all you'll get, unless you view at full resolution and count them individually. Yes white is 255 for R/G/B

Also had a search on Google where someone says that using the crop tool should tell you:
Go to Image > Histogram. It will tell you at the bottom the number of pixels in the
current selection, or the whole picture if none are selected.
I haven't used it so be interested how you get on
 
Back
Top