查找在Ubuntu上安装的OpenCV版本 [英] Find OpenCV Version Installed on Ubuntu
问题描述
我想知道我的电脑上安装了什么版本的OpenCV(我运行的是Ubuntu 10.04)。有没有简单的方法来检查它,如果?如果不是那么我可以找到文件(样品等)安装的目录吗?
I would like to find out what version of OpenCV is installed on my computer (i am running Ubuntu 10.04). Is there a simple way to check it if ? If not then can i find out the directories where files (samples, etc) are installed ?
我试图运行一些代码,我已经在另一台安装了OpenCV 2.3的计算机上测试,并得到很多错误。
I am trying to run some code that i have already tested on another computer with OpenCV 2.3 installed and i get many errors.
推荐答案
您可以查看安装的头文件或libs。 pkg-config可以告诉你他们在哪里:
You can look at the headers or libs installed. pkg-config can tell you where they are:
pkg-config --cflags opencv
pkg-config --libs opencv
或者,您可以编写一个简单的程序并打印以下def:
Alternatively you can write a simple program and print the following defs:
CV_MAJOR_VERSION
CV_MINOR_VERSION
这里也提出了类似的问题:
A similar question has been also asked here:
这篇关于查找在Ubuntu上安装的OpenCV版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!