Lipschitz Filter

Authors: Mikulas Stencel (mikulas.stencel at
Jiri Janacek (janacek at
History: 2006/06/21: First version
Installation: Download Lipschitz_.class to the plugins folder, or subfolder, restart ImageJ, and there will be a new "Lipschitz " command in the Plugins menu, or submenu.
Description: This plugin implements Lipschitz cover of image that is equivalent to a grayscale opening by a cone. The Lipschitz cover can be applied for the elimination of a slowly varying image background by subtraction of the lower Lipschitz cover (a top-hat procedure). Sequential double scan algorithm (according Rosenfeld) was used.

This plug-in is designed to perform filtering on an 8-bit, 16-bit and RGB images with support for ROI and Stacks. Long processing can be stopped with Esc.

Dialog box parameters:

  • Slope - maximum allowed difference between two neighbouring pixels
  • TopDown - covering from top to bottom.
  • TopHat - computes lower (upper) Lipschitz cover.
A PDF document and sample images are available.


  1. Mikulas Stencel, Jiri Janacek: On calculation of chamfer distance and lipschitz covers in digital images. S4G conference, Prague, 2006.
  2. Bloch I.: Fuzzy spatial relationships for image processing and interpretation: a review. Image and Vision Computing 23 (2005), 89-110.
  3. Borgefors G.: Distance transformations in arbitrary dimensions. CVGIP 27 (1984), 321-345.
  4. Borgefors G.: Distance transformations in digital images. CVGIP 34 (1986), 344-371.
  5. Breu H., Gil J., Kirkpatrick D., Werman M.: Linear time euclidean distance transform algorithms, IEEE Trans. PAMI 17 (1995), 529-533.
  6. Danielsson P.-E.: Euclidean distance mapping. CVIP 14 (1980), 227-248.
  7. Moreau P., Ronse C.: Generation of shading-off in images by extrapolation of Lipschitz functions. Graphical Models and Image Processing 58 (1996), 314-333.
  8. Rosenfeld A., Pfaltz J. L.: Sequential Operations in Digital Picture Processing. (1966), 33-61.
  9. Rosenfeld A., Pfaltz J. L.: Distance functions on digital pictures. Pattern Recognition 1 (1968), 33-61.
  10. Sternberg S. R.: Grayscale morphology. CVGIP 35 (1986), 333-355.

|Plugins | Home |