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 binarization results.

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

Correcting a color image by histogram

Using correction 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.dwg file, created during the previous lesson from the Lesson_2-3 folder
- or -
Open a new AutoCAD document - with the Open command from the rFile menu open the Utrecht.tif document from Lesson_2-3 folder.

  • Choose Equalize from the Image menu.       

During this exercise we will use manual correction by histogram. To correct an image manually you need to specify three values: lightest and darkest levels and image gamma (which 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 box choose Master from the Channel list.
  • The lightest level is set using the light eyedropper , with which you can specify the colours to turn white. (click on one of the darkest pixels in the white part of the image).
    All pixels that are lighter that the specified value, will turn white.
  • The darkest level is set using the dark eyedropper , with which you can specify the colours to turn black. (click on one of the lightest pixels in the black letters). 
    All pixels that are darker than the specified value will turn black.
  • Move the middle marker of the Histogram (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 a result you are happy with in the Preview window, press the Apply button.
           

Binarizing a color image

Binarization allows you to extract pixels of specified colors (or colors close to them) to a monochrome layer. To do 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 rImage menu.
  • Choose the binarization method - Range;  Open the Range tab in the Binarization dialog.
  • Chose a range method - by HSV and channel - Hue in the corresponding lists of the Range tab.
  • Specify a Layer and its color on which the new monochrome image will be placed.
  • Using one of these eyedroppers specify a range of colors that form the roads; these colors are added to the Colors list. The estimated binarization results are shown in the preview window. 

INFORMATION: The first eyedropper is used for specifying a color for a specified pixel, the second eyedropper is used for specifying the averaged color of all pixels adjacent to the specified by you; the third eyedropper is used for specifying the averaged color of pixels contained within a 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 towards the right, and observe 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 some of the WiseImage tools for enhancing monochrome images.

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

To make this operation easier, turn off the visibility of the AutoCAD layer that contains the color image.

Hole Remover

  • Choose Hole Remover from the Filters menu.
  • Clear the Auto estimating checkbox, then press the Measure Max Size button and specify the largest hole on the image.
  • 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 equal to '1'.
  • Press OK.       

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


 
top