OpenCV2.3 is fully compiled and installed in Ubuntu.

Source: Internet
Author: User
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.

  1. Cd OpenCV-2.3.0/
  2. Mkdir release
  3. 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.

  1. Make
  2. Sudo make install

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.

Sudo ldconfig

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:

 
  1. Modules/highgui/src/cap_v4l.cpp: 217: 28: fatal error: linux/videodev. h: No such file or directory
  2. Compilation terminated.
  3. Make [2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_v4l.o] Error 1
  4. Make [1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
  5. Make: *** [all] Error 2

Solution:

 Sudo apt-get install libv4l-dev

ThenIn cap_v4l.cpp# Include Replace with # include That's all.  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.