Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3x Speed-up #1

Merged
merged 2 commits into from
Jun 24, 2013
Merged

3x Speed-up #1

merged 2 commits into from
Jun 24, 2013

Conversation

w-m
Copy link
Contributor

@w-m w-m commented Jun 23, 2013

  • Use 1D Gaussian filters, apply twice, along each axis. This is what scipy's gaussian_filter does, and is much faster, yielding the same result
  • correctly set mu in relation to gaussian_kernel_width; not always 5
  • use -= where appropriate

These changes result in a ~3x performance improvement (on my machine) without any changes to the API or the results.

@jterrace
Copy link
Owner

This looks cool! Quick question: did you verify that you get the same results with the two sets of test images in the repo?

@w-m
Copy link
Contributor Author

w-m commented Jun 24, 2013

I made sure that he results are exactly the same for the two pairs of test images of the repo - when called without further parameters.

Since I fixed what I believe to be a bug in the kernel creation, result values will differ if gaussian_kernel_width is set to something other than 11.

@jterrace
Copy link
Owner

The results are the same on the test images when I tried it and it runs in half the time. Nice!

jterrace added a commit that referenced this pull request Jun 24, 2013
@jterrace jterrace merged commit ba28bd5 into jterrace:master Jun 24, 2013
@jterrace
Copy link
Owner

Actually, would you mind adding yourself to the AUTHORS file?

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