I wanted to generate Gray Scale wedge image of 10 Levels in MATLAB and then increase and decrease its Intensity. By high intensity, I mean mapping increasing the level of gray scale intensity in an image from lower value to higher values.

The examples I have tried were performed on a Gray Scale wedge image of 10 levels:

    0   28   57   85  113  142  170  198  227  255

I was using the function `imadjust`. For increasing the intensity levels I used:

     imadjust(grayStepImage, [.35 .75], [0.7 0.8])

The output:

    179  179  179  179  184  192  199  204  204  204

and the result in image form:

![enter image description here][1]


Similarly, for lowering the intensity I used

    imadjust(grayStepImage, [.35 .75], [0.1 0.39])

Original and modified levels are:

    0   28   57   85  113  142  170  198  227  255


    26   26   26   26   43   64   84   99   99   99

and the result in image form:

![enter image description here][2]

Was I actually increasing/lowering intensity of the image? How do those operations relate to the case of increasing and decreasing the contrast of an image?

What I know about contrast is,

> Contrast is defined as the separation between the darkest and
> brightest areas of the image. Increase contrast and you increase the
> separation between dark and bright, making shadows darker and
> highlights brighter.

Does that mean, if I want to increase the contrast of an image I should increase the high intensity levels of an image to much higher and lower intensity level to much lower?

I am confused with contrast and the intensity as they seem opposite to each other.
Kindly help me out.

  [1]: http://i.stack.imgur.com/fdbAz.png
  [2]: http://i.stack.imgur.com/uUO4F.png