Efficiently convolve with 2D Gaussian (non-diagonal covariance matrix)

ساخت وبلاگ

Vote count: 0

After looking at the SciPy docs and NumPy, I haven't found a way to efficiently convolve an image with a 2D Gaussian N(μ, Σ). Here, Σ is not diagonal, which means that the filter will not be separable.

I have looked at scipy.ndimage.filters.gaussian_filter, scipy.signal.gaussian and scipy.signal.general_gaussian, but none of them seem to support it.

Then I think the only way would be to create a the window (kernel) for my filter and call scipy.signal.convolve2d. However, in my use-case, I will need to generate many of those Gaussians, all with different Σ.

What would be the most efficient way to proceed?

asked 26 secs ago

back soft...
ما را در سایت back soft دنبال می کنید

برچسب : نویسنده : استخدام کار backsoft بازدید : 411 تاريخ : جمعه 29 ارديبهشت 1396 ساعت: 22:00