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

Suggestion -- reusing Gaussian filters for Difference of Gaussian calculations #41

Open
mattb112885 opened this issue Jul 21, 2017 · 1 comment

Comments

@mattb112885
Copy link

Greetings,

I'm taking a look at the implementation of Gaussian filter features and noticed that the Difference of Gaussian feature calculator separately computes filtered images for each pair of Sigma values, and therefore would compute the Gaussian at each value of sigma multiple times. Note -- I am not sure if this really a bottleneck, so any comments are welcomed.

I think there are several ways this could be reduced to improve the performance of Gaussian feature generation:

  • If user had already requested Gaussian features, we could use these to take the difference and save the memory and time from re-computing them.
  • If the user did not request Gaussian filters it becomes a choice:
  • The program could compute each Gaussian anyway (or they could already be computed if the user selects that they want Gaussian features) and then do DOG on each pair on the pre-computed filtered images. If the user didn't already select that they want a Gaussian filter, however, this would need more memory than the current implementation.
  • The program could do something like compute the Gaussian for the lowest sigma and keep subtracting that from higher sigma values (so only two filtered images are in memory at a time, like the current implementation, but the total number of times the image needs to be filtered is still reduced).

Thoughts?

@iarganda
Copy link
Collaborator

Hello @mattb112885,
Actually the Gaussian feature can be reused by many other features, not only DoG. It is not done for the sake of simplicity when calling the the features in a multi-thread fashion and also because its calculation is quite fast. That being said, I agree it would be a nice improvement to make the Gaussian filtered versions of the input image reusable by other features. I'll look into it! Thanks for suggesting!

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

No branches or pull requests

2 participants