Summary of problems related to opencv in ubuntu

Source: Internet
Author: User

 

1. opencv2.2 compilation failure:

When making, an error occurs: 'ptrdiff _ t' does not name a type, causing a compilation error. This is why I tried to choose opencv IN THE SYSTEM library many times without success. The specific reason is that no namespace is added. For details, refer:

 

Using std: ptrdiff_t;

For detailed steps to install opencv2.2, see: http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/

2. Too many No accelerated colorspace conversion found from yuv422p to bgr24

This is a problem that may occur when the video is displayed (generally in the avi format). The solution is to install strongswan x264 and libvpx.

 

Sudo apt-get update

Sudo apt-get install build-essential checkinstall git libfaac-dev libjack-jackd2-dev \

Libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev \

Libva-dev libvdpau-dev libvorbis-dev libx11-dev libxfixes-dev texi2html yasm zlib1g-dev

 

 

Cd

Git clone git: // git.videolan.org/x264

Cd x264

./Configure -- enable-static

Make

Sudo checkinstall -- pkgname = x264 -- pkgversion = "3: $ (./version. sh | \

Awk-F' ["]''/POINT/{print $4 "+ git" $5} ') "-- backup = no -- deldoc = yes \

-- Fstrans = no -- default

 

 

Sudo apt-get remove libvpx-dev

Cd

Git clone http://git.chromium.org/webm/libvpx.git

Cd libvpx

./Configure

Make

Sudo checkinstall -- pkgname = libvpx -- pkgversion = "1: $ (date + % Y % m % d % H % M)-git" -- backup = no \

-- Deldoc = yes -- fstrans = no -- default

 

For more information about installation, see http://ubuntuforums.org/showthread.php? T = 786095

 

3. opencv2.2 environment configuration in Qt

You can directly add the include path and library path under the pro file without modifying the configuration file.

 

INCLUDEPATH + =/usr/local/include/opencv

 

LIBS + =/usr/local/lib/libopencv_core.so \

/Usr/local/lib/libopencv_highgui.so \

/Usr/local/lib/libopencv_imgproc.so \

/Usr/local/lib/libopencv_objdetect.so \

/Usr/local/lib/libopencv_video.so

Note the following:

Video. so is the library required for updates such as cvUpdateBGStatModel and background model creation.

Imgproc. so is the library used to process images, such as cvtColor and other functions.

Objdetect. so is required for tracking. For example, this library is required for face recognition.

 

From the timebomb Column

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.