opencv - 使用 Caffe 时出错 : "This tool requires OpenCV; compile with USE_OPENCV."

标签 opencv deep-learning caffe pycaffe

我想使用 Caffe 的工具 compute_image_mean 来计算平均图像,但命令行告诉我:

This tool requires OpenCV; compile with USE_OPENCV.

我在网上搜索了一下,有人说:

Well, this message suggests that you have compiled caffe without OpenCV, i.e; with USE_OPENCV set to 0 in your Makefile.config. Recompile with that settings commented out (as is the default) and try again. And of course you need to have OpenCV installed for this to work.

但我在编译 Caffe 时已经设置了 USE_OPENCV := 0

有人可以帮我解决这个问题吗?

最佳答案

我认为您误读了您发现的声明,它说您在没有 OpenCV 的情况下进行编译,这意味着 WITH_OPENCV := 0 ,要使用 OpenCV 编译 Caffe,您必须设置 WITH_OPENCV := 1 ,或者只是将其注释掉。

关于opencv - 使用 Caffe 时出错 : "This tool requires OpenCV; compile with USE_OPENCV.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41465282/

相关文章:

python - 为什么要替换原始图像矩阵值?

c++ - 如何使用opencv获取笔划路径?

python - Keras 相当于 Caffe 的 'cpu_data()' 方法?

ubuntu - Ubuntu 16.04 中的 Caffe 库在哪里?

c++ - 无法在 C++ 类中分配 cv::Mat 对象

c++ - 我的GPU加速的opencv代码比普通的opencv慢

machine-learning - 如何计算最佳批量大小

machine-learning - RNN 在预测方面相对于 DNN 的优势

python - 卷积网络 : Not getting the required output in the max pooling function

c++ - Caffe 中的欧氏损失层