# Replicating scipy.ndimate.gaussian\_filter keyword "order" to filter image with derivatives of Gaussian

**URL:** <https://discourse.julialang.org/t/replicating-scipy-ndimate-gaussian-filter-keyword-order-to-filter-image-with-derivatives-of-gaussian/121715>\
**Category:** General Usage\
**Tags:** images, python\
**Created:** [October 24, 2024, 6:22pm UTC](https://discourse.julialang.org/t/replicating-scipy-ndimate-gaussian-filter-keyword-order-to-filter-image-with-derivatives-of-gaussian/121715 "2024-10-24T18:22:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fsyhantis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fsyhantis/32/19686_2.png) [@fsyhantis](https://discourse.julialang.org/u/fsyhantis)\
**Post date:** [October 24, 2024, 6:22pm UTC](https://discourse.julialang.org/t/replicating-scipy-ndimate-gaussian-filter-keyword-order-to-filter-image-with-derivatives-of-gaussian/121715/1 "2024-10-24T18:22:29Z")

</div>

I am trying to convert a Python script to Julia, using the package `Images`. To compute the Gaussian filtered gradient of images, the python scipy use `scipy.ndimage.gaussian_filter(img, σ, order=(1,0))` and `scipy.ndimage.gaussian_filter(img, σ, order=(0,1))` to get each component of the filtered gradient.  
See [scipy.ndimage.gaussian\_filter](https://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.gaussian_filter.html) for the doc.  
See [Gradient of a Signal](https://hannibunny.github.io/orbook/preprocessing/04gaussianDerivatives.html#) for more about derivatives of Gaussian.

I’ve checked the methods `ImageFiltering.imfilter`, `ImageFiltering.imgradients` and the kernels `ImageFiltering.Kernel.gaussian`, `ImageFiltering.Kernel.DoG` in the [doc](https://juliaimages.org/latest/function_reference/#ImageFiltering.Kernel.gaussian).

However, `ImageFiltering.Kernel.DoG` is not a kernel for derivative of gaussian, but for difference of two gaussian filters. `ImageFiltering.imgradients` seems not to work with `KernelFactors.gaussian`.

Is there an equivalent method for this? Or should I find some workaround.
