Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 475

Display CompressedDepth Image Python cv2

$
0
0
Folks, What is the correct way to subscribe to a CompressDepth (32FC1, plus, no regular depth image available) image and display (e.g., cv2.imshow) in Python? I can do this easily in roscpp, but I get an empty array rospy, even if I use something like: depth_image = cv_bridge.CvBridge().compressed_imgmsg_to_cv2(msg) Or depth_image = np.array(cv_bridge.CvBridge().compressed_imgmsg_to_cv2(msg)) And even: np_arr = np.fromstring(msg.data, np.uint8) image_np = cv2.imdecode(np_arr, cv2.CV_LOAD_IMAGE_UNCHANGED) Nothing works

Viewing all articles
Browse latest Browse all 475

Trending Articles