Converting a Gray-Level Image into a Binary Image
Single Thresholding - Double Thresholding - Histogram-Based Single Thresholding - Histogram-Based Double Thresholding
Objective
Following this tutorial, you will learn how to use EasyImage to convert a gray-level source image into a binary destination image. Thresholding an image transforms all the gray pixels into black or white pixels, depending on whether they are below or above a specified threshold. Thresholding an image makes further analysis easier.
You'll need first to load an image (step 1). Then you'll set the thresholding parameters (step 2), and perform the conversion (step 3).
Gray-level source image
Black and white destination image, after thresholding
Step 1: Load the source image
1. | From the main menu, click EasyImage, then Threshold. |
2. | In the Simple Threshold tab, click the Open icon of the Source Image area, and load the image file EasyMatch\Switch1.tif. |
3. | Keep the default variable name for the new Image object, and click OK. |
Step 2: Set the thresholding parameters
1. | In the right area of the Threshold dialog box, move the slider to change the threshold, and see directly in the source image a preview of the result. |
2. | Select the Minimum residue option to set a pre-defined algorithm that finds automatically the right threshold. |
Step 3: Perform the conversion
1. | Click the New icon in the Destination Image area to create a new destination image. |
2. | Keep the default settings for the new Image object, and click OK. |
3. | In the Threshold dialog box, click Execute to perform the thresholding in the destination image. |