True as always that the way to make software run faster is to make it do less operations. After all, CPUs can only execute a fixed number of operations per unit of time.

Here, I tweaked code for serial section registration that drops execution time from 27 seconds to 100 milliseconds: a 270x speed up.

All it had to do is to search for matching SIFT features in one image only within a predetermined radius centered on one SIFT feature in another image. Extremely effective for when e.g., the maximum translation is known.

The matching code using a KDTree:
https://github.com/acardona/scripts/blob/master/java/asm/my/PointMatchesFast.java#L56

The test script:
https://github.com/acardona/scripts/blob/dev/python/imagej/FIBSEM/tests/test_matchNearbyFeatures.py

#FijiSc #java #jython #volumeEM #vEM

scripts/java/asm/my/PointMatchesFast.java at master · acardona/scripts

A collection of scripts related to neural circuit analysis and image processing for python, Fiji, TrakEM2, CATMAID, and others. - acardona/scripts

GitHub