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

OpenCV 3 support #89

Open
VictorLamoine opened this issue Nov 10, 2016 · 10 comments
Open

OpenCV 3 support #89

VictorLamoine opened this issue Nov 10, 2016 · 10 comments
Labels

Comments

@VictorLamoine
Copy link
Contributor

Kinetic ships with OpenCV 3 and industrial_calibration expects OpenCV 2, this makes CMake fails when checking OpenCV dependency.

At the moment I just replaced

find_package(OpenCV 2 REQUIRED)

with

find_package(OpenCV REQUIRED)

In the two CMake files requiring OpenCV

@edgeded
Copy link

edgeded commented Jan 3, 2017

Does this work for you? i.e. were you able to build all sources?
In my case CMake could find OpenCV 3 but fails building e.g. cirlce_detector

[ 85%] Building CXX object industrial_calibration/industrial_extrinsic_cal/CMakeFiles/industrial_extrinsic_cal.dir/src/circle_detector.cpp.o
In file included from .../industrial_calibration/industrial_extrinsic_cal/src/circle_detector.cpp:50:0:
.../industrial_calibration/industrial_extrinsic_cal/include/industrial_extrinsic_cal/circle_detector.hpp:101:46: error: ‘vector’ has not been declared
   virtual void detectImpl( const Mat& image, vector<KeyPoint>& keypoints, const Mat& mask=Mat() ) const;

I suppose this is due to different declarations in OpenCV 2 and OpenCV 3

@VictorLamoine
Copy link
Contributor Author

Yes I was able to build the sources by de-activating one or two features. I'll get back to you in an hour with a pull request to show you the changes!

@edgeded
Copy link

edgeded commented Jan 3, 2017

This would be great!
I tried some changes by myself but somehow I ended up in a mess.

@VictorLamoine
Copy link
Contributor Author

VictorLamoine commented Jan 3, 2017

Better late than never.. sorry!

#90, #92

@edgeded
Copy link

edgeded commented Jan 3, 2017

Unfortunately it doesn't work for me on Ubuntu 16.10
I cloned your https://github.com/InstitutMaupertuis/industrial_calibration but get building errors e.g.

.../src/industrial_calibration/industrial_extrinsic_cal/src/nodes/ros_robot_scene_trigger_action_server.cpp:22:
/opt/ros/kinetic/include/moveit/macros/declare_ptr.h:52:16: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
   typedef std::shared_ptr<Type> Name##Ptr;       

but thank you very much though!

@VictorLamoine
Copy link
Contributor Author

Ah, we need C++11 enabled. I'm using gcc 6 so C++14 is enabled by default, that's why I don't see this error.
I'll add that in the pull request right now.

@edgeded
Copy link

edgeded commented Jan 3, 2017

Thank you very much!

@VictorLamoine
Copy link
Contributor Author

VictorLamoine commented Feb 15, 2017

I tried used the calibration procedure again and now I get this error:

OpenCV Error: The function/feature is not implemented () in detectAndCompute, file /tmp/binarydeb/ros-kinetic-opencv3-3.1.0/modules/features2d/src/feature2d.cpp, line 144
[ERROR] [1487148390.729431750]: Exception thrown while processing service call: /tmp/binarydeb/ros-kinetic-opencv3-3.1.0/modules/features2d/src/feature2d.cpp:144: error: (-213)  in function detectAndCompute

[ERROR] [1487148390.729564226]: Service call failed: service [/TargetLocateService] responded with an error: /tmp/binarydeb/ros-kinetic-opencv3-3.1.0/modules/features2d/src/feature2d.cpp:144: error: (-213)  in function detectAndCompute

It happens only with the modified circle detector

@VictorLamoine
Copy link
Contributor Author

VictorLamoine commented Feb 15, 2017

Problem is here:
https://github.com/ros-industrial/industrial_calibration/blob/kinetic/industrial_extrinsic_cal/src/ros_camera_observer.cpp#L103

Solution is explained here:
http://stackoverflow.com/questions/30622304/opencv-3-blobdetection-the-function-feature-is-not-implemented-in-detectand

Not sure how I should modify the custom CircleDetector class.

@VictorLamoine VictorLamoine mentioned this issue Mar 1, 2017
@AustinDeric AustinDeric added the bug label Mar 7, 2017
drchrislewis added a commit to drchrislewis/industrial_calibration that referenced this issue Mar 21, 2017
@drchrislewis
Copy link
Member

I believe this is now fixed with retry_dynreconfig PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants