scikit-image 熵计算的边界条件是什么

What are the boundary conditions for the scikit-image entropy calculations

我正在使用 scikit-image 执行局部熵计算,遵循可以找到的示例 here。熵的计算采用圆形结构元素,其半径由用户定义,实现起来非常简单。

但是,文档没有指定用于计算熵的边界条件是什么(例如,如果图像在边界处被零填充,或者 periodically/symmetrically 重复),甚至没有查看源代码代码我无法理解。有人知道在这种情况下对图像应用了哪种边界条件吗?

even looking into the source code I could not understand it.

是的,Cython 代码很难理解。诀窍是知道排名过滤器中的所有内核都以相同的方式运行,然后在 module docstring:

中找到提示

The filter is applied up to the image border, the neighborhood used is adjusted accordingly.

因此,根本没有边界填充:您只需在直方图中使用较少的值来实现过滤功能。