Sunday, November 02, 2014

Installing OpenCV 3.0.0 in Ubuntu 12.04

[This is a note for my own installation of OpenCV 3.0.0 in Ubuntu 12.04]

The main steps have been listed in the guidance page:
http://docs.opencv.org/trunk/doc/tutorials/introduction/linux_install/linux_install.html

But my cmake options were as the follows:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHO
N_SUPPORT=ON
-D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=O
N -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_IPP=OFF -D BUILD_opencv_nonfree=ON ..

Note that the WITH_IPP option had been disabled or there would be errors (which I didn't have time to tackle).

I also used lscpu to view my CPU information. Actually I didn't know anything about ``number of hardware threads,'' and I assumed it just equal to the number of CPU multiplied by ``Thread(s) per core.'' I typed ``make -j16'' during the installation.

After the installation, I check the installed version by typing
pkg-config --modversion opencv
and it returned
3.0.0
Also, in ipython, typed the following command to check the installed version:
In [1]: import cv2
In [2]: print cv2.__version__
3.0.0-dev
But after installing the new version, I couldn't run the python example of generating stereo image because there was no module named createStereoBM... O__Oa

That's out of my expectation. I thought the example was under the location of OpenCV 3.0.0, so it should had no problem for me to run the sample code. Another bad news was that the old StereoBM module was also failed.

---
I just tried the ORB example, but the module was also disappeared from the 3.0.0 version.

After reinstall OpenCV 2.4.9, everything was okay. So now I just have no idea where are the missing modules in OpenCV 3.0.0.

1 comment:

  1. Nice info, but I did notice that BUILD_NEW_PYTHON_SUPPORT and BUILD_opencv_nonfree are "Manually-specified variables were not used by the project".
    Also I did run in to another problem which points to gstreamer, I have 1.0 and 0.1 installed, also did try version 1.4.0 but still fail are 22%
    Do you perhaps have any more tips?

    ReplyDelete