Rolling ball algorithm is not explained correctly in the wiki



Hi all,

the rolling ball algorithm is explained in the source code as

/** ‘Rolls’ a filtering object over a (shrunken) image in order to find the
image’s smooth continuous background. For the purpose of explaining this
algorithm, imagine that the 2D grayscale image has a third (height) dimension
defined by the intensity value at every point in the image. The center of
the filtering object, a patch from the top of a sphere having radius BallRadius,
is moved along each scan line of the image so that the patch is tangent to the
image at one or more points with every other point on the patch below the
corresponding (x,y) point of the image. Any point either on or below the patch
during this process is considered part of the background. Shrinking the image
before running this procedure is advised due to the fourth-degree complexity
of the algorithm.

does not match the wiki explanation:

Best Moritz


Hi Moritz,

sorry, I don’t see the difference, it’s all the same algorithm.
Anyhow, the web page you mention is for the external plugin, not the ImageJ built-in Process/Subtract Background (which has got preview in the meanwhile; the web page of the plugin was not updated after that…)
By the way, my favorite is the ‘sliding paraboloid’ of the ImageJ Subtract Background command, because it works better for images where the pixel values are not in the usual range of 8-bit images (maybe also because it is my brainchild :slight_smile: )