introlab / find-object

Find-Object project
http://introlab.github.io/find-object/
BSD 3-Clause "New" or "Revised" License
448 stars 189 forks source link

Unknown interpolation method in function resize #81

Open ghost opened 5 years ago

ghost commented 5 years ago

Hi,

First, I want to thank you your work and contribution to the ros community. Second, here are some questions I have regarding the installation of find-object package.

I installed ros-melodic apt and some other packages from source located in my catkin_ws, like find-object. As far as I undestand, opencv3 is a standard on melodic and the library will be automatically installed as specified on http://wiki.ros.org/melodic/Migration#opencv

The problem is, I guess, that I also have another opencv version installed (3.4) in /usr/local, which is built with CUDA. Therefore, I see some warning during compilation time:

/usr/bin/ld: warning: libopencv_core.so.3.4, needed by /home/nvidia/catkin_ws/devel/lib/libfind_object_2d.so, may conflict with libopencv_core.so.3.2

Anyway, building find-package from source is so far ok, but as soon as I try to read an image with find_object_2d I'm getting the following error:

OpenCV Error: Bad argument (Unknown interpolation method) in resize, file /build/opencv-XDqSFW/opencv-3.2.0+dfsg/modules/imgproc/src/imgwarp.cpp, line 3367 terminate called after throwing an instance of 'cv::Exception' what(): /build/opencv-XDqSFW/opencv-3.2.0+dfsg/modules/imgproc/src/imgwarp.cpp:3367: error: (-5) Unknown interpolation method in function resize

If I install find-object binaries with apt everything is working fine, so I guess there are some conflicts between libraries during compilation from source, isn't it?

How should I proceed If I want to be able to build find_object_2d from source but using my own opencv version? Shoudl I uninstall libopencv-dev and rebuild cv_bridge and all its dependencies using opencv 3.4?

matlabbe commented 5 years ago

Shoudl I uninstall libopencv-dev and rebuild cv_bridge and all its dependencies using opencv 3.4?

Yes, having only one version of opencv will solve a lot of problems.

Wuxinxiaoshifu commented 3 years ago

i also meet this problem.now i am using opencv3.4.5,but after build my project,warning is "libopencv_core.so.3.4, needed by /usr/local/lib/libopencv_features2d.so.3.4.5, may conflict with libopencv_core.so.3.2"

when i run my project, failure occurs that is: openCV Error: Bad argument (Unknown interpolation method) in resize, file /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/imgproc/src/imgwarp.cpp, line 3367 terminate called after throwing an instance of 'cv::Exception' what(): /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/imgproc/src/imgwarp.cpp:3367: error: (-5) Unknown interpolation method in function resize

the part of code is: Ptr orb = ORB::create(200); orb->setFastThreshold(10); orb->detectAndCompute(img1, Mat(), kp1, d1);

the below can't exeucate