-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix for opencv 3.3.1 #71
Conversation
@furushchev please review, specially face recognizer code |
3435cac
to
06bf976
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a comment.
The reason of build failure on kinetic env is just wrong path specification for haar cascade data?:
�[31m[ERROR] [1510151903.264184171]: --Error loading /opt/ros/kinetic/share/opencv3/../OpenCV-3.2.0-dev/haarcascades/haarcascade_frontalface_alt.xml�[0m
�[31m[ERROR] [1510151903.264840994]: --Error loading /opt/ros/kinetic/share/opencv3/../OpenCV-3.2.0-dev/haarcascades/haarcascade_eye_tree_eyeglasses.xml�[0m
@@ -463,16 +463,34 @@ namespace face_recognition { | |||
if (need_recreate_model) { | |||
try { | |||
if (config.model_method == "eigen") { | |||
// https://docs.opencv.org/3.3.1/da/d60/tutorial_face_main.html | |||
#if CV_MAJOR_VERSION >= 3 && CV_MINOR_VERSION >= 3 && CV_SUBMINOR_VERSION >= 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@k-okada It seems the new API is available from 3.3.0
, so && CV_SUBMINOR_VERSION >= 1
should just be removed. (I confirmed on docker where 3.3.0 is installed)
docker run --rm -it ubuntu:trusty /bin/bash
apt-get update
apt-get upgrade
apt-get -y -qq install cmake git libgtk2.0-dev ocl-icd-opencl-dev qt5-default wget unzip
wget https://github.com/Itseez/opencv/archive/3.3.0.zip -O /tmp/opencv-3.3.0.zip
cd /tmp/
unzip opencv-3.3.0.zip
cd opencv-3.3.0
git clone --depth 1 https://github.com/Itseez/opencv_contrib.git opencv_contrib -b 3.3.0
mkdir build && cd build
cmake .. -DWITH_OPENGL:BOOL=ON -DWITH_QT:BOOL=ON -DCMAKE_BUILD_TYPE=RelWithDebugInfo -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_TESTS:BOOL=OFF -DBUILD_PERF_TESTS:BOOL=OFF -DWITH_FFMPEG:BOOL=OFF -DBUILD_EXAMPLES:BOOL=ON -DINSTALL_C_EXAMPLES:BOOL=OFF -DINSTALL_PYTHON_EXAMPLES:BOOL=ON -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules
make -j
sudo make install -j
sudo ldconfig
echo 'export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH' >> ~/.bashrc
exec -l bash
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
apt-get update && apt-get install ros-indigo-ros-base python-rosdep python-catkin-tools
mkdir -p ~/ros/src && cd ~/ros/src
git clone https://github.com/k-okada/opencv_apps -b fix_for_opencv_3_3_1
cd ~/ros
source /opt/ros/indigo/setup.bash
sudo rosdep init && rosdep update && rosdep install --from-paths src -i -r -n -y
catkin init
catkin build
06bf976
to
025c953
Compare
025c953
to
a01af5f
Compare
http://build.ros.org/job/Kbin_uX64__opencv_apps__ubuntu_xenial_amd64__binary/35/display/redirect
c.f. ros/rosdistro#16230 (comment)