|
This distribution is dated May 21, 2001. It includes the complete set of source files, along with the precompiled classes.
This Java class is based on the following paper:
M. Unser, "Splines: A Perfect Fit for Signal and Image Processing," IEEE Signal Processing Magazine, vol. 16, no. 6, pp. 22-38, November 1999.
It is written as a plugin for ImageJ. Please read the ImageJ documentation to learn how to install the plugin.
This plugin allows you to perform several differentiation operations on images, seen as continuous functions, even though they are stored as discrete pixels. The general principle is to construct the continuously defined function
ƒ(x, y) = ∑k,l c[k,l] ⋅ φ(x-k, y-l).
Here, we shall concentrate on the specific case where the function
φ(x, y) = β3(x) ⋅ β3(y)
is a tensor-product (separable) cubic B-spline. Then, a typical example of spatial differentiation operation is
∂ƒ(x, y) ⁄ ∂y = ∑k,l c[k,l] ⋅ β3(x-k) ⋅ ∂β3(y-l) ⁄ ∂y,
where we compute the exact vertical gradient of the continuously defined image.
![]() |
Figure 1. Possible operations.
√( (∂ƒ(x, y) ⁄ ∂x)2 + (∂ƒ(x, y) ⁄ ∂y)2 ).
arc tan( (∂ƒ(x, y) ⁄ ∂y) ⁄ (∂ƒ(x, y) ⁄ ∂x) ),
along with considerations on the sign of ∂ƒ(x, y) ⁄ ∂y and of ∂ƒ(x, y) ⁄ ∂x.∂2ƒ(x, y) ⁄ ∂x2 + ∂2ƒ(x, y) ⁄ ∂y2.
The following pair of images is typical of the kind of results you can obtain with the present program. The image on the left is the original image, while the image on the right shows its Laplacian.
![]() | ![]() |
Figure 2. Left: 256×256 Lena input image. Right: Resulting Laplacian.
You'll be free to use this software for research purposes, but you should not redistribute it without our consent. In addition, we expect you to include a citation or acknowlegment whenever you present or publish results that are based on it.
The class Differentials_ exports the five following public methods:
getCrossHessian | ↔ | (∂ƒ(x, y) ⁄ ∂x) ⋅ (∂ƒ(x, y) ⁄ ∂y) |
getHorizontalGradient | ↔ | ∂ƒ(x, y) ⁄ ∂x |
getHorizontalHessian | ↔ | ∂2ƒ(x, y) ⁄ ∂x2 |
getVerticalGradient | ↔ | ∂ƒ(x, y) ⁄ ∂y |
getVerticalHessian | ↔ | ∂2ƒ(x, y) ⁄ ∂y2 |
These methods have two parameters each and perform the in-place processing of an object of type ImageProcessor, given as first parameter. The only image type that is currently implemented is ImagePlus.GRAY32.
The second parameter is a variable of type double that controls the compromise between speed and accuracy. Its value should be a small positive or null number. The best precision is achieved by setting tolerance = 0.0, at the expense of some (moderate) loss in efficiency. We have observed experimentally that the value that corresponds to the C constant FLT_EPSILON exhibits an excellent trade-off. In Java, this value can be written as Float.intBitsToFloat((int)0x33FFFFFF).