next up previous
Next: Data Structures Up: Hoshen-Kopelman Algorithm Previous: Hoshen-Kopelman Algorithm

1.1 Pre-Processing the ERDAS/Lan Maps

An ERDAS/Lan map is comprised of integer values ranging from zero to the number of map classes contained in the map. Each pixel contains either a zero or an integer representing the pixel's map class. The HK algorithm uses one data structure both to store the map pixel values and to store temporary pixel label values. This dual purpose will not allow different map classes to be stored in the same structure without altering the cluster identification process. Thus, the finite-state-machine implementation of the Hoshen-Kopelman algorithm requires the input ERDAS/Lan map to be pre-processed in a way which alters the original data by filtering out the pixel data values not belonging to the selected map class. Only one map class can be represented at a time in the input map for the finite state machine implementation. For example, to analyze map class 2, all of the map's pixel values equal to 2 would be changed to -1, and the rest of the pixel values in the map would be changed to 0. Figure 3 shows the results of pre-processing map class 2 of a simple ERDAS/Lan map file containing two map classes. The result is an input map containing only -1's and 0's where the -1's distinguish pixels belonging to the chosen map class.

 


Figure 3: Explanation of pre-processing map class 2 of a simple ERDAS/Lan map. Pixels assigned to map class 2 have a pixel value of 2 as seen in the before image (left). Pre-processing the map will change the pixel values, currently 2, to a -1 in the post-processed image (right) substituting zero for the rest of the values.

Michael W. Berry (berry@cs.utk.edu)
Sat Mar 30 23:40:13 EST 1996