Computing Gray-Level Statistics Using a Flexible Mask
Objective
Following this tutorial, you will learn how to compute gray-level statistics on an arbitrary-shaped area only.
You'll need first to load a source image (step 1), and a flexible mask image (step 2). The mask image must be applied on the source image (step 3), to separate do-care areas (that must be considered) and don't-care areas (that should not be considered). Finally, the gray-level statistics are computed on the do-care area only (step 4).
Source image (left) and flexible mask image (right)
Step 1: Load the source image
1. | From the main menu, click |
2. | Click the Open icon of the Source Image area, and load the image file EasyImage\Key1.tif. |
3. | Keep the default variable name for the new image object In a general content, the term object should be understood with the meaning of a class instance. In EasyObject, an object is a maximally-sized area of adjacent connected pixels belonging to the layer foreground., and click OK. |
Step 2: Load the flexible mask image
1. | From the main menu, click Image, then Open.... |
2. | Load the image file EasyImage\Mask2.bmp. |
3. | Keep the default variable name for the new image, and click OK. |
Step 3: Apply the flexible mask on the source image
1. | In the Mask area of the Gray Scale Image Pixels Statistics dialog box, select the mask image from the drop-down list. |
2. | The source image preview in the dialog box shows (in red diagonal lines) the don't-care area, that is the area that will be not be considered when computing the gray-level statistics. |
Step 4: Compute the gray-level statistics
1. | Select the Pixel Count check-box. |
2. | Click Execute. |
The results are displayed in the read-only fields below.