[WIP] Remove Gaussian blur code alternatives that are exotic or didn't work very well #159
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.
This PR cannot build before PR #156 is merged into it.
Description
PopSift had a wide variety of downscaling and Gaussian filtering modes. These were written to increase the potential parallelism of PopSift, explore the trade-off between sequential operation and wider Gaussian filters, the impact of various filter width on quality, etc.
In practice, it seems that user stay with the default. The less successful downscaling/filtering options have therefore been removed.
Two options have been retained from the original PopSift code. Both implement the classical sequence that starts by scaling the input image and performing Gaussian filtering incrementally through the levels of an octave, and downscaling the following octave from the 3rd last level of the previous octave. These are the non-interpolating and the interpolating approaches.
The classical "non-interpolating" approach
It takes the neighbouring pixels and multiplies them with the weights from the pre-computed Gaussian filter. The width of this filter varies for each level to ensure a regular scale space.
The alternative "interpolating" approach
It starts with the same Gaussian filters, although their width is increase to a multiple of 2. The weight of two neighbouring cells g[n] and g[n+1] is then reformulated as a relative weight between these two cells, ie.:
g[n]I + g[n+1]J = abI + (1-a)bJ = b*(a*I + (1-a)J) where b=g[n]+g[n+1] and a=g[n]/(g[n]+g[n+1])
The appropriate values for b can then be read from an array, while the neighboring pixels I and J can be read with linear interpolation with a weight of A through the texture engine. This means that the term a*I + (1-a)J is handled by the texture hardware, leaving only one multiplication per 2 pixels.
Features list
Implementation remarks