ipa320 / cob_people_perception

www.care-o-bot.org
27 stars 74 forks source link

Make the repo compile under ROS Lunar (OpenCV 3.2.0) #72

Closed pierrekilly closed 7 years ago

pierrekilly commented 7 years ago

This Github issue helped a lot: https://github.com/wg-perception/people/issues/44

I haven't tested it, it "just" compiles.

This is an open discussion, so if improvements are needed, please tell :)

pierrekilly commented 7 years ago

The build has failed, which is what I expected, as some names in OpenCV 3 have changed.

I think I can try to make those changes depending on the OpenCV version. I'll try to make something compatible in the next few days.

ipa-rmb commented 7 years ago

Many thanks! Well done. I guess you can easily make it work with both OpenCV versions using this macro

    #if CV_MAJOR_VERSION == 2
        cv::SVM ...
    #else
        // OpenCV 3
        cv::ml::SVM
    #endif
pierrekilly commented 7 years ago

The build failed trying to execute code for OpenCV 3. I can't look further more right now, but obviously OPENCV_MAJOR_VERSION == 2 does not evaluate to true for whatever reason.

ipa-rmb commented 7 years ago

No problem. Thanks for your assistance. I will fix the errors for OpenCV 2 and complement your pull request so that Travis is happy. Again, many thanks for your contribution.

By the way, a new colleague of mine will extend the functionality of this package significantly, soon, especially with major improvements on the person recognition quality. So stay tuned.

ipa-rmb commented 7 years ago

OPENCV_MAJOR_VERSION was wrong, CV_MAJOR_VERSION seem to be correct, sorry for the wrong hint.

ipa-rmb commented 7 years ago

Now you received a pull request from me. Can you please merge them in order to update this pull request?