Lesson 3. Correction and Binarization of Color Images

Brief description: During this lesson you will learn how to correct color images by histogram, binarize a color image and correct the results of binarization.

For detailed information on these subjects see the following sections of the Quick Start guide:
Correction by histogram, Separating color and greyscale images to monochrome layers, Filtering Monochrome Images.

Using correction of a color image by histogram you can tune the image brightness, hue and contrast. You can apply automatic correction by histogram or tune the parameters manually.

Choose Open from the File menu. Open the utrecht.cws file, created during the previous lesson from the Lesson_2-3 folder (or the Utrecht.tif file from the same folder if you skipped the previous exercise).

  • Choose Equalize from the Image menu.

During this exercise we will use the manual correction by histogram. To correct an image manually you need to specify three values: lightest and darkest levels and image gamma (that defines the position of the middle brightness value relative to the current threshold values) - for each channel or for Master channel.

In the Equalize dialog choose Master from the Channel list:

  • Lightest level is set using the White point eyedropper , using which you can specify the colours to turn white. (click one of the darkest pixel in the white part of the image).
    All pixels included in the histogram area from the right slider to 256, will turn white.
  • Darkest level is set using the Black point eyedropper , using which you can specify the colours to turn black. (click one of the lightest pixels in the black letters). 
    All pixels included in the histogram area from 0 to the left slider, will turn black.
  • Move the Histogram middle marker (setting the image gamma) to obtain the best result in the preview window.
    Moving the middle slider to the left increases the gamma value; the image becomes lighter.
    Moving the middle slider to the right reduces the gamma value; the image becomes darker.
  • When you achieve satisfactory result in the Preview window, press the Apply button.

Binarizing a color image

Binarization allows you to extract pixels of specified colors (or close to them) to a monochrome layer. For this, you need to specify colors on the original image to transfer to another layer.

During this exercise we use binarization to obtain a monochrome layer of roads, which are yellow on this image.

  • Choose Binarization from the Image menu.
  • Choose a binarization method - Range; for this, open the Range tab in the Binarization dialog.
  • Chose range method - by HSV and channel - Hue in the corresponding lists of the Range tab.
  • Specify a layer and its color to place the new monochrome image to. 
  • Using one of these eyedroppers specify the colours on the screen; they are added to the Colors list. The estimated binarization results are highlighted in the preview window.

INFORMATION:  the first eyedropper is for specifying a color for a specified pixel, the second eyedropper is for specifying the averaged color of all pixels adjacent to the one specified by you; the third eyedropper is for specifying the averaged color of the polygon defined by you.

  • You can delete incorrectly selected colors by pressing the Delete button. 
  • Tune the results using the sliders located in Ranges. 
  • You can delete small speckles that appear using the Noise Reduction slider - move it right, observing the changes in the preview window. 
  • When you achieve satisfactory results in the Preview window, press Apply
  • You can save the binarization template for future use. To do this, press the Template button, choose Save, and in the Save template File dialog specify a name and location, and then press the Save button.          

Improving the monochrome layer obtained after binarization

To improve the monochrome layer obtained after binarization, you can apply one or more of the WiseImage tools for enhancing monochrome images.

Let’s apply the Hole Remover and Smoothing filters to correct text areas.

For convenience, open the Image Manager by choosing Images from the Tools menu, and then turn off the display of the color image by pressing the button. Close Image Manager.

Hole Remover

  • Choose Hole Remover from the Filters menu.

  • Select the Auto estimating checkbox, and then press the Measure Max Size button and specify the largest hole.
  • Press Apply.

Smoothing

  • Choose Smoothing from the Filters menu.
  • Using the sliders - Medianning & Threshold - achieve the best result in the Preview window.
  • Press OK.       
   
Before applying Smoothing
After applying Smoothing

Thinning

If needed, you can apply the Thinning filter to make the obtained roads thinner.

  • Choose Thinning from the Filters menu.
  • Specify Number of Passes - 1.
  • Press OK.

 

 [ welcome ]   [ hybrid graphics ]   [ quick start ]   [ tutorial ]   [ reference ]   [ about ] 
 
 [ Welcome ]  [ WiseImage for Windows ]   [ WiseImage for AutoCAD ] 


 
top