Skip to main content
Participant
August 6, 2024
Answered

Average K Value of a File

  • August 6, 2024
  • 2 replies
  • 495 views

Hi All,

I'm looking for a way to find the average K (black) value of a file/channel.

The histogram window works well for black and white files. I just divide the # of pixels that are selected by the total pixels in the file to get the percentage.

This is harder when there are gray pixels of any quantity involved. Pixels of 51% K or higher get selected and added to that tally of pixels selected. And it ignores pixels lower than 50% K. I could isolate only the gray pixels and find the quantity of those pixels, excluding full white and full black. But even if I did so, I dont know how to get the average. Another helpful alternative/work around would be for it to tell me how many 100% K value pixels a given number of selected gray pixels equals. For example, 4 pixels at 50% K equals 2 pixels at 100% K. So if those two pixel situations existed in an 8 pixel file, both files would read as 25% K/black. 

Ultimately, that is the outcome I am looking for. A full file colored at 50% gray should read the same as a half white and half black file by whatever method used. Then I can be confident that any other tonal/gray file using any combination of white/black/gray pixels will fall correctly in the spectrum of 100%/full coverage to 0%/no coverage.

Let me know if I need to clarify and thanks for any help!

This topic has been closed for replies.
Correct answer Semaphoric

Maybe duplicate the K channel and run Filter > Blur > Average on it.

2 replies

Semaphoric
Community Expert
SemaphoricCommunity ExpertCorrect answer
Community Expert
August 6, 2024

Maybe duplicate the K channel and run Filter > Blur > Average on it.

Participant
August 6, 2024

That looks like it works! Thank you!

D Fosse
Community Expert
Community Expert
August 6, 2024

There are no absolute K numbers.

 

Numbers are relative to the color space. That includes grayscale profile - the tone curves are different. The same visual value gives different numbers.

 

With a color RGB image, it's a double relative.

 

This will be calculated from the open document, via your working spaces to other modes.

Participant
August 6, 2024

Sure. But suppose we chose a color space to be our standard, or in this case a specific grayscale profile. Wouldn't then the K values between files be relatable?

D Fosse
Community Expert
Community Expert
August 6, 2024

If you stick specifically to, say, Adobe RGB and Gray Gamma 2.2, then yes.

 

But if you want universally valid - convert to Lab and use the Lab L numbers. That's absolute.