Figure 5
From: Detection and Segmentation of Cell Nuclei in Virtual Microscopy Images: A Minimum-Model Approach

Image object (all pixels) with non-compact pixels on the object border (white pixels).
Numbers represent the distance of the corresponding pixel to the nearest background (non-object) pixel with the Manhattan metric. A distance value d is given for the testing of compactness (3 in this example). Removing all pixels pi (with di the distance value of pi and di < d) that are connected to a pixel pj (with dj = d) over more than d − di edges results in a compact object (gray pixels).