Some time has passed, and OpenCV has reached 2.3. I am very excited to give it a try. I have improved and increased a lot. For details, refer to examples.
A period of time has passed, OpenCV out to 2.3, very excited want to try, improve and increase a lot, please see the http://opencv.willowgarage.com/wiki/OpenCV%20Change%20Logs
First download OpenCV 2.3 for Linux
If the download is slow, go to the official website to download: http://sourceforge.net/projects/opencvlibrary/files/ (SVN repository has been migrated from SourceForge to https://code.ros.org/svn/opencv .)
Before compilation, make sure that your machine has the following installation packages.
| Build-essential libgtk2.0-dev libavcodec-dev libavformat-dev libjpeg62-dev libtiff4-dev cmake libswscale-dev libjasper-dev |
Okay. After the download, go to the directory and unzip it.
| Tar jxf OpenCV-2.3.0.tar.bz2 |
Then, we recommend that you create a special directory for compilation, which will be convenient for future compilation.
- Cd OpenCV-2.3.0/
- Mkdir release
- Cd release
|
Cmake: Configure parameters and generate Makefile. I believe it is understandable. The python library is configured,For more information, see http://opencv.willowgarage.com/wiki/installguide.
| Cmake-D CMAKE_BUILD_TYPE = RELEASE-D CMAKE_INSTALL_PREFIX =/usr/local-D BUILD_PYTHON_SUPPORT = ON .. |
Then it's simpler.
Configuration Library: enter this sentence:/Usr/Local/Lib, Save
| Sudo gedit/etc/ld. so. conf. d/opencv. conf |
Then run this statement to complete the configuration library.
OK. Now you can try your own example.
| G ++ 'pkg-config opencv -- libs -- cflags opencv 'main. cpp-o main |
If no problem exists, you will be able to run normally !!!
Bytes ------------------------------------------------------------------------------------------------------
Okay, I have a problem on my camera. The camera cannot be opened !!! Please kindly advise!
I really can't stand it. I haven't found any problem yet. I can't do it. I can only install 2.2. sudo make uninstall...
The camera can be used. It seems to be a problem with OpenCV.
By the way, if this problem occurs during OpenCV2.2 Compilation:
- Modules/highgui/src/cap_v4l.cpp: 217: 28: fatal error: linux/videodev. h: No such file or directory
- Compilation terminated.
- Make [2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_v4l.o] Error 1
- Make [1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
- Make: *** [all] Error 2
|
Solution:
| Sudo apt-get install libv4l-dev |
ThenIn cap_v4l.cpp# Include Replace with # include That's all.