java - 如何创建高斯核并将其用作 opencv 中的过滤器

标签 java android opencv

我正在用 OpenCv 开发道路线检测算法,发现了一些引用,但我无法理解它的 fragment 。

你能解释一下我如何在 OpenCv 中实现这样的事情吗?

引用如下:

The image is then filtered by a two dimensional Gaussian kernel. The vertical direction is a smoothing Gaussian, whose σy is adjusted according to the required height of lane segment (set to the equivalent of 1m in the image). The horizontal direction is a second-derivative of Gaussian, whose σx is adjusted according to the expected width of the lane.

我该如何准备这样的内核? getDerivKernel 似乎不允许我设置它的 σx 或 σy。

提前谢谢你。

最佳答案

我相信 OpenCV 有一个函数可以做到这一点。

 Mat getGaussianKernel(int ksize, double sigma, int ktype=CV_64F)

参见 http://docs.opencv.org/modules/imgproc/doc/filtering.html

关于java - 如何创建高斯核并将其用作 opencv 中的过滤器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13901361/

相关文章:

python - Pycharm 无法识别 cv2 但仍然可用

java - Java 中复合赋值(+=、-=、*=、...)的混淆

java - 通过接口(interface)契约强制(重新)实现现有方法?

java - HashMap...这里获取 null,我必须重载 hashcode() 以便我各自的对象

java - 库的类路径

java - Android Studio 布局未设置

java - achartengine 如何将 x 轴标签更改为仅字符串

android - 如何在 Android 中全屏显示警告对话框?

python - 查找无人驾驶车道,代码问题

c++ - opencv copyTo中的段错误