-
Notifications
You must be signed in to change notification settings - Fork 2
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
Discussion about gauss_f
#3
Comments
Hi. Strictly speaking a Gaussian filter is seperable. So ideally it should be implemented as a separable convolution. Why did you rename it and why did you remove the |
Keywords don't participate in dispatch unfortunately. For me the new name is more clear. |
rfft of an int array already throws an error, so this works anyway only for floating |
The name |
Any objections to this implementation?
|
If you really want to rename it, I suggest "filter_gaussian" to be more in agreemend with the English term "Gaussian filter" and with the function "gaussian" which the implementation uses. The As for the implementation, it is good. It would break compatibility with the previous version where I up-casted, but that can be tolerated, especially since the name changes and it is moved to |
function filter_gaussian(img::AbstractArray{T};
sigma=one(T), dims=1:ndims(img)) where (T <: Real)
shiftdims = dims[2:end]
f = rfft(img, dims)
return irfft(f .* ifftshift(gaussian(T, size(f),
offset=CtrRFT,
sigma=size(img) ./ (T(2π) .*sigma)),
shiftdims),
size(img, dims[1]), dims)
end |
great!. Should one also include the option for Gaussian low-pass (this one), high-pass and band-pass? |
Hi!
See:
PSFDistiller.jl/src/utils.jl
Line 36 in c5074a4
I would probably implement it like:
The text was updated successfully, but these errors were encountered: