gpt4 book ai didi

opencv - 如何在 OPENCV 中为模式识别定义我们自己的内核?

转载 作者:太空宇宙 更新时间:2023-11-03 20:42:31 24 4
gpt4 key购买 nike

我想为 OpenCV 上的图像分类编写自己的内核。

但对于 SVM(Opencv 的内置函数),内核已经定义。

我的问题是,OpenCV 中是否有任何东西可以让我定义我的内核?

实际上,我想为图像分类实现多核学习。

最佳答案

我查看了一个答案,其中一种解决方法(也在 linked question 中提到)是使用替代 SVM 库,如 LibSVM 等(LibSVM 确实是一个很好的库)。

但是,如果您只想留在 OpenCV 中(这就是您的问题所显示的内容),那么有一个 similar question posted on OpenCV forums并且以某种方式解决方法是(逐字复制):

This message means that SVM with custom kernel does not support loading from file. You can try following things:

  1. Use one of the standard kernels (obviously)

  2. Implement your kernel as standard and optionally contribute it to the mainline

  3. Set kernel to standard before saving to file and back to custom after loading from file (workaround)

  4. Implement mechanism for saving/loading custom kernels with parameters (can be hard)

关于opencv - 如何在 OPENCV 中为模式识别定义我们自己的内核?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27793348/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com