Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I played around with the intensity match derivation process and introduced two optimizations:
nBins x nBins
bins (where I tentatively setnBins = 256
). All matches in one bin result in a single match with a weight that equals the sum of all original matches in that bin. I am aware that this introduces a discretization error, but since the number of bins is sufficiently large, the effect should be small. Reducing the number of bins further improves the runtime, trading off accuracy.Point
andPointMatch
for 1D points. Since there are a lot of static and final methods in the originalPoint
class, there's only so much that one can specialize, but all methods that are called in the intensity matching process make full use of the optimizations.I tested the impact of these changes on a randomly chosen neighboring pair of images from some fibsem stack, using the parameters that were specified in the alignment-prep files for that project.
For this tile pair, the matching process (including RANSAC filtering) took 2.36s with a single core on my local machine. Of this, the rendering accounted for 0.95s, while the RANSAC filtering took 1.38s. The optimizations described above resulted in the following runtime improvements for the RANSAC filtering:
My chosen example might not be a representative test case. Maybe @trautmane can help me set up a test case for multi-sem so that we can make sure the changes didn't introduce bugs and see how much we gain in this case. @StephanPreibisch