X

Help Articles are product support tips and information straight from the NV5 Geospatial Technical Support team developed to help you use our products to their fullest potential.



4286 Rate this article:
No rating

How the DILATE function works on a grayscale image.

This Help Article walks through the operations performed by the DILATE routine.

Discussion

Let A be the following array:

tt3534_image1.jpeg

Define S to be the following structuring element with origin at element (1,1):

tt3534_image2.jpeg

The origin of the structuring element, denoted as O, is systematically placed over each pixel in the image, with the exception of image pixels which result in a portion of the structuring element outside of the image (entries (0,0), (0,1), (0,2), (0,3), (1,0), (2,0) and (3,0) in this example), and then used to determine potential new values for the pixels under the remaining elements of the structuring element. Note that the final value of a pixel is not being determined; Just potential values for the final output.

In this example, O is first placed over A[1,1] (The position of the structuring element is boldfaced with O's position underlined).

tt3534_image3.jpeg

Placing O over A[2,1], we get more potential pixel values.

tt3534_image4.jpeg

Continuing this process over A[i,j], 1 <= i <= 3, 1 <= j <= 2, we get the following potential pixel values:

tt3534_image5.jpeg

The next pixel over which O will be placed is A[1,3] = 0. Since this pixel value is 0, no new potential pixel values will be added to the sets for A[0,2], A[1,2], A[0,3] and A[1,3]. Since all of image pixel values are non-negative in this case, 0 will be added to each set:

tt3534_image6.jpeg

Placing O over the remaining two image pixels (A[2,3] and A[3,3]), we get the following array of potential pixel values.

tt3534_image7.jpeg

Picking the maximum from each set, we get the output from DIALTE:

tt3534_image8.jpeg

This result can be verified using IDL:

IDL> a = [[2,3,4,1],[0,5,7,2],[1,8,4,5],[6,0,9,3]]
IDL> s = [[1,1],[0,1]]
IDL> print, dilate(a,s, /gray)
5 7 7 2
8 8 7 5
0 9 9 5
0 0 9 3

Please login or register to post comments.
Featured

End-of-Life Policy Enforcement for ENVI 5.3 / IDL 8.5 and Earlier Versions

5/6/2024

April 1, 2024 Dear ENVI/IDL Customer,  We are reaching out to notify you of our supported... more »

How to Upgrade licenses to ENVI 6.x / IDL 9.x

12/5/2023

What is the new Upgrade function? Starting with ENVI 6.0 and IDL 9.0, we have implemented an... more »

What to do if the 'License Administrator - License Server' for the Next-Generation License Server does not start?

6/13/2023

Background: With the release of ENVI 5.7 & IDL 8.9 and the corresponding Next-Generation licensing... more »

Next-Generation Licensing FAQ

4/28/2023

  NV5 Geospatial has adopted a new licensing technology for all future releases of our ENVI, IDL... more »

The IDL Virtual Machine

6/6/2013

What is the IDL Virtual Machine? An IDL Virtual Machine is a runtime version of IDL that can... more »