### Contrast

The Contrast operation is used to enhance the visual quality of the image represented by a raster file. The available methods in TerraLib are:

- Linear: The user defines a new minimum and maximum values for the pixels in the image. The algorithm then applies a linear function over the pixels using this 2 values.

- Histogram Equalization: Using this method, the histogram of the image will be equalized automatically.

- Set Mean and Standard Deviation: The contrasted image will have a predefined mean and standard deviation, defined by the user.

It is accessible through:
Raster Processing > Contrast... (list of all raster layers will be available)
This wizard consists of the following steps:

#### Wizard Page 1 - Selection of the layer to apply the contrast (Layer Search)

1. On the List of Layers select the raster layer to apply the contrast.

2. Optionally use Filter By Name field giving part of the layer name to help find the layer in the list.
3. Press Next to go to next step or Cancel to close the dialog.

#### Wizard Page 2 - Contrast parameters

1. Select the Type of contrast to be used (Linear, Histogram or Mean and Standard deviation).
2. In Raster Bands check the desired bands and set the specific parameters which will varies depending on the contrast type chosen. Double Click over the cell of each parameter to make the cell editable and then change the value and press enter:

1. If Linear: set the new value for Minimum and/or Maximum,
2. If Histogram Equalization: set the new value for Maximum,
3. If Mean and Standard Deviation: set the new value for Mean and/or Std Dev.

3. On the Preview section click on to have a preview of the contrast with the parameters informed.
4. Press Next to apply the contrast or Back to go to the previous wizard page.

#### Wizard Page 3 - Output information

1. Raster Info - First press and inform the folder where the resulting file will be saved.
2. Name - inform the raster name.
3. Extra Parameters - if there are some, see the details on how to inform then here.
4. Press Finish to save the resulting contrasted raster or Back to go to the previous wizard page.

Hint: The contrasted image will be added as a new layer at the TerraView project.