How to get started with OpenCV 2.4.2 in ubuntu 10.4?

I am trying to install the latest version of OpenCV version 2.4.2 on a Linux (ubuntu 10.4) PC.

I loaded the tar ball. Disperse it. And after installing opencv in ubuntu 10.04 .

While "Make", I got an error after " Linking CXX executable ../../bin/opencv_perf_core " is shown in red; after millions of warnings or error messages, it shows the following:

 ... ... ... ../../lib/libopencv_ts.so.2.4.2: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string()' ../../lib/libopencv_ts.so.2.4.2: undefined reference to `typeinfo for int' collect2: error: ld returned 1 exit status make[2]: *** [bin/opencv_perf_core] Error 1 make[1]: *** [modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2 make: *** [all] Error 2 

Keyword: "Linking the CXX ../../ bin / opencv_perf_core executable" with quotation marks.

I searched for it and found that a PC needs a CUDA driver. I don’t need this at the moment.

Is this driver installation required here or can I get around this particular "make" process?

My goal is to get started with OpenCV as soon as possible in ubuntu. Are these build processes required to compile their own cpp file using the openCV 2.4.2 libraries? I do not concentrate on static or non-stationary libraries.

Someone worked on ubuntu in the same way as on Windows, I install OpenCV and start by simply setting the path to the included file and saving the DLL with a custom executable, for example, to capture images from the camera.

<=== Update ===>

Further http://docs.opencv.org/trunk/doc/tutorials/introduction/linux_install/linux_install.html .

He passed the Linking CXX executable ../../ bin / opencv_perf_core.

now it is held in Linking CXX executable ../../bin/opencv_perf_highgui with the following errors:

 /usr/bin/ld: ../../lib/libopencv_highgui.a(cap_libv4l.cpp.o): undefined reference to symbol 'v4l2_close' /usr/bin/ld: note: 'v4l2_close' is defined in DSO /usr/lib/libv4l2.so.0 so try adding it to the linker command line /usr/lib/libv4l2.so.0: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status make[2]: *** [bin/opencv_perf_highgui] Error 1 make[1]: *** [modules/highgui/CMakeFiles/opencv_perf_highgui.dir/all] Error 2 make: *** [all] Error 2 

It seems that cmake options should be well understood. Any shortcut will be helpful.

+4
source share
3 answers

I installed OpenCV 2.4.2 and wrote a script to install it. You can find it here https://github.com/jayrambhia/Install-OpenCV/blob/master/Ubuntu/2.4/opencv2_4_2.sh

Or check out my blog for more detailed instructions. http://jayrambhia.wordpress.com/2012/06/20/install-opencv-2-4-in-ubuntu-12-04-precise-pangolin/

 echo "Installing OpenCV 2.4.2" mkdir OpenCV cd OpenCV echo "Removing any pre-installed ffmpeg and x264" sudo apt-get remove remove ffmpeg x264 libx264-dev echo "Installing Dependenices" sudo apt-get install libopencv-dev sudo apt-get install build-essential checkinstall cmake pkg-config yasm sudo apt-get install libtiff4-dev libjpeg-dev libjasper-dev sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev sudo apt-get install python-dev python-numpy sudo apt-get install libtbb-dev sudo apt-get install libqt4-dev libgtk2.0-dev echo "Downloading ffmpeg" wget http://ffmpeg.org/releases/ffmpeg-0.11.1.tar.bz2 echo "Installing ffmpeg" tar -xvf ffmpeg-0.11.1.tar.bz2 cd ffmpeg-0.11.1/ ./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab make sudo make install cd .. echo "Downloading v4l" wget http://www.linuxtv.org/downloads/v4l-utils/v4l-utils-0.8.8.tar.bz2 echo "Installing v4l" tar -xvf v4l-utils-0.8.8.tar.bz2 cd v4l-utils-0.8.8/ make sudo make install cd .. echo "Downloading OpenCV 2.4.2" wget -O OpenCV-2.4.2.tar.bz2 http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.2/OpenCV-2.4.2.tar.bz2/download echo "Installing OpenCV 2.4.2" tar -xvf OpenCV-2.4.2.tar.bz2 mkdir build cd build cmake -D CMAKE_BUILD_TYPE=RELEASE .. make sudo make install sudo echo "/usr/local/lib" >> /etc/ld.so.conf sudo ldconfig echo "OpenCV 2.4.2 ready to be used" 
+2
source

I'm not sure if the problem is with CUDA, but you can turn it off when configuring cmake by passing WITH_CUDA=OFF :

 cd OpenCV-2.4.2 mkdir build cd build cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_EXAMPLES=ON -D WITH_CUDA=OFF .. make sudo make install 

Another interesting flag for you might be BUILD_PYTHON_SUPPORT=ON

EDIT

Obviously, OpenCV 2.4.2 should use the later CMake , so keep installing CMake 2.8.8 on your system.

0
source

I solve this problem by going to CMakeCache.txt after creating the UNIX makefile using cmake-gui in the directory that you set to create the binaries and adding the path to libcuda.so to this line CUDA_CUDA_LIBRARY:FILEPATH= , so in my case I ended up with CUDA_CUDA_LIBRARY:FILEPATH=/usr/lib/nvidia-current-updates/libcuda.so

If you are not going to use your CUDA toolkit, you can turn off these settings when you minimize your opencv with CUDA = off

0
source

All Articles