# Sparse vector in imfilter kernel

**URL:** <https://discourse.julialang.org/t/sparse-vector-in-imfilter-kernel/139133>\
**Category:** Signal and Image Processing\
**Tags:** sparse, digital-filters\
**Created:** [September 1, 2026, 7:00am UTC](https://discourse.julialang.org/t/sparse-vector-in-imfilter-kernel/139133 "2026-09-01T07:00:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xor0110](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xor0110/32/7926_2.png) [@xor0110](https://discourse.julialang.org/u/xor0110)\
**Post date:** [September 1, 2026, 7:00am UTC](https://discourse.julialang.org/t/sparse-vector-in-imfilter-kernel/139133/1 "2026-09-01T07:00:33Z")

</div>

What would it take to make ImageFiltering.imfilter work with sparse or “dilated” kernels? I know it supports OffsetArrays, for instance. We basically need to skip every few values so a filter like `[-1,0,0,0,1]` only performs two multiplications. I’m thinking it’s something that might already work out of the box, but I can’t find any examples and have little time to investigate now, wondering if someone familiar with the library would have any ideas.
