Selection of Hierarchical Levels

In its original formulation, Hierarchical Step-Wise Optimization produces a segmentation hierarchy of all sequences of segmentations from the initial iteration to the final trivial one region segmentation, if allowed to continue that far. However, it is more useful to select a subset of the most interesting segmentations from the segmentation hierarchy. Such most interesting segmentations can be selected by monitoring the value of the merging threshold.

HSWO with selection of a subset of region segmentations- for the segmentation hierarchy is as follows:

  • Give each image pixel a label and set prev_max_threshold = max_threshold = 0.0. Unless a pre-segmentation is provided, label each pixel as a separate region.
  • Calculate the dissimilarity criterion value between all pairs of spatially adjacent regions. Find the smallest dissimilarity criterion value and set the threshold equal to it. If threshold > max_threshold, set prev_max_threshold = max_threshold, and then set max_threshold = threshold.
  • Merge all pairs of spatially adjacent regions with dissimilarity criterion value ≤ threshold.
  • If the number of regions remaining is less than or equal to the user defined value, chk_nregions, continue to step 5; else, go to back to step 2.
  • If the number of regions remaining is less than or equal to conv_nregions, save the current region label map along with associated region information and STOP. If this is the first time this step is executed, save the current region label map along with associated region information, and to back to step 2. Otherwise, calculate the threshold ratio equal to max_threshold/prev_max_threshold. If the threshold ratio is greater than the preset threshold convfact, save the region label map from the previous iteration along with associated region information and go back to step 2. Otherwise, just go back to step 2.