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