I am a beginner at OpenCV and trying my best to get a simple application running on an embedded platform. I cross-compiled OpenCV 2.4.4 and built it WITH_GTK=ON, WIT
Opencv highgui error
Have to reinstall opencv using cmake
git clone https://github.com/Itseez/opencv.git
cd ~/opencv
mkdir release
cd release
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_IPP=OFF ..
make -j4 sudo
make install
export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages
After doing the cmake
statement Verify whether the output of cmake
includes the following text: V4L/V4L2: Using libv4l
.
If it is not there, then install v4l2ucp
, v4l-utils
and libv4l-dev
from synaptic package manager. Then cmake
and build again.
This worked for me but I was using OpenCV with python bindings on Ubuntu 12.04.
In order to cross compile you need to tell pkg-config to lookup the proper path (by default this will be your host config/.pc files!)
From pkg-config website
- searching directories listed in $PKG_CONFIG_PATH
- when $PKG_CONFIG_LIBDIR is specified, it will override the compiled in default directory (e.g. /usr/lib/pkgconfig) and the PKG_CONFIG_PATH. Note that when specifying PKG_CONFIG_LIBDIR, pkg-config will completely ignore the content in PKG_CONFIG_PATH, even if the documentation states different things.