Open stillyslalom opened 4 years ago
Yes, when the kernel's dimensions are provided in physical units, this is doable. ImageFiltering does not currently depend on Unitful, but it does use Requires, and so we can add a "soft" dependency. PR welcome, or someone will get around to this eventually.
Came here for the same reason.
I'd add that if the input image is an AxisArray
then the dimensions of the kernel should be the same as the dimensions of the axes of the image -- regardless of any Unitful dimensions. So, I think that:
img = AxisArray(zeros(3, 3),
Axis{:x}(0:100:200),
Axis{:y}(0:100:200))
imfilter(img, Kernel.LoG(10))
should result in a similar image to:
img = zeros(3, 3)
imfilter(img, Kernel.LoG(0.1))
ref. https://discourse.julialang.org/t/images-kernel-sizes-and-imageaxes/
In the following example, the kernel size is calculated based on array indices, not the provided physical dimensions of the image.
An error is thrown when physical dimensions are provided for the kernel: