# Re: Measuring image contrast

aslak grinsted wrote:

Chon-Ji wrote:

rf wrote:

rf wrote:

Chon-Ji wrote:

Hello is there a way to measure the contrast of an
image?

thanks

The entire image or specific areas of the image?
rf

I meant to include the following definition in my previous
message.

The variation in the intensity of an image formed by an
optical
system as black and white bars. Image contrast is defined
as
(a
-
b)/(a + b), where a and b are the illuminance in the images
of
bright
and dark bars respectively.

HTH
rf

Is it possible to get the average contrast of the entire image?
Also
is there a way I could relate contrast to the ambient luminance
since
we know that luminance could also affect the contrast in the
image.
Basically, I need to test the performance of my system with
respect
to different levels luminance and contrast but not exactly sure
how
to present them

I don't know if there is any well defined method. But it seems
clear
you should measure some properties of the distribution of
grey-values
in your image. I suggest the following measures:

* Median absolute deviation (of image converted to black and white)
as a measure for contrast. Alternatively use the normal standard
deviation.

* Median as a measure of luminance.

* You could also check the skewness which may give some clues to
the
lightning conditions.

If saturated pixels is a common problem then you can try to make an
estimate of how many percent is affected by saturation and trim the
upper and lower x percentiles before analysis. You should keep the
x
constant though (or the measures wont be comparable between
images).

Aslak

Is there a way in matlab to compute for this media standard deviation?
.

## Relevant Pages

• Re: Measuring image contrast
... Chon-Ji wrote: ... Is it possible to get the average contrast of the entire image? ... we know that luminance could also affect the contrast in the image. ... If saturated pixels is a common problem then you can try to make an ...
(comp.soft-sys.matlab)
• Re: Measuring image contrast
... Chon-Ji wrote: ... Hello is there a way to measure the contrast of an image? ... system as black and white bars. ... we know that luminance could also affect the contrast in the image. ...
(comp.soft-sys.matlab)
• Re: Verifying calibrated gamma
... 300:1 and on a very good display 500:1 measured as Sequential contrast, ... Black measurement / Full white measurement. ... Director of Display and Capture Technologies ... should be nominally 1% of the full scale luminance: ...
(sci.engr.color)
• Re: Contrast scoring
... Michelson's contrast formulation based on luminance: ... divisor of 2 in the denominator, the divisor being necessary in order ... to find the the mean of the maximum and minimum luminance values. ...
(sci.image.processing)
• Re: My Latest CodeFez Article
... > turned on in his office, he also adjusted the contrast and luminance ... > settings on his CRT monitor down so much that it to me looked like a ... I actually have the contrast quite high. ...
(borland.public.delphi.non-technical)