Highlighted

Count red pixels (no RGB)

New Here ,
Oct 20, 2020

Copy link to clipboard

Copied

For my work, I should analyse photo's of blood vessels. I already tried GIMP and Photoshop to do this but I only get the RGB value of the picture and that is not what I am looking for. 

I want to know the density of the blood vessels so I tought it would be easy to count the number of red pixels (red blood vessels) in the picture compared to the total amount of pixels. However, this does not work since I only get 1/3 th of the picture red, 1/3 blue and 1/3 green...

I already viewed several Youtube videos, read various posts but none are working for me.

Is there someone that could help me with this?

Thank you in advance.

TOPICS
How to, Windows

Views

41

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Count red pixels (no RGB)

New Here ,
Oct 20, 2020

Copy link to clipboard

Copied

For my work, I should analyse photo's of blood vessels. I already tried GIMP and Photoshop to do this but I only get the RGB value of the picture and that is not what I am looking for. 

I want to know the density of the blood vessels so I tought it would be easy to count the number of red pixels (red blood vessels) in the picture compared to the total amount of pixels. However, this does not work since I only get 1/3 th of the picture red, 1/3 blue and 1/3 green...

I already viewed several Youtube videos, read various posts but none are working for me.

Is there someone that could help me with this?

Thank you in advance.

TOPICS
How to, Windows

Views

42

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 20, 2020 0
Most Valuable Participant ,
Oct 20, 2020

Copy link to clipboard

Copied

Using  selections and the histogram you can get pixels counts and do the math in a photoshop script.

Capture.jpgimage.png

// jazz-y histogran pixel count
var a = 0, h = app.activeDocument.histogram;
for (i=0; i<256;i++) {a+= h[i]}
alert (a)
JJMack

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 20, 2020 2
New Here ,
Oct 20, 2020

Copy link to clipboard

Copied

Hi JJMack,

 

Thank you for your answer! I think this will be helpful. 

However, I am somewhat new to working with Photoshop and I can't find what selections you chose or how to write the message for pixel counts..

Are you able to explain this some more in detail?

Thank you very much.

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 20, 2020 0