0

Problems in using cv_bridge to convert ROS image to OpenCV image.

I created a virtual environment with Python 3.7.2 and OpenCV. I can import by using "import cv2"

The problem is in this line:

cv_image = self.bridge.imgmsg_to_cv2(data,"bgr8")

What I want to do is to get an image from ROS topic and display in cv2.imshow

ImportError: dynamic module does not define module export function (PyInit_cv_bridge_boost)

pedro_bb7
  • 1,601
  • 3
  • 12
  • 28
  • Does this answer your question? [Unable to use cv\_bridge with ROS Kinetic and Python3](https://stackoverflow.com/questions/49221565/unable-to-use-cv-bridge-with-ros-kinetic-and-python3) – hosh0425 Jul 02 '20 at 04:47

1 Answers1

0

Even though opencv2 could be import in python 3.7, there were some problems in using cv_bridge library. Solved by running my code using python older version (2.7). (python2 code_name.py)

pedro_bb7
  • 1,601
  • 3
  • 12
  • 28