Performing Color Segmentation
Color Components
Objective
Following this tutorial, you will learn how to use EasyImage to perform color segmentation.
You'll need first to load an image (step 1), create a color look-up table (step 2), and perform the segmentation (step 3).
Source image
Segmented image
Step 1: Load the source image
|
1.
|
From the main menu, click EasyColor, then Threshold. |
|
2.
|
Click the Open icon of the Source Image area, and load the image file EasyColor\Pills.tif. |
|
3.
|
Keep the default variable name for the new image object, and click OK. |
|
4.
|
Disable the Preview Mode check-box to see the raw source image. |
Step 2: Create a color lookup table
|
1.
|
Click the New icon of the Color Lookup area. |
|
2.
|
Keep the default variable name for the new color lookup object, and click OK. |
Step 3: Perform the color segmentation
|
1.
|
Select LSH from the Color System drop-down list. |
|
2.
|
In the source image, click in the center of a green pill. The pixel lightness, saturation and hue values are updated in the Color Threshold dialog box. |
|
3.
|
Increase the lightness tolerance up to 120. Increase the saturation tolerance up to 50. |
|
4.
|
Enable the Preview Mode check-box to see the result of the segmentation. If needed, click in the green pills to improve the result. |
|
5.
|
Click the New icon of the Destination Image area. |
|
6.
|
Keep the default settings for the new Image object, and click OK. |
|
7.
|
The new image is automatically thresholded. Clicking Execute will insert the corresponding code into the script windows. |