Skip to content

Implemented separable gaussian blur for improved performance.#667

Merged
swharden merged 1 commit intoScottPlot:masterfrom
bclehmann:separable-gaussian
Dec 21, 2020
Merged

Implemented separable gaussian blur for improved performance.#667
swharden merged 1 commit intoScottPlot:masterfrom
bclehmann:separable-gaussian

Conversation

@bclehmann
Copy link
Member

In ScottPlot.Tools.XYToIntensities

New Contributors:
please review CONTRIBUTING.md

Purpose:
Improved performance for ScottPlot.Tools.XYToIntensities when using gaussian intensity mode.

The gaussian blur is separable, instead of using an n x n matrix as the kernel one can use a 1 x n matrix followed by an n x 1 matrix. This gives O(n) complexity instead of O(n^2).

Note that the previous code did not explicitly use a blur filter, but instead applied the gaussian after adding each coordinate. This is still O(n^2).

This code also precomputes the kernel, which ought to bring a performance boost of its own.

New Functionality:
N/A

@bclehmann
Copy link
Member Author

This does not address the concerns raised in #666, although this PR could be expanded to do so.

@swharden swharden merged commit bca6a8b into ScottPlot:master Dec 21, 2020
@swharden swharden mentioned this pull request Jan 26, 2021
48 tasks
@swharden swharden mentioned this pull request May 17, 2021
82 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants