
293Image Enhancement in the Spatial Domain
It is not necessary for the targets of the top hat to be completely surrounded by a uniform
dark (or light) region. As long as the target is significantly different from the darkest pixel in
the surrounding neighborhood, it can be found. Figure5.63 shows an example, the location
of dark myelin sheath cells along axons in a microscope image. Since the comparison is local,
the overall shading in the image and the varying density of the different axons do not matter.
Figure 5.61 Locating edges with a rank operator: (a) original image (AFM image of a deposited coat-
ing); (b) use of a rank filter to repl