How correctly define the pixel intensity of an image?

3.8k Views Asked by At

Let's do easy: I have an image IM and p(i,j) is the discrete intensity value of a pixel in the image IM (not necessarily 2-dimensional)..... How can I mathematically correctly define this? Thank you so much!

1

There are 1 best solutions below

0
On

It depends on what you exactly mean by "intensity". I suggest you familiarize yourself with different color models and the difference between additive and subtractive colors.

After this (probably too generic) answer, I'll give it a shot, whilst making some assumptions:

  • You're talking additive colorspace
  • You mean how "bright" a pixel shines, regardless of its color.
  • You want to calculate this "intensity" based on the RGB values of the image.

In that case, you'll find the HSL and/or HSV (Hue, Saturation and Lightness/Value, which are slightly different!) colorspaces useful. Check the link - it contains a lot of good information. I'll cite the lightness, value and intensity definitions from that page:

Brightness: The "attribute of a visual sensation according to which an area appears to emit more or less light".

Lightness or Value: The "brightness relative to the brightness of a similarly illuminated white".

Now, to the concretely answer of your question, in mathematical terms:

  • Value = max( R, G, B )
  • Lightness = 1/2 * max( R, G, B ) + 1/2 * min( R, G, B )

Where R, G and B are the values of a pixel in Red, Green and Blue colorspace.

Please refer to the previously mentioned link about HSV and HSB for a more elaborate explanation and some second thoughts.