fiji / Trainable_Segmentation

Fiji library to perform image segmentation based on the Weka learning schemes
https://imagej.net/Trainable_Weka_Segmentation
GNU General Public License v3.0
106 stars 60 forks source link

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

Open mattb112885 opened 7 years ago

mattb112885 commented 7 years ago

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:

Thoughts?

iarganda commented 7 years ago

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!