View on GitHub

Multi-Template Matching for object-detection

HomePage and documentation for the Multi-Template matching project. A simple solution for object-detection from one or several template images. Available for Fiji, Python and KNIME.

Multi-Channel images

The plugin can be used with RGB images directly. There are internally converted to grayscale for the detection.

More generally, there are 2 options for template matching with multi-channel images : 1) either projecting the channels to a grayscale image (typically average projection for RGB images) 2) running the detection on exclusively one channel.

The choice depends on what should be found: if a particular channel distribution is expected, or if a single channel offers enough discriminative power for the detection.

Template matching in 3D

For 3D images there are also 2 options:

What about using a 3D template ?

Performing the search with a 3D template is technically possible, but probably computationally expensive, as this would mean comparing pixel intensities between 3D volumes for every position of the sliding window and performing the search along the 3 dimensions of the images.
More dramatically, the number of template rotations to perform to capture a maximum of object can possibly be very high, as one can rotate along the 3 axis, so in the end it is not a method of choice.