Closed Graerth closed 7 years ago
Hi @Graerth,
The main maintainer (@rdube) is currently travelling, I'll try my best with a couple of hints :)
CvRTree
disappeared with OpenCV 3 (or to be more precise, it is still present in opencv/apps/traincascade/old_ml.hpp
). On my computer (Ubuntu 16.04) I currently have OpenCV 2.4, can you try using that version? Otherwise you can dig in the code in order to use the old_ml.hpp
header.I hope this helps! :) Keep us updated!
Hi @dotPiano,
I followed this installation procedude for OpenCV2 and now it compiled. Thanks! https://gist.github.com/arthurbeggs/06df46af94af7f261513934e56103b30
Cool, thanks for the link!
@rdube maybe you want to add it to the instructions on the wiki?
Hey, If you have ROS Kinetic and you don't want to perform a system-wide install of OpenCV 2.4.x, you can set CMAKE_INSTALL_PREFIX to point to another folder in your system.
In my case I first declare the OpenCV 2.4.x install path as an environment variable in ~/.bashrc:
export OPENCV2_INSTALL_DIR=/path/to/OpenCV2/lib
I clone the latest version of OpenCV 2.4.x:
git clone https://github.com/opencv/opencv.git OpenCV2 --depth=1 -b 2.4
And then I build, by running:
cd OpenCV2
mkdir build
cd build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$OPENCV2_INSTALL_DIR \
-DBUILD_PNG=OFF \
-DBUILD_TIFF=OFF \
-DBUILD_TBB=OFF \
-DBUILD_JPEG=OFF \
-DBUILD_JASPER=OFF \
-DBUILD_ZLIB=OFF \
-DBUILD_EXAMPLES=ON \
-DBUILD_opencv_java=OFF \
-DBUILD_opencv_nonfree=OFF \
-DBUILD_opencv_python=ON \
-DWITH_OPENCL=OFF \
-DWITH_OPENMP=OFF \
-DWITH_FFMPEG=ON \
-DWITH_GSTREAMER=OFF \
-DWITH_GSTREAMER_0_10=OFF \
-DWITH_CUDA=OFF \
-DWITH_GTK=ON \
-DWITH_VTK=OFF \
-DWITH_TBB=ON \
-DWITH_1394=OFF \
-DWITH_OPENEXR=OFF \
-DINSTALL_C_EXAMPLES=ON \
-DINSTALL_TESTS=OFF \
../
make -j$(nproc)
sudo make install
Finally, in all CMakeLists.txt files that attempt to import OpenCV (and specifically need version 2.4.x), I replace find_package(OpenCV REQUIRED)
with:
set(OpenCV_DIR $ENV{OPENCV2_INSTALL_DIR})
find_package(OpenCV 2 REQUIRED)
Thanks @YoshuaNava for your input! :-)
Working on a fresh workspace (Lunar Loggerhead, though I did have a Kinetic workspace too first).
I'm pretty new to ROS and catkin builds so might have made some mistake but can't figure this out right now.
There was quite a lot of warnings, but these are the parts with actual errors (and the summary from end and catkin config output)):
Anyone got ideas what's the problem?