martibosch / detectree

Tree detection from aerial imagery in Python

Home Page:https://doi.org/10.21105/joss.02172

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

confusing comment in Gaussian 1D kernel creation

easz opened this issue · comments

# # Since we are calling correlate, not convolve, revert the kernel

# # Since we are calling correlate, not convolve, revert the kernel
# weights = _gaussian_kernel1d(sigma, order, lw)[::-1]
weights = _gaussian_kernel1d(sigma, order, lw)

the kernel is not reverted or do I understand wrong?

Hello @easz,

this was written a while ago and I do not remember exactly why the kernel was reverted at first, but in the released code the kernel is not reverted (the [::-1] is not in the uncommented line), and it is actually ndi.convolve that is used to build the pixel features with the kernel.

Hope this helps. Best,
Martí