Skip to content
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

Merged
merged 3 commits into from
Nov 14, 2017
Merged

Conversation

k-okada
Copy link
Contributor

@k-okada k-okada commented Nov 8, 2017

http://build.ros.org/job/Kbin_uX64__opencv_apps__ubuntu_xenial_amd64__binary/35/display/redirect

  1. faces
/tmp/binarydeb/ros-kinetic-opencv-apps-1.12.0/src/nodelet/face_recognition_nodelet.cpp: In member function ‘void face_recognition::FaceRecognitionNodelet::configCallback(face_recognition::FaceRecognitionNodelet::Config&, uint32_t)’:
/tmp/binarydeb/ros-kinetic-opencv-apps-1.12.0/src/nodelet/face_recognition_nodelet.cpp:466:22: error: ‘createEigenFaceRecognizer’ is not a member of ‘face’
             model_ = face::createEigenFaceRecognizer(config.model_num_components,
  1. lk_track
https://docs.opencv.org/3.3.1/d2/d0a/lkdemo_8cpp-example.html#a20
https://docs.opencv.org/3.3.1/dd/d1a/group__imgproc__feature.html#ga1d6bb77486c8f92d79c8793ad995d541
https://docs.opencv.org/3.3.0/dd/d1a/group__imgproc__feature.html#ga1d6bb77486c8f92d79c8793ad995d541

c.f. ros/rosdistro#16230 (comment)

@k-okada
Copy link
Contributor Author

k-okada commented Nov 8, 2017

@furushchev please review, specially face recognizer code

@k-okada k-okada force-pushed the fix_for_opencv_3_3_1 branch 2 times, most recently from 3435cac to 06bf976 Compare November 8, 2017 13:55
Copy link
Contributor

@furushchev furushchev left a 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
Copy link
Contributor

@furushchev furushchev Nov 8, 2017

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

@k-okada k-okada merged commit ad360af into ros-perception:indigo Nov 14, 2017
@k-okada k-okada deleted the fix_for_opencv_3_3_1 branch November 14, 2017 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants