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?
.