camera_calibration error related cv2

asked 2016-07-09 14:39:28 -0500

baozhang gravatar image

updated 2021-05-21 16:14:49 -0500

Orhan gravatar image

Hi, I would like to calibrate my camera and type command rosrun camera_calibration cameracheck.py

but error happened

Traceback (most recent call last):
  File "/opt/ros/indigo/lib/camera_calibration/cameracheck.py", line 52, in <module>
    import cv2
ImportError: /usr/local/lib/python2.7/dist-packages/cv2.so: undefined symbol: _ZN2cv11arrowedLineERNS_3MatENS_6Point_IiEES3_RKNS_7Scalar_IdEEiiid

I thought this was the problem related opencv and tried to check whether opecv worked or not. in terminal, I wanted to type 'python' and then 'import cv2'.

When I typed the latter command, the error below happened,

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /usr/local/lib/python2.7/dist-packages/cv2.so: undefined symbol: _ZN2cv11arrowedLineERNS_3MatENS_6Point_IiEES3_RKNS_7Scalar_IdEEiiid

I have no solution now.

Please help me to solve this problem.

edit retag flag offensive close merge delete

Comments

It seems like a library conflict, did you compile and install opencv from source? If so try deleting it and installing it again using sudo apt-get install libopencv-dev

Mehdi. gravatar image Mehdi.  ( 2016-07-11 03:53:12 -0500 )edit

The problem might be related to symbolic link. There is a cv2.so in /usr/local/lib/python2.7/dist-packages, but it is not liked to OpenCV(I don't know the detail...)

Thank you for replying and please let me know if you notice something.

baozhang gravatar image baozhang  ( 2016-07-12 05:01:19 -0500 )edit